4
$\begingroup$

I'm annealing a system and setting multiple fixes in the same input script to change the thermostat parameters. When the below is contained in the input file (for example), the simulation completes and all other output files write successfully - but the trajectory file is empty.

fix            ID all nvt temp 300.0 400.0 100.0 tchain 1 #anneal 300K to 400K
run            500000
fix            ID all nvt temp 400.0 400.0 100.0 tchain 1 #hold at 400K
run            500000

dump           ID all dcd 10000 trajectory.dcd

However, when removing all but one of the fixes (i.e., to run a simulation at constant T) - keeping everything else in the input file the same - the trajectory file is written as normal.

fix            ID all nvt temp 300.0 300.0 100.0 tchain 1 #hold at 300k
run            500000

dump           ID all dcd 10000 trajectory.dcd
$\endgroup$
1
  • 1
    $\begingroup$ Can you try with unfix ID after first NVT then put fix NVT again $\endgroup$ Commented Nov 2, 2022 at 2:01

1 Answer 1

4
$\begingroup$

First of all, if you are using multiple fix with different conditions, you must unfix the previous fix before going into the next condition, else you would still have the first fix in place along with a new fix. This is a very bad practice and may generate dubious results.

Secondly, you have used the dump command after run, which means you are asking LAMMPS to store trajectories after the simulation is completed. This will not store the trajectories as you have requested (every $10000$ step).

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .