Fw:Re: Question occures during the use of fix npt

Dear Prof. Thompson, Thompson,

Thanks for your reply, but I still have a problem. When there is only a particle containing 120 formic acid molecules in my system. The ‘in’ file is written as follow:

fix a2 formic rigid/npt molecule temp 180 180 100 iso 1.0 1.0 1000 .

The simulation still crashes after some steps. The change of pressure and volume is similar to the situation mentioned before, i.e., the volume of the system decreases monotonically from a=8nm to a=3.6nm. Then the simulation crashes. The change of pressure is shown as follow. Although there is no water and fix shake in the system, it still fails. I’m confused by why the fix rigid/npt cannot been used to control the pressure of formic acid molecules.

E3DA2E6A@...5902....jpg
I hope you can give me some advice again.

Thanks very much, and I’m looking forward to hear from you.

Best regards!

Zhang Chao

Hi Zhang Chao,

can you send the input script and data file that produces the issue? I can take a look.

-Trung

E3DA2E6A@...5902....jpg

Dear sir/madam,

The ‘data’ and ‘in’ file have been put in the attachment. Thanks very much for your help!

Best regards!

Zhang Chao

Dear sir/madam,

The ‘data’ and ‘in’ file have been put in the attachment. Thanks very much for your help!

Best regards!

Zhang Chao

0nacl0h2o.lammps05 (165 KB)

in.ch2o2 (2.42 KB)

Hi Zhang Chao,

the timestep of 1 fs appears to be so big that it causes numerical instability for the npt rigid body integrator (more specifically, for the integration of the thermostat chains coupled with the barostat). Also, for with a small system like yours (i.e. 120 rigid bodies), large fluctuations in pressure are to be expected, which further makes the integrator easily unstable even with a smaller timestep.

I would suggest you 1) try a smaller timestep, e.g. 0.1 fs and a bigger system, e.g. ~1000 rigid bodies, or 2) not use fix rigid/npt for the group of rigid bodies in your case.

Best,

-Trung

I agree that there is a problem with numerical stability when rigid/npt (or npt) is subjected to a large initial transient. However, making the system bigger is not a good solution. Also, it should not be necessary to make the timestep any smaller than is required for stable NVE integration. I suggest the following:

Don’t start the main simulation with a system that is very far from equilibrium. I did a test where I first equilibrated the system using fix npt/rigid, but stopped it before it crashed, so the density was close to the equilibrium value (not off by 10x like your simulation). I then did unfix npt/rigid and issued a new fix npt/rigid command to reset all the internal variables the fix. After that, the simulation remained stable. See attached script.

Aidan

in.ch2o2_fast (2.3 KB)