Formatting of OUTPUT as YAML
OUTPUT is largely in YAML format but is still not parseable fully.
The goal is to keep the human readable character but moulding the content so it is also YAML compliant.
-
comment progress data -
warnings and special info commented -
control_output.F90 information conformant -
enforce a check in the tests (e.g. loading OUTPUT with ruamel.yaml
inrun_test.py
.
Older issue text
I think we were interested in molding OUTPUT to YAML format. Or at least having that as an option like io_statis_yaml
. This would certainly free me from having to grep random stuff.
The main job I think will be the timestep progress data, which we should agree on a yaml template that is reasonably compact, like the current output blocks.
----------------------------------------------------------------------------------------------------------------------------------
step eng_tot temp_tot[K] eng_cfg eng_src eng_cou eng_bnd eng_ang eng_dih eng_tet
time[ps] eng_pv temp_rot[K] vir_cfg vir_src vir_cou vir_bnd vir_ang vir_con vir_tet
cpu [s] volume temp_shl[K] eng_shl vir_shl alpha[o] beta[o] gamma[o] vir_pmf press
----------------------------------------------------------------------------------------------------------------------------------
0 -4.3783E+01 1.0000E+01 -4.4428E+01 -4.4428E+01 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00
0.00000 -4.3771E+01 0.0000E+00 1.0792E+01 1.0792E+01 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00
0.077 1.8191E+04 0.0000E+00 0.0000E+00 0.0000E+00 9.0000E+01 9.0000E+01 9.0000E+01 0.0000E+00 -2.7530E-01
rolling 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00
averages 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00
0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00
----------------------------------------------------------------------------------------------------------------------------------
Perhaps
steps:
10:
cpu_time: 1.057
state: {volume: xxx, pressure: xxx, energy: xxx, enthalpy: xxx, temperature: xxx}
energy_contributions: {config: xxx, short-ranged: xxx, electrostatics: xxx, bond: xxx, angle: xxx, dihedral: xxx, tether: xxx}
virial_contributions: {config: xxx, short-ranged: xxx, electrostatics: xxx, bond: xxx, angle: xxx, dihedral: xxx, tether: xxx}
core-shell: {temperature: xxx, energy: xxx, virial: xxx}
cell: {alpha: xxx, beta: xxx, gamma: xxx}
rotational_temperature: xxx
virial-pmf: xxx
20:
cpu_time: 2.04
state: {volume: xxx, pressure: xxx, energy: xxx, enthalpy: xxx, temperature: xxx}
energy_contributions: {config: xxx, short-ranged: xxx, electrostatics: xxx, bond: xxx, angle: xxx, dihedral: xxx, tether: xxx}
virial_contributions: {config: xxx, short-ranged: xxx, electrostatics: xxx, bond: xxx, angle: xxx, dihedral: xxx, tether: xxx}
core-shell: {temperature: xxx, energy: xxx, virial: xxx}
cell: {alpha: xxx, beta: xxx, gamma: xxx}
rotational_temperature: xxx
virial-pmf: xxx
...
- We could verify this by adding yamllint (python) https://github.com/adrienverge/yamllint#installation to the ctest
- Currently lots of little issues
yamllint OUTPUT
../Ar-large/OUTPUT
1:2 warning missing starting space in comment (comments)
2:2 warning missing starting space in comment (comments)
3:2 warning missing starting space in comment (comments)
4:2 warning missing starting space in comment (comments)
...
26:1 warning missing document start "---" (document-start)
28:17 error too many spaces after colon (colons)
55:35 error too many spaces after colon (colons)
61:40 warning truthy value should be one of [false, true] (truthy)
# etc.
Edited by Harvey Devereux