Sort model history by time stamps
The model history should be sorted but it is not, for example this model:
COMPLETED 2024-11-16T15:45:10+01:00 use len from builtins
COMPLETED 2024-11-16T15:14:43+01:00 prop_data = Table (struct.temperature, time)
COMPLETED 2024-11-16T15:13:31+01:00 temp = (temperature: struct.temperature:array)
COMPLETED 2024-11-16T15:14:05+01:00 time = map((x: x*timestep), range(0, len(struct.temperature), 1))
COMPLETED 2024-11-16T15:15:05+01:00 rdf = prop_rdf.rdf:array
COMPLETED 2024-11-16T15:15:30+01:00 distance = prop_rdf.rdf_distance[0:1]:array
COMPLETED 2024-11-16T15:13:41+01:00 timestep = interval*prop.trajectory[0].description.timestep[0]
COMPLETED 2024-11-16T15:12:48+01:00 interval = prop.trajectory[0].description.interval[0]
COMPLETED 2024-11-16T15:13:01+01:00 struct = prop.trajectory[0].structure
COMPLETED 2024-11-16T15:14:19+01:00 prop_rdf = Property rdf, rdf_distance ((structure: traj_struct), (algorithm: algo_rdf))
COMPLETED 2024-11-16T15:12:22+01:00 algo_rdf = Algorithm RDF, many_to_one ((nbins: 100))
COMPLETED 2024-11-16T15:13:52+01:00 traj_struct = traj.structure
COMPLETED 2024-11-16T15:13:18+01:00 traj = prop.trajectory[0]
COMPLETED 2024-11-16T15:12:30+01:00 prop = Property energy, forces, trajectory ((calculator: calc), (structure: h2o), (algorithm: algo))
COMPLETED 2024-11-16T15:12:22+01:00 algo = Algorithm Langevin ((timestep: 1) [fs], (steps: 200), (interval: 10),
(temperature_K: 298.15) [K], (friction: 0.05 [1/fs]),
(trajectory: true), (logfile: true))
COMPLETED 2024-11-16T15:12:22+01:00 calc = Calculator emt (), task: single point
COMPLETED 2024-11-16T15:12:22+01:00 h2o = Structure from file 'h2o_box.cif'
In addition, if there are statements of more than one state, first the list should be sorted by state
and then by updated_on
.
Edited by Ivan Kondov