Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Q-HDNNP: Simplified "charge-aware" HDNNP #80

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
25a5cb7
Save NN setup in separate map to structs (WIP)
singraber Dec 22, 2020
d64acd2
Working on per-element adjustable NN setup
singraber Dec 23, 2020
6f4ae5c
Changed setupNeuralNetwork() (WIP)
singraber Dec 23, 2020
70cfb23
Changed NN setup once again (WIP)
singraber Dec 24, 2020
23bdf04
NN setup work continued (WIP)
singraber Dec 25, 2020
d904f47
Per-element NN setup should work, needs testing
singraber Dec 25, 2020
b5fc486
More changes in Mode class (WIP)
singraber Dec 28, 2020
7cf84c3
Allow to override default weights file name format
singraber Dec 28, 2020
ed06ade
Fixed bug, nnp-predict works now again
singraber Dec 29, 2020
42ce95e
LAMMPS interface works again
singraber Jan 14, 2021
7775054
Added pair_style nnp/external and examples
singraber Jan 14, 2021
3f29113
Pair_style nnp/external now also works with RuNNer
singraber Jan 14, 2021
a2242b6
Fixed Training class, ready for 4G-HDNNP code!
singraber Jan 15, 2021
bbaabfb
Added hardness and sigma read-in
singraber Jan 18, 2021
3974406
Merge branch '4G-HDNNP-prediction' of github.com:singraber/n2p2 into …
singraber Jan 19, 2021
2c1f45c
Merge branch '4G-HDNNP-prediction' of github.com:CompPhysVienna/n2p2 …
singraber Jan 19, 2021
9ca34d1
NNP prediction for Chi seems to work.
singraber Jan 19, 2021
d68d0c0
Filled Qeq matrix A for non-periodic systems
singraber Jan 19, 2021
31ff47e
Fixed makefiles, now include Eigen
singraber Jan 20, 2021
96592f9
Linear solve seems to work (non-periodic case)
singraber Jan 20, 2021
c16521e
Fixed build process, added electrostatic energy
singraber Jan 20, 2021
526982d
Started with periodic case, k-space missing
singraber Jan 20, 2021
b0550b9
Extra branch for Q-HDNNP development starts here
singraber Jan 22, 2021
6453793
Introduced missing code for 2nd stage of Q-HDNNP fit
mpbircher Jan 27, 2021
e996fae
Merge branch 'master' of github.com:CompPhysVienna/n2p2 into Q-HDNNP
singraber Jan 28, 2021
07a077f
Fixed bug in training
singraber Feb 1, 2021
f7e74a7
Fixed makefile bug occurring in MacOS
singraber Feb 2, 2021
cca139d
Fixed another bug in makefile
singraber Feb 2, 2021
17fa511
Added charge normalisation. Temporarily breaks old examples; will be …
mpbircher Feb 2, 2021
19577ca
Fixed definition of Q-HDNNP force & derivative
mpbircher Feb 3, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
Generated by sg2cfg

144 atoms
2 atom types

0.0000000000000000E+00 1.5246000000000000E+01 xlo xhi
0.0000000000000000E+00 1.1884000000000000E+01 ylo yhi
0.0000000000000000E+00 1.2091965796411374E+01 zlo zhi
0.0000000000000000E+00 -5.9893571590294590E+00 0.0000000000000000E+00 xy xz yz

Atoms

