diff --git a/doc/src/Commands_pair.rst b/doc/src/Commands_pair.rst index 2ca0e88729..8d28bb7bb6 100644 --- a/doc/src/Commands_pair.rst +++ b/doc/src/Commands_pair.rst @@ -221,6 +221,7 @@ OPT. * :doc:`polymorphic ` * :doc:`python ` * :doc:`quip ` + * :doc:`rann ` * :doc:`reax/c (ko) ` * :doc:`rebo (io) ` * :doc:`resquared (go) ` diff --git a/doc/src/pair_rann.rst b/doc/src/pair_rann.rst index 72f1768364..af9b90de14 100644 --- a/doc/src/pair_rann.rst +++ b/doc/src/pair_rann.rst @@ -253,7 +253,7 @@ is given by: E = \sum_{\alpha} E^{\alpha}\\\\ E^{\alpha} = {}^{N}\!A^{\alpha}\\\\ {}^{n+1}\!A_i^{\alpha} = {}^{n}\!F\left({}^{n}\!W_{ij}{\;}^{n}\!A_j^{\alpha}+{}^{n}\!B_i\right)\\\\ - {}^{0}\!A_i^{\alpha} = \left[\begin{array} S{}^1\!S\!f^\alpha\\ {}^2\!S\!f^\alpha \\...\\\end{array}\right] + {}^{0}\!A_i^{\alpha} = \left[\begin{array}{c} {}^1\!S\!f^\alpha\\ {}^2\!S\!f^\alpha \\...\\\end{array}\right] Here :math:`E^\alpha` is the energy of atom :math:`\alpha`, :math:`{}^n\!F()`, :math:`{}^n\!W_{ij}` and :math:`{}^n\!B_i` are the activation function, weight matrix and bias vector of the n-th layer respectively. The @@ -283,7 +283,7 @@ is the bond angle: \\ C = \frac{2\left(X^{\alpha\gamma}+X^{\gamma\beta}\right)-\left(X^{\alpha\gamma}-X^{\gamma\beta}\right)^2-1}{1-\left(X^{\alpha\gamma}-X^{\gamma\beta}\right)^2}\\ \\ - f_c(x) = \left[\begin{array} 11 \; x \geq 1\\ \left(1-\left(1-x\right)^4\right)^2 \; 0` - polymorphic 3-body potential * :doc:`python ` - * :doc:`quip ` - +* :doc:`rann ` - * :doc:`reax/c ` - ReaxFF potential in C * :doc:`rebo ` - second generation REBO potential of Brenner * :doc:`resquared ` - Everaers RE-Squared ellipsoidal potential diff --git a/potentials/Mg.rann b/potentials/Mg.rann deleted file mode 100644 index 23ce143f2e..0000000000 --- a/potentials/Mg.rann +++ /dev/null @@ -1,91 +0,0 @@ -# Neural Network Potential file created by MATLAB -atomtypes: -Mg -mass:Mg: -24.305 -fingerprints:Mg_Mg: - radialpower_0 -fingerprints:Mg_Mg_Mg: - bondpower_0 -fingerprintconstants:Mg_Mg:radialpower_0:re: -3.1936 -fingerprintconstants:Mg_Mg:radialpower_0:rc: -6 -fingerprintconstants:Mg_Mg:radialpower_0:dr: -2.8064 -fingerprintconstants:Mg_Mg:radialpower_0:n: -3 -fingerprintconstants:Mg_Mg:radialpower_0:o: --1 -fingerprintconstants:Mg_Mg:radialpower_0:alpha: -5.52 5.52 5.52 5.52 5.52 -fingerprintconstants:Mg_Mg_Mg:bondpower_0:re: -3.1936 -fingerprintconstants:Mg_Mg_Mg:bondpower_0:rc: -6 -fingerprintconstants:Mg_Mg_Mg:bondpower_0:dr: -2.8064 -fingerprintconstants:Mg_Mg_Mg:bondpower_0:m: -8 -fingerprintconstants:Mg_Mg_Mg:bondpower_0:alphak: -1 2 6 9 -fingerprintconstants:Mg_Mg_Mg:bondpower_0:k: -4 -networklayers:Mg: -3 -layersize:Mg:0: -37 -layersize:Mg:1: -20 -layersize:Mg:2: -1 -weight:Mg:0: - -2.854926896534886 1.551245978744016 -5.299486715905226 1.303032393066583 -3.927350992087088 0.806210218127504 -1.428595777065406 -0.168066964538803 -0.728351260519369 -0.157450640068210 5.491434639296052 1.080334461269439 -2.130535923458539 -1.156477049555650 -2.051010848588853 -0.782611130585220 -4.606523573915344 -2.387644217672982 -5.576794096713175 -3.318269168403370 -6.292539058097229 18.703592187192875 -2.381590380244950 2.799241528343801 -2.407391034332221 4.405517388343755 -9.491423045727968 8.229571895198635 2.527344035625121 -0.067244382960372 0.170484581466223 1.282379910053745 0.065724915799647 1.113377435138116 -0.573535002947138 1.560506886857219 -0.876475786409630 - -6.905795192470435 -7.464851024478298 -4.212312565059744 0.177224177577384 11.273321377353385 -0.210487659926669 -5.819374791289330 -2.033417952209441 -4.401498131844281 -2.128151337900873 -0.904360930561321 -3.305494550705017 -4.616231916010149 3.912909136253442 2.947676302989125 -2.342485904191098 -2.629380811311687 -6.884618057641441 -3.228814118217041 -13.703094807969595 -1.300216807828401 -2.261830509920602 0.027689516537923 -0.754770352048472 0.265831744444728 -0.578713086630345 1.235859586468241 -0.909393391144123 -0.130377276389241 0.005769129836449 -0.018101530784263 -0.153698562663844 -0.004256306458426 -0.129488729063532 0.071417563698228 -0.180101367188990 0.106998530785552 - 2.027368852731460 -2.234930329773146 8.824228524281670 1.704698789800998 -1.155837352063270 0.376652391418795 0.858355152247836 1.377681586792678 0.436289641520560 0.853917175552360 0.690614213233795 1.376492364541512 -2.015997328530133 1.369574870403928 0.055844805801055 0.783591606187434 0.404005434930766 1.206961052573969 -1.999327862233608 1.826075255464499 0.627227543558058 -17.260093530489559 -0.015436687195038 -5.792743983495749 1.941452350663885 -4.516251976247205 9.635327821970479 -7.154962635508413 -1.132501265775309 0.045219076986031 -0.144961660279011 -1.214358002605798 -0.035176354978761 -1.023461588111742 0.562378377829011 -1.423056677559738 0.843325995738792 - 1.208244516420682 -1.131840612824115 5.602916209454777 5.377189872565848 -8.289510961581353 -0.757639317978607 1.630815069114324 -0.339900851719867 0.082235533040557 0.540557520027109 -5.105403160100436 -1.014334786095929 2.143454227839968 0.951897441739667 0.979668365102507 3.548633747321196 8.841902370955873 1.763504926468970 3.512417602344678 1.382917514597444 5.555534077563014 -1.659972257416550 -2.351658713764479 -4.038187560819433 -0.088959774258771 -0.970180329948655 1.946111437202853 -0.300645322288457 1.144144327361578 -0.013167226701211 -0.002692066926437 -0.162155013181752 0.022921711089007 -0.104820739882106 0.094406387979159 -0.133404958291914 0.125683026190237 - 2.100928316978550 -5.183998527665579 -8.480879276100829 9.460380106942930 -5.201669626403725 0.962206904548074 -2.984661666784377 0.261183571650286 -3.848501149625126 -0.239707114702959 -8.596129999470033 0.521757831428229 -6.520209233371624 2.323033278087488 -0.265454776689194 1.523127304519969 -1.082726125483242 1.511022780061617 1.205965597804440 0.024474495360653 -3.483786353690174 14.171770758936283 -3.851702757605302 -1.798585833589429 4.049824434318227 0.069456670984154 -4.253485775805993 4.540282728384077 14.367909979660597 -0.197918108438600 0.311690000226778 1.819217692267907 0.210328518613983 1.580666788134497 -0.708099957875404 2.228865452878142 -1.144252642918932 - 1.262532693758904 0.350623829895615 -8.699901753422376 -3.085638499190991 6.389397372073611 1.179750651699251 -2.593445903455847 1.952325298053385 6.595055699523514 2.135194104048645 5.528706413590786 1.560624920794900 2.422460296183040 1.304225846779401 -7.241934606696978 1.636390257791887 -1.736384466347888 1.467247357487496 -2.853047935848705 0.759339373628147 -3.654077760246829 11.754664182440964 0.130595433294996 4.052940796844539 -1.224415821949852 3.148873042113080 -6.429982902218374 4.900113261521697 0.823458021034089 -0.029774951115797 0.098876543510691 0.819211676255803 0.024553459350792 0.690424769720306 -0.378293809056988 0.959647124562582 -0.567667252848028 - 1.077951213052746 -1.212884120455442 4.466696029681781 1.126522701233764 -0.824485886270087 0.746066586200740 0.237846800839545 2.412691828237975 0.265670197068234 2.547960690375329 0.251089808230521 2.789866425802990 -1.386565169169989 3.188365508353491 0.012788207345652 1.411569880351537 0.187923650084155 0.897708422676008 -1.186063481186897 1.817579144493965 0.005486752244332 -8.791529216651448 -0.007914899179980 -2.954460648767480 0.990232144780852 -2.303180614487853 4.914297841774428 -3.649557839866476 -0.577624553073888 0.023071421508466 -0.073933351726003 -0.619347250688672 -0.017940452989678 -0.521986222874665 0.286824650670929 -0.725787973584357 0.430113661483229 - 1.477170160541443 -1.649652581439826 6.213432897237716 1.400569462034309 -1.011276402537009 1.187897469736217 0.453209851000615 0.871685199158680 0.459321320291843 1.847312220269744 0.575610035134335 1.736036062978334 -1.860153349971864 2.116310742565068 0.031994029982359 0.458180992521830 0.264483774017290 1.209179594569965 -1.541309826350069 2.085021603546824 0.201598271251571 -12.106547394711939 -0.010869556896233 -4.065906834057119 1.362668952258048 -3.169692616907158 6.762715300426427 -5.022207983262414 -0.794878825801757 0.031744704425550 -0.101742280431958 -0.852305421462378 -0.024688589050509 -0.718323459269597 0.394709266338209 -0.998782081426093 0.591894259734427 - 3.433524389012201 -17.461788286235350 10.477660623704468 -5.777816863260376 1.914103672722578 0.018096330553880 -0.058070001804858 -0.070387239997111 0.173183121485576 -0.045144096781169 -0.171378715111243 0.095905929991461 0.071086574391139 -0.115350907959316 0.256550435439909 0.433809735763484 -0.863025644960901 0.488223534834578 1.213451867057584 -0.873878466713472 -0.796742757392603 -13.714272857908089 7.342980962765325 64.411093528170881 10.387772034565234 -18.536427206282116 36.869062803091644 -26.192181909491545 -76.230119220113451 -13.489960390399707 0.696638838828117 -13.112785864355953 -2.884037632878795 -10.509259276761314 -0.367453998594681 -12.268265660772627 0.697571815289684 - -0.127608387430088 0.115300949266899 -0.437150971619888 -0.133383966308027 0.121497970782513 -0.588669819740072 0.025758224769098 -0.952554844198443 -0.053640314558928 -0.365454037935086 0.129308125986025 -0.108538052032897 0.419666410719713 -0.626154283498825 -0.000249078140046 -0.147478260516556 -0.027032875858370 0.027866916754600 0.118178617778006 0.057943800212654 0.006595878355105 0.872180305198599 0.000779633398631 0.293574525283819 -0.098431741706998 0.228849445048682 -0.488441508114544 0.362715745551437 0.057399641976603 -0.002293960641186 0.007348131388532 0.061556392948764 0.001783028792910 0.051879800695321 -0.028507370794972 0.072135539589032 -0.042748769934250 - 6.381829674277219 -9.048190600698000 6.288111643495736 12.859689000600714 -7.950284963331926 -0.970019501268750 2.974296325271271 -0.265518710035594 3.942466510230380 0.269993334517349 8.414210339742439 -0.503624461184050 6.702627400542080 -2.230387593186117 0.250866190943356 -1.468229492221626 0.247068384710592 -1.396879607519626 0.665239379557282 -0.918952145927020 1.429461700682165 -15.803218589855202 -3.880476592562245 -11.877864843053574 7.432265722744073 -7.799320747356560 12.522656664504245 -7.918155443300065 12.404212000235528 -0.119232499915167 0.059383452319659 -0.294483753163383 0.149136663588460 -0.200756253322839 0.270808659593346 -0.248080700766084 0.323670903595105 - -0.174630851219475 0.043280581679653 -0.446460924331736 -0.178544685668711 0.036242615491561 -0.524739832236012 -0.066055003483814 -0.137301477746459 -0.260937722788983 -0.433701744197567 -0.202915786397843 -0.164266056105498 0.067411395038662 -0.937156750357017 -0.011279189601853 -0.020004506355464 -0.062554491544235 0.022590523114614 0.005757221221309 0.030386324941044 -0.142473382537104 0.774225371167432 0.000586551446714 0.260475983526433 -0.087519136219707 0.203162145763299 -0.433956694209711 0.322113054560167 0.050871468441467 -0.002036664806940 0.006526429550767 0.054676879236815 0.001583202407854 0.046082022464924 -0.025321978370274 0.064074051139615 -0.037971760564235 - 1.804009863208751 -1.996305019395112 7.740036521789937 1.588277242818513 -1.127917261976985 0.701006047346957 0.557741638403578 1.156565391221981 0.431154676709536 0.267492331905443 0.627850709462984 1.265970301880936 -1.494924752456795 1.939364476480926 0.046524941140489 0.934668819229131 0.342634065807298 0.391343475176609 -1.821750622749297 1.674946697561555 0.434698378479914 -15.135870610005762 -0.013558976481435 -5.081347218787830 1.703032625264342 -3.961512412227682 8.451989917310183 -6.276405372141420 -0.993423100238103 0.039669224673654 -0.127157904945782 -1.065214383909233 -0.030856015692956 -0.897763264572354 0.493308941368786 -1.248281399355681 0.739751462439964 - 1.307888003990277 -1.470165596889384 5.467224874622317 1.289881274307584 -0.938892247073344 1.331752505949844 0.537151376396538 -0.075378173532199 0.266500990656396 1.863487506524708 0.466975119525905 1.205289348036037 -1.557599888898875 1.648789441886696 0.024422842314144 1.193230614379106 0.231572766233420 0.892139401518918 -1.400371331161769 2.065766931528078 0.108468715937517 -10.742037993381615 -0.009655857775515 -3.608709961236443 1.209493294888381 -2.813266719855085 6.002491329081101 -4.457627644815942 -0.705526065191486 0.028177864002805 -0.090305007412531 -0.756494222655155 -0.021913204159751 -0.637573756175409 0.350338429089144 -0.886504900913266 0.525357052259401 - 1.558386094279491 -1.738794171282809 6.591215786058525 1.446257102140766 -1.030297257597810 0.865702182464186 0.712435361441494 1.443935746150295 0.443054428290101 1.415008392625009 0.490563331892227 0.721770756564936 -1.843974805913214 1.447665543613017 0.035872549918664 -0.166709499936668 0.283150849026334 1.068709451145629 -1.615148679265154 1.807215711113644 0.254016524992397 -12.873904534676676 -0.011552521483852 -4.323339814739654 1.448978628076924 -3.370447786810358 7.191077754521811 -5.340218997908830 -0.845225465359211 0.033754412034381 -0.108187186030265 -0.906294955878763 -0.026252522971385 -0.763825881404720 0.419712224908423 -1.062050230892440 0.629387965766975 - 0.902089419117165 0.368911320289205 -8.669057127373151 -2.858394823981106 6.876026844124112 0.449359543436865 3.212232877709710 2.301343293089906 -4.918023478422725 1.779808514019082 0.075997852285900 1.213908548868051 6.340631437124236 1.806639880874012 10.667794428429600 2.826887737164946 4.877448002936416 2.649500563815019 7.025883314722370 0.314429155946167 5.646355364868669 12.148758934398504 0.126774988579089 4.171148179432463 -1.268266698902179 3.240121622890479 -6.635394495266157 5.059976550931194 0.854046514711456 -0.030497259634990 0.101782937425919 0.845882737638225 0.025146523997290 0.712861326998738 -0.390781339641258 0.990877629774033 -0.586319907462099 - -6.854080311751575 -3.366413846641228 -13.072799595088947 -1.947514492844213 13.713838929601375 -0.019406446538777 8.473917855409606 1.004610551903908 9.093996565522684 3.207103662168222 3.901439651670244 2.983318187189680 -2.524579939084030 3.252784494652512 2.950876646744284 3.372023470643452 -0.464237673645948 3.755696203886226 3.808960469764337 2.339907193946746 5.146170730857166 17.834156726071658 0.035731510216900 6.005254664256362 -1.999420765454485 4.690139638769533 -9.977721762987899 7.426200989135139 1.184394487193257 -0.046748770059314 0.150461492361159 1.259105030698577 0.036602097122206 1.061204719522792 -0.582916554758782 1.475480676393535 -0.874188624044419 - -0.091871803641423 0.155712039736981 -1.736705516334532 -3.235473587990033 -7.662082879932669 0.592839860436439 -7.068870826737258 -0.399637343479208 -6.149104660398526 -2.063383569534510 7.873997147178776 -3.605791816207420 20.150381452293846 -3.351880740983101 -0.863899319401915 -4.018547645815094 -0.784923284019245 -4.442513682373789 0.250780859062035 -5.184517276334443 0.558648923127730 1.885233769145124 0.001521615587180 0.634399323585855 -0.213531910461594 0.494460218427058 -1.058719613823579 0.784528439330135 0.124197877420478 -0.004983773553378 0.015924450492573 0.133399802571537 0.003863441417922 0.112429943824441 -0.061782783107639 0.156329122431333 -0.092647205069654 - 0.482137277570261 0.655431110773911 0.092243100481870 0.244841673165367 0.207743962910201 -0.645933694930810 -0.982792443155817 -0.909615692956593 0.313478029717837 -0.555365598226454 4.163468659783327 -0.412159823135017 6.862260499419868 -3.302281380717564 1.482065536636173 -2.407385962358501 1.098207258186840 -1.807106215233626 1.383175114366523 -1.461187579432369 1.404195771393285 0.800616887078038 0.003684546162640 0.269069405372722 -0.087549656335027 0.209484975310045 -0.442918898899253 0.331272282874469 0.053885366476729 -0.002067807910823 0.006698932859304 0.056045887718202 0.001629610981992 0.047234045216482 -0.025947665446354 0.065674182157580 -0.038913439761760 - 12.149148826917946 4.657579636724005 1.764736473860053 0.870668138244216 6.223017368077887 -1.046145904487804 0.953308100141891 -1.978615490874998 -3.417207462372495 -2.506835762341485 -3.697370786082169 -0.450785302259934 -3.125213455592869 -1.637693139214092 -1.348769649727682 -1.994082907081566 2.283115627163778 -2.635964849784550 -3.318422800479618 -3.639669251682635 -0.145614294451353 -1.483837070228372 0.212891384076277 -0.324023869431791 0.362382513657968 -0.276474277638942 1.166715100587859 -0.608385924126500 -0.008353550840676 0.006659952284272 -0.013796269604796 -0.130275245160746 -0.002411584088968 -0.109852596493500 0.062271293211841 -0.153386893869237 0.092727416429870 -bias:Mg:0: - -5.812840455195256 - 15.010638582099496 - 29.624659288791705 - 6.089482003604780 - -20.183942564953359 - -19.131750622870765 - 25.425690046060971 - 27.624111929794111 - 0.740297410586282 - -4.844537022087861 - 20.211971127789965 - -3.950026427133535 - 28.926886494246766 - 25.304822365917076 - 27.383284316546206 - -14.878350779530585 - -13.726815004417979 - 0.300936029014161 - -1.610552372672948 - 17.876279610284211 -weight:Mg:1: - 8.393525190816597 -9.799005074799757 -7.735480085336927 -8.104124576752014 12.240026012539039 5.213425998776577 -3.945232488424331 -5.429176982828405 -99.914578185849578 3.921063641589451 -12.243519026057772 3.482819561249847 -6.785425943665748 -4.818862897620001 -5.773098229238692 5.383347312306200 8.019798211775075 8.499369933136281 3.569846715528147 -8.397559798533649 -bias:Mg:1: -1713.7664607023298 -activationfunctions:Mg:0: -sigI -activationfunctions:Mg:1: -linear diff --git a/src/activation.cpp b/src/activation.cpp index aaa409c4b0..5286eb4730 100644 --- a/src/activation.cpp +++ b/src/activation.cpp @@ -10,10 +10,23 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- - Contributing author: Christopher Barrett (MSU) barrett@me.msstate.edu + Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” + +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + */ #include "activation.h" diff --git a/src/activation.h b/src/activation.h index 3fba49723d..0188f80bff 100644 --- a/src/activation.h +++ b/src/activation.h @@ -10,10 +10,23 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- - Contributing author: Christopher Barrett (MSU) barrett@me.msstate.edu + Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” + +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + */ #ifndef ACTIVATION_H_ #define ACTIVATION_H_ diff --git a/src/activation_linear.cpp b/src/activation_linear.cpp index 2ad9594be1..ddb9ae54c9 100644 --- a/src/activation_linear.cpp +++ b/src/activation_linear.cpp @@ -10,14 +10,26 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- - Contributing author: Christopher Barrett (MSU) barrett@me.msstate.edu + Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” + +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + */ -#include #include "activation_linear.h" -#include "activation.h" + using namespace LAMMPS_NS; diff --git a/src/activation_linear.h b/src/activation_linear.h index ba39436f03..2ea0f55729 100644 --- a/src/activation_linear.h +++ b/src/activation_linear.h @@ -10,11 +10,23 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- - Contributing author: Christopher Barrett (MSU) barrett@me.msstate.edu -*/ + Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu + ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + */ #ifdef ACTIVATION_CLASS ActivationStyle(linear,Activation_linear) diff --git a/src/activation_sigI.cpp b/src/activation_sigI.cpp index cdf82982da..b14f1c503d 100644 --- a/src/activation_sigI.cpp +++ b/src/activation_sigI.cpp @@ -10,12 +10,23 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- - Contributing author: Christopher Barrett (MSU) barrett@me.msstate.edu + Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” -#include +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + */ #include "activation_sigI.h" using namespace LAMMPS_NS; diff --git a/src/activation_sigI.h b/src/activation_sigI.h index b47433a336..404af35cfd 100644 --- a/src/activation_sigI.h +++ b/src/activation_sigI.h @@ -10,10 +10,23 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- - Contributing author: Christopher Barrett (MSU) barrett@me.msstate.edu -*/ + Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu + ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” + +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + */ #ifdef ACTIVATION_CLASS diff --git a/src/fingerprint.cpp b/src/fingerprint.cpp index cdcb5855bd..89786b632a 100644 --- a/src/fingerprint.cpp +++ b/src/fingerprint.cpp @@ -10,18 +10,25 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” + +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + */ #include "fingerprint.h" -#include -#include -#include -#include -#include -#include using namespace LAMMPS_NS; diff --git a/src/fingerprint.h b/src/fingerprint.h index 1bef4c0ab8..35645742f4 100644 --- a/src/fingerprint.h +++ b/src/fingerprint.h @@ -10,10 +10,24 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- - Contributing author: Christopher Barrett (MSU) barrett@me.msstate.edu + Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” + +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + +----------------*/ #ifndef FINGERPRINT_H_ #define FINGERPRINT_H_ diff --git a/src/fingerprint_bond.cpp b/src/fingerprint_bond.cpp index 7fdece310c..1f8630ccb2 100644 --- a/src/fingerprint_bond.cpp +++ b/src/fingerprint_bond.cpp @@ -10,21 +10,26 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu - Doyl Dickel (MSU) doyl@cavs.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + */ #include "fingerprint_bond.h" -#include "fingerprint.h" -#include -#include -#include -#include -#include -#include + using namespace LAMMPS_NS; diff --git a/src/fingerprint_bond.h b/src/fingerprint_bond.h index 1d07d34f3b..42d5cb03c6 100644 --- a/src/fingerprint_bond.h +++ b/src/fingerprint_bond.h @@ -10,10 +10,23 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- - Contributing author: Christopher Barrett (MSU) barrett@me.msstate.edu + Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” + +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + */ #ifdef FINGERPRINT_CLASS diff --git a/src/fingerprint_bondscreened.cpp b/src/fingerprint_bondscreened.cpp index 54659581a7..c573f6aedb 100644 --- a/src/fingerprint_bondscreened.cpp +++ b/src/fingerprint_bondscreened.cpp @@ -10,21 +10,25 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu - Doyl Dickel (MSU) doyl@cavs.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + */ #include "fingerprint_bondscreened.h" -#include "fingerprint.h" -#include -#include -#include -#include -#include -#include using namespace LAMMPS_NS; diff --git a/src/fingerprint_bondscreened.h b/src/fingerprint_bondscreened.h index 912cd1f84f..945e1615fc 100644 --- a/src/fingerprint_bondscreened.h +++ b/src/fingerprint_bondscreened.h @@ -10,11 +10,23 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- - Contributing author: Christopher Barrett (MSU) barrett@me.msstate.edu + Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + */ #ifdef FINGERPRINT_CLASS FingerprintStyle(bondscreened,Fingerprint_bondscreened) diff --git a/src/fingerprint_bondscreenedspin.cpp b/src/fingerprint_bondscreenedspin.cpp index cf1812b700..ce7e7c9e51 100644 --- a/src/fingerprint_bondscreenedspin.cpp +++ b/src/fingerprint_bondscreenedspin.cpp @@ -10,21 +10,25 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu - Doyl Dickel (MSU) doyl@cavs.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” - +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + */ #include "fingerprint_bondscreenedspin.h" -#include "fingerprint.h" -#include -#include -#include -#include -#include -#include + using namespace LAMMPS_NS; diff --git a/src/fingerprint_bondscreenedspin.h b/src/fingerprint_bondscreenedspin.h index 8a081305ff..e560c16ddb 100644 --- a/src/fingerprint_bondscreenedspin.h +++ b/src/fingerprint_bondscreenedspin.h @@ -10,11 +10,23 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- - Contributing author: Christopher Barrett (MSU) barrett@me.msstate.edu + Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + */ #ifdef FINGERPRINT_CLASS FingerprintStyle(bondscreenedspin,Fingerprint_bondscreenedspin) diff --git a/src/fingerprint_bondspin.cpp b/src/fingerprint_bondspin.cpp index 69e214c77a..78a0bdd815 100644 --- a/src/fingerprint_bondspin.cpp +++ b/src/fingerprint_bondspin.cpp @@ -10,21 +10,25 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu - Doyl Dickel (MSU) doyl@cavs.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” - +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + */ #include "fingerprint_bondspin.h" -#include "fingerprint.h" -#include -#include -#include -#include -#include -#include + using namespace LAMMPS_NS; diff --git a/src/fingerprint_bondspin.h b/src/fingerprint_bondspin.h index 5190af7107..56c540b508 100644 --- a/src/fingerprint_bondspin.h +++ b/src/fingerprint_bondspin.h @@ -10,11 +10,23 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- - Contributing author: Christopher Barrett (MSU) barrett@me.msstate.edu + Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + */ #ifdef FINGERPRINT_CLASS FingerprintStyle(bondspin,Fingerprint_bondspin) diff --git a/src/fingerprint_radial.cpp b/src/fingerprint_radial.cpp index f42dfc8cef..71dbcd9ad8 100644 --- a/src/fingerprint_radial.cpp +++ b/src/fingerprint_radial.cpp @@ -10,20 +10,26 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- - Contributing author: Christopher Barrett (MSU) barrett@me.msstate.edu + Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + */ #include "fingerprint_radial.h" -#include "fingerprint.h" -#include -#include -#include -#include -#include -#include + using namespace LAMMPS_NS; diff --git a/src/fingerprint_radial.h b/src/fingerprint_radial.h index e828aa2c41..aeb1c2eca3 100644 --- a/src/fingerprint_radial.h +++ b/src/fingerprint_radial.h @@ -10,11 +10,23 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- - Contributing author: Christopher Barrett (MSU) barrett@me.msstate.edu + Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + */ #ifdef FINGERPRINT_CLASS FingerprintStyle(radial,Fingerprint_radial) diff --git a/src/fingerprint_radialscreened.cpp b/src/fingerprint_radialscreened.cpp index 003c7abbc3..3101ca0ab0 100644 --- a/src/fingerprint_radialscreened.cpp +++ b/src/fingerprint_radialscreened.cpp @@ -10,19 +10,26 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- - Contributing author: Christopher Barrett (MSU) barrett@me.msstate.edu + Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + */ #include "fingerprint_radialscreened.h" -#include -#include -#include -#include -#include -#include + using namespace LAMMPS_NS; diff --git a/src/fingerprint_radialscreened.h b/src/fingerprint_radialscreened.h index 1a2cc518ab..7f9b729222 100644 --- a/src/fingerprint_radialscreened.h +++ b/src/fingerprint_radialscreened.h @@ -10,11 +10,23 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- - Contributing author: Christopher Barrett (MSU) barrett@me.msstate.edu + Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + */ #ifdef FINGERPRINT_CLASS FingerprintStyle(radialscreened,Fingerprint_radialscreened) diff --git a/src/fingerprint_radialscreenedspin.cpp b/src/fingerprint_radialscreenedspin.cpp index 906715109c..48ad061489 100644 --- a/src/fingerprint_radialscreenedspin.cpp +++ b/src/fingerprint_radialscreenedspin.cpp @@ -10,19 +10,25 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- - Contributing author: Christopher Barrett (MSU) barrett@me.msstate.edu + Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” - +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + */ #include "fingerprint_radialscreenedspin.h" -#include -#include -#include -#include -#include -#include + using namespace LAMMPS_NS; diff --git a/src/fingerprint_radialscreenedspin.h b/src/fingerprint_radialscreenedspin.h index f5a835111d..76c4eae50a 100644 --- a/src/fingerprint_radialscreenedspin.h +++ b/src/fingerprint_radialscreenedspin.h @@ -10,11 +10,23 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- - Contributing author: Christopher Barrett (MSU) barrett@me.msstate.edu + Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + */ #ifdef FINGERPRINT_CLASS FingerprintStyle(radialscreenedspin,Fingerprint_radialscreenedspin) diff --git a/src/fingerprint_radialspin.cpp b/src/fingerprint_radialspin.cpp index 36b74488b6..67ff6982c5 100644 --- a/src/fingerprint_radialspin.cpp +++ b/src/fingerprint_radialspin.cpp @@ -10,21 +10,25 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- - Contributing author: Christopher Barrett (MSU) barrett@me.msstate.edu + Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” - +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + */ #include "fingerprint_radialspin.h" -#include "fingerprint.h" -#include -#include -#include -#include -#include -#include using namespace LAMMPS_NS; diff --git a/src/fingerprint_radialspin.h b/src/fingerprint_radialspin.h index c42b904d61..428c0e74e4 100644 --- a/src/fingerprint_radialspin.h +++ b/src/fingerprint_radialspin.h @@ -10,10 +10,23 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- - Contributing author: Christopher Barrett (MSU) barrett@me.msstate.edu + Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” + +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + */ #ifdef FINGERPRINT_CLASS diff --git a/src/pair_rann.cpp b/src/pair_rann.cpp index 84333d7710..3507c931dc 100644 --- a/src/pair_rann.cpp +++ b/src/pair_rann.cpp @@ -10,36 +10,42 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu - Doyl Dickel (MSU) doyl@cavs.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” + +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + */ -#include -#include -#include -#include -#include -#include -#include "atom.h" #include "style_fingerprint.h" #include "style_activation.h" -#include "force.h" -#include "comm.h" -#include "memory.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "neigh_request.h" -#include "memory.h" -#include "error.h" -#include "update.h" + #include "pair_rann.h" - - using namespace LAMMPS_NS; +static const char cite_user_rann_package[] = + "USER-RANN package:\n\n" + "@Article{Nitol2021,\n" + " author = {Nitol, Mashroor S and Dickel, Doyl E and Barrett, Christopher D},\n" + " title = {Artificial neural network potential for pure zinc},\n" + " journal = {Computational Materials Science},\n" + " year = 2021,\n" + " volume = 188,\n" + " pages = {110207}\n" + "}\n\n"; + PairRANN::PairRANN(LAMMPS *lmp) : Pair(lmp) { single_enable = 0; @@ -241,44 +247,43 @@ void PairRANN::read_file(char *filename) FILE *fp; int eof = 0,i,j,k,l; int n,nwords; - char line [MAXLINE],line1[MAXLINE]; - + int longline = 4096; + char line [longline],line1[longline]; char *ptr; bool comment; char str[128]; - fp = force->open_potential(filename); + fp = utils::open_potential(filename,lmp,nullptr); if (fp == NULL) { - sprintf(str,"Cannot open NN potential file %s",filename); + sprintf(str,"Cannot open rann potential file %s",filename); error->one(FLERR,str); } while (eof == 0){ - ptr = fgets(line,MAXLINE,fp); + ptr = fgets(line,longline,fp); if (ptr == NULL) { if (check_potential()) {//looks to see if everything needed appears to be defined error->one(FLERR,"Invalid syntax in potential file, values are inconsistent or missing"); } else{ - update_stack_size(); fclose(fp); eof = 1; break; } } else n = strlen(line) + 1; - // strip comment, skip line if blank - if ((ptr = strchr(line,'#'))) *ptr = '\0'; - nwords = count_words(line); - char **words = new char* [strlen(line)]; - if (nwords == 0) continue; + if ((ptr = strchr(line,'#'))) *ptr = '\0';//strip comments from end of lines + if (count_words(line)==0){continue;}//skip comment line comment = true; while (comment==true){ - ptr = fgets(line1,MAXLINE,fp); - if (ptr==NULL)error->one(FLERR,"Unexpected end of file"); + ptr = fgets(line1,longline,fp); + if (ptr==NULL)errorf("Unexpected end of parameter file (keyword given with no value)"); if ((ptr = strchr(line1,'#'))) *ptr = '\0'; nwords = count_words(line1); if (nwords == 0) continue; comment = false; } + line1[strlen(line1)-1] = '\0';//replace \n with \0 + nwords = count_words(line); + char **words=new char *[nwords+1]; nwords = 0; words[nwords++] = strtok(line,": ,\t_\n"); while ((words[nwords++] = strtok(NULL,": ,\t_\n"))) continue; @@ -369,8 +374,6 @@ void PairRANN::read_fingerprints(char **words,int nwords,char * line1){ i1 = fingerprintcount[i]; delete fingerprints[i][i1]; fingerprints[i][i1] = create_fingerprint(words1[k]); - sprintf(str,"%d %d\n",nwords-1,fingerprints[i][i1]->n_body_type); - std::cout<n_body_type!=nwords-1){error->one(FLERR,"invalid fingerprint for element combination");} k++; fingerprints[i][i1]->init(atomtypes,strtol(words1[k++],NULL,10)); @@ -425,15 +428,17 @@ void PairRANN::read_network_layers(char **words,char *line1){ for (i=0;ione(FLERR,"invalid number of network layers"); + if (net[i].layers < 1)errorf("invalid number of network layers"); delete [] net[i].dimensions; - net[i].dimensions = new int [net[i].layers]; weightdefined[i] = new bool [net[i].layers]; biasdefined[i] = new bool [net[i].layers]; + net[i].dimensions = new int [net[i].layers]; net[i].Weights = new double * [net[i].layers-1]; net[i].Biases = new double * [net[i].layers-1]; + net[i].activations = new int [net[i].layers-1]; for (j=0;jone(FLERR,"networklayers for each atom type must be defined before the corresponding layer sizes."); int j = strtol(words[2],NULL,10); - if (j>=net[i].layers || j<0){errorf("invalid layer in layer size definition");}; + if (j>=net[i].layers || j<0){error->one(FLERR,"invalid layer in layer size definition");}; net[i].dimensions[j]= strtol(line1,NULL,10); -// net[i].Weights[j] = new double [1]; -// net[i].Weights[j][0]=0; -// net[i].Biases[j] = new double [1]; -// net[i].Biases[j][0] = 0; return; } } - error->one(FLERR,"layer size element not found in atom types"); + errorf("layer size element not found in atom types"); } void PairRANN::read_weight(char **words,char* line1,FILE* fp){ int i,j,k,l,nwords; char *ptr; + int longline = 4096; char **words1; for (l=0;lone(FLERR,"networklayers must be defined before weights."); + if (net[l].layers==0)errorf("networklayers must be defined before weights."); i=strtol(words[2],NULL,10); if (i>=net[l].layers || i<0)error->one(FLERR,"invalid weight layer"); - if (net[l].dimensions[i]==0 || net[l].dimensions[i+1]==0) error->one(FLERR,"network layer sizes must be defined before corresponding weight"); -// delete [] net[l].Weights[i]; + if (net[l].dimensions[i]==0 || net[l].dimensions[i+1]==0) errorf("network layer sizes must be defined before corresponding weight"); net[l].Weights[i] = new double [net[l].dimensions[i]*net[l].dimensions[i+1]]; weightdefined[l][i] = true; int n = count_words(line1)+1; @@ -489,7 +490,8 @@ void PairRANN::read_weight(char **words,char* line1,FILE* fp){ net[l].Weights[i][k] = strtod(words1[k],NULL); } for (j=1;jone(FLERR,"weight element not found in atom types"); + errorf("weight element not found in atom types"); } void PairRANN::read_bias(char **words,char* line1,FILE* fp){ @@ -552,13 +554,6 @@ void PairRANN::read_activation_functions(char** words,char * line1){ void PairRANN::read_screening(char** words,int nwords,char *line1){ int i,j,k; bool found; -// char str[MAXLINE]; -// sprintf(str,"%d\n",nwords); -// for (i=0;itype[i]]; f = net[itype].dimensions[0]; jnum = sims->numneigh[i]; - double xn[jnum]; - double yn[jnum]; - double zn[jnum]; - int tn[jnum]; - int jl[jnum]; + double *xn = new double[jnum]; + double *yn = new double[jnum]; + double *zn = new double[jnum]; + int *tn = new int[jnum]; + int *jl = new int[jnum]; cull_neighbor_list(xn,yn,zn,tn,&jnum,jl,i,0); double features [f]; - double dfeaturesx[f*jnum]; - double dfeaturesy[f*jnum]; - double dfeaturesz[f*jnum]; + double *dfeaturesx = new double[f*jnum]; + double *dfeaturesy = new double[f*jnum]; + double *dfeaturesz = new double[f*jnum]; for (j=0;jspin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); } - clock_t t3 = clock(); //run fingerprints through network if (dospin){ propagateforwardspin(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,&energy,force,fm,virial,ii,jnum,jl); @@ -733,15 +725,26 @@ void PairRANN::compute(int eflag, int vflag) else { propagateforward(features,dfeaturesx,dfeaturesy,dfeaturesz,&energy,force,virial,ii,jnum,jl); } - //testdfeatures(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii); - clock_t t4 = clock(); - double ts = (double) (t2-t1) / CLOCKS_PER_SEC * 1000.0; - double tf = (double) (t3-t2) / CLOCKS_PER_SEC * 1000.0; - double tp = (double) (t4-t3) / CLOCKS_PER_SEC * 1000.0; - sprintf(str,"screen time: %f, fingerprint time: %f, propagation time: %f\n",ts,tf,tp); -// std::cout<type; - inum = sims->inum; - ilist = sims->ilist; - int f = net[itype].dimensions[0]; - double cutinv2 = 1/cutmax/cutmax; - i = sims->ilist[ii]; - numneigh = sims->numneigh; - firstneigh = sims->firstneigh; - jlist = firstneigh[i]; - itype = map[sims->type[i]]; - f = net[itype].dimensions[0]; - jnum = sims->numneigh[i]; - double xn[jnum]; - double yn[jnum]; - double zn[jnum]; - int tn[jnum]; - int jl[jnum]; - double features1x [f]; - double features2x [f]; - double features1y [f]; - double features2y [f]; - double features1z [f]; - double features2z [f]; - double features1sx [f]; - double features2sx [f]; - double features1sy [f]; - double features2sy [f]; - double features1sz [f]; - double features2sz [f]; - double dfeaturesx1[f*jnum]; - double dfeaturesy1[f*jnum]; - double dfeaturesz1[f*jnum]; - double dspinx1[f*jnum]; - double dspiny1[f*jnum]; - double dspinz1[f*jnum]; - double dfxtest[f*jnum]; - double dfytest[f*jnum]; - double dfztest[f*jnum]; - double dfstestx[f*jnum]; - double dfstesty[f*jnum]; - double dfstestz[f*jnum]; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features1x,dfeaturesx1,dfeaturesy1,dfeaturesz1,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features1x,dfeaturesx1,dfeaturesy1,dfeaturesz1,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features1x,dfeaturesx1,dfeaturesy1,dfeaturesz1,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features1x,dfeaturesx1,dfeaturesy1,dfeaturesz1,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - xn[jj] = xn[jj]-2*del; - if (doscreen){ - screen(Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,0,xn,yn,zn,tn,jnum-1); - } - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features2x,dfeaturesx1,dfeaturesy1,dfeaturesz1,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features2x,dfeaturesx1,dfeaturesy1,dfeaturesz1,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features2x,dfeaturesx1,dfeaturesy1,dfeaturesz1,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features2x,dfeaturesx1,dfeaturesy1,dfeaturesz1,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - for (k=0;kspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features1y,dfeaturesx1,dfeaturesy1,dfeaturesz1,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features1y,dfeaturesx1,dfeaturesy1,dfeaturesz1,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features1y,dfeaturesx1,dfeaturesy1,dfeaturesz1,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features1y,dfeaturesx1,dfeaturesy1,dfeaturesz1,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - yn[jj] = yn[jj]-2*del; - if (doscreen){ - screen(Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,0,xn,yn,zn,tn,jnum-1); - } - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features2y,dfeaturesx1,dfeaturesy1,dfeaturesz1,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features2y,dfeaturesx1,dfeaturesy1,dfeaturesz1,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features2y,dfeaturesx1,dfeaturesy1,dfeaturesz1,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features2y,dfeaturesx1,dfeaturesy1,dfeaturesz1,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - for (k=0;kspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features1z,dfeaturesx1,dfeaturesy1,dfeaturesz1,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features1z,dfeaturesx1,dfeaturesy1,dfeaturesz1,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features1z,dfeaturesx1,dfeaturesy1,dfeaturesz1,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features1z,dfeaturesx1,dfeaturesy1,dfeaturesz1,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - zn[jj] = zn[jj]-2*del; - if (doscreen){ - screen(Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,0,xn,yn,zn,tn,jnum-1); - } - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features2z,dfeaturesx1,dfeaturesy1,dfeaturesz1,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features2z,dfeaturesx1,dfeaturesy1,dfeaturesz1,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features2z,dfeaturesx1,dfeaturesy1,dfeaturesz1,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features2z,dfeaturesx1,dfeaturesy1,dfeaturesz1,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - for (k=0;ks[jj1][0]+=del; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features1sx,dfeaturesx1,dfeaturesy1,dfeaturesz1,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features1sx,dfeaturesx1,dfeaturesy1,dfeaturesz1,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features1sx,dfeaturesx1,dfeaturesy1,dfeaturesz1,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features1sx,dfeaturesx1,dfeaturesy1,dfeaturesz1,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - sims->s[jj1][0]-=2*del; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features2sx,dfeaturesx1,dfeaturesy1,dfeaturesz1,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features2sx,dfeaturesx1,dfeaturesy1,dfeaturesz1,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features2sx,dfeaturesx1,dfeaturesy1,dfeaturesz1,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features2sx,dfeaturesx1,dfeaturesy1,dfeaturesz1,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - for (k=0;ks[jj1][0]+=del; - sims->s[jj1][1]+=del; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features1sy,dfeaturesx1,dfeaturesy1,dfeaturesz1,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features1sy,dfeaturesx1,dfeaturesy1,dfeaturesz1,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features1sy,dfeaturesx1,dfeaturesy1,dfeaturesz1,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features1sy,dfeaturesx1,dfeaturesy1,dfeaturesz1,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - sims->s[jj1][1]-=2*del; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features2sy,dfeaturesx1,dfeaturesy1,dfeaturesz1,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features2sy,dfeaturesx1,dfeaturesy1,dfeaturesz1,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features2sy,dfeaturesx1,dfeaturesy1,dfeaturesz1,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features2sy,dfeaturesx1,dfeaturesy1,dfeaturesz1,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - for (k=0;ks[jj1][1]+=del; - sims->s[jj1][2]+=del; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features1sz,dfeaturesx1,dfeaturesy1,dfeaturesz1,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features1sz,dfeaturesx1,dfeaturesy1,dfeaturesz1,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features1sz,dfeaturesx1,dfeaturesy1,dfeaturesz1,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features1sz,dfeaturesx1,dfeaturesy1,dfeaturesz1,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - sims->s[jj1][2]-=2*del; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features2sz,dfeaturesx1,dfeaturesy1,dfeaturesz1,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features2sz,dfeaturesx1,dfeaturesy1,dfeaturesz1,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features2sz,dfeaturesx1,dfeaturesy1,dfeaturesz1,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features2sz,dfeaturesx1,dfeaturesy1,dfeaturesz1,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - for (k=0;ks[jj1][2]+=del; - for (k=0;kone(FLERR,"terminate"); - } -} - -void PairRANN::testdenergy(){ - double **force = atom->f; - double **fm = atom->fm; - double del = 0.00002; - int ii,i,j; - int nn = 0; - double ex1,ex2,ey1,ey2,ez1,ez2,esx1,esx2,esy1,esy2,esz1,esz2; - ex1=ex2=ey1=ey2=ez1=ez2=esx1=esx2=esy1=esy2=esz1=esz2=0.0; - double **force1 = new double *[listfull->maxatom]; - double **fm1 = new double *[listfull->maxatom]; - double **force1n = new double *[listfull->maxatom]; - double **fm1n = new double *[listfull->maxatom]; - for (i=0;imaxatom;i++){ - force1[i]=new double [3]; - fm1[i] = new double [3]; - force1n[i]=new double [3]; - fm1n[i] = new double [3]; - } - for (int n=0;ninum;n++){ - int itype,f,jnum,len; - double **virial = vatom; - char str[MAXLINE]; - eng_vdwl=0; - //loop over atoms - sims->x[n][0]+=del; - for (ii=0;iiinum;ii++){ - i = sims->ilist[ii]; - itype = map[sims->type[i]]; - f = net[itype].dimensions[0]; - jnum = sims->numneigh[i]; - double xn[jnum]; - double yn[jnum]; - double zn[jnum]; - int tn[jnum]; - int jl[jnum]; - cull_neighbor_list(xn,yn,zn,tn,&jnum,jl,i,0); - double features [f]; - double dfeaturesx[f*jnum]; - double dfeaturesy[f*jnum]; - double dfeaturesz[f*jnum]; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - itype = nelements; - //do fingerprints for type "all" - len = fingerprintperelement[itype]; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - //run fingerprints through network - if (dospin){ - propagateforwardspin(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,&ex1,force1,fm1,virial,ii,jnum,jl); - } - else { - propagateforward(features,dfeaturesx,dfeaturesy,dfeaturesz,&ex1,force1,virial,ii,jnum,jl); - } - ex1=eng_vdwl; - } - eng_vdwl=0; - //loop over atoms - sims->x[n][0]-=2*del; - for (ii=0;iiinum;ii++){ - i = sims->ilist[ii]; - itype = map[sims->type[i]]; - f = net[itype].dimensions[0]; - jnum = sims->numneigh[i]; - double xn[jnum]; - double yn[jnum]; - double zn[jnum]; - int tn[jnum]; - int jl[jnum]; - cull_neighbor_list(xn,yn,zn,tn,&jnum,jl,i,0); - double features [f]; - double dfeaturesx[f*jnum]; - double dfeaturesy[f*jnum]; - double dfeaturesz[f*jnum]; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - itype = nelements; - //do fingerprints for type "all" - len = fingerprintperelement[itype]; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - //run fingerprints through network - if (dospin){ - propagateforwardspin(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,&ex2,force1,fm1,virial,ii,jnum,jl); - } - else { - propagateforward(features,dfeaturesx,dfeaturesy,dfeaturesz,&ex2,force1,virial,ii,jnum,jl); - } - ex2=eng_vdwl; - } - force1n[n][0]=(ex1-ex2)/2/del; - eng_vdwl=0; - //loop over atoms - sims->x[n][0]+=del; - sims->x[n][1]+=del; - for (ii=0;iiinum;ii++){ - i = sims->ilist[ii]; - itype = map[sims->type[i]]; - f = net[itype].dimensions[0]; - jnum = sims->numneigh[i]; - double xn[jnum]; - double yn[jnum]; - double zn[jnum]; - int tn[jnum]; - int jl[jnum]; - cull_neighbor_list(xn,yn,zn,tn,&jnum,jl,i,0); - double features [f]; - double dfeaturesx[f*jnum]; - double dfeaturesy[f*jnum]; - double dfeaturesz[f*jnum]; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - itype = nelements; - //do fingerprints for type "all" - len = fingerprintperelement[itype]; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - //run fingerprints through network - if (dospin){ - propagateforwardspin(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,&ey1,force1,fm1,virial,ii,jnum,jl); - } - else { - propagateforward(features,dfeaturesx,dfeaturesy,dfeaturesz,&ey1,force1,virial,ii,jnum,jl); - } - ey1=eng_vdwl; - } - eng_vdwl=0; - //loop over atoms - sims->x[n][1]-=2*del; - for (ii=0;iiinum;ii++){ - i = sims->ilist[ii]; - itype = map[sims->type[i]]; - f = net[itype].dimensions[0]; - jnum = sims->numneigh[i]; - double xn[jnum]; - double yn[jnum]; - double zn[jnum]; - int tn[jnum]; - int jl[jnum]; - cull_neighbor_list(xn,yn,zn,tn,&jnum,jl,i,0); - double features [f]; - double dfeaturesx[f*jnum]; - double dfeaturesy[f*jnum]; - double dfeaturesz[f*jnum]; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - itype = nelements; - //do fingerprints for type "all" - len = fingerprintperelement[itype]; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - //run fingerprints through network - if (dospin){ - propagateforwardspin(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,&ey2,force1,fm1,virial,ii,jnum,jl); - } - else { - propagateforward(features,dfeaturesx,dfeaturesy,dfeaturesz,&ey2,force1,virial,ii,jnum,jl); - } - ey2=eng_vdwl; - } - eng_vdwl=0; - force1n[n][1]=(ey1-ey2)/2/del; - //loop over atoms - sims->x[n][1]+=del; - sims->x[n][2]+=del; - for (ii=0;iiinum;ii++){ - i = sims->ilist[ii]; - itype = map[sims->type[i]]; - f = net[itype].dimensions[0]; - jnum = sims->numneigh[i]; - double xn[jnum]; - double yn[jnum]; - double zn[jnum]; - int tn[jnum]; - int jl[jnum]; - cull_neighbor_list(xn,yn,zn,tn,&jnum,jl,i,0); - double features [f]; - double dfeaturesx[f*jnum]; - double dfeaturesy[f*jnum]; - double dfeaturesz[f*jnum]; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - itype = nelements; - //do fingerprints for type "all" - len = fingerprintperelement[itype]; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - //run fingerprints through network - if (dospin){ - propagateforwardspin(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,&ez1,force1,fm1,virial,ii,jnum,jl); - } - else { - propagateforward(features,dfeaturesx,dfeaturesy,dfeaturesz,&ez1,force1,virial,ii,jnum,jl); - } - ez1=eng_vdwl; - } - eng_vdwl=0; - //loop over atoms - sims->x[n][2]-=2*del; - for (ii=0;iiinum;ii++){ - i = sims->ilist[ii]; - itype = map[sims->type[i]]; - f = net[itype].dimensions[0]; - jnum = sims->numneigh[i]; - double xn[jnum]; - double yn[jnum]; - double zn[jnum]; - int tn[jnum]; - int jl[jnum]; - cull_neighbor_list(xn,yn,zn,tn,&jnum,jl,i,0); - double features [f]; - double dfeaturesx[f*jnum]; - double dfeaturesy[f*jnum]; - double dfeaturesz[f*jnum]; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - itype = nelements; - //do fingerprints for type "all" - len = fingerprintperelement[itype]; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - //run fingerprints through network - if (dospin){ - propagateforwardspin(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,&ez2,force1,fm1,virial,ii,jnum,jl); - } - else { - propagateforward(features,dfeaturesx,dfeaturesy,dfeaturesz,&ez2,force1,virial,ii,jnum,jl); - } - ez2=eng_vdwl; - } - eng_vdwl=0; - sims->x[n][2]+=del; - force1n[n][2]=(ez1-ez2)/2/del; - - //loop over atoms - sims->s[n][0]+=del; - for (ii=0;iiinum;ii++){ - i = sims->ilist[ii]; - itype = map[sims->type[i]]; - f = net[itype].dimensions[0]; - jnum = sims->numneigh[i]; - double xn[jnum]; - double yn[jnum]; - double zn[jnum]; - int tn[jnum]; - int jl[jnum]; - cull_neighbor_list(xn,yn,zn,tn,&jnum,jl,i,0); - double features [f]; - double dfeaturesx[f*jnum]; - double dfeaturesy[f*jnum]; - double dfeaturesz[f*jnum]; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - itype = nelements; - //do fingerprints for type "all" - len = fingerprintperelement[itype]; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - //run fingerprints through network - if (dospin){ - propagateforwardspin(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,&esx1,force1,fm1,virial,ii,jnum,jl); - } - else { - propagateforward(features,dfeaturesx,dfeaturesy,dfeaturesz,&esx1,force1,virial,ii,jnum,jl); - } - esx1=eng_vdwl; - } - eng_vdwl=0; - //loop over atoms - sims->s[n][0]-=2*del; - for (ii=0;iiinum;ii++){ - i = sims->ilist[ii]; - itype = map[sims->type[i]]; - f = net[itype].dimensions[0]; - jnum = sims->numneigh[i]; - double xn[jnum]; - double yn[jnum]; - double zn[jnum]; - int tn[jnum]; - int jl[jnum]; - cull_neighbor_list(xn,yn,zn,tn,&jnum,jl,i,0); - double features [f]; - double dfeaturesx[f*jnum]; - double dfeaturesy[f*jnum]; - double dfeaturesz[f*jnum]; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - itype = nelements; - //do fingerprints for type "all" - len = fingerprintperelement[itype]; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - //run fingerprints through network - if (dospin){ - propagateforwardspin(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,&esx2,force1,fm1,virial,ii,jnum,jl); - } - else { - propagateforward(features,dfeaturesx,dfeaturesy,dfeaturesz,&esx2,force1,virial,ii,jnum,jl); - } - esx2=eng_vdwl; - } - eng_vdwl=0; - fm1n[n][0]=(esx1-esx2)/2/del; - //loop over atoms - sims->s[n][0]+=del; - sims->s[n][1]+=del; - for (ii=0;iiinum;ii++){ - i = sims->ilist[ii]; - itype = map[sims->type[i]]; - f = net[itype].dimensions[0]; - jnum = sims->numneigh[i]; - double xn[jnum]; - double yn[jnum]; - double zn[jnum]; - int tn[jnum]; - int jl[jnum]; - cull_neighbor_list(xn,yn,zn,tn,&jnum,jl,i,0); - double features [f]; - double dfeaturesx[f*jnum]; - double dfeaturesy[f*jnum]; - double dfeaturesz[f*jnum]; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - itype = nelements; - //do fingerprints for type "all" - len = fingerprintperelement[itype]; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - //run fingerprints through network - if (dospin){ - propagateforwardspin(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,&esy1,force1,fm1,virial,ii,jnum,jl); - } - else { - propagateforward(features,dfeaturesx,dfeaturesy,dfeaturesz,&esy1,force1,virial,ii,jnum,jl); - } - esy1=eng_vdwl; - } - eng_vdwl=0; - //loop over atoms - sims->s[n][1]-=2*del; - for (ii=0;iiinum;ii++){ - i = sims->ilist[ii]; - itype = map[sims->type[i]]; - f = net[itype].dimensions[0]; - jnum = sims->numneigh[i]; - double xn[jnum]; - double yn[jnum]; - double zn[jnum]; - int tn[jnum]; - int jl[jnum]; - cull_neighbor_list(xn,yn,zn,tn,&jnum,jl,i,0); - double features [f]; - double dfeaturesx[f*jnum]; - double dfeaturesy[f*jnum]; - double dfeaturesz[f*jnum]; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - itype = nelements; - //do fingerprints for type "all" - len = fingerprintperelement[itype]; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - //run fingerprints through network - if (dospin){ - propagateforwardspin(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,&esy2,force1,fm1,virial,ii,jnum,jl); - } - else { - propagateforward(features,dfeaturesx,dfeaturesy,dfeaturesz,&esy2,force1,virial,ii,jnum,jl); - } - esy2=eng_vdwl; - } - eng_vdwl=0; - fm1n[n][1]=(esy1-esy2)/2/del; - //loop over atoms - sims->x[n][1]+=del; - sims->x[n][2]+=del; - for (ii=0;iiinum;ii++){ - i = sims->ilist[ii]; - itype = map[sims->type[i]]; - f = net[itype].dimensions[0]; - jnum = sims->numneigh[i]; - double xn[jnum]; - double yn[jnum]; - double zn[jnum]; - int tn[jnum]; - int jl[jnum]; - cull_neighbor_list(xn,yn,zn,tn,&jnum,jl,i,0); - double features [f]; - double dfeaturesx[f*jnum]; - double dfeaturesy[f*jnum]; - double dfeaturesz[f*jnum]; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - itype = nelements; - //do fingerprints for type "all" - len = fingerprintperelement[itype]; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - //run fingerprints through network - if (dospin){ - propagateforwardspin(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,&esz1,force1,fm1,virial,ii,jnum,jl); - } - else { - propagateforward(features,dfeaturesx,dfeaturesy,dfeaturesz,&esz1,force1,virial,ii,jnum,jl); - } - esz1=eng_vdwl; - } - eng_vdwl=0; - //loop over atoms - sims->s[n][2]-=2*del; - for (ii=0;iiinum;ii++){ - i = sims->ilist[ii]; - itype = map[sims->type[i]]; - f = net[itype].dimensions[0]; - jnum = sims->numneigh[i]; - double xn[jnum]; - double yn[jnum]; - double zn[jnum]; - int tn[jnum]; - int jl[jnum]; - cull_neighbor_list(xn,yn,zn,tn,&jnum,jl,i,0); - double features [f]; - double dfeaturesx[f*jnum]; - double dfeaturesy[f*jnum]; - double dfeaturesz[f*jnum]; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - itype = nelements; - //do fingerprints for type "all" - len = fingerprintperelement[itype]; - for (j=0;jspin==false && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==false && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==false)fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,ii,nn,xn,yn,zn,tn,jnum-1,jl); - else if (fingerprints[itype][j]->spin==true && fingerprints[itype][j]->screen==true) fingerprints[itype][j]->compute_fingerprint(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,Sik,dSikx,dSiky,dSikz,dSijkx,dSijky,dSijkz,Bij,ii,nn,xn,yn,zn,tn,jnum-1,jl); - } - //run fingerprints through network - if (dospin){ - propagateforwardspin(features,dfeaturesx,dfeaturesy,dfeaturesz,sx,sy,sz,&esz2,force1,fm1,virial,ii,jnum,jl); - } - else { - propagateforward(features,dfeaturesx,dfeaturesy,dfeaturesz,&esz2,force1,virial,ii,jnum,jl); - } - esz2=eng_vdwl; - } - eng_vdwl=0; - sims->s[n][2]+=del; - fm1n[n][2]=(esz1-esz2)/2/del; - sprintf(str,"atom: %d fx: %f fxn: %f fy: %f fyn: %f fz: %f fzn: %f fmx: %f fmxn: %f fmy: %f fmyn: %f fmz: %f fmzn: %f\n",n,force[n][0],force1n[n][0],force[n][1],force1n[n][1],force[n][2],force1n[n][2],fm[n][0],fm1n[n][0],fm[n][1],fm1n[n][1],fm[n][2],fm1n[n][2]); - std::cout<error->all(FLERR,message); } diff --git a/src/pair_rann.h b/src/pair_rann.h index d2746954d2..1358c67fb0 100644 --- a/src/pair_rann.h +++ b/src/pair_rann.h @@ -10,12 +10,23 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- Contributing authors: Christopher Barrett (MSU) barrett@me.msstate.edu - Doyl Dickel (MSU) doyl@cavs.msstate.edu + Doyl Dickel (MSU) doyl@me.msstate.edu ----------------------------------------------------------------------*/ +/* +“The research described and the resulting data presented herein, unless +otherwise noted, was funded under PE 0602784A, Project T53 "Military +Engineering Applied Research", Task 002 under Contract No. W56HZV-17-C-0095, +managed by the U.S. Army Combat Capabilities Development Command (CCDC) and +the Engineer Research and Development Center (ERDC). The work described in +this document was conducted at CAVS, MSU. Permission was granted by ERDC +to publish this information. Any opinions, findings and conclusions or +recommendations expressed in this material are those of the author(s) and +do not necessarily reflect the views of the United States Army.​” +DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918 + */ #ifdef PAIR_CLASS @@ -26,14 +37,26 @@ PairStyle(rann,PairRANN) #ifndef LMP_PAIR_RANN #define LMP_PAIR_RANN -#define MAXLINE 4096 +#define MAXLINE 1024 +#include +#include +#include +#include +#include +#include "atom.h" +#include "force.h" +#include "comm.h" +#include "memory.h" +#include "neighbor.h" #include "neigh_list.h" +#include "neigh_request.h" +#include "memory.h" +#include "error.h" +#include "update.h" #include "pair.h" #include -#include #include -#include namespace LAMMPS_NS { @@ -49,7 +72,7 @@ class PairRANN : public Pair { void init_style(); double init_one(int, int); void init_list(int , NeighList *); - void errorf(char*); + void errorf(const char*); int count_words(char *); //black magic for modular fingerprints and activations class Activation ***activation; @@ -79,8 +102,6 @@ class PairRANN : public Pair { bool dospin; int res;//Resolution of function tables for cubic interpolation. int memguess; -// double *Sik,*dSikx,*dSiky,*dSikz,*dSijkx,*dSijky,*dSijkz; -// bool *Bij; double *screening_min; double *screening_max; bool **weightdefined; @@ -137,11 +158,8 @@ class PairRANN : public Pair { void propagateforward(double *,double *,double *,double *,double *,double **,double **,int,int,int*);//called by compute to get force and energy void propagateforwardspin(double *,double *,double *,double *,double *,double *,double *,double *,double **,double **,double**,int,int,int*);//called by compute to get force and energy void screen(double*,double*,double*,double*,double*,double*,double*,bool*,int,int,double*,double*,double*,int *,int); - void testdfeatures(double *,double *, double *, double *,double *,double *, double *,int); - void testdenergy(); void cull_neighbor_list(double *,double *,double *,int *,int *,int *,int,int); void screen_neighbor_list(double *,double *,double *,int *,int *,int *,int,int,bool*,double*,double*,double*,double*,double*,double*,double*); - void update_stack_size(); }; }