any alternative to fix shake??

Dear lammps users,

I am trying to simulate clay layers in water box using CLAYFF forcefield.

I have modelled clay structure using its unitcell and added H( type zh and type 13). the system also has water molecules where water H are given Wh type ( type 1). I have grouped water.

when I am trying to equilibrate system, by using fix shake for bonds attached to type 1 and 13 atoms( i.e water and clay H) the simulation is just stopped after minimization and is not reporting any error.

But i have observed that the simualtion is running without fixshake…

Is there any alternative to fix shake command in lammps so as to constrain bonds attached to H.

Any of your suggestions are of great help.

Here I am enclosing the forcefield, lammps data file.

The input script I used is


units real
dimension 3
boundary p p p
atom_style full

Atom Definition

include CLAYFF-withH.frc


group water type 1 2
group cation type 6
group mont type 3 4 5 7 8 9 10 11 12 13
group ca_mont type 3 4 5 6 7 8 9 10 11 12 13

generate initial velocities for atoms using gaussian distribution

velocity all create 298 123456 dist gaussian rot yes mom yes
velocity ca_mont set 0.0 0.0 0.0

set the force on clay and cations to zero…only simulate water

fix freeze ca_mont setforce 0.0 0.0 0.0

#initial minimization
minimize 1.0e-6 1.0e-6 10000 10000


reset_timestep 0

#use NVT ensemble for further minimization
fix NVT all nvt temp 100 100 1000 tchain 1

#constrain bonds attached to hydrogen
fix shake all shake 0.0001 100 0 b 1 2 3 a 1

#fix the center of mass for CLAY
fix COM ca_mont recenter INIT INIT INIT units box

output data every 1000 timesteps

thermo 1000
thermo_style custom step dt time temp press pe

timestep 0.5

run for 100 ps

restart 10000 restart.1 restart.2
run 200000

undump traj
unfix NVT
unfix freeze
unfix shake
unfix COM

write_restart eq1-nvt.*.lmp
shell rm restart.1 restart.2

CLAYFF-withH.frc (2.74 KB)

something is happening, you may not see it.
just switching away from using fix shake is not solving the problem.
instead, a) please let us know exactly what LAMMPS version you are using and what platform you are running on, b) if you don’t do so, if at all possible, please try out the latest LAMMPS version (7 Aug 2019 at this moment) and see, if the issue can be reproduced. c) if b) doesn’t help, please try to build a minimal example system, that can be quickly run and reproduce the issue. for somebody else to help you debugging, this step is essential. d) if for some reason c) is not an option, please try running under a debugger and see what message the debugger prints when the run stops. type “where” to get a stack trace and report it here.