Hi LAMMPS users,
I’m using LAMMPS version 3 Mar 2020
I have been working on simulating a customized 2D Vicsek model using LAMMPS, where I have created rigid bodies with custom shapes. However, I am facing challenges in accessing the angular velocity of each rigid body to apply torque correctly.
My approach so far has included using fix rigid/small
for each rigid body and the compute rigid/local
command to retrieve the angular velocity (omegaz
) for each rigid body. Unfortunately, I keep encountering various errors, especially when trying to access this information.
I attempted to simplify the setup by calculating the angular velocity for just one rigid body ), but I still can’t access the angular velocity via variables or print
commands as intended.*
group g_1 id <> 1 6
…
fix rigid1 g_1 rigid/small molecule
compute my_rigid_group g_1 rigid/local rigid1 omegaz
compute reduced_momentum g_1 reduce ave c_my_rigid_group
variable my_momentum equal c_reduced_momentum