# Problem of rotation of rigid H2O molecule

Hello,

I want to give H2O molecule a angular velocity: W = [1,0,0]. I calculate first the velocity of atoms in H2O, then I use “velocity set” to add velocity for every atom.
It seems that the rotation of H2O is unstable, angular velocity W always changes and the axis of rotation is uncertain.
I have tried these issues:

1. use “fix rnvt H2O rigid/small molecule” to fix atoms.
2. change timestep from 1 fs to 0.001 fs.
3. use "boundary f f f " to avoid the interaction by itself.

Regards,
Meng

rot_test.in (2.81 KB)

H2O.conf (728 Bytes)

Hello,

I want to give H2O molecule a angular velocity: W = [1,0,0]. I calculate
first the velocity of atoms in H2O, then I use "velocity set" to add
velocity for every atom.
It seems that the rotation of H2O is unstable, angular velocity W always
changes and the axis of rotation is uncertain.
I have tried these issues:
1. use "fix rnvt H2O rigid/small molecule" to fix atoms.
2. change timestep from 1 fs to 0.001 fs.
3. use "boundary f f f " to avoid the interaction by itself.

​have you debugged what kind of velocities, you are assigning?

when i run your input deck, i get:

velocity H2O_O set 0 0 -0.0514777777777766 units box
velocity H2O_H1 set 0 0 -0.0514777777777766 units box
velocity H2O_H2 set 0 0 0.875122222222224 units box

​this doesn't look right for the rotation around a principal axis.

Hello Axel,

I think the velocities are right.
The H2O’s initial position is at x-y plan like this:

H

\ . Mass Center
O—H

And the H2O should rotate around X axis with any Vx=0, Vy=0, Vz(Ox):Vz(Hy1):Vz(Hy2) = -1:-1:17.
But when you visualize “equil.lammpstrj” you can see clearly the rotation axis is unstable.

Regards,
Meng