Dear Axel,
First of all, I would like to thank you for your tips and instructions. After the above discussions, I searched “flying ice cube syndrome” within the LAMMPS forum and found several threads! The journey was very informative.
I am just posting to report back my experimentations on the case and share the results with the LAMMPS community for future reference. Meanwhile, your final comments on my queries would be very much appreciated and illustrative.
First, I applied the following revisions to my model:
- Excluding intra pair interactions within rigid-body molecules (Warning: “Neighbor exclusions used with KSpace solver may give inconsistent Coulombic energies,” due to long-range solver via the kspace-solver),
- Delete bonds, angles, …, within rigid-body molecules,
I further separately computed the temperature of mobile and rigid groups after subtracting out the COM velocity of each group using “compute temp/com,” and then using “fix_modify temp,” the fix temperatures were asked to be modified based on each group’s compute. As also noted in the documentation, “compute temp/com” substracts out constrained DOF due to different fixes (i.e., “fix shake” and “fix rigid” in our case), and consequently, the temperature of groups is computed more correctly.
Q1: The latter modifications led to a 4% increase in the density of the bulk system after NPT when compared to the non-modified fixes! Regardless of whether the revised density better replicates experimental results or not (i.e., experimental outputs are very limited for this system, we expect our own experimental characterizations to pop up soon), is it technically more accurate to modify each fix temperature when we have a mixture of mobile-rigid molecules in a system?
Applying the above modifications (plus reducing the timestep, …), the movement of COM still existed. Therefore, I implemented other remedies suggested by you above and in the other threads. The MD code included 1 ns NVT at lower density and then, 1 ns NPT to find the equilibrium density of the system.
1- velocity zero linear
I called this command with different frequencies within the equilibration phase. The displacement of COM is shown below. As seen, this velocity zero linear command needs to be recalled at finer frequencies for a shorter displacement of overall COM!
I further implemented your recipe for writing a data file after the system reached a somewhat equilibrium (obtained for the above system after applying velocity zero every 5000 steps), and then cleanly re-initialized an MD simulation using the datafile. The movement of COM started again! So, it seems that the COM of the system containing small rigid HF molecules will not stop moving without frequent modification of velocity distribution!
2- fix momentum linear rescale
I read in one of the previous threats that you warned about the frequency of calling fix momentum, in a way that calling fix momentum in every step could make matters worse since this enforces truncation to the floating point resolution, and thus creates noise. In contrast, applying fix momentum every few steps allows some cancelations of the errors due to the coarseness of floating point numbers and non-associative summation. Therefore, I examined the effect of different frequencies on the movement of COM in the system. As seen, even the calling frequency of 1000 for fix momentum can efficiently cancel the net momentum on the COM of the system.
Q2: Upon the explanations/results above, is it technically acceptable to apply “fix momentum linear rescale” during the course of MD equilibration and production runs? Does the command alter the dynamics of the system hugely?
i.e., I am thinking of performing the production runs under NVE; therefore, I think the COM won’t drift drastically in the absence of thermostats. In this case, we might not need to apply fix momentum for the production runs.
Thank you, once again, for all your support.
Regards,
A