mirror of https://github.com/lammps/lammps.git
Added elastic constant example at finite temperature
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14105 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
233eaea97d
commit
da1e4e4f25
examples/ELASTIC_T
|
@ -52,8 +52,16 @@ include init.mod
|
|||
|
||||
# Compute initial state
|
||||
|
||||
variable thermostat equal 1
|
||||
include potential.mod
|
||||
run ${nequil}
|
||||
|
||||
if "${adiabatic} == 1" &
|
||||
then "variable thermostat equal 0" &
|
||||
else "variable thermostat equal 1"
|
||||
|
||||
print ${thermostat}
|
||||
|
||||
include potential.mod
|
||||
run ${nrun}
|
||||
|
||||
|
|
|
@ -12,17 +12,18 @@ variable cfac equal 1.0e-4
|
|||
variable cunits string GPa
|
||||
|
||||
# Define MD parameters
|
||||
variable nevery equal 10
|
||||
variable nrepeat equal 10
|
||||
variable nfreq equal ${nevery}*${nrepeat}
|
||||
variable nthermo equal ${nfreq}
|
||||
variable nequil equal 10*${nthermo}
|
||||
variable nrun equal 3*${nthermo}
|
||||
variable temp equal 2000.0
|
||||
variable timestep equal 0.001
|
||||
variable mass1 equal 28.06
|
||||
variable tdamp equal 0.01
|
||||
variable seed equal 123457
|
||||
variable nevery equal 10 # sampling interval
|
||||
variable nrepeat equal 10 # number of samples
|
||||
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
||||
variable nthermo equal ${nfreq} # interval for thermo output
|
||||
variable nequil equal 10*${nthermo} # length of equilibration run
|
||||
variable nrun equal 3*${nthermo} # length of equilibrated run
|
||||
variable temp equal 2000.0 # temperature of initial sample
|
||||
variable timestep equal 0.001 # timestep
|
||||
variable mass1 equal 28.06 # mass
|
||||
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
||||
variable tdamp equal 0.01 # time constant for thermostat
|
||||
variable seed equal 123457 # seed for thermostat
|
||||
|
||||
# generate the box and atom positions using a diamond lattice
|
||||
variable a equal 5.431
|
||||
|
@ -34,4 +35,6 @@ region box prism 0 3.0 0 3.0 0 3.0 0.0 0.0 0.0
|
|||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
mass 1 ${mass1}
|
||||
velocity all create ${temp} 87287
|
||||
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ thermo_modify norm no
|
|||
|
||||
timestep ${timestep}
|
||||
fix 4 all nve
|
||||
fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}
|
||||
if "${thermostat} == 1" then &
|
||||
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue