the total momentum is not zero

Hello, users

I have a doubt that the total momentum of my system is not zero, and the system has always had the translational drift, even if the velocity scaling is performed. Below is part of my script file

group h2o type 1 2

group c6h14 type 3 4 5
group sio2 type 6 7 8 9

group flow union c6h14 h2o

velocity all create ${t} 4928459 loop local dist gaussian units box
min_style cg

minimize 1.0e-12 1.0e-12 10000 10000

reset_timestep 0

write_data LL-sio2.init2.data
fix wshake h2o shake 0.0001 50 0 b 1 a 1 mol h2omol

fix Rsio2 sio2 rigid/small molecule
fix fixnpt flow npt temp $t $t 100 z 1.0 1.0 1000
thermo_style custom step etotal temp vol press density

thermo 1000

timestep 1.0

dump 1 all custom 240000 LL-npt.lammpstrj id type x y z

dump_modify 1 sort id
run 0

velocity all scale $t
run 12000000

Is there anything wrong with my Settings? Looking forward to your reply.

With regards!

zhang

velocity scaling does NOT remove a center of mass drift, in fact, it tends to enhance it (thus using berendsen thermostat often leads to a larger drift than others).

there is nothing in your input that actually removes a drift. with having multiple types of rigid objects in the system, there is a good chance that your initial velocity assignment will not cancel out.

since non-equilibrated systems are more likely to pick up a COM drift, the recommended procedure is to run for a bit, so that your system is mostly equilibrated and then use the velocity command to remove any residual drift (see the “zero” option).

if this is insufficient, you can also use fix momentum to regularly (but not too often!) remove any residual COM drift that would accumulate.
note, that COM fluctuations are quite normal and you don’t want to suppress those (and negatively impact your dynamics).

a couple other changes that may have a minor impact but are good practice anyway:

  • translate your initial coordinates so that the origin is in the center of the box
  • do the variable cell adjustment in the rigid integrator and use fix nvt instead of fix npt

axel.

axel

Thank you very much for your detailed explanation.

I have some questions about your reply. Do you mean that I do not need to set velocity scaling, but need to remove the residual drift (through velocity “zero” option) after running for a period of time to balance?
In addition, in the column of “remove the residual drift” on the mailing list, Steve suggested that the other party use rigid/NVT/small to replace rigid/smal. Why is that? Is it useful for removing the residual drift.

ZHANG

axel

Thank you very much for your detailed explanation.

I have some questions about your reply. Do you mean that I do not need to set velocity scaling, but need to remove the residual drift (through velocity “zero” option) after running for a period of time to balance?

i hate it when people ask me to explain the same thing multiple times. i wrote what i meant to write and my advice remain the same. so just re-read my previous e-mail since you apparently did not read it with sufficient attention to detail.

In addition, in the column of “remove the residual drift” on the mailing list, Steve suggested that the other party use rigid/NVT/small to replace rigid/smal. Why is that? Is it useful for removing the residual drift.

i am not a mind reader, so i cannot know any context (there are between 300 and 500 e-mails every month) whether this applies to a COM drift (unlikely) nor do i know why steve gave the recommendation (i can’t read his mind either), so it makes no sense to ask me this question. again, my explanations for why one can get a COM drift and what to do about it in my previous e-mail was meant to be of general nature and includes all that i can recommend. you should follow those instead of speculating.

axel.

I’m very sorry to make you feel uncomfortable. Thank you for your patient reply. Blame me for not understanding your email in detail, I will read your previous email carefully.
Thank you very much.

ZHANG