Merge remote-tracking branch 'akohlmey/unit-test-updates' into refactor-table-reading

This commit is contained in:
Richard Berger
2020-06-02 18:24:23 -04:00
24 changed files with 18911 additions and 106 deletions

View File

@ -288,7 +288,7 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
// equilibrium angle
std::stringstream eqstr;
eqstr << lmp->atom->nangletypes;
for (std::size_t i=0; i < lmp->atom->nangletypes; ++i) {
for (int i=0; i < lmp->atom->nangletypes; ++i) {
eqstr << " " << lmp->force->angle->equilibrium_angle(i+1);
}
writer.emit("equilibrium", eqstr.str());

View File

@ -288,7 +288,7 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
// equilibrium distance
std::stringstream eqstr;
eqstr << lmp->atom->nbondtypes;
for (std::size_t i=0; i < lmp->atom->nbondtypes; ++i) {
for (int i=0; i < lmp->atom->nbondtypes; ++i) {
eqstr << " " << lmp->force->bond->equilibrium_distance(i+1);
}
writer.emit("equilibrium", eqstr.str());

View File

@ -0,0 +1,89 @@
---
lammps_version: 2 Jun 2020
date_generated: Tue Jun 2 16:53:15 202
epsilon: 5e-13
prerequisites: ! |
pair table
pre_commands: ! ""
post_commands: ! ""
input_file: in.metal
pair_style: table bitmap 10
pair_coeff: ! |
* * ${input_dir}/pair_table_bitmap.txt beck_1_1
extract: ! ""
natoms: 32
init_vdwl: 1.66863069929167
init_coul: 0
init_stress: ! |2-
6.1952827280949752e+00 6.0616458078803026e+00 5.8879068387604203e+00 2.0730193733654706e-01 -2.1217457971568116e-02 -8.9424946009241696e-02
init_forces: ! |2
1 1.3462021756359327e-02 6.5546484939056501e-02 1.4239378405106444e-02
2 -2.2007228833976065e-02 -7.7589845112095546e-02 4.8902697347770523e-02
3 -3.8360617077969741e-02 1.9000610721085417e-01 -4.8543675419659094e-02
4 2.0909689528763566e-02 -9.9051714348463316e-03 -5.2627007649843807e-02
5 5.6017317782444738e-02 1.4268372317778771e-01 3.5492113737546842e-02
6 4.1557359610043018e-02 2.9641106441236388e-02 -6.9666505508374872e-03
7 -6.4166646403998925e-02 8.9315602328966931e-02 -1.0227283854625933e-02
8 -6.8596281778498247e-02 -6.0833941051629016e-02 4.4682109809175953e-02
9 1.4368972530624599e-02 -5.5197060731424975e-02 -2.8201433919835286e-02
10 -3.2703871825595171e-02 -1.4474456554468246e-01 -1.1516819202560430e-01
11 -4.0405247666710227e-02 -5.0409352470214198e-02 4.2972316829875207e-02
12 3.0916743299077298e-02 -8.8133140512779831e-02 -3.9753798941002949e-03
13 -1.8590365196257386e-02 2.4575364499331190e-02 -4.7077193181172067e-02
14 5.6675408248286062e-02 -1.8711344187186302e-02 7.0130262965183210e-02
15 -3.1926591760213181e-02 3.1641397846490678e-02 -2.8162923341260547e-02
16 1.1005724174097668e-01 -9.1797768313712017e-02 3.7455099430156756e-02
17 4.3878459411519591e-02 1.3059623784047278e-01 -1.6097155896137277e-03
18 -1.4777439020699670e-01 -3.5658427272011572e-02 -7.0718736029538459e-02
19 -1.5580794194082498e-01 -8.1567700677555310e-02 3.7488943756308291e-02
20 2.4266515940572463e-02 1.9762354212930246e-02 -3.4097639624214998e-02
21 1.6277874455848959e-01 5.0800476849828920e-02 4.3314810824989737e-03
22 2.9893704848344602e-03 -8.1978960608305021e-02 -1.1775536941431530e-02
23 4.6993698780955703e-02 1.2309490227999968e-01 -8.0573799329662799e-02
24 1.2797425247184574e-01 9.4738372709908938e-02 8.3761735780926952e-02
25 6.9930077496344431e-02 4.2200999537168552e-03 -4.6754566887666743e-02
26 -5.1872497435892714e-02 -1.5107287052733298e-01 1.2864569803094950e-01
27 4.6175201131873622e-02 -4.7147053051923900e-03 -2.1152042044204553e-04
28 1.1139415424523944e-02 5.7577179243740957e-02 7.3714500884676210e-02
29 4.8901565126232033e-02 1.0736209516268529e-01 -3.2125425217601846e-03
30 -4.2584465166652936e-02 -3.0054615946788474e-02 -8.4428957096643942e-02
31 -2.0649926244740491e-02 -1.1590442114762316e-01 7.4794527710849712e-02
32 -1.9354598378544019e-01 -6.3287613853627508e-02 -2.2278111493111191e-02
run_vdwl: 1.66741314145205
run_coul: 0
run_stress: ! |2-
6.1931374572792954e+00 6.0579168006450157e+00 5.8831944925174655e+00 2.0546568651742717e-01 -2.2310825568610582e-02 -9.0786598388712531e-02
run_forces: ! |2
1 1.0245582840443836e-02 6.5151854710940468e-02 1.3361955389177321e-02
2 -2.2314027604621318e-02 -7.7535528641419729e-02 4.9002169116395371e-02
3 -3.9051836443840873e-02 1.8729640241706769e-01 -5.0368800191922920e-02
4 2.1556848319449432e-02 -9.6560257281038397e-03 -5.2226270227499996e-02
5 5.5692513794487093e-02 1.4100131039803696e-01 3.6433829498680612e-02
6 4.2104114940438239e-02 2.9061099461956740e-02 -8.0757486645345530e-03
7 -6.4974396400004103e-02 9.0834827653364231e-02 -1.1497303228903639e-02
8 -6.9891945210390563e-02 -6.1365585968288172e-02 4.5058971443054034e-02
9 1.5494788785065767e-02 -5.6313873741252601e-02 -2.9239516346795842e-02
10 -3.0025791257554668e-02 -1.4356984394446920e-01 -1.1248096343757182e-01
11 -4.0162199915935268e-02 -5.1244062549941558e-02 4.2120428458812920e-02
12 3.2219067015055440e-02 -8.8023947653775636e-02 -4.0000605662452050e-03
13 -1.9322021317182518e-02 2.3705996957186400e-02 -4.6458078927757253e-02
14 5.7515188139881337e-02 -1.5720861856457415e-02 6.8903466211661560e-02
15 -3.1550376834563972e-02 3.2004964657920229e-02 -2.7509931415147928e-02
16 1.0690614440695038e-01 -9.0850865144888507e-02 3.6425761956666795e-02
17 4.4576246121271583e-02 1.3023640557355332e-01 -7.6587762084134013e-04
18 -1.4790335009012934e-01 -3.4561193108141076e-02 -7.1476252590456105e-02
19 -1.5517474793926253e-01 -8.1735148865468926e-02 3.6534263240961207e-02
20 2.3564800733902859e-02 2.0130469558539449e-02 -3.4093822740206496e-02
21 1.6267868459547039e-01 4.8910520011812009e-02 4.9415963505101621e-03
22 3.9143651683370253e-03 -8.1172695145679000e-02 -1.0834230526190378e-02
23 4.9870311913370033e-02 1.2420611623040828e-01 -7.7833840076172459e-02
24 1.2773385871506515e-01 9.4431969129075782e-02 8.4509868356579518e-02
25 7.0376169719190279e-02 4.4792786930559310e-03 -4.6803763947891978e-02
26 -5.0364526911511179e-02 -1.4929711058338557e-01 1.2850817811267942e-01
27 4.6472580366719141e-02 -4.1923069078539394e-03 -1.3401923595724521e-03
28 1.1441857387906706e-02 5.8173904345736008e-02 7.3370361778840071e-02
29 4.7811159682183739e-02 1.0733827504367408e-01 -1.9879309433676450e-03
30 -4.2511930547412778e-02 -2.9916695214642831e-02 -8.4066745720912481e-02
31 -2.1952102296720562e-02 -1.1662029578060293e-01 7.4721379144302519e-02
32 -1.9497502987605872e-01 -6.5187354007956666e-02 -2.2832899526331281e-02
...

View File

@ -0,0 +1,91 @@
---
lammps_version: 2 Jun 2020
date_generated: Tue Jun 2 16:46:19 202
epsilon: 5e-13
prerequisites: ! |
pair table
pre_commands: ! ""
post_commands: ! ""
input_file: in.metal
pair_style: table linear 10000
pair_coeff: ! |
1 1 ${input_dir}/pair_table_beck.txt beck_1_1
1 2 ${input_dir}/pair_table_beck.txt beck_1_1
2 2 ${input_dir}/pair_table_beck.txt beck_2_2
extract: ! ""
natoms: 32
init_vdwl: 1.66849758741132
init_coul: 0
init_stress: ! |2-
6.1946715433684973e+00 6.0610621944595691e+00 5.8874237884568794e+00 2.0726669272562587e-01 -2.1210093847498168e-02 -8.9416411707758034e-02
init_forces: ! |2
1 1.3461768519573423e-02 6.5534109919214642e-02 1.4238046153935983e-02
2 -2.2001532385230976e-02 -7.7578110900587721e-02 4.8895494306522291e-02
3 -3.8355274675308998e-02 1.8998944460354011e-01 -4.8534579158997129e-02
4 2.0908450525723498e-02 -9.9065259851936448e-03 -5.2618638347233404e-02
5 5.6008845819212463e-02 1.4266708026293753e-01 3.5487913450023841e-02
6 4.1552575164020243e-02 2.9642511828555394e-02 -6.9641129743398126e-03
7 -6.4155910069342403e-02 8.9302215279040434e-02 -1.0225629221330955e-02
8 -6.8587774765165088e-02 -6.0829429175094735e-02 4.4680410492059397e-02
9 1.4366115666253289e-02 -5.5193010436797592e-02 -2.8199868469874739e-02
10 -3.2696772118295803e-02 -1.4472907530040827e-01 -1.1516096653547711e-01
11 -4.0401292979786972e-02 -5.0403260261100417e-02 4.2969363549390502e-02
12 3.0908963526062479e-02 -8.8120722839359025e-02 -3.9792237714215200e-03
13 -1.8590586442952396e-02 2.4570524680954029e-02 -4.7073976129125013e-02
14 5.6668681846789561e-02 -1.8708035295572849e-02 7.0129732306455847e-02
15 -3.1927433330968973e-02 3.1638369787962112e-02 -2.8162497777685959e-02
16 1.1004266778296544e-01 -9.1785066871052839e-02 3.7455063670217288e-02
17 4.3874209968260171e-02 1.3058176120978526e-01 -1.6077990215935685e-03
18 -1.4775183032052960e-01 -3.5651338364660598e-02 -7.0714213256030112e-02
19 -1.5579450123857666e-01 -8.1557435871161682e-02 3.7491976413329374e-02
20 2.4262106793077946e-02 1.9762251986969553e-02 -3.4094105051678786e-02
21 1.6276246770534447e-01 5.0791644250007900e-02 4.3248360141969555e-03
22 2.9904687035853137e-03 -8.1967139210456882e-02 -1.1772377300447360e-02
23 4.6987794141318706e-02 1.2308604930197996e-01 -8.0566882858205235e-02
24 1.2795930744437653e-01 9.4726737159825200e-02 8.3749152147737538e-02
25 6.9925482162420033e-02 4.2199513301063160e-03 -4.6743912320864334e-02
26 -5.1856917641538880e-02 -1.5105261662137287e-01 1.2862943385759271e-01
27 4.6163997109484788e-02 -4.7144533487617334e-03 -2.0769859565411553e-04
28 1.1137606033726113e-02 5.7570749823347561e-02 7.3702486316706894e-02
29 4.8892603764312044e-02 1.0734444862695605e-01 -3.2133899506260749e-03
30 -4.2587368463202192e-02 -3.0047436022746527e-02 -8.4421201266270535e-02
31 -2.0646231349659299e-02 -1.1590205379082782e-01 7.4785818423894770e-02
32 -1.9352068689594826e-01 -6.3282139756026798e-02 -2.2278655095207611e-02
run_vdwl: 1.66727802356891
run_coul: 0
run_stress: ! |2-
6.1925738027578641e+00 6.0573149352705613e+00 5.8826519662480035e+00 2.0544288354756310e-01 -2.2314569036134008e-02 -9.0767397150969681e-02
run_forces: ! |2
1 1.0239417972012135e-02 6.5143936411888370e-02 1.3356763777998637e-02
2 -2.2314835701632570e-02 -7.7524477122967728e-02 4.8999346575662309e-02
3 -3.9043638693828556e-02 1.8727196361074283e-01 -5.0358906369839446e-02
4 2.1555046910191538e-02 -9.6562479880345862e-03 -5.2220025740068080e-02
5 5.5684458879600447e-02 1.4098102798381096e-01 3.6430504994586173e-02
6 4.2104147709418713e-02 2.9055058600247489e-02 -8.0778112152718948e-03
7 -6.4963866924303920e-02 9.0824824870264262e-02 -1.1492621439859574e-02
8 -6.9888106386663568e-02 -6.1362238801327997e-02 4.5061669154972568e-02
9 1.5493057273285156e-02 -5.6307006366398599e-02 -2.9234755420043165e-02
10 -3.0006706586658188e-02 -1.4355133290296190e-01 -1.1246538976169368e-01
11 -4.0156699765253455e-02 -5.1238883202820718e-02 4.2112202625462891e-02
12 3.2215165580774301e-02 -8.8013396380619557e-02 -4.0047290710007333e-03
13 -1.9322767417550984e-02 2.3711197649086194e-02 -4.6454058795633212e-02
14 5.7508424194302507e-02 -1.5717730349026085e-02 6.8892268883266869e-02
15 -3.1552192265302363e-02 3.2002449140037137e-02 -2.7508481800674743e-02
16 1.0688955089657577e-01 -9.0842508916126788e-02 3.6418887829925486e-02
17 4.4577236329712736e-02 1.3022532646095397e-01 -7.5825494000398793e-04
18 -1.4789247023417521e-01 -3.4554869410601124e-02 -7.1472651306375229e-02
19 -1.5516659799350990e-01 -8.1733259734237992e-02 3.6528023380248152e-02
20 2.3565292501585497e-02 2.0131963706666492e-02 -3.4090460756558867e-02
21 1.6266349958385409e-01 4.8905943278807026e-02 4.9357951969207243e-03
22 3.9108463662172284e-03 -8.1159914942901146e-02 -1.0833213112554453e-02
23 4.9862761614696910e-02 1.2418695431753196e-01 -7.7818580582703634e-02
24 1.2773299190190621e-01 9.4426552636226180e-02 8.4500013220674824e-02
25 7.0366190135544543e-02 4.4772942266913711e-03 -4.6793931216364631e-02
26 -5.0367407305875939e-02 -1.4928033291926532e-01 1.2849353197675831e-01
27 4.6468146723438429e-02 -4.1892634838488693e-03 -1.3380548635599163e-03
28 1.1447706368862415e-02 5.8175438626723523e-02 7.3359635688296038e-02
29 4.7807434863290775e-02 1.0732112842460283e-01 -1.9886348252873588e-03
30 -4.2515720470887731e-02 -2.9914625470396135e-02 -8.4056579797267661e-02
31 -2.1956047762899965e-02 -1.1661348485300055e-01 7.4709459326432123e-02
32 -1.9494431829672756e-01 -6.5181487099745139e-02 -2.2830961616444944e-02
...

View File

@ -0,0 +1,91 @@
---
lammps_version: 2 Jun 2020
date_generated: Tue Jun 2 16:45:40 202
epsilon: 5e-13
prerequisites: ! |
pair table
pre_commands: ! ""
post_commands: ! ""
input_file: in.metal
pair_style: table lookup 10000
pair_coeff: ! |
1 1 ${input_dir}/pair_table_beck.txt beck_1_1
1 2 ${input_dir}/pair_table_beck.txt beck_1_1
2 2 ${input_dir}/pair_table_beck.txt beck_2_2
extract: ! ""
natoms: 32
init_vdwl: 1.66822081098814
init_coul: 0
init_stress: ! |2-
6.1925708391090373e+00 6.0607873158796632e+00 5.8866502515961283e+00 2.0635047994864009e-01 -2.2304749096038870e-02 -8.9977381381968910e-02
init_forces: ! |2
1 1.3652870615947011e-02 6.5292578314726832e-02 1.4401786849082793e-02
2 -2.2075986500789631e-02 -7.7530344175629484e-02 4.8918295738716797e-02
3 -3.8548065982306853e-02 1.9049129535293563e-01 -4.8497042796395010e-02
4 2.0883993795891603e-02 -9.8004460881346168e-03 -5.2544284235507610e-02
5 5.6473535558532267e-02 1.4259381967545881e-01 3.5283580728998398e-02
6 4.1436803654676703e-02 2.9757415671595559e-02 -6.9441568265177812e-03
7 -6.4342009716857218e-02 8.9407090045572943e-02 -1.0076354375758356e-02
8 -6.8438588566627351e-02 -6.0719143235589357e-02 4.4375134570496459e-02
9 1.4267631647248345e-02 -5.5225493516036783e-02 -2.8235579582748780e-02
10 -3.2874735468490235e-02 -1.4496018410464423e-01 -1.1522122672190530e-01
11 -4.0439244564162688e-02 -5.0797057909291822e-02 4.2990522799705479e-02
12 3.1118238818285009e-02 -8.8117800460577142e-02 -4.0963549347812021e-03
13 -1.8421701898180837e-02 2.4603479320682679e-02 -4.6953330610188748e-02
14 5.6779946032995847e-02 -1.8997405137617097e-02 7.0084749782857475e-02
15 -3.1872432338948091e-02 3.1520110382368773e-02 -2.8177989701802592e-02
16 1.1013395678084995e-01 -9.1707318824236786e-02 3.7083770573599802e-02
17 4.3975078896704253e-02 1.3054106752514974e-01 -1.5760211066586478e-03
18 -1.4753246799540981e-01 -3.5398540009504140e-02 -7.0784984645480470e-02
19 -1.5562703896771166e-01 -8.1533158870799177e-02 3.7998367628389429e-02
20 2.4120555351187806e-02 1.9895957059386932e-02 -3.4031571261011077e-02
21 1.6241181372756625e-01 5.0567395846590979e-02 4.0311135803611352e-03
22 3.0847862699784918e-03 -8.2082703890837161e-02 -1.1813933267531539e-02
23 4.6631319964723403e-02 1.2294704911631910e-01 -8.0759997950587623e-02
24 1.2784615418643658e-01 9.4570579283427048e-02 8.4136049252381967e-02
25 6.9854637188683621e-02 4.3796329364953045e-03 -4.6383679169275639e-02
26 -5.1672371161515490e-02 -1.5093773642419464e-01 1.2890155107784523e-01
27 4.6418514479134469e-02 -4.8647715941130543e-03 -3.3400893593061448e-04
28 1.0837875140475392e-02 5.7768778789330170e-02 7.3335429938361563e-02
29 4.8424486534314935e-02 1.0705191088477574e-01 -3.4221430692390835e-03
30 -4.2678491461167409e-02 -3.0167096740169222e-02 -8.4323491798094938e-02
31 -2.0446963122925290e-02 -1.1577119295225209e-01 7.4834425292344492e-02
32 -1.9338210089853922e-01 -6.2777766271189708e-02 -2.2198626823726184e-02
run_vdwl: 1.66790120138923
run_coul: 0
run_stress: ! |2-
6.1954399052539300e+00 6.0597796933663810e+00 5.8839846490596770e+00 2.0464958122047128e-01 -2.2990948428733799e-02 -9.0561388880444543e-02
run_forces: ! |2
1 1.0357196419898495e-02 6.5372257333873959e-02 1.3514409758410917e-02
2 -2.2518946587964585e-02 -7.7700478129363010e-02 4.8980708027650338e-02
3 -3.9187350884245992e-02 1.8746598368586515e-01 -5.0095509280450985e-02
4 2.1505122391926864e-02 -9.8121998835355474e-03 -5.2197325168546041e-02
5 5.6368397082486393e-02 1.4115837375527868e-01 3.6749677569935905e-02
6 4.2042380520510882e-02 2.9049092654418140e-02 -8.0059207630978693e-03
7 -6.5262053410956963e-02 9.1189712395790753e-02 -1.1162106417995799e-02
8 -6.9823982763573419e-02 -6.1642359327017858e-02 4.5148186601411129e-02
9 1.5581717631005403e-02 -5.6464988109373171e-02 -2.9179373549110328e-02
10 -2.9936010364121191e-02 -1.4403347574591194e-01 -1.1249323547874966e-01
11 -4.0279718641423851e-02 -5.1267663186455890e-02 4.2308426648069226e-02
12 3.2548290765190446e-02 -8.8360090934889973e-02 -4.1059424850670304e-03
13 -1.9100876563736404e-02 2.3923943182546592e-02 -4.6654992572323889e-02
14 5.7003886104469645e-02 -1.5977942426948746e-02 6.9080947733147463e-02
15 -3.1419200863690128e-02 3.2134894708585104e-02 -2.7460582419399034e-02
16 1.0678077169426231e-01 -9.0718758218836820e-02 3.6086450730476470e-02
17 4.4432206292973897e-02 1.3053785119638170e-01 -8.8349832217821166e-04
18 -1.4847693210486995e-01 -3.4770804844180284e-02 -7.1598050906370336e-02
19 -1.5584406172770648e-01 -8.1902850262455335e-02 3.6401901739187829e-02
20 2.3632828687886766e-02 2.0210640568054113e-02 -3.3962375402201296e-02
21 1.6251200328353549e-01 4.8509762572667509e-02 4.6262805117567836e-03
22 3.9297251786593766e-03 -8.1271664355599668e-02 -1.0814196256901271e-02
23 4.9681279655079395e-02 1.2435597457773782e-01 -7.8146336899556537e-02
24 1.2830345267622284e-01 9.4849763681645619e-02 8.4755594763442382e-02
25 7.0574066259719931e-02 4.7738855789510749e-03 -4.6746928071330643e-02
26 -5.0012323977413009e-02 -1.4919205052782003e-01 1.2835423785227032e-01
27 4.6693855278230161e-02 -4.3926905018267671e-03 -1.5097765818073844e-03
28 1.1103730609808571e-02 5.8020761280684265e-02 7.3177666578219974e-02
29 4.8063412527103180e-02 1.0769074559895483e-01 -1.8637969627234715e-03
30 -4.2307197338881525e-02 -2.9602719505751475e-02 -8.4192072289735478e-02
31 -2.2008710097816863e-02 -1.1651727431063712e-01 7.4819836125210509e-02
32 -1.9493695773256986e-01 -6.5615632500831411e-02 -2.2932304811643992e-02
...

View File

@ -0,0 +1,91 @@
---
lammps_version: 2 Jun 2020
date_generated: Tue Jun 2 16:47:29 202
epsilon: 5e-13
prerequisites: ! |
pair table
pre_commands: ! ""
post_commands: ! ""
input_file: in.metal
pair_style: table spline 10000
pair_coeff: ! |
1 1 ${input_dir}/pair_table_beck.txt beck_1_1
1 2 ${input_dir}/pair_table_beck.txt beck_1_1
2 2 ${input_dir}/pair_table_beck.txt beck_2_2
extract: ! ""
natoms: 32
init_vdwl: 1.66849237317226
init_coul: 0
init_stress: ! |2-
6.1946491697735437e+00 6.0610401365658024e+00 5.8874025724620429e+00 2.0726580316940962e-01 -2.1210361695457737e-02 -8.9415208770840096e-02
init_forces: ! |2
1 1.3461900166603218e-02 6.5533756921056424e-02 1.4237872357245411e-02
2 -2.2001295274018444e-02 -7.7577892895343906e-02 4.8895379860549121e-02
3 -3.8355321598214184e-02 1.8998901399717005e-01 -4.8534413942792565e-02
4 2.0908396793481509e-02 -9.9066117521727070e-03 -5.2618403012712124e-02
5 5.6008413316644114e-02 1.4266663667152152e-01 3.5487859843299545e-02
6 4.1552391358114872e-02 2.9642295673519448e-02 -6.9640527234652461e-03
7 -6.4155546133542837e-02 8.9301753561023003e-02 -1.0225594515349757e-02
8 -6.8587453028246703e-02 -6.0829070542048190e-02 4.4680193619080481e-02
9 1.4366068063822880e-02 -5.5192738935146854e-02 -2.8199665411938767e-02
10 -3.2697019980711756e-02 -1.4472840813665638e-01 -1.1516072254520793e-01
11 -4.0401272804121854e-02 -5.0402863668631913e-02 4.2969197904076183e-02
12 3.0908680631425673e-02 -8.8120244487072494e-02 -3.9791730686956463e-03
13 -1.8590573588915013e-02 2.4570208722629043e-02 -4.7073683697064536e-02
14 5.6668374919472228e-02 -1.8707913260279440e-02 7.0129358194749039e-02
15 -3.1927219149443416e-02 3.1638287874549260e-02 -2.8162304610562044e-02
16 1.1004228625210850e-01 -9.1784876878925489e-02 3.7455203664712555e-02
17 4.3874110434413707e-02 1.3058123184332987e-01 -1.6078470938548138e-03
18 -1.4775126775856298e-01 -3.5651201719208082e-02 -7.0713629953624360e-02
19 -1.5579381073821677e-01 -8.1556836647145553e-02 3.7492096227633373e-02
20 2.4262149455103726e-02 1.9762082500828778e-02 -3.4093995317030654e-02
21 1.6276229493138114e-01 5.0791551859706734e-02 4.3245301958938116e-03
22 2.9902891288209246e-03 -8.1966958449035843e-02 -1.1772410092696793e-02
23 4.6987757268038249e-02 1.2308546657800162e-01 -8.0566592682958557e-02
24 1.2795842291296708e-01 9.4726040785926641e-02 8.3748524809472952e-02
25 6.9925310941154381e-02 4.2197730528178625e-03 -4.6744097166442150e-02
26 -5.1856965388326640e-02 -1.5105237092347160e-01 1.2862892445018109e-01
27 4.6163842732722504e-02 -4.7145326827103505e-03 -2.0770802868259192e-04
28 1.1137379858917107e-02 5.7570783215990615e-02 7.3702487792676769e-02
29 4.8892657028303636e-02 1.0734409425986763e-01 -3.2134995127967849e-03
30 -4.2587398133307960e-02 -3.0047443784418228e-02 -8.4420705386072381e-02
31 -2.0646215207926085e-02 -1.1590108886476506e-01 7.4785520470549566e-02
32 -1.9351936740994052e-01 -6.3281923890906297e-02 -2.2278650628172247e-02
run_vdwl: 1.667273130413
run_coul: 0
run_stress: ! |2-
6.1925535687585693e+00 6.0572952105271769e+00 5.8826298841000604e+00 2.0544338949977917e-01 -2.2313078114848450e-02 -9.0766976514897041e-02
run_forces: ! |2
1 1.0239633061502058e-02 6.5143827221595174e-02 1.3356826587515483e-02
2 -2.2314719792140746e-02 -7.7524048417887792e-02 4.8999119168703323e-02
3 -3.9043356307568236e-02 1.8727112901323323e-01 -5.0358319574288206e-02
4 2.1555031522153656e-02 -9.6560578347078038e-03 -5.2219714561247452e-02
5 5.5684799810960112e-02 1.4098076857747269e-01 3.6430385068854737e-02
6 4.2103921190025241e-02 2.9054969033758940e-02 -8.0777612807259296e-03
7 -6.4964007703587665e-02 9.0824767825338215e-02 -1.1492723720965943e-02
8 -6.9887912879430303e-02 -6.1361831723537673e-02 4.5061147281770325e-02
9 1.5493100733112084e-02 -5.6306897360260899e-02 -2.9234346339233039e-02
10 -3.0007119234870205e-02 -1.4355108819988596e-01 -1.1246502096182201e-01
11 -4.0156584042997157e-02 -5.1238608709860869e-02 4.2111943089822509e-02
12 3.2215137999640264e-02 -8.8013573068877235e-02 -4.0049314316609446e-03
13 -1.9322692643690253e-02 2.3710729865779583e-02 -4.6453771618837091e-02
14 5.7508119522746703e-02 -1.5717550954823703e-02 6.8891636524075137e-02
15 -3.1551853579254628e-02 3.2002270904692251e-02 -2.7508263221790400e-02
16 1.0688913506500985e-01 -9.0842063672437995e-02 3.6419114766505958e-02
17 4.4576981599750799e-02 1.3022472720372444e-01 -7.5802573483000615e-04
18 -1.4789239369554841e-01 -3.4554795916705260e-02 -7.1472573328781749e-02
19 -1.5516657008010420e-01 -8.1733453599869749e-02 3.6527707427395764e-02
20 2.3565108550513952e-02 2.0131835710028016e-02 -3.4090223278000355e-02
21 1.6266310434046480e-01 4.8905845083266029e-02 4.9357148091662226e-03
22 3.9108125555495730e-03 -8.1159764595007206e-02 -1.0833146565530810e-02
23 4.9862133358188218e-02 1.2418637371342198e-01 -7.7818397024808514e-02
24 1.2773306535829987e-01 9.4426378198700950e-02 8.4499926668801975e-02
25 7.0365780658878857e-02 4.4772437288752168e-03 -4.6793953502009267e-02
26 -5.0367468278612715e-02 -1.4927976307827082e-01 1.2849283634143213e-01
27 4.6468158385616867e-02 -4.1893770730035470e-03 -1.3381218640924168e-03
28 1.1447647509745237e-02 5.8175457185785213e-02 7.3359279966104529e-02
29 4.7807504512594315e-02 1.0732100993527130e-01 -1.9887010850049803e-03
30 -4.2515398596597830e-02 -2.9914524234883048e-02 -8.4055979568242525e-02
31 -2.1955840630845491e-02 -1.1661294434426502e-01 7.4709133379083956e-02
32 -1.9494325826950429e-01 -6.5180990416658327e-02 -2.2830796417360581e-02
...

View File

@ -0,0 +1,98 @@
---
lammps_version: 2 Jun 2020
date_generated: Tue Jun 2 17:07:52 202
epsilon: 5e-14
prerequisites: ! |
atom full
pair table
pre_commands: ! ""
post_commands: ! ""
input_file: in.fourmol
pair_style: table linear 1000
pair_coeff: ! |
1 1 ${input_dir}/pair_table_lj_cut.txt lj_1_1
1 2 ${input_dir}/pair_table_lj_cut.txt lj_1_2
1 3 ${input_dir}/pair_table_lj_cut.txt lj_1_3
1 4 ${input_dir}/pair_table_lj_cut.txt lj_1_4
1 5 ${input_dir}/pair_table_lj_cut.txt lj_1_5
2 2 ${input_dir}/pair_table_lj_cut.txt lj_2_2
2 3 ${input_dir}/pair_table_lj_cut.txt lj_2_3
2 4 ${input_dir}/pair_table_lj_cut.txt lj_2_4
2 5 ${input_dir}/pair_table_lj_cut.txt lj_2_5
3 3 ${input_dir}/pair_table_lj_cut.txt lj_3_3
3 4 ${input_dir}/pair_table_lj_cut.txt lj_3_4
3 5 ${input_dir}/pair_table_lj_cut.txt lj_3_5
4 4 ${input_dir}/pair_table_lj_cut.txt lj_4_4
4 5 ${input_dir}/pair_table_lj_cut.txt lj_4_5
5 5 ${input_dir}/pair_table_lj_cut.txt lj_5_5
extract: ! ""
natoms: 29
init_vdwl: 756.641645798358
init_coul: 0
init_stress: ! |2-
2.2090340377185967e+03 2.2244453255747117e+03 4.7288126624664974e+03 -7.6403326905269398e+02 2.8082113929050504e+01 6.7633740837364439e+02
init_forces: ! |2
21 -7.4152834115258486e+01 -8.4097799952580075e+01 2.3159619440133380e+02
22 -1.1068613517882235e+02 -2.6823333923316500e+01 -1.7365467444566553e+02
23 1.8482904133388223e+02 1.1093264541659750e+02 -5.7930741636712071e+01
19 3.1933948922635905e-04 -2.3852967242197055e-04 1.7434557181616340e-03
18 -1.8861300062111192e-02 -3.3400052294502179e-02 3.0998859026254152e-02
20 -9.9899500683441750e-04 -1.0223083257768326e-03 3.6965867058990032e-04
28 -1.8537423924296499e+02 7.9666126830459447e+01 -1.2542634211727822e+02
4 -7.9160281367275722e+00 2.1475153087741110e+00 -5.6273386055724828e+00
10 5.3659703631942352e+02 -6.1638821121220133e+02 -1.8524754345847680e+02
11 -2.3998246191028687e+00 -6.0237447250432350e+00 -9.8493429965792298e+00
12 1.7521141359856628e+01 1.0629841850210417e+01 -7.9312291032117042e+00
14 -3.4254573458881881e+00 6.9454087271157916e-01 -8.8549490264531219e+00
3 -1.3601366655597215e+02 -3.8933969547126463e+02 -1.4673165295081574e+02
6 -8.3976623131970030e+02 9.7421656440040920e+02 1.1689035557011593e+03
7 5.9087836043818115e+01 -3.4067040950997404e+02 -1.7408617984623156e+03
15 -2.0812424842265748e-01 8.6236045287663003e+00 3.0626696691420956e+00
8 1.4404606696350953e+02 -1.1101530899074169e+02 3.9802209126866262e+02
9 8.1112222258717168e+01 8.7379022925008144e+01 3.5897466875849778e+02
16 4.6872469487658930e+02 -3.3472142759962014e+02 -1.2036108146826032e+03
17 -4.5876131348491481e+02 3.1932075524331395e+02 1.2202196485462191e+03
5 -2.5605507618514016e+00 -4.1184521759347588e+00 1.2369824594500452e+01
13 8.2458457495438626e+00 -3.2680411194697614e+00 -1.5173080370124606e-01
2 1.5875070222736517e+02 1.3063288077538610e+02 -1.8684429323195315e+02
1 -2.3000580006052314e+01 2.7192815329191200e+02 3.3414196848607327e+02
27 5.3953257632741014e+01 -2.3246330657484364e+02 9.3521822143445291e+01
29 1.3142887167232908e+02 1.5280375224826219e+02 3.1900088976429561e+01
24 3.6069363323679390e+01 -2.1770366344996296e+02 1.1410578468006614e+02
25 -1.5123846858732526e+02 2.4345575024648110e+01 -1.2714600914378309e+02
26 1.1515691479712817e+02 1.9334707687878640e+02 1.3017031466176082e+01
run_vdwl: 146.327829985032
run_coul: 0
run_stress: ! |2-
6.2914745307898283e+02 6.7439990734333583e+02 4.8382994180885322e+02 -3.2311602844067630e+02 -2.9168790037089135e+01 1.2280146536160866e+02
run_forces: ! |2
21 -9.8223704263420135e+00 -1.1937831142654984e+01 3.8747486275879332e+01
22 -1.8260879394786041e+01 -4.4231132834754163e+00 -2.9364817699370402e+01
23 2.8071936064676528e+01 1.6373759184425133e+01 -9.3702350107338450e+00
19 2.5604832046069535e-04 -2.4189898030892005e-04 1.6743691237745819e-03
18 -1.8054106711718410e-02 -3.1568964918282955e-02 2.9599553823736552e-02
20 -8.8390456832979493e-04 -9.1401459749508313e-04 3.6013486968785625e-04
28 -2.5002749675394742e+01 1.1546639020795190e+01 -1.6860888288423549e+01
4 -8.7521679338772564e+00 3.2350894298919783e+00 -6.3183019964749780e+00
10 6.3968310015089294e+01 -7.5154164336910185e+01 -7.5921779563234097e+01
11 -6.3974181801433527e+00 -8.2015044886741890e+00 -1.6623131445951760e+01
12 1.4375970778558539e+01 1.2183815698169100e+01 -8.2849268567516905e+00
14 -2.8220099744921270e+00 4.4312152330104282e-01 -7.1784838499077441e+00
3 -2.5170415829369691e+02 1.0807957243252388e+02 8.7902068634117185e+01
6 1.2021318256369948e+02 -1.0159989935597440e+02 -1.4455046866801038e+02
7 3.7064970613492512e+00 -1.0481522858827926e+01 -4.1617502928655071e+01
15 -4.0482676064288375e-01 8.2478176580999758e+00 3.1232194954592902e+00
8 -1.9012552812922401e+01 1.9341369900133493e+01 5.6061660162509632e+01
9 1.1002966844626583e+01 1.2955046425976752e+01 4.8964009756379951e+01
16 5.3215666467083004e+01 -6.8452018298715132e+01 1.6067414590921679e+01
17 -1.4543993736556850e+01 9.9518135650728148e+00 4.0557829246754260e+01
5 -1.7372909950509312e+00 -2.5663073053399832e+00 1.0327280945285382e+01
13 7.4327969687776196e+00 -2.8316539598264616e+00 -1.0441307986265116e-01
2 1.8402173670762625e+01 1.3899059683375182e+01 -2.2581973215530972e+01
1 1.3092386727121557e+01 8.0975258006863527e+01 6.0162717183582615e+01
27 3.0641658609965634e+00 -3.8727506359895912e+01 1.1409481341404170e+01
29 2.1946401102557179e+01 2.7187485766660277e+01 5.4471747925943950e+00
24 1.2590957134158188e+01 -3.6189602254037929e+01 2.3845923499083668e+01
25 -3.0061118850595161e+01 5.3993721695176697e+00 -2.5809444960387523e+01
26 1.7456807738003775e+01 3.0778628058022715e+01 1.9384675815059120e+00
...

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,16 @@
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "lammps.h"

View File

@ -1,3 +1,16 @@
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "potential_file_reader.h"

View File

@ -5,3 +5,7 @@ add_test(Tokenizer test_tokenizer)
add_executable(test_utils test_utils.cpp)
target_link_libraries(test_utils PRIVATE lammps GTest::GMockMain GTest::GMock GTest::GTest)
add_test(Utils test_utils)
add_executable(test_fmtlib test_fmtlib.cpp)
target_link_libraries(test_fmtlib PRIVATE lammps GTest::GMockMain GTest::GMock GTest::GTest)
add_test(FmtLib test_fmtlib)

View File

@ -0,0 +1,106 @@
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#include "lmptype.h"
#include "gtest/gtest.h"
#include "gmock/gmock.h"
#include "fmt/format.h"
#include <string>
#include <exception>
using namespace LAMMPS_NS;
using ::testing::Eq;
// this tests a subset of {fmt} that is most relevant to LAMMPS
TEST(FmtLib, insert_string) {
const char val[] = "word";
auto text = fmt::format("word {}",val);
ASSERT_THAT(text, Eq("word word"));
}
TEST(FmtLib, insert_int) {
const int val = 333;
auto text = fmt::format("word {}",val);
ASSERT_THAT(text, Eq("word 333"));
}
TEST(FmtLib, insert_neg_int) {
const int val = -333;
auto text = fmt::format("word {}",val);
ASSERT_THAT(text, Eq("word -333"));
}
TEST(FmtLib, insert_bigint) {
if (sizeof(bigint) == 4) GTEST_SKIP();
const bigint val = 9945234592L;
auto text = fmt::format("word {}",val);
ASSERT_THAT(text, Eq("word 9945234592"));
}
TEST(FmtLib, insert_neg_bigint) {
if (sizeof(bigint) == 4) GTEST_SKIP();
const bigint val = -9945234592L;
auto text = fmt::format("word {}",val);
ASSERT_THAT(text, Eq("word -9945234592"));
}
TEST(FmtLib, insert_tagint) {
if (sizeof(tagint) == 4) GTEST_SKIP();
const tagint val = 9945234592L;
auto text = fmt::format("word {}",val);
ASSERT_THAT(text, Eq("word 9945234592"));
}
TEST(FmtLib, insert_neg_tagint) {
if (sizeof(tagint) == 4) GTEST_SKIP();
const tagint val = -9945234592L;
auto text = fmt::format("word {}",val);
ASSERT_THAT(text, Eq("word -9945234592"));
}
TEST(FmtLib, insert_imageint) {
if (sizeof(imageint) == 4) GTEST_SKIP();
const imageint val = 9945234592L;
auto text = fmt::format("word {}",val);
ASSERT_THAT(text, Eq("word 9945234592"));
}
TEST(FmtLib, insert_neg_imageint) {
if (sizeof(imageint) == 4) GTEST_SKIP();
const imageint val = -9945234592L;
auto text = fmt::format("word {}",val);
ASSERT_THAT(text, Eq("word -9945234592"));
}
TEST(FmtLib, insert_double) {
const double val = 1.5;
auto text = fmt::format("word {}",val);
ASSERT_THAT(text, Eq("word 1.5"));
}
TEST(FmtLib, insert_neg_double) {
const double val = -1.5;
auto text = fmt::format("word {}",val);
ASSERT_THAT(text, Eq("word -1.5"));
}
TEST(FmtLib, int_for_double) {
const double val = -1.5;
ASSERT_THROW(fmt::format("word {:d}",val),std::exception);
}
TEST(FmtLib, double_for_int) {
const int val = 15;
ASSERT_THROW(fmt::format("word {:g}",val),std::exception);
}

View File

@ -1,5 +1,18 @@
#include <gtest/gtest.h>
#include <gmock/gmock.h>
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#include "gtest/gtest.h"
#include "gmock/gmock.h"
#include "tokenizer.h"
using namespace LAMMPS_NS;

View File

@ -1,5 +1,18 @@
#include <gtest/gtest.h>
#include <gmock/gmock.h>
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#include "gtest/gtest.h"
#include "gmock/gmock.h"
#include "utils.h"
#include <string>