Set and update quaternions to multisphere

Submitted by keepfit on Wed, 09/20/2017 - 09:09

In Liggghts, can we set an initial quaternion and update it for a multisphere particle, or hybrid sphere molecule clump?
Same as asphere, can we also output the cumulative quaternion (compare to quaternion at time = 0) of each clump/multisphere?
Such that we can not only track the positions (center of mass) but also the degree of rotation of all clumps.

Greetings,
David

medvedeg | Wed, 09/20/2017 - 11:07

Hallo David,

try something like this for dumping quaternions into files:

compute quat all multisphere property masstotal

and this

dump dmpLocal all local 100 post/dump*.multi.dmp c_quat[1] c_quat[2] c_quat[3] c_quat[4]

Alexander Podlozhnyuk

keepfit | Wed, 09/20/2017 - 21:36

"compute quat all multisphere property quat" does work with "dump ID groupID local ......."
However, is there any way to use

dump ID groupID custom ..... x y z vx vy vz radius c_quat[1] c_quat[2] c_quat[3] c_quat[4]?

[Error: Dump custom compute does not compute per-atom info]

medvedeg | Thu, 09/21/2017 - 10:34

As written in the error message, dump custom works only with per-atom data. Quaternions are stored per-multisphere particle, not per-atom. To dump positions and velocities of each multispherical particle you must call "compute xcm all multisphere property xcm" and "compute vcm all multisphere property vcm" and add c_xcm[1] c_xcm[2] c_xcm[3] c_vcm[1] c_vcm[2] c_vcm[3] to "dump .. local.."

Alexander Podlozhnyuk

keepfit | Wed, 09/20/2017 - 13:17

Thanks, Alex, I will try this out.
PS: Can we associate quaternion to a multisphere with specific ID? I.e. treat quaternion like other properties mass of center, principal moment of inertia

govind | Thu, 09/28/2017 - 11:13

Hi Alex,

How do I visualize those dump files for multisphere?

Govind

Mectro | Fri, 10/01/2021 - 15:00

Hi Alex,
For my own multi sphere simulation I've been trying to validate the orientation vectors produced using the quaternion dumps. Are quaternions calculated based of the orientation of the template file? In my case the template is along the z axis, so i've been using q(0i + 0j +1k)q* to find the new orientation vectors. These don't match when I calculate an orientation vector by using the xyz positions of two spheres in my multisphere template.

Thanks,