COM drift when using fix rigid/nvt/small on CO2 molecules

Dear LAMMPS Users,

I am simulating the equilibrium behavior of a CO2 decane mixture in a 70A cube box with PBC in all directions. Since CO2 is a 3-sites linear molecule, I used fix rigid/nvt/small to keep the CO2 angle to be 180. Fix nvt is applied on decane separately.

When I check the center of mass velocity, I noticed a notable center of mass drift even after manually removing the COM velocity with fix momentum command.


I am wondering what caused this. Also, is it physical to keep removing the COM velocity during the simulation?

Best wishes,
Hongwei

I don’t think that fix momentum will have an effect on rigid bodies. Their fix maintains per-body velocities (for translation and rotation) and creates the corresponding per-atom velocities from them.
You would have to stop the run, adjust the velocities with the velocity command and reinitialize the rigid bodies to remove any drift.

Thank you for the suggestion. I will use the velocity command.

As for the reason for the drift, do you have any idea? The drift velocity seems quite large.

That is difficult to say without knowing more. There are many possible reasons: the initial velocity assignment, the choice of time step, bad interactions between the two molecule models, boundary conditions or system manipulations that are not mentioned, or a combination of those.

Sorry for the late reply. Thank you for giving the possible reasons. I will keep checking them. I attached the files I used for the simulation below. It would be very helpful if you could take a look when you have time.
70A_cube.zip (398.2 KB)

My first suspect is always the timestep. Integrating the equations of motion for rotating rigid bodies is much more sensitive to the timestep than motions of atoms. I would check with 0.5 fs or even 0.2 fs or 0.1fs.

I actually tried to use timestep 0.1 but this didn’t prevent the COM drift.

You have to check after the system is properly equilibrated and any existing drift removed at that point.

Got it. I used the fix momentum to remove the velocity before that rerun. I will use the velocity command this time to check the drift again. Just to make sure, I can use the keyword ‘rigid’ in the velocity command to keep CO2 rigid right?

It does what the documentation says it does.