updated and slightly refactored tabulation for vashishta pair style

- tables are now dimensioned by nelements instead of ntypes
- tables are only created if used
- correctly identify max size of table
- add test for illegal cutoff for tabulation
- allocated memory for tables is accounted for
- add example input using 16-bit tables
This commit is contained in:
Axel Kohlmeyer
2016-08-27 22:36:17 -04:00
parent bf59c976f8
commit ebce76c7f0
5 changed files with 152 additions and 40 deletions

View File

@ -0,0 +1,76 @@
# calculate the energy volume curve for InP zincblende
# define volume range and filename
variable ndelta equal 100
variable volatom_min equal 20.0
variable volatom_max equal 29.0
variable evsvolfile string evsvol.dat
# set up cell
units metal
boundary p p p
# setup loop variables for box volume
variable amin equal ${volatom_min}^(1/3)*2
variable delta equal (${volatom_max}-${volatom_min})/${ndelta}
variable scale equal (${delta}/v_volatom+1)^(1/3)
# set up 8 atom InP zincblende unit cell
lattice diamond ${amin}
region box prism &
0 1 &
0 1 &
0 1 &
0 0 0
create_box 2 box
create_atoms 1 box &
basis 5 2 &
basis 6 2 &
basis 7 2 &
basis 8 2
mass 1 114.76
mass 2 30.98
# choose potential
pair_style vashishta
pair_coeff * * InP.vashishta In P
pair_modify table 16
# setup neighbor style
neighbor 1.0 nsq
neigh_modify once no every 1 delay 0 check yes
# setup output
thermo_style custom step temp pe press vol
thermo_modify norm no
variable volatom equal vol/atoms
variable eatom equal pe/atoms
print "# Volume [A^3/atom] Energy [eV/atom]" file ${evsvolfile}
# loop over range of volumes
label loop
variable i loop ${ndelta}
change_box all x scale ${scale} y scale ${scale} z scale ${scale} remap
# calculate energy
# no energy minimization needed for zincblende
run 0
print "${volatom} ${eatom}" append ${evsvolfile}
next i
jump SELF loop

View File

@ -0,0 +1,29 @@
# test Vashishta potential for quartz
units metal
boundary p p p
atom_style atomic
read_data data.quartz
replicate 4 4 4
velocity all create 2000.0 277387 mom yes
displace_atoms all move 0.05 0.9 0.4 units box
pair_style vashishta
pair_coeff * * SiO.1990.vashishta Si O
pair_modify table 16
neighbor 0.3 bin
neigh_modify delay 10
fix 1 all nve
thermo 10
timestep 0.001
#dump 1 all cfg 10 *.cfg mass type xs ys zs vx vy vz fx fy fz
#dump_modify 1 element Si O
run 100