Some advice on getting uniform water density

Dear all,

I used fix nve/limit and langevin to dissipate high-potential energies near the interfaces (water- carbon nanotube). Then, I used fix npt to set the water density constant everywhere at T=298 k and P=1 atm.

fix NPT solvent npt temp 298.0 298.0 1000.0 iso 1.0 1.0 1000.0

Unfortunately, simulation box is drifted when I used fix npt ( Maybe, it is because of incompressibility) So, I tried with fix press/berendsen and fix nvt, But again I got an error, bound atom missing.

Is there any other simple method to have uniform water density at T=298 K and P=1 atm?

Thanks

What does it mean?

Also what is your system exactly? Are the carbon nanotube freely diffusing inside the water phase?

I have a simple system. It is a CNT located in the water box
I used the following command for CNT to freeze it:

velocity cnt set 0 0 0 units box
fix NOFORCE1 cnt setforce 0 0 0

I located my CNT at the center of my water box. But using fix npt will move a part of CNT outside the box. So the number of Oxygen atoms iside the CNT are decreasing over the time.

This makes no sense. You cannot have atoms “outside the box”. This is more likely an issue of not correctly interpreting the results of your simulation when visualized.

Using NPT requires care when the system is partially frozen. Your issue would probably not appear with a fully thermalised system.