1 1 9.5538084006653907E+00 9.8518360000000005E-01 1.0183853593737659E+01
2 1 -3.2918441392095787E+00 6.9271836000000002E+00 7.9540951008794023E+00
3 1 -2.9716555969484926E-01 1.0898816400000001E+01 1.9081122026737154E+00
4 1 1.2548486980180119E+01 4.9568164000000001E+00 4.1378706955319728E+00
5 1 1.2277544351544003E+01 9.1269119999999992E-01 4.1862385587176183E+00
6 1 -2.6222931058731080E-02 6.8546911999999995E+00 1.8597443394880693E+00
7 1 -3.0209015105734602E+00 1.0971308800000001E+01 7.9057272376937560E+00
8 1 9.2828657720292718E+00 5.0293088000000008E+00 1.0232221456923305E+01
9 1 9.0699177918038707E+00 9.7924160000000005E-01 6.1282082656212848E+00
10 1 -2.8079535303480587E+00 6.9212416000000001E+00 1.2009740428995777E+01
11 1 1.8672504916667076E-01 1.0904758400000000E+01 5.9637575307900894E+00
12 1 1.2064596371318601E+01 4.9627584000000002E+00 8.2225367415599035E-02
13 1 1.2034322057045824E+01 9.7092279999999997E-01 7.2551794778468251E-02
14 1 2.1699936343944826E-01 6.9129228000000005E+00 5.9734311034272185E+00
15 1 -2.7776792160752812E+00 1.0913077200000000E+01 1.2019414001632907E+01
16 1 9.0396434775310937E+00 4.9710771999999999E+00 6.1185346929841558E+00
17 1 3.1737058543672330E+00 1.0493572000000000E+00 7.4160026229390956E+00
18 1 3.0882584070885768E+00 6.9913572000000004E+00 1.0721946071677966E+01
19 1 6.0829369866033067E+00 1.0834642799999999E+01 4.6759631734722786E+00
20 1 6.1683844338819629E+00 4.8926428000000000E+00 1.3700197247334083E+00
21 1 6.2021409198808808E+00 8.6277839999999995E-01 1.1572011267165685E+00
22 1 6.0491805006043897E+00 6.8047784000000000E+00 4.8887817714891186E+00
23 1 3.0545019210896607E+00 1.1021221600000001E+01 1.0934764669694806E+01
24 1 3.2074623403661517E+00 5.0792216000000003E+00 7.2031840249222556E+00
25 1 -1.4015081272437779E-01 9.2814040000000009E-01 9.5139586886164693E+00
26 1 6.4021150741801902E+00 6.8701404000000013E+00 8.6239900060005912E+00
27 1 9.3967936536949193E+00 1.0955859600000000E+01 2.5780071077949045E+00
28 1 2.8545277667903521E+00 5.0138596000000000E+00 3.4679757904107813E+00
29 1 2.6160912310744484E+00 9.8874879999999998E-01 3.4691849869904230E+00
30 1 9.6352301894108230E+00 6.9307487999999999E+00 2.5767979112152641E+00
31 1 6.6405516098960931E+00 1.0895251200000001E+01 8.6227808094209522E+00
32 1 -3.7858734844028064E-01 4.9532512000000004E+00 9.5151678851961101E+00
33 1 6.2869001311807295E+00 2.9484203999999998E+00 8.7303993050090121E+00
34 1 -2.4935869724918902E-02 8.8904204000000000E+00 9.4075493896080502E+00
35 1 2.9697427097898110E+00 8.9355796000000005E+00 3.3615664914023622E+00
36 1 9.2815787106954595E+00 2.9935796000000003E+00 2.6844164068033249E+00
37 1 5.8575182718324248E+00 2.6584508000000002E+00 5.0387221473646200E+00
38 1 6.3938031486528448E+00 8.6004508000000008E+00 1.0072607508410674E+00
39 1 3.3991245691381162E+00 9.2255491999999997E+00 7.0532436490467534E+00
40 1 2.8628396923176949E+00 3.2835491999999999E+00 1.1084705045570308E+01
41 1 1.4893437800655995E-01 2.8331455999999999E+00 5.7630308985696610E+00
42 1 1.2102387042478711E+01 8.7751456000000001E+00 2.8295199963602585E-01
43 1 9.1077084629639806E+00 9.0508544000000004E+00 6.3289348978417133E+00
44 1 -2.8457442015081695E+00 3.1088544000000002E+00 1.1809013796775348E+01
45 1 -6.1400573582723883E-02 2.7618415999999999E+00 1.6106498440819952E+00
46 1 1.2312721994067994E+01 8.7038415999999987E+00 4.4353330541236922E+00
47 1 9.3180434145532658E+00 9.1221584000000018E+00 1.0481315952329380E+01
48 1 -3.0560791530974529E+00 3.1801584000000003E+00 7.6566327422876821E+00
49 2 1.1427082159552079E+01 2.9662463999999997E+00 3.5393183886096096E+00
50 2 8.2423926093319233E-01 8.9082464000000012E+00 2.5066645095960776E+00
51 2 -2.1704393185815376E+00 8.9177535999999993E+00 8.5526474078017660E+00
52 2 8.4324035800373487E+00 2.9757536000000004E+00 9.5853012868152963E+00
53 2 5.3565064819165702E+00 8.7941599999999998E-01 8.1802148612722938E+00
54 2 9.0545777953924045E-01 6.8214159999999993E+00 9.9577338333447667E+00
55 2 3.9001363590539699E+00 1.1004584000000001E+01 3.9117509351390796E+00
56 2 8.3511850614313001E+00 5.0625840000000002E+00 2.1342319630666062E+00
57 2 8.2986940044307591E+00 1.0885743999999999E+00 2.0278226640581871E+00
58 2 3.9526274160545114E+00 7.0305744000000008E+00 4.0181602341475005E+00
59 2 9.5794883653978147E-01 1.0795425600000000E+01 1.0064143132353188E+01
60 2 5.3040154249160301E+00 4.8534255999999996E+00 8.0738055622638747E+00
61 2 5.0934267916749469E+00 2.8521600000000000E+00 8.8392269971767146E-01
62 2 7.1578946288103236E+00 8.7941599999999998E+00 5.1620601984880157E+00
63 2 4.1632160492955945E+00 9.0318400000000008E+00 1.1208043096693704E+01
64 2 2.0987482121602175E+00 3.0898400000000001E+00 6.9299055979233577E+00
65 2 -3.7151518509987418E+00 1.0089516000000001E+00 1.1428116874188390E+01
66 2 9.9771161124545564E+00 6.9509515999999998E+00 6.7098318204286711E+00
67 2 1.2971794691969285E+01 1.0875048400000001E+01 6.6384892222298386E-01
68 2 -7.2047327148401274E-01 4.9330484000000006E+00 5.3821339759827032E+00
69 2 -1.0289872857341475E+00 9.3051719999999993E-01 5.3555316512305975E+00
70 2 1.3280308706219419E+01 6.8725172000000008E+00 6.9045124697508931E-01
71 2 1.0285630126704689E+01 1.0953482800000000E+01 6.7364341451807759E+00
72 2 -4.0236658652488773E+00 5.0114828000000005E+00 1.1401514549436286E+01
73 2 8.3041478910950666E+00 1.4652972000000002E+00 1.1998857659779006E+01
74 2 -2.0421836296392564E+00 7.4072971999999995E+00 6.1390910348380556E+00
75 2 9.5249494987547301E-01 1.0418702800000000E+01 9.3108136632368069E-02
76 2 1.1298826470609797E+01 4.4767028000000000E+00 5.9528747615733186E+00
77 2 1.1298611184610881E+01 1.6780207999999999E+00 6.1656933595901604E+00
78 2 -5.0366469231550672E+00 7.6200207999999998E+00 1.1972255335026901E+01
79 2 -2.0419683436403382E+00 1.0205979200000000E+01 5.9262724368212139E+00
80 2 1.4293289764125610E+01 4.2639792000000005E+00 1.1971046138447285E-01
81 2 9.1488021433547946E+00 2.9757536000000004E+00 4.9685887457454339E+00
82 2 3.1025192771304759E+00 8.9177535999999993E+00 1.0773941524602535E+00
83 2 1.0784069761574688E-01 8.9082464000000012E+00 7.1233770506659404E+00
84 2 6.1541235638400646E+00 2.9662463999999997E+00 1.1014571643951122E+01
85 2 1.1536023277392626E+00 1.7552668000000000E+00 1.1303569626485352E+01
86 2 5.1083619337165480E+00 7.6972667999999995E+00 6.8343790681317094E+00
87 2 8.1030405132312779E+00 1.0128733200000001E+01 7.8839616992602202E-01
88 2 4.1482809072539908E+00 4.1867331999999999E+00 5.2575867282796667E+00
89 2 3.8575184786178740E+00 1.4605436000000001E+00 5.3059545914653112E+00
90 2 8.3938029418673974E+00 7.4025436000000004E+00 7.4002830674037579E-01
91 2 5.3991243623526675E+00 1.0423456400000001E+01 6.7860112049460621E+00
92 2 8.6283989910314407E-01 4.4814563999999999E+00 1.1351937489670998E+01
93 2 -1.1647273351863610E+00 2.8010587999999998E+00 1.0286635303007156E+01
94 2 7.4266915966421729E+00 8.7430588000000000E+00 7.8513133916099056E+00
95 2 1.0421370176156902E+01 9.0829412000000005E+00 1.8053304934042180E+00
96 2 1.8299512443283681E+00 3.1409411999999999E+00 4.2406524048014687E+00
97 2 8.4247104603828795E+00 4.2544719999999997E-01 8.2588126389489691E+00
98 2 -2.1627461989270667E+00 6.3674472000000009E+00 9.8791360556680914E+00
99 2 8.3193238058766239E-01 1.1458552800000000E+01 3.8331531574624051E+00
100 2 1.1419389039897609E+01 5.5165528000000004E+00 2.2128297407432820E+00
101 2 1.0936796418726178E+01 7.4156159999999993E-01 2.0205674845803405E+00
102 2 1.3145250017590928E+00 6.6835616000000000E+00 4.0254154136253462E+00
103 2 -1.6801535777556365E+00 1.1142438400000000E+01 1.0071398311831034E+01
104 2 7.9421178392114484E+00 5.2004384000000003E+00 8.0665503827860281E+00
105 2 -4.2270609982025480E+00 2.4302779999999999E+00 9.3374159879888623E+00
106 2 1.0489025259658359E+01 8.3722779999999997E+00 8.8005327066281982E+00
107 2 1.3483703839173089E+01 9.4537220000000008E+00 2.7545498084225111E+00
108 2 -1.2323824186878187E+00 3.5117219999999998E+00 3.2914330897831761E+00
109 2 5.9652557811310523E+00 9.4477800000000001E-01 3.4268631067029833E+00
110 2 6.2860656393542182E+00 6.8867780000000005E+00 2.6191197915027038E+00
111 2 3.2913870598394892E+00 1.0939222000000001E+01 8.6651026897083909E+00
112 2 2.9705772016163232E+00 4.9972219999999998E+00 9.4728460049086696E+00
113 2 8.7597168992464747E-01 5.1576560000000005E-01 7.5332946911642864E+00
114 2 5.3859925715311645E+00 6.4577656000000001E+00 1.0604654003452776E+01
115 2 8.3806711510458936E+00 1.1368234400000000E+01 4.5586711052470879E+00
116 2 3.8706502694393770E+00 5.4262344000000002E+00 1.4873117929585991E+00
117 2 3.8480550764059558E+00 5.1220040000000000E-01 1.6191142201394828E+00
118 2 8.4032663440793165E+00 6.4542004000000004E+00 4.4268686780662039E+00
119 2 5.4085877645645866E+00 1.1371799599999999E+01 1.0472851576271891E+01
120 2 8.5337649689122586E-01 5.4297995999999999E+00 7.6650971183451704E+00
121 2 3.4757056949440797E+00 2.4742487999999998E+00 9.1209698002330999E+00
122 2 2.7862585665117328E+00 8.4162488000000000E+00 9.0169788943839624E+00
123 2 5.7809371460264618E+00 9.4097512000000005E+00 2.9709959961782748E+00
124 2 6.4703842744588087E+00 3.4677512000000004E+00 3.0749869020274123E+00
125 2 1.3936508439354220E+01 1.0172703999999999E+00 2.6191197915027034E+00
126 2 -1.6851870188689482E+00 6.9592704000000003E+00 3.4268631067029833E+00
127 2 -4.6798655983836772E+00 1.0866729599999999E+01 9.4728460049086696E+00
128 2 1.0941829859839491E+01 4.9247296000000000E+00 8.6651026897083909E+00
129 2 3.7852278917290239E+00 1.2264288000000001E+00 1.1524852600559679E+01
130 2 2.4767363697267886E+00 7.1684288000000000E+00 6.6130960940573811E+00
131 2 5.4714149492415176E+00 1.0657571200000001E+01 5.6711319585169406E-01
132 2 6.7799064712437520E+00 4.7155712000000003E+00 5.4788697023539941E+00
133 2 7.3392329837052301E+00 2.3102496000000001E+00 6.8428434441891959E+00
134 2 -1.0772687222494177E+00 8.2522496000000007E+00 1.1295105250427865E+01
135 2 1.9174098572653118E+00 9.5737503999999998E+00 5.2491223522221784E+00
136 2 1.0333911563219958E+01 3.6317504000000000E+00 7.9686054598351042E-01
137 2 2.2545766691676814E+00 2.4587995999999999E+00 1.6904568183383102E+00
138 2 9.9967447513175891E+00 8.4007995999999991E+00 4.3555260798673769E+00
139 2 7.0020661718028601E+00 9.4252004000000014E+00 1.0401508978073064E+01
140 2 -7.4010191034704809E-01 3.4832004000000003E+00 7.7364397165439973E+00
141 2 -2.0731956466969059E+00 1.1479944000000002E+00 8.2116539723429653E+00
142 2 8.3351599081527183E+00 7.0899944000000001E+00 9.9262947222740969E+00
143 2 1.1329838487667448E+01 1.0736005600000000E+01 3.8803118240684094E+00
144 2 9.2148293281782356E-01 4.7940056000000002E+00 2.1656710741372778E+00
48 changes: 48 additions & 0 deletions examples/interface-LAMMPS/Cu2S_PBE_external/md.lmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
###############################################################################
# MD simulation for NN copper sulfide
###############################################################################

###############################################################################
# VARIABLES
###############################################################################
clear
# Configuration files
variable cfgFile string "cu2s_144_low-chalcocite_Evans-1979_PBE.data"
# Timesteps
variable numSteps equal 100
variable dt equal 0.001
# NN
variable nnpCutoff equal 6.01
variable nnpDir string "nnp-data"
# Masses
variable mass_S equal 32.065 # mass for element 1 (S) (g/mol)
variable mass_Cu equal 63.546 # mass for element 2 (Cu) (g/mol)

###############################################################################
# GENERAL SETUP
###############################################################################
units metal
boundary p p p
atom_style atomic
read_data ${cfgFile}
mass 1 ${mass_S}
mass 2 ${mass_Cu}
timestep ${dt}
thermo 10

###############################################################################
# NN
###############################################################################
pair_style nnp/external "S Cu" dir ${nnpDir} cflength 1.0 cfenergy 1.0
pair_coeff * * ${nnpCutoff}

###############################################################################
# INTEGRATOR
###############################################################################
fix INT all nve
dump 1 all atom 10 traj.dump

###############################################################################
# SIMULATION
###############################################################################
run ${numSteps}
Loading