[lammps-users] Create_atoms after read_restart

Dear Debora,

This is probably because when you ran the initial water run, either

You used create_box N region-id, and specified N to be 2.
The water data file had atom types values as 2.

This value should be the maximum number of atom types encountered in the simulation.

If this is the cause of the trouble, you can either:

Change the original N value in the input/data file to the total number of atom types (eg 3 if you are going to have H,O and Au) and rerun the water simulation
Use the restart2data and make changes in the data file you get.


Dear all,

Thank you for your answers, both were very usefull. I created the planes in a separete run, and merged the datafiles in a text program with the help of the read2restart tool (I had no time to learn to use VMD). The simulation of the system planes+water runs, but now the problem is that when I try to move the upper plane it just doesn’t move, as all the water molecules after 10000 timesteps in real units. I’ve created the velocities with velocity create, computed velocity only in z, set the atoms of the planes again as type 3, and zeroed all the fixes one by one to debug and nothing worked. I’ve applied the “velocity set”, different fixes of forces and nothing worked. The temperature stays the same after a while. Is it a problem of the conversion of files? Is it similar to the so called “freezing water problem”? Can it be a geometry problem like atoms overlaping, even if I’m already using “delete atoms”?

2009/11/22 Mario Pinto <[email protected]…24…>

If you are time integrating them, then they will move. Have you dumped
the velocities and forces and coords for the atoms you think aren't moving?


2009/11/29 Débora Marques <[email protected]>:

I’ve dumped the velocities with a fix in a text file. The particles velocities do not change due to the commands trying to move the upper block, and when I apply the shake fix command, the velocities turn to nan. Can it be because temp/rescale doesn’t integrate in time? I’ve tried different velocities for the velocity set command, and all I get is that the total energy changes, and only this. I’m trying to apply Nose- Hoover but then I become an error message about out of range atoms. Am I using any command non-applicable to non-equilibrium simulations?
Here is the code:
dimension 3
units real
boundary p p f
atom_style full
kspace_style pppm 1.0e-5
kspace_modify slab 3
bond_style harmonic
angle_style harmonic

#Create atoms and boxes
lattice fcc 4.08

read_data water100Auv03.dat
region box block -1.765539 1.765539 -1.765539 1.765539 -3.000000 3.000000

#Pair_style hybrid definition

pair_style hybrid lj/cut/coul/long 10.0 eam lj/cut 2.5

#Definition of pair coefficients


pair_coeff 1 2 lj/cut/coul/long 0.0 0.0 10.0 #pair coefficients for OH
pair_coeff 1 1 lj/cut/coul/long 0.102 3.188 10.0 #pair coefficients between OO
pair_coeff 2 2 lj/cut/coul/long 0.0 0.0 10.0 #pair coefficients between HH

bond_coeff 1 450.000000 0.9572

angle_coeff 1 55.000000 104.52


pair_coeff 3 3 eam Au_u3.eam #pair coefficient for planes

#Water+ planes

pair_coeff 1 3 lj/cut 1.0 1.0 2.5

pair_coeff 2 3 lj/cut 1.0 1.0 2.5

#running conditions

neighbor 0.3 bin
neigh_modify delay 5
#neigh_modify check yes

#delete overlaped atoms

delete_atoms overlap 0.1 all all

#create region

region upper block INF INF INF INF 1.8 INF
region lower block INF INF INF INF INF -1.8
region imob union 2 upper lower
group upper region upper
group lower region lower
group imob region imob
group box region box
group flow subtract box imob

set group imob type 3
compute tv all temp/partial 0 1 1

velocity all create 350 482748 temp tv

variable K atom “mass[]*(vy[]^2)+(vz[]^2)/2”

fix 1 all ave/spatial 1 1 100 x 0.0 0.6 v_K x y z vx vy vz file water100Auv08.txt

#stabilizing T=300K

fix 2 all temp/rescale 10 350 300 100 5 0.5
fix_modify 2 temp tv
fix 3 flow shake 0.00001 200 10 b 1 a 1

thermo 100
run 1000

#moving it
velocity upper set 0.3 0 0 sum yes
#unfix 2
#fix 4 all nvt 300.0 300.0 1.0

write_restart restart.water100Auv08

dump 1 all atom 1000 dump.water100Auv08
dump 2 all xyz 1000 dump.water100Auv08.*.xyz

#timestep 50
run 5000

2009/11/30 Steve Plimpton <[email protected]…24…>

fix 1 all ave/spatial 1 1 100 x 0.0 0.6 v_K x y z vx vy vz file
fix 2 all temp/rescale 10 350 300 100 5 0.5
fix_modify 2 temp tv
fix 3 flow shake 0.00001 200 10 b 1 a 1

None of these fixes do time integration. Try using fix nve.
You can dump velocities directly with the dump custom command.


2009/11/30 Débora Marques <[email protected]>: