Atoms don't move after velocity set

Hello lammps-users,

I wrote this input file, all work perfectly until the last run in which a single CO2 molecule is supposed to move towards a surface.

units metal
atom_style full
boundary p p p

read_data h2o.data
region box block 0.0 30.939036 0.0 31.377064 0.0 121.914108 side in
region bottom block 0.0 30.939036 0.0 31.377064 0.0 7.0 side in
region top block 0.0 30.939036 0.0 31.377064 0.0 7.0 side out

bond_style A A A
angle_style A A A
pair_style A A A

pair_coeff A A A

group bottomgroup region bottom
group topgroup region top
fix 1 topgroup nve
fix 2 bottomgroup setforce 0.0 0.0 0.0
compute temptop topgroup temp
timestep 0.00025
dump 1 all custom 499 dynamics.xyz id mol type q x y z vx vy vz
dump_modify 1 sort id
dump 2 all xyz 3 dynamics_vmd.xyz
dump_modify 2 element h o sort id
thermo_style custom step evdwl ecoul elong epair ebond eangle emol ke pe etotal temp
thermo_modify temp temptop format float %.12f
thermo 1

run 499

It looks as if the molecule you insert is not being time integrated because it is not inside a fix nve or something similar.

You can add something like

fix move_my_co2 CO2 nve

or something similar underneath the group CO2-statement to make it move.

Hello lammps-users,

I wrote this input file, all work perfectly until the last run in which a
single CO2 molecule is supposed to move towards a surface.

[...]

#________________________________________________________
# End of script

I insert the CO2 molecule in the simulation box and this works fine (I
checked the initial position of the CO2 in " inserted.dump " and it
corresponds to what I want). After I set the velocity to the CO2 molecule, I
checked it's velocity and position by using "dump 4$a all ....vx vy vz" and
it showed the CO2 molecule has a velocity, but it doesn't change position
during the last run. I'm fairly inexperienced with LAMMPS, are there any
veterans out there who might know what went wrong?

there is no time integration for the inserted molecule. you only time
integrate the atoms in "topgroup" with fix nve and the inserted
molecule is not part of that group, thus only those atoms will move.

axel.