Dear Lammps exports,

I use Gay-berne model to simulate ellipsoidal particles. I wanna specify each particle's orientation. So I did the following:

variable theta atom -asin(x/sqrt(x^2+y^2+z^2))/PI*180

set group LC quat 0 z -y theta

But the quaternion is still (1,0,0,0) at the initial configuration. If I do the following, it works:

set group LC quat 0 0 1 90

I couldn't figure it out. Could you help me with it? Thank you in advance.

Regards,

Rui Zhang

Dear Lammps exports,

I use Gay-berne model to simulate ellipsoidal particles. I wanna specify each particle’s orientation. So I did the following:

variable theta atom -asin(x/sqrt(x^2+y^2+z^2))/PI*180

set group LC quat 0 z -y theta

But the quaternion is still (1,0,0,0) at the initial configuration. If I do the following, it works:

set group LC quat 0 0 1 90

I couldn’t figure it out. Could you help me with it? Thank you in advance.

Please re-read the documentation for the variable and set command. Your script is incorrect.