LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] problem for using fix nve & fix aveforce
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] problem for using fix nve & fix aveforce

From: Axel Kohlmeyer <akohlmey@...24...>
Date: Wed, 28 Jun 2017 06:03:05 -0400

On Wed, Jun 28, 2017 at 1:00 AM, Rouhollah Mirzaamiri <r.mirzaamiri@...24...> wrote:
​Dear lammps developers,
In my simulation I need to use fix nve & fix aveforce for a group but this results in explosion of group and atom lost error.
Following is the concise form of the script showing the problem. ​
What is wrong with in the script?

​there is nothing wrong with the script. it is (syntactica​lly) correct and the resulting trajectory is what you are supposed to be getting from that combination of commands.

you set up your atoms to have random velocities (in magnitude and direction) and then you change the forces on each atom to be the average force on the whole group, which will be (close to) zero. so what should you get when you do time integration with random velocities and (almost) no force? look up newton's first law of motion, if you need a reference.

so if there is a problem, it would be located somewhere between your chair and your computer.



units metal
dimension 3
boundary p p s  
atom_style atomic
variable runstep_relax equal 10000
variable TIMESTEP equal 0.002 
variable lat_block equal 5.431 #Si
lattice diamond ${lat_block}  
region s_box block 0 10 0 5 0 10
create_box 1 s_box  
region UP block 0 10 0 5 3 8 
create_atoms 1 region UP
pair_style tersoff 
pair_coeff *   * SiC.tersoff Si
mass 1 28.0855 ## Si
compute new all temp
velocity all create 300 577625 temp new

fix 1 all nve 
fix 2 all aveforce 0.0 0.0 0.0

thermo 500
thermo_modify temp new
dump 10 all image  1000 image.*.jpg type type &
zoom 1.6 size 1024 768  adiam 1.5  axes yes 0.05 0.05 view 90 -90
timestep ${TIMESTEP} 
run ${runstep_relax}

Check out the vibrant tech community on one of the world's most
engaging tech sites,!
lammps-users mailing list

Dr. Axel Kohlmeyer  akohlmey@...12...24...
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.