How to sum a velocity to a selected atom?

Dear all,

I am working with Fe crystals. After equilibration of the crystal at temperature T, I would like to select some atoms with region and group and sum a velocity to their current velocity. I know that with the velocity command I can change/replace their velocity. But how to sum a velocity? Is that possible?

Many thanks in advance and best regards,
Christophe

Dear all,

I am working with Fe crystals. After equilibration of the crystal at
temperature T, I would like to select some atoms with region and group and
sum a velocity to their current velocity. I know that with the velocity
command I can change/replace their velocity. But how to sum a velocity? Is
that possible?

​compute reduce? compute reduce/region?
then define an atom style variable with the result of that, masking out
atoms that you don't want the velocity set on and then add that variable to
all atoms.

axel.​

Yes; try reading the manual entry for velocity command

You need the option ‘set’ with keyword ‘sum’

Nigel

Just what I was looking for. Thanks!

Best regards,
Christophe