How can stop overwriting?

Hi dear all LAMMPS users
We need to keep “fix nvt…” command after equilibrium phase in the simulations.
on the other hand in MD phase we need to move a nanotube. To prevent overwriting fix commands, we decided to use “Velocity set…” instead of “fix move…”, but the problem is another “velocity set…” command was inserted previously. so the second one is overwritten on the first one, Does anyone have an idea about that?

In short term:

Equilibrium phase

velocity Group1 set 0.0 0.0 0.0 units box
fix nvt all nvt temp 300.0 300.0 $(100.0*dt)

MD phase

velocity SiNT set 0.0 2.0 0.0 units box
###########################################
Problem is: Group1 is moving in MD phase

Hello,
The problem here is that velocity set only imposes the velocities on the first step of the run, but velocities are then being updated by the nvt command.
To avoid velocities of Group1 to be updated, you can use the set_force command (in addition to the velocity set), to cancel all the forces applied on Group1 (and thus cancel all acceleration).
Simon

1 Like