appending colvars output to file

Hello all,

When a colvars job is restarted, is there a way to append the output to “out.colvars.traj” from previous run?

Right now, when I restart a job using a lammps restart file, it overwrites out.colvars.traj each time.


Hello Jamal/Ali, it is not recommended to append to a file, because if either the old job or the new job end abnormally, you can easily end up with a corrupted file.

It’s best to change the file name from “out.colvars.traj” (which is only an example) to something that changes each time you restart the job.

You can always concatenate .colvars.traj files from consecutive jobs after they are written, using this script:
It does also some rudimentary plotting, but the main feature is selecting a few variables (useful when you defined many) and saving their trajectory in a single file with few columns that can be processed more conveniently.