Vector components multiplication

Dear LAMMPS users,

I want to know if there is a way to multiply each component of a vector.
I'm going to calculate first the center of mass velocities for single rigid bodies, and I can access them with the following code :

compute velcm all rigid/local NPT_EQL vx vy vz mass

But, for my application, at this point I need to multiply each vector components (i.e. the single center of mass velocity vx, vy, vz) with the each others.
I mean : vx*vy, vx*vz and vz*vy for each rigid body and access them with a variable.

Thank you in advance for your reply.



You can dump those quantities to a.dump local output file.
And then post-process them however you wish.

But there is no current way to do math on them inside a LAMMPS script.
That would require something like a “local” variable be added
the variable command.

Possibly there is some way to pass them to a piece of Python
code via a Python variable (see the variable command)
and have it do the computation you wish.