Warning: Changing velocities of atoms in rigid bodies. This has no effect unless rigid bodies are rebuild (src/velocity.cpp:71)

Hi all,

Was that warning meaning?
I used fix rigid and run some steps of nve, then use velocity all scale $(v_tempK). Does velocity commond can change the speed of rigid bodies?

velocity all create ${tempK} ${seed}

fix nveR dimers rigid/nve/small molecule
fix nveP particles rigid/nve molecule
fix nvenR no_dimers nve
run ${sdt}

velocity all scale $(v_tempK)

Thanks!

When you define rigid bodies with fix rigid or fix rigid/small or any of their variants, then the fix styles create internal data structures where they maintain the center of mass positions, velocities, orientations, and rotational velocities for all rigid bodies. During the time steps the per-atom forces are translated into center-of-mass forces and torques on the rigid bodies, then the time integration is applied to the rigid bodies and the atom positions and velocities are extracted from that.

Thus if you change the per-atom velocities it will not change the velocities of the rigid bodies unless you re-initialize them, for example by repeating the fix commands.