# This test compares Hardy and Cauchy-Born metrics of energy density and stress
# for an Ar system subjected to uniaxial strain deformation.
echo both
units		real	
atom_style	atomic
# create domain
lattice         fcc 4.08 origin 0.25 0.25 0.25
region		BOX block -8 8 -2 2 -2 2
boundary	f p p
create_box	1 BOX
# create atoms
region		MD block -7 7 -2 2 -2 2
create_atoms	1 region MD
pair_style  eam
pair_coeff  * * Au_u3.eam
mass          *  196.97
# specify interal/ghost atoms
region    FREE block -6 6 -2 2 -2 2
group   internal region FREE
# specify inter-atomic potential
# specify neighbor/re-neighboring parameters
neighbor	0.3 bin
neigh_modify	every 10 delay 0 check no
# setup thermal output
thermo		10
thermo_style custom step pe ke press lx ly lz
#           ID  group atc PhysicsType ParameterFile
fix         PP1 internal   atc field Au_eam_linear.mat
fix_modify  PP1 mesh create 8 1 1 BOX f p p
fix_modify  PP1  fields add displacement 
fix_modify  PP1  fields add internal_energy stress cauchy_born_energy cauchy_born_stress
fix_modify  PP1  gradients add displacement 
fix_modify  PP1  set reference_potential_energy 0 # correct cb and messes pe
#           ID  group atc PhysicsType ParameterFile
fix         PP2 internal   atc field Au_eam.mat
fix_modify  PP2 mesh create 8 1 1 BOX f p p
fix_modify  PP2  fields add cauchy_born_energy cauchy_born_stress internal_energy
fix_modify  PP2  set reference_potential_energy
timestep 0.0
fix_modify  PP1  output cb_unistrain_eam_linearFE 1 text tensor_components binary
fix_modify  PP2  output cb_unistrain_eam_refFE    1 text tensor_components 
log       cb_unistrain_eam_linear.log
variable step  equal 0
thermo_style  custom step v_step pe ke press lx ly lz
run 	1
variable step equal ${step}+1
displace_atoms	all ramp x -0.1 0.1 x -100 100
run		1
variable step equal ${step}+1
displace_atoms	all ramp x -0.1 0.1 x -100 100
run		1
