About fix shake of H2O2

Hello, lammps users

I want to build bulk solvation of H2O2, before that I tried a single molecule and see if it is OK. But somehow it shows error " Shake clusters are connected ".
the data is below:
4 atoms
3 bonds
2 angles
1 dihedrals
0 impropers

2 atom types
2 bond types
1 angle types
1 dihedral types
0 improper types

-35 35 xlo xhi
-35 35 ylo yhi
-35 35 zlo zhi

Masses

1 1.008 # HGP1
2 15.9994 # OG311

Pair Coeffs # lj/charmm/coul/long

1 0.046 0.400013524445 0.046 0.400013524445 # HGP1
2 0.1921 3.14487247504 0.1921 3.14487247504 # OG311

Atoms # full

1 1 2 -0.5 1 1 0 # OG311
2 1 2 -0.5 -0.453 1 0 # OG311
3 1 1 0.5 1.111 1 -0.97 # HGP1
4 1 1 0.5 -0.564 1.001 0.97 # HGP1

Bond Coeffs # harmonic

1 545 0.96 # HGP1 OG311
2 428 1.42 # OG311 OG311

Bonds

1 2 1 2 # OG311 OG311
2 1 1 3 # HGP1 OG311
3 1 2 4 # HGP1 OG311

Angle Coeffs # charmm

1 60 101.5 0 0 # HGP1 OG311 OG311

Angles

1 1 1 2 4 # HGP1 OG311 OG311
2 1 2 1 3 # HGP1 OG311 OG311

Dihedral Coeffs # charmm

1 0.18 3 0 1 # HGP1 OG311 OG311 HGP1

Dihedrals

1 1 3 1 2 4 # HGP1 OG311 OG311 HGP1

And the fix shake command I use is this:

fix rigid_H2O2 all shake 0.0001 10 100 b 1 2

I have read the lammps documentation and lots of issue discussions about fix shake, the most likely problem is from one of the letters saying that there might be mis-connected bond between two H, but it is clear that there is only 3 bonds per molecule in my data.

after that, I try
fix rigid_H2O2 all shake 0.0001 10 100 b 1
and
fix rigid_H2O2 all shake 0.0001 10 100 b 2

and
fix rigid_H2O2 all shake 0.0001 10 100 a 1 b 1

and
fix rigid_H2O2 all shake 0.0001 10 100 a 1 b 2
and
fix rigid_H2O2 all shake 0.0001 10 100 t 1 (or t 2)

they all worked fine, however once I do combinations like

b1 t2
or
a1 t2

it just shows error “Shake clusters are connected”
and i really cannot see how they are connected

any help is appreciated, thank you

Hello, lammps users

I want to build bulk solvation of H2O2, before that I tried a single molecule and see if it is OK. But somehow it shows error " Shake clusters are connected ".

[…]

it just shows error “Shake clusters are connected”
and i really cannot see how they are connected

fix shake in LAMMPS has documented(!) limitations for improved parallelisation.
you can only constrain bonds, that connect bonds that are constrained.
i.e. it is ok to constrain all bonds between carbon and hydrogen in an alkane, but you cannot constrain the carbon-carbon bond connecting them. each group of C-H bonds would be called a cluster and constraining the C-C bond would connect the clusters, which is not supported. also you can only constrain an angle, if both bonds forming that angle are also constrained, since that angle constraint is actually internally converted to a constraint of a bond connecting the two outer atoms of the angle.

thus with fix shake in LAMMPS you can constrain the O-H bonds in H2O2, but not also the O-O bond, as that would connect the two “clusters” of O-H bonds. the angle constraint would not be applied, either (as can be seen from the output). the angle constraint is mostly meant for water molecules, anyway.

thus LAMMPS is behaving as documented.

axel