Why the Velocity command only have rotational kinetic energy?

##########  variable ##########
variable R equal 0.5
variable Ra equal 0.1
variable Na equal 16
variable k equal ((${Ra}/${R})^2)/2
variable m equal 1/(${Na}*${k}+1)
variable ma equal (1-${m})/${Na}
variable D equal 2*${R}
variable Da equal 2*${Ra}
########## basic settings  ##########
dimension   2
atom_style hybrid sphere dipole
atom_modify     map array
boundary    p p p
comm_modify vel yes cutoff 2.5
timestep    0.001
fix             prop all property/atom mol ghost yes 

region      box block 0 5 0 5 -0.5 0.5 units box
create_box  2 box
shell mkdir dump
########## pair settings  ##########
pair_style  gran/hertz/history 2e8 NULL 11900 NULL 0 1
pair_coeff  * *

########## create molecule  ##########
molecule        allmol mol_rough1.txt
create_atoms 0 random 1 458465 box  mol allmol 4565 overlap 0.1 maxtry 20 units box    
set type 1 diameter ${D}
set type 2 diameter ${Da}
mass 1 $(v_m)
mass 2 $(v_ma)

##########  molecule settings  ##########
fix 1 all rigid molecule 
velocity all create 100 5454654  
fix f2d all enforce2d  
########## compute and thermo  ##########
compute 1 all erotate/sphere 
compute 2 all temp/sphere 
thermo_style    custom step atoms ke  c_2 
thermo_modify   lost ignore norm no temp 2
compute_modify  2 dynamic/dof yes
thermo      10
dump 1 all custom 10 dump/tmp.*.dump mol id type radius mass x y z vx vy vz omegax omegay omegaz 

run 1000  

This is the in file. But my velocity command only have rotational kinetic energy.If I want both have rotational and translational kinetic energy,what I should do?Sorry if this is a basic question,and thank you in advance.

How do you determine that?

I find this very surprising, since the opposite is true. The velocity command does not know anything about rotations. It only “sees” point particles, which have no rotation at all. However, if you have random (translational) velocities applied to the constituent atoms of a rigid body, the resulting net translation of the rigid body may be small, and thus could also be (by chance) smaller than the net rotation.

p.s.: you have periodic boundaries and set thermo_modify lost ignore. That is a very bad idea. With periodic boundaries, you cannot lose atoms unless you have bad settings and thus an unstable simulation. Using thermo_modify lost ignore will hide that but not address the real problem.

Thank you for your reply.I observed it through OVITO.And I read the dump.txt.It has the Vx and Vy. But I don’t see it in OVITO.Maybe I need to set the velocity of the molecule.

You are not making much sense here. What you “see” in a visualization program is not a scientific observation. You need to quantify your observation.

As I already stated, the velocity command knows nothing about molecules or extended particles, so it will only set the velocity as if there were only point particles.

If you want to observe the properties of the rigid bodies you have to query the properties of the rigid fix directly as documented in the LAMMPS manual. Given the kind of system you have, I would have expected that you would be using fix rigid/small for better computational efficiency and then you need to use compute rigid/local to access properties of the rigid bodies. At any rate, the properties you see from these commands (in numbers) are the real evidence of what is happening at the level of the rigid bodies.

The dump file will only show the properties of the constituent particles.

Thank you.It’s very useful for me.