[lammps-users] using rigid and flexible models simultaneously

Dear all,

I want to simulate the contact angle of a spherical water droplet surrounded by CO2 molecules on a surface. I want to use rigid Trappe force field for CO2, flexible SPC water model for water. The ensemble of the simulation is NPT. Since water molecules are flexible and CO2 molecules are rigid, I have to use different fix commands. So, I use these commands:

fix 2 water npt temp 323.0 323.0 100 z 200.0 200.0 1000.0 couple none

fix 3 co2 rigid/npt/small molecule temp 323.0 323.0 100 z 200.0 200.0 1000.0 couple none

and I get this error: "ERROR: Must not have multiple fixes change box parameter z (src/domain.cpp:164) "

It is impossible to use two NPT commands since both control and change the simulation box. I wonder if it is correct to use NVT fix command for flexible water and rigid NPT fix command for CO2 as follows:

fix 2 water nvt temp 323.0 323.0 100

fix 3 co2 rigid/npt/small molecule temp 323.0 323.0 100 z 200.0 200.0 1000.0 couple none

Best wishes,

Neda

yes. since you MUST NOT have two barostats you can use fix npt only for either the rigid or the non-rigid part of the system.
that fix will also do the scaling of the entire system according to the changes of the box. because of that, it is usually preferred to use the barostat with the rigid objects and the thermostat with the flexible part of the system.

axel.