Dear LAMMPS users,
I am simulating a system of water, hydrogen, and ions (Na, Cl). The water molecule is four site TIP4P 2005. since it is four-sited, I use fix rigid instead of fix shake. Because the ions are single particles, I can not rigid them, so I use different fixes: 1) fix rigid (for water and hydrogen) and 2) common fix (which is not rigid for ions).
when I use NVE or NVT ensemble, the mentioned approach works fine. however, I want the NPT ensemble to equilibrate the pressure too. But, we can not have two fixes that change the simulation box. Can you guide me on how to use NPT in this case?
Hello,
For tip4p water model, instead of fix rigid, simply use fix shake together with:
pair_style lj/cut/tip4p/long 1 2 1 1 0.1546 12.0
kspace_style pppm/tip4p 1.0e-4
where 1 2 1 1 are the water-oxygen type, water-hydrogen type, water-bond type and water-angle type, respectively. 0.1546 is the distance between the water-oxygen and the water-M point of tip4p.
Then you can use fix NPT without any issue.
Simon
provided the oxygen and hydrogen atoms are ordered in the data file in the specific way that the tip4p style versions expect.
Many thanks for your reply. Regarding the method you mentioned, I cannot run it on GPU, but it works on CPU. I am using LAMMPS Aug 2018.
I tried these approaches to run LAMMPS tip4p on GPU:
package gpu 1 neigh yes newton off
suffix gpu
pair_style lj/cut/tip4p/long 1 2 1 1 0.1546 10
kspace_style pppm/tip4p 1e-05
ERROR: Pair style lj/cut/tip4p/long requires newton pair on (…/pair_lj_cut_tip4p_long.cpp:467)
when I set the newton pair on (package gpu 1 neigh yes newton on), I get:
ERROR: Illegal package gpu command (…/fix_gpu.cpp:176)
Last command: package gpu 1 neigh yes newton on
In the past month I asked how to run this TIP4P model on GPU, which Mr. akohlmey replied and said to offload the pair style into GPU. I tried it and it did not work
package gpu 1 neigh yes newton off pair/only on
suffix gpu
ERROR: Illegal package gpu command (…/fix_gpu.cpp:165)
Last command: package gpu 1 neigh yes newton off pair/only on
** I should run my simulations with GPU, that’s why I used the four site instead of using LAMMPS TIP4P. Once I ran my simulation on CPU, the simulation lasts for weeks, therefore I can not use CPU version. I would appreciate your help to use LAMMPS TIP4P with GPU.
I am not using LAMMPS on GPU, but I think you should have a look at :
lj/cut/tip4p/long/gpu
and update your LAMMPS version !!! Aug 2018 is really old, particularly if you want to use GPU.
ERROR: Unknown pair style lj/cut/tip4p/long/gpu (…/force.cpp:262)
Last command: pair_style lj/cut/tip4p/long/gpu 1 2 1 1 0.1546 10
Of course, I told you to update your LAMMPS version.