This server is intended for use for Academic Classwork related Git repositories only. Projects/repositories will generally be removed after 6 months following close of the semester. Inactive repositories from previous semester are now being archived when no activity for 365 days. They are renamed and marked as 'archived'. After 90 days in that state they will be removed from the system completely.

Commit ed74191e authored by stah32's avatar stah32

Added ZBL splined directly into buckingham potential

parent cff4f28f
......@@ -23,7 +23,7 @@ def hackZBL(rij):
return energy
# =============================================================================
# Define Potentials for table output
# Define Potentials
# =============================================================================
zbl = potentialforms.zbl(13, 13)
bks_buck = potentialforms.buck(5131.179, 0.3040, 248.0)
......@@ -34,7 +34,10 @@ buck_coul = atsim.potentials.plus(bks_buck,coul)
buck_coul_zbl = atsim.potentials.plus(buck_coul,zbl)
spline = atsim.potentials.SplinePotential(zbl,buck_coul,0.065,1.3)
hackspline = atsim.potentials.SplinePotential(hackZBL,buck_coul,.1,1.3)
buckspline = atsim.potentials.SplinePotential(hackZBL,bks_buck,0.07,1.4)
buckspline_coul = atsim.potentials.plus(buckspline,coul)
buckcoul_AlAl=atsim.potentials.Potential('Al', 'Al', buck_coul)
buckspline_AlAl = atsim.potentials.Potential( 'Al', 'Al', buckspline)
# =============================================================================
......@@ -42,9 +45,9 @@ buckcoul_AlAl=atsim.potentials.Potential('Al', 'Al', buck_coul)
# =============================================================================
#No ZBL Shift
spline_AlAl= atsim.potentials.Potential('Al', 'Al', spline)
with open('spline_AlAl_1.3.lmptab', 'wb') as outfile:
atsim.potentials.writePotentials('LAMMPS', [spline_AlAl], 16.0, 50000, out = outfile)
#spline_AlAl= atsim.potentials.Potential('Al', 'Al', spline)
#with open('spline_AlAl_1.3.lmptab', 'wb') as outfile:
# atsim.potentials.writePotentials('LAMMPS', [spline_AlAl], 16.0, 50000, out = outfile)
#ZBL Shift + Spline
#hackspline_AlAl= atsim.potentials.Potential('Al', 'Al', hackspline)
......@@ -54,6 +57,10 @@ with open('spline_AlAl_1.3.lmptab', 'wb') as outfile:
#No Spline
#with open('buckcoul_AlAl.lmptab', 'wb') as outfile:
# atsim.potentials.writePotentials('LAMMPS', [buckcoul_AlAl], 16.0, 50000, out = outfile)
#BuckSpline
#with open ( 'buckspline_AlAl.lmptab', 'wb') as outfile:
# atsim.potentials.writePotentials('LAMMPS', [buckspline_AlAl], 16.0, 50000, out = outfile)
#Pure Buckingham
#with open('buck_AlAl.lmptab', 'wb') as outfile:
......@@ -73,6 +80,12 @@ with open('spline_AlAl_1.3.lmptab', 'wb') as outfile:
#Shifted ZBL + Spline
#atsim.potentials.plot( 'hackSpline_2.0.dat', 0.1,16, hackspline, 5000)
#BuckSpline
#atsim.potentials.plot( 'buckspline.dat',0.1,16, buckspline, 50000)
#BuckSpline + Coul
atsim.potentials.plot( 'buckspline_coul.dat', 0.1, 16, buckspline_coul, 50000)
#Buckingham
#atsim.potentials.plot( 'buck.dat', 0.1,16,bks_buck,5000)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -29,12 +29,16 @@ buck_NAl = atsim.potentials.Potential('N', 'Al',bks_buck)
coul_NAl = atsim.potentials.Potential('N', 'Al',coul)
buck_coul = atsim.potentials.plus(bks_buck,coul)
buck_coul_zbl = atsim.potentials.plus(buck_coul,zbl)
buckspline = atsim.potentials.SplinePotential(hackZBL,bks_buck,0.5,1.0)
buckspline_coul = atsim.potentials.plus(buckspline,coul)
spline = atsim.potentials.SplinePotential(zbl,buck_coul,0.5,1.3)
hackspline = atsim.potentials.SplinePotential(hackZBL, buck_coul, 0.7, 1.3)
hackspline = atsim.potentials.SplinePotential(hackZBL, buck_coul, 0.8, 1.3)
spline_NAl= atsim.potentials.Potential('N', 'Al', spline)
hackspline_NAl = atsim.potentials.Potential('N' , 'Al', hackspline)
buckcoul_NAl=atsim.potentials.Potential('N', 'Al', buck_coul)
buckspline_NAl = atsim.potentials.Potential( 'N' , 'Al' , buckspline)
# =============================================================================
# Outputting of potentials for use with LAMMPS
......@@ -48,6 +52,9 @@ buckcoul_NAl=atsim.potentials.Potential('N', 'Al', buck_coul)
#with open('hackspline_NAl_2.0.lmptab', 'wb') as outfile:
# atsim.potentials.writePotentials('LAMMPS', [hackspline_NAl], 16.0, 50000, out = outfile)
#Buckspline
with open('buckspline_NAl,lmptab', 'wb') as outfile:
atsim.potentials.writePotentials('LAMMPS' , [buckspline_NAl], 16.0, 50000, out=outfile)
#with open('buckcoul_NAl.lmptab', 'wb') as outfile:
# atsim.potentials.writePotentials('LAMMPS', [buckcoul_NAl], 16.0, 50000, out = outfile)
......@@ -68,8 +75,22 @@ buckcoul_NAl=atsim.potentials.Potential('N', 'Al', buck_coul)
#Spline with ZBL Shift
#atsim.potentials.plot( 'hackspline_2.0.dat' ,0.1, 16, hackspline, 5000)
#Buckingham
#atsim.potentials.plot( 'buck.dat', 0.1, 16, bks_buck, 50000)
#Buckingham + Coulomb
#atsim.potentials.plot( 'buck_coul.dat', 0.1, 16.0, buck_coul, 5000)
#Buckspline
#atsim.potentials.plot( 'buckspline.dat', 0.1, 16.0, buckspline, 50000)
#Buckspline+Coul
#atsim.potentials.plot( 'buckspline_coul.dat' ,0.1, 16.0, buckspline_coul, 50000)
#No Shift ZBL
#atsim.potentials.plot( 'zbl.dat', 0.1, 16.0, zbl, 5000)
#Total combination
#atsim.potentials.plot( 'sum.dat',0.1,16, buck_coul_zbl, 5000)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -12,7 +12,7 @@ def o(x):
return 0.18175*math.exp(-3.19980*x)+.50986*math.exp(-.94229*x)+.28022*math.exp(-.40290*x)+.02817*math.exp(-.20162*x)
def hackZBL(rij):
energy = (14.3996*7*7)/(rij)*o(rij/a)+1000
energy = (14.3996*7*7)/(rij)*o(rij/a)+100
return energy
# =============================================================================
......@@ -25,12 +25,15 @@ buck_NN = atsim.potentials.Potential('N', 'N', bks_buck)
coul_NN = atsim.potentials.Potential('N', 'N', coul)
buck_coul = atsim.potentials.plus(bks_buck,coul)
buck_coul_zbl = atsim.potentials.plus(buck_coul,zbl)
buckspline = atsim.potentials.SplinePotential(hackZBL, bks_buck, 1.1,1.42)
buckspline_coul = atsim.potentials.plus(buckspline, coul)
spline = atsim.potentials.SplinePotential(zbl,buck_coul,0.075,1.3)
hackspline = atsim.potentials.SplinePotential(hackZBL, buck_coul, 0.05, 1.3)
hackspline_NN = atsim.potentials.Potential( 'N' , 'N' , hackspline)
spline_NN= atsim.potentials.Potential('N', 'N', spline)
buckcoul_NN=atsim.potentials.Potential('N', 'N', buck_coul)
buckspline_NN = atsim.potentials.Potential('N', 'N', buckspline)
# =============================================================================
# Table output for use with LAMMPS
......@@ -40,8 +43,8 @@ buckcoul_NN=atsim.potentials.Potential('N', 'N', buck_coul)
# atsim.potentials.writePotentials('LAMMPS', [spline_NN], 16.0, 50000, out = outfile)
with open('hackspline_NN_2.0.lmptab', 'wb') as outfile:
atsim.potentials.writePotentials('LAMMPS', [hackspline_NN], 16.0, 50000, out = outfile)
#with open('hackspline_NN_2.0.lmptab', 'wb') as outfile:
# atsim.potentials.writePotentials('LAMMPS', [hackspline_NN], 16.0, 50000, out = outfile)
#with open('buckcoul_NN.lmptab', 'wb') as outfile:
# atsim.potentials.writePotentials('LAMMPS', [buckcoul_NN], 16.0, 50000, out = outfile)
......@@ -52,6 +55,10 @@ with open('hackspline_NN_2.0.lmptab', 'wb') as outfile:
#with open('coul_NN.lmptab', 'wb') as outfile:
# atsim.potentials.writePotentials('LAMMPS' ,[coul_NN], 16.0, 50000, out = outfile)
#BuckSpline
with open ('buckspline_NN.lmptab', 'wb') as outfile:
atsim.potentials.writePotentials('LAMMPS' , [buckspline_NN], 16.0, 50000, out = outfile)
# =============================================================================
# Plotting
# =============================================================================
......@@ -59,5 +66,13 @@ with open('hackspline_NN_2.0.lmptab', 'wb') as outfile:
#atsim.potentials.plot( 'hackspline_1.3.dat', 0.1, 16, hackspline, 5000)
#atsim.potentials.plot( 'buck.dat', 0.1,16,bks_buck,5000)
#atsim.potentials.plot( 'buck_coul.dat', 0.1, 16.0, buck_coul, 5000)
#Buckspline
#atsim.potentials.plot( 'buckspline.dat' ,0.1, 16.0, buckspline, 50000)
#Buckspline_coul
#atsim.potentials.plot( 'buckspline_coul.dat', 0.1, 16.0, buckspline_coul, 50000)
#atsim.potentials.plot( 'zbl.dat', 0.1, 16.0, zbl, 5000)
#atsim.potentials.plot( 'sum.dat',0.1,16, buck_coul_zbl, 5000)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment