I am running a simple simulation with about 4000 atoms using LJ pair
potential. My command script is below. When I look at the total energy
(TotEng) of the system from the log file, there appears to be
fluctuations that are on the order of 0.4% of KE of the system if I have
the fix temp/rescale commented out (lines with #*** following them). Is
this sort of fluctuation in the energy typical? When I uncomment the
fix temp/rescale commands (lines with #*** following them), I get even
larger fluctuations that approach 2% of the KE of the system. My
understanding is that the "fix_modify fixID energy yes" would account
for all the energy added or subtracted from the group of atoms and add
is to the potential energy of the system so that energy conservation of
the entire system can be monitored. Is this correct or am I missing
something? If it is correct, why might I be getting such large
fluctuations in my total system energy (TotEng)? Could it be that the
energy added from the fix_modify command is only adding the energy from
the last timestep, opposed to all the energy added since the last log
printing?
Also if I use "fix_modify fixID themo yes", where the fixID is the ID
of the fix temp/rescale command, is the output to my log file the energy
the fix added to the system since the last log print or since the last
timestep?
A side question, is there a way to introduce a random seed into the
velocity command within in LAMMPS or is this something I must do
external to the program?
Thank you,
Rob
#3D LJ simulation for TBR
echo both
variable d equal 010307 #Change this to be date
variable s equal 2 #Change this to be scan number
log simulation$dscan$s.dat
#Initialization, units are Angstrom, ps, grams/mole, eV, K
units metal
boundary p p f
atom_style atomic
pair_style lj/cut 8.5125
#Atom definitions
lattice fcc 5.2865
region afixed block 0 5 0 5 -20 -18.01
region aheat block 0 5 0 5 -18.0 -16.01
region abox block 0 5 0 5 -16.0 -.01
region bbox block 0 5 0 5 0 15.99
region bcool block 0 5 0 5 16 17.99
region bfixed block 0 5 0 5 18.0 20
region aside block 0 5 0 5 -20 -0.0001
region bside block 0 5 0 5 0 20
region worldbox block 0 5 0 5 -20 20
region activebox block 0 5 0 5 -18 18
create_box 2 worldbox
create_atoms 1 region aside
create_atoms 2 region bside
mass 1 40
mass 2 80
group gaheat region aheat
group gaside region abox
group gafixed region afixed
group gbcool region bcool
group gbside region bbox
group gbfixed region bfixed
group gactivebox region activebox
velocity gaheat create 46 4932345 # mom yes rot yes dist
gaussian
velocity gaside create 46 8932345 # mom yes rot yes dist
gaussian
velocity gbside create 34 6932345 # mom yes rot yes dist
gaussian
velocity gbcool create 34 2932345 # mom yes rot yes dist
gaussian
#Settings
pair_coeff * * .0103 3.405 8.5125
neighbor 2.0 bin
neigh_modify every 20 delay 0 check yes
fix heat gaheat temp/rescale 1 23 23 0.01 1 #***
fix cool gbcool temp/rescale 1 17 17 0.01 1 #***
timestep 0.005
fix 1 gactivebox nve
fix_modify heat thermo yes energy yes #***
fix_modify cool thermo yes energy yes #***
temperature 1 gaheat full
temperature 2 gaside full
temperature 3 gbside full
temperature 4 gbcool full
thermo 50
run 100000