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 8a7bc16f authored by stah32's avatar stah32

Cleaned up code presentation. Updated tables for outer cutoffs of 1.4-2.0

parent 98cc64b4
#AlAl
#Python script to spline the ZBL Potential to the Buckingham-Coulomb potential for Al-Al interactions
# =============================================================================
# Imports
# =============================================================================
import math
from atsim.potentials import Potential
from atsim.potentials import potentialforms
import atsim.potentials
# =============================================================================
# Custom definitions for ZBL Potential
# =============================================================================
a = (0.46850)/((13**.23)+(13**.23))
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*13*13)/(rij)*o(rij/a)+100
return energy
# =============================================================================
# Define Potentials for table output
# =============================================================================
zbl = potentialforms.zbl(13, 13)
bks_buck = potentialforms.buck(5131.179, 0.3040, 248.0)
coul = potentialforms.coul(-2,-2)
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.5,1.7)
spline = atsim.potentials.SplinePotential(zbl,buck_coul,0.239,2.0)
hackspline = atsim.potentials.SplinePotential(hackZBL,buck_coul,0.5,2.0)
# =============================================================================
# Code to output potentials as tables suitable for LAMMPS
# =============================================================================
#No ZBL Shift
#spline_AlAl= atsim.potentials.Potential('Al', 'Al', spline)
#with open('spline_AlAl_2.0.lmptab', 'wb') as outfile:
# atsim.potentials.writePotentials('LAMMPS', [spline_AlAl], 16.0, 5000, out = outfile)
#ZBL Shift + Spline
#hackspline_AlAl= atsim.potentials.Potential('Al', 'Al', hackspline)
#with open('hackspline_AlAl_2.0.lmptab', 'wb') as outfile:
# atsim.potentials.writePotentials('LAMMPS', [hackspline_AlAl], 16.0, 5000, out = outfile)
#No Spline
#with open('buckcoul_AlAl.lmptab', 'wb') as outfile:
# atsim.potentials.writePotentials('LAMMPS', [buckcoul_AlAl], 16.0, 5000, out = outfile)
# =============================================================================
# Output to data files for use with GNUPlot
# =============================================================================
#ZBL + Spline
#atsim.potentials.plot( 'Spline_2.0.dat', 0.1,16, spline, 5000)
#Shifted ZBL + Spline
#atsim.potentials.plot( 'hackSpline_2.0.dat', 0.1,16, hackspline, 5000)
#Buckingham
atsim.potentials.plot( 'buck.dat', 0.1,16,bks_buck,5000)
#atsim.potentials.plot( 'buck.dat', 0.1,16,bks_buck,5000)
#Buckingham + Coulomb
atsim.potentials.plot( 'buck_coul.dat', 0.1, 16.0, buck_coul, 5000)
###########Maximum at ~1.248
#ZBL
atsim.potentials.plot( 'zbl.dat', 0.1, 16.0, zbl, 5000)
#atsim.potentials.plot( 'zbl.dat', 0.1, 16.0, zbl, 5000)
#Buckingham + Coulomb + ZBL
atsim.potentials.plot( 'sum.dat',0.1,16, buck_coul_zbl, 5000)
atsim.potentials.plot( 'spline.dat' ,0.1, 16, spline, 5000)
buckcoul_AlAl=atsim.potentials.Potential('Al', 'Al', buck_coul)
spline_AlAl= atsim.potentials.Potential('Al', 'Al', spline)
with open('spline_AlAl.lmptab', 'wb') as outfile:
atsim.potentials.writePotentials('LAMMPS', [spline_AlAl], 16.0, 5000, out = outfile)
#atsim.potentials.plot( 'sum.dat',0.1,16, buck_coul_zbl, 5000)
with open('buckcoul_AlAl.lmptab', 'wb') as outfile:
atsim.potentials.writePotentials('LAMMPS', [buckcoul_AlAl], 16.0, 5000, out = outfile)
\ No newline at end of file
#atsim.potentials.plot( 'spline.dat' ,0.1, 16, spline, 5000)
#buckcoul_AlAl=atsim.potentials.Potential('Al', 'Al', buck_coul)
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -250,258 +250,258 @@
0.8918200000000001 44.20777711181338
0.895 43.6769132634754
0.89818 43.15344459379857
0.90136 42.637219788662506
0.90454 42.12706972289101
0.90772 41.620667102629426
0.9109 41.11573704209769
0.91408 40.61012934010553
0.91726 40.101815612052505
0.92044 39.58888704013415
0.92362 39.069552651552115
0.9268 38.54213803873455
0.92998 38.005084442811025
0.93316 37.45694812419778
0.93634 36.8963999507678
0.93952 36.32222513596871
0.9427 35.73332306502466
0.94588 35.12870715085077
0.94906 34.50750466518345
0.95224 33.86895649404104
0.95542 33.21241677219825
0.9586 32.53735235285423
0.96178 31.843342076458836
0.96496 31.130075802453685
0.96814 30.397353177137493
0.97132 29.645082110190575
0.9745 28.873276941564573
0.97768 28.082056280964704
0.98086 27.271640509767014
0.98404 26.442348938046056
0.98722 25.594596614408314
0.9904000000000001 24.728890790493278
0.99358 23.845827046559382
0.99676 22.946085089116334
0.99994 22.030424234018685
1.00312 21.09967859409078
1.0063 20.154751992101456
1.0094800000000002 19.19661262487543
1.0126600000000001 18.226287504383496
1.01584 17.244856708105242
1.01902 16.25344746943905
1.0222 15.253228141833976
1.02538 14.245402073758196
1.0285600000000001 13.231201428726873
1.03174 12.211880988493395
1.03492 11.188711975946891
1.0381 10.162975934168774
1.04128 9.135958697998785
1.0444600000000002 8.108944492477914
1.0476400000000001 7.0832101927582904
1.05082 6.0600197761008054
1.054 5.040618996506634
1.05718 4.026230309806056
1.06036 3.018048073503085
1.0635400000000002 2.0172340444439634
1.0667200000000001 1.0249131933416002
1.0699 0.04216985314748456
1.07308 -0.9299557854053049
1.07626 -1.8904708208198606
1.07944 -2.838432422693554
1.0826200000000001 -3.772950244885596
1.0858 -4.693188467475196
1.08898 -5.598367470690093
1.09216 -6.48776514384733
1.09534 -7.360717837231864
1.0985200000000002 -8.216620966120097
1.1017000000000001 -9.054929278320284
1.10488 -9.87515679985113
1.10806 -10.676876473401183
1.1112400000000002 -11.459719507515118
1.1144200000000002 -12.223374454653708
1.1176000000000001 -12.967586037928783
1.12078 -13.69215374701983
1.12396 -14.396930224491918
1.12714 -15.081819463977023
1.1303200000000002 -15.746774842207913
1.1335000000000002 -16.391797006474903
1.1366800000000001 -17.01693163928521
1.13986 -17.62226712111432
1.14304 -18.20793211220244
1.14622 -18.7740930729613
1.1494000000000002 -19.32095174249144
1.1525800000000002 -19.848742592919088
1.1557600000000001 -20.357730277049782
1.15894 -20.848207085011524
1.16212 -21.320490425000962
1.1653000000000002 -21.7749203414384
1.1684800000000002 -22.211857083098025
1.1716600000000001 -22.631678732258443
1.17484 -23.034778904583
1.17802 -23.421564528426067
1.1812 -23.792453710961265
1.1843800000000002 -24.147873697179264
1.1875600000000002 -24.48825892680593
1.1907400000000001 -24.814049193273988
1.19392 -25.125687907319914
1.1971 -25.42362046747974
1.20028 -25.708292738212403
1.2034600000000002 -25.980149636070877
1.2066400000000002 -26.23963382328877
1.2098200000000001 -26.487184507406823
1.213 -26.723236345215327
1.21618 -26.948218448501443
1.2193600000000002 -27.16255348875017
1.2225400000000002 -27.36665689740396
1.2257200000000001 -27.56093615807719
1.2289 -27.74579018675405
1.23208 -27.921608795841898
1.23526 -28.088772237676583
1.2384400000000002 -28.247650823028593
1.2416200000000002 -28.398604610116212
1.2448000000000001 -28.541983159495366
1.24798 -28.678125350306935
1.25116 -28.807359253337204
1.2543400000000002 -28.93000205644764
1.2575200000000002 -29.0463600380152
1.2607000000000002 -29.156728584178182
1.2638800000000001 -29.2613922457414
1.26706 -29.360624830883214
1.27024 -29.454689529797164
1.2734200000000002 -29.543839067785242
1.2766000000000002 -29.628315883332377
1.2797800000000001 -29.708352327960807
1.28296 -29.784170884882833
1.28614 -29.85598440359597
1.28932 -29.923996347779905
1.2925000000000002 -29.988401054130392
1.2956800000000002 -30.049383999785466
1.2988600000000001 -30.10712207634179
1.30204 -30.16178386857647
1.30522 -30.21352993609164
1.3084000000000002 -30.26251309640057
1.3115800000000002 -30.308878708011395
1.3147600000000002 -30.35276495226875
1.3179400000000001 -30.394303112832954
1.32112 -30.433617851835393
1.3243 -30.47082748180275
1.3274800000000002 -30.506044232681436
1.3306600000000002 -30.539374513234733
1.3338400000000001 -30.570919166334072
1.33702 -30.600773717675587
1.3402 -30.629028617538108
1.34338 -30.655769475308023
1.3465600000000002 -30.681077286539114
1.3497400000000002 -30.705028652380964
1.3529200000000001 -30.72769599127456
1.3561 -30.74914774284985
1.35928 -30.76944856402024
1.3624600000000002 -30.788659517299944
1.3656400000000002 -30.80683825138374
1.3688200000000001 -30.824039174111903
1.372 -30.840313617909736
1.37518 -30.855709997848976
1.37836 -30.870273962485417
1.3815400000000002 -30.884048537649104
1.3847200000000002 -30.897074263357094
1.3879000000000001 -30.90938932406271
1.39108 -30.921029672425018
1.39426 -30.932029146810805
1.3974400000000002 -30.942419582747874
1.4006200000000002 -30.9522309185284
1.4038000000000002 -30.961491295184906
1.4069800000000001 -30.970227151044707
1.41016 -30.97846331108504
1.41334 -30.986223071276438
1.4165200000000002 -30.993528278137248
1.4197000000000002 -31.000399403687933
1.4228800000000001 -31.006855616004856
1.42606 -31.012914845555485
1.42924 -31.01859384750965
1.43242 -31.023908260190876
1.4356000000000002 -31.02887265985383
1.4387800000000002 -31.033500611930013
1.4419600000000001 -31.03780471893174
1.44514 -31.04179666512965
1.44832 -31.045487258176042
1.4515000000000002 -31.048886467803598
1.4546800000000002 -31.052003461721192
1.4578600000000002 -31.054846638855757
1.4610400000000001 -31.057423660033628
1.46422 -31.05974147623698
1.4674 -31.061806354532095
1.4705800000000002 -31.06362390177754
1.4737600000000002 -31.065199086213042
1.4769400000000001 -31.06653625701405
1.48012 -31.067639161914503
1.4833 -31.068510962979087
1.48648 -31.069154250603603
1.4896600000000002 -31.069571055832707
1.4928400000000002 -31.06976286106618
1.4960200000000001 -31.069730609236608
1.4992 -31.069474711531594
1.50238 -31.06899505372977
1.5055600000000002 -31.068291001243665
1.5087400000000002 -31.067361402923094
1.5119200000000002 -31.066204593722077
1.5151000000000001 -31.064818396288842
1.51828 -31.063200121580834
1.52146 -31.061346568588135
1.5246400000000002 -31.059254023263613
1.5278200000000002 -31.05691825675749
1.5310000000000001 -31.054334523074292
1.53418 -31.05149755628201
1.53736 -31.048401567377535
1.5405400000000002 -31.04504024099317
1.5437200000000002 -31.041406732065113
1.5469000000000002 -31.037493662676354
1.5500800000000001 -31.033293119238806
1.55326 -31.02879665024807
1.55644 -31.02399526483653
1.5596200000000002 -31.01887943239558
1.5628000000000002 -31.013439083542746
1.5659800000000001 -31.007663612760425
1.56916 -31.001541883045157
1.57234 -30.99506223295262
1.57552 -30.988212486449953
1.5787000000000002 -30.980979966033736
1.5818800000000002 -30.973351509597
1.5850600000000001 -30.96531349158937
1.58824 -30.95685184903977
1.59142 -30.947952113065536
1.5946000000000002 -30.938599446529732
1.5977800000000002 -30.92877868856127
1.6009600000000002 -30.918474406680694
1.6041400000000001 -30.907670957348397
1.60732 -30.89635255574781
1.6105 -30.884503355693834
1.6136800000000002 -30.87210754056214
1.6168600000000002 -30.859149426176213
1.6200400000000001 -30.845613576580455
1.62322 -30.831484933689993
1.6264 -30.816748961714275
1.62958 -30.801391807313806
1.6327600000000002 -30.785400476356127
1.6359400000000002 -30.768763028108605
1.6391200000000001 -30.75146878759249
1.6423 -30.733508576735733
1.64548 -30.714874964807283
1.6486600000000002 -30.695562538414514
1.6518400000000002 -30.675568191210537
1.6550200000000002 -30.654891433052068
1.6582000000000001 -30.633534718228077
1.66138 -30.611503791862802
1.66456 -30.588808053285632
1.6677400000000002 -30.565460934683887
1.6709200000000002 -30.541480292839857
1.6741000000000001 -30.516888811156825
1.67728 -30.491714408610584
1.68046 -30.4659906515398
1.6836400000000002 -30.43975716351447
1.6868200000000002 -30.41306002773856
1.6900000000000002 -30.385952175602284
1.6931800000000001 -30.358493754328425
1.69636 -30.33075246567428
1.69954 -30.302803866959987
0.90136 42.63719718622219
0.90454 42.12624488010248
0.90772 41.616688983615326
0.9109 41.10475536180562
0.91408 40.5869188387226
0.91726 40.05989831522755
0.92044 39.520653353864056
0.92362 38.966381929719255
0.9268 38.39451906575176
0.92998 37.802736095027036
0.93316 37.18894031167218
0.93634 36.55127478754216
0.93952 35.888118155681745
0.9427 35.19808417395864
0.94588 34.48002090618041
0.94906 33.733009372436136
0.95224 32.95636154259136
0.95542 32.14961756475565
0.9586 31.31254213790273
0.96178 30.445119964702045
0.96496 29.54755022940538
0.96814 28.62024007601228
0.97132 27.663797074220327
0.9745 26.679020680962672
0.97768 25.6668927260081
0.98086 24.628566961917947
0.98404 23.565357740076635
0.98722 22.478727884054166
0.9904000000000001 21.37027584821209
0.99358 20.241722258101653
0.99676 19.09489594038792
0.99994 17.931719555356487
1.00312 16.754194953605307
1.0063 15.564388378861004
1.0094800000000002 14.364415642526794
1.0126600000000001 13.156427393354498
1.01584 11.942594605549907
1.01902 10.725094401687763
1.0222 9.506096322546043
1.02538 8.287749149926796
1.0285600000000001 7.072168375236437
1.03174 5.861424404293466
1.03492 4.657531569928096
1.0381 3.462438018699231
1.04128 2.2780165239465617
1.0444600000000002 1.1060562649143861
1.0476400000000001 -0.051744399116451234
1.05082 -1.1937841443725468
1.054 -2.3185638822059467
1.05718 -3.4246909498442015
1.06036 -4.510882308690071
1.0635400000000002 -5.575966777928805
1.0667200000000001 -6.618886336443779
1.0699 -7.638696539524972
1.07308 -8.634566097188316
1.07626 -9.605775671860862
1.07944 -10.551715954150367
1.0826200000000001 -11.47188508297263
1.0858 -12.365885473294721
1.08898 -13.23342012160774
1.09216 -14.074288456900657
1.09534 -14.888381805145944
1.0985200000000002 -15.675678534006874
1.1017000000000001 -16.436238942675224
1.10488 -17.170199960344505
1.10806 -17.877769710890348
1.1112400000000002 -18.559222001345965
1.1144200000000002 -19.214890784772535
1.1176000000000001 -19.84516464594969
1.12078 -20.450481353245472
1.12396 -21.031322514813425
1.12714 -21.58820837464002
1.1303200000000002 -22.121692776992354
1.1335000000000002 -22.63235832562211
1.1366800000000001 -23.12081175845113
1.13986 -23.587679554754594
1.14304 -24.033603788403298
1.14622 -24.45923823596281
1.1494000000000002 -24.865244746627
1.1525800000000002 -25.252289876829842
1.1557600000000001 -25.62104178929414
1.15894 -25.97216741529993
1.16212 -26.30632987515111
1.1653000000000002 -26.624186150674085
1.1684800000000002 -26.92638500201044
1.1716600000000001 -27.213565119558915
1.17484 -27.486353500190173
1.17802 -27.745364037101456
1.1812 -27.991196311325567
1.1843800000000002 -28.224434572196824
1.1875600000000002 -28.4456468947024
1.1907400000000001 -28.655384500774367
1.19392 -28.85418123190694
1.1971 -29.042553160604726
1.20028 -29.22099832863929
1.2034600000000002 -29.389996599890544
1.2066400000000002 -29.550009616855412
1.2098200000000001 -29.701480849297525
1.213 -29.844835725192453
1.21618 -29.980481833864218
1.2193600000000002 -30.10880919211079
1.2225400000000002 -30.230190564735288
1.2257200000000001 -30.3449818314871
1.2289 -30.45352239295766
1.23208 -30.55613560870336
1.23526 -30.653129261311804
1.2384400000000002 -30.744796040775324
1.2416200000000002 -30.831414044123576
1.2448000000000001 -30.913247285628742
1.24798 -30.990546213574472
1.25116 -31.06354822993173
1.2543400000000002 -31.132478209731794
1.2575200000000002 -31.197549017339085
1.2607000000000002 -31.258962017328404
1.2638800000000001 -31.316907577736973
1.26706 -31.37156556409424
1.27024 -31.42310582266607
1.2734200000000002 -31.471688651901324
1.2766000000000002 -31.517465260989034
1.2797800000000001 -31.560578214895173
1.28296 -31.601161865350456
1.28614 -31.639342767559828
1.28932 -31.67524008214532
1.2925000000000002 -31.708965962793755
1.2956800000000002 -31.74062592921346
1.2988600000000001 -31.770319225875248
1.30204 -31.79813916684575
1.30522 -31.824173466981442
1.3084000000000002 -31.84850456003378
1.3115800000000002 -31.871209904169607
1.3147600000000002 -31.892362275544404
1.3179400000000001 -31.91203005049113
1.32112 -31.93027747707236
1.3243 -31.947164936647027
1.3274800000000002 -31.962749196328172
1.3306600000000002 -31.977083652923042
1.3338400000000001 -31.990218569274017
1.33702 -32.00220130386331
1.3402 -32.0130765343032
1.34338 -32.02288647577857
1.3465600000000002 -32.031671095092584
1.3497400000000002 -32.03946832126263
1.3529200000000001 -32.0463142534743
1.3561 -32.05224336712484
1.35928 -32.05728871890292
1.3624600000000002 -32.06148215156899
1.3656400000000002 -32.06485449919327
1.3688200000000001 -32.067435793549166
1.372 -32.06925547236386
1.37518 -32.070342589918425
1.37836 -32.07072603048296