Set and update quaternions to multisphere

Submitted by keepfit on
medvedeg

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]

Wed, 20 Sep 2017 - 11:07 Permalink
keepfit

In reply to by medvedeg

"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]

Wed, 20 Sep 2017 - 21:36 Permalink
medvedeg

In reply to by keepfit

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.."

Thu, 21 Sep 2017 - 10:34 Permalink
keepfit

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

Wed, 20 Sep 2017 - 13:17 Permalink
Mectro

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,

Fri, 1 Oct 2021 - 15:00 Permalink

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