[lammps-users] question about some fix commands

Dear LAMMPS users,

I have a system involved with O and H atoms. I want to keep OH bond fixed and also keep O atoms fixed (freeze, not move).
I expect there are two possible ways to realize this:

(a)

fix 1 Oxygen setforce 0.0 0.0 0.0
fix 2 Oxygen nve
fix 3 O_and_H shake 0.000010 10 0 b 1

(b)

fix 1 Oxygen nve/noforce
fix 2 O_and_H shake 0.000010 10 0 b 1

but both may have some problem:
for (a), the O atoms may move, since the SHAKE command will add addtional force to O atoms (if the SHAKE command comes later than setforce).
for (b), O atoms will not move (we update the position without force), but this may make the SHAKE command not accurate, since we only consider the additional force caused by SHAKE on H atoms.

Anyone have some advice on this? or did I misunderstand the SHAKE command or something else?
Any suggestions will be appreciated!

M.H.

For (a), just make the fix setforce the later fix. Or don't integrate
the O atoms, then they won't move.

Steve