Particle still moves while its force and velocity have been set to be zero

Hi,

I tried to get a group of particles fixed during the simulation by setting their forces and velocities to be zero. I did this using the following command in the input files.

group C1 type 15
fix 3 C1 setforce 0.0 0.0 0.0
velocity C1 zero linear

velocity all create 298.0 4928459 rot yes dist gaussian

Then I started the simulation from a restart file. However, after running the simulation for about 1 ns, by looking at the trajectory file I found that the positions of atoms in group C1 is totally different from the initial configuration. However, if I look at the magnitudes of particle velocities for atoms in group C1, they are all quite small, about 1e-8 Angstrom/fs. So I don’t quite understand why the particle could still move even if I set their forces and velocities to be zero.

Thanks.

Shule

Hello Shule.

Why don't you exclude the particles from time integration if you do not want them to move?

Hi,

I tried to get a group of particles fixed during the simulation by setting
their forces and velocities to be zero. I did this using the following
command in the input files.

group C1 type 15
fix 3 C1 setforce 0.0 0.0 0.0
velocity C1 zero linear

this does not zero the velocities. it only removes the center of mass
velocity of this group.

velocity all create 298.0 4928459 rot yes dist gaussian

and this initializes the velocities for *all* atoms.

so you didn't set any atom's velocity to zero anywhere with these commands.

axel.

Thanks a lot, Axel! Do you think if using the following command would give me zero velocities for the group C1?

velocity C1 set 0.0 0.0 0.0

On the other hand I still would lik to keep the ‘velocity all create 298.0 4928459 rot yes dist gaussian’ command to maintain the velocity distribution. Do you think this command would still interrupt the previous command that sets the velocity to be zero?

Thanks.

Shule

Thanks a lot, Axel! Do you think if using the following command would give
me zero velocities for the group C1?

velocity C1 set 0.0 0.0 0.0

what does the manual say?

On the other hand I still would lik to keep the 'velocity all create 298.0
4928459 rot yes dist gaussian' command to maintain the velocity
distribution. Do you think this command would still interrupt the previous
command that sets the velocity to be zero?

yes, of course. what does the manual say?

axel.

Also, if you don't want to read the manual, just run for 10 timesteps
and see what happens. If the velocities of the C1 atoms are not
exactly 0.0, then you got it wrong. Try something else. No need to
wait for 1 ns.