From 8bdabcc3136333273f1decb0ab537765def8aa7c Mon Sep 17 00:00:00 2001 From: Gareth Aneurin Tribello Date: Thu, 25 Apr 2024 15:45:37 +0100 Subject: [PATCH] Added tests on perovskite CVs that were used by Lorenzo Gigli --- .../metatensor/rt-perovskite/CV1.reference | 2 + .../metatensor/rt-perovskite/CV2.reference | 2 + regtest/metatensor/rt-perovskite/Makefile | 1 + regtest/metatensor/rt-perovskite/config | 10 + regtest/metatensor/rt-perovskite/config.xyz | 322 ++++++++++++++++++ .../metatensor/rt-perovskite/forces.reference | 322 ++++++++++++++++++ regtest/metatensor/rt-perovskite/plumed.dat | 60 ++++ regtest/metatensor/rt-perovskite/soap_cv.py | 113 ++++++ .../rt-unwrapped-perovskite/CV1.reference | 2 + .../rt-unwrapped-perovskite/CV2.reference | 2 + .../rt-unwrapped-perovskite/Makefile | 1 + .../metatensor/rt-unwrapped-perovskite/config | 10 + .../rt-unwrapped-perovskite/config.xyz | 322 ++++++++++++++++++ .../rt-unwrapped-perovskite/forces.reference | 322 ++++++++++++++++++ .../rt-unwrapped-perovskite/plumed.dat | 60 ++++ .../rt-unwrapped-perovskite/soap_cv.py | 113 ++++++ 16 files changed, 1664 insertions(+) create mode 100644 regtest/metatensor/rt-perovskite/CV1.reference create mode 100644 regtest/metatensor/rt-perovskite/CV2.reference create mode 100644 regtest/metatensor/rt-perovskite/Makefile create mode 100644 regtest/metatensor/rt-perovskite/config create mode 100644 regtest/metatensor/rt-perovskite/config.xyz create mode 100644 regtest/metatensor/rt-perovskite/forces.reference create mode 100644 regtest/metatensor/rt-perovskite/plumed.dat create mode 100644 regtest/metatensor/rt-perovskite/soap_cv.py create mode 100644 regtest/metatensor/rt-unwrapped-perovskite/CV1.reference create mode 100644 regtest/metatensor/rt-unwrapped-perovskite/CV2.reference create mode 100644 regtest/metatensor/rt-unwrapped-perovskite/Makefile create mode 100644 regtest/metatensor/rt-unwrapped-perovskite/config create mode 100644 regtest/metatensor/rt-unwrapped-perovskite/config.xyz create mode 100644 regtest/metatensor/rt-unwrapped-perovskite/forces.reference create mode 100644 regtest/metatensor/rt-unwrapped-perovskite/plumed.dat create mode 100644 regtest/metatensor/rt-unwrapped-perovskite/soap_cv.py diff --git a/regtest/metatensor/rt-perovskite/CV1.reference b/regtest/metatensor/rt-perovskite/CV1.reference new file mode 100644 index 0000000000..8a198f2ff8 --- /dev/null +++ b/regtest/metatensor/rt-perovskite/CV1.reference @@ -0,0 +1,2 @@ +#! FIELDS time CV1 + 0.000000 7.338286e+02 diff --git a/regtest/metatensor/rt-perovskite/CV2.reference b/regtest/metatensor/rt-perovskite/CV2.reference new file mode 100644 index 0000000000..c0cb82333f --- /dev/null +++ b/regtest/metatensor/rt-perovskite/CV2.reference @@ -0,0 +1,2 @@ +#! FIELDS time CV2 + 0.000000 -6.796922e+00 diff --git a/regtest/metatensor/rt-perovskite/Makefile b/regtest/metatensor/rt-perovskite/Makefile new file mode 100644 index 0000000000..3703b27cea --- /dev/null +++ b/regtest/metatensor/rt-perovskite/Makefile @@ -0,0 +1 @@ +include ../../scripts/test.make diff --git a/regtest/metatensor/rt-perovskite/config b/regtest/metatensor/rt-perovskite/config new file mode 100644 index 0000000000..85adf01af8 --- /dev/null +++ b/regtest/metatensor/rt-perovskite/config @@ -0,0 +1,10 @@ +plumed_modules=metatensor +plumed_needs=metatensor +type=driver +# this is to test a different name +arg="--plumed plumed.dat --ixyz config.xyz --dump-forces forces --dump-forces-fmt %8.4f --length-units A" # --debug-forces forces.num" + +function plumed_regtest_before(){ + python soap_cv.py + echo Generated model using soap_cv.py +} diff --git a/regtest/metatensor/rt-perovskite/config.xyz b/regtest/metatensor/rt-perovskite/config.xyz new file mode 100644 index 0000000000..f31f36161e --- /dev/null +++ b/regtest/metatensor/rt-perovskite/config.xyz @@ -0,0 +1,322 @@ +320 +15.95322 0.0 0.0 0.0418879 15.9989 0.0 -0.103034 -0.0550045 16.0748 +Ba 0.04386166 15.86631600 0.13413300 +Ba 15.89643070 -0.00217588 4.03009000 +Ba 15.93391350 15.92169400 8.01833000 +Ba 15.85082100 -0.03577400 12.09000000 +Ba 15.89910000 3.93818000 0.06161510 +Ba 15.83680000 4.12332000 3.99476000 +Ba 15.84190000 4.09458000 8.07886000 +Ba -0.01002000 3.90047000 12.08630000 +Ba 15.93410000 8.00594000 0.13882500 +Ba 0.08998000 7.85922000 3.89935000 +Ba 15.92060000 7.94912000 7.98610000 +Ba -0.03332000 8.00603000 12.05700000 +Ba -0.02562000 12.05730000 16.02790000 +Ba 0.16038000 12.02400000 3.99179000 +Ba 0.01678000 11.95580000 8.03406000 +Ba -0.03732000 11.94990000 12.05730000 +Ba 3.97329000 0.00942696 0.13944700 +Ba 3.86464000 0.06466770 3.91390000 +Ba 3.98661790 15.96998340 7.99678000 +Ba 3.90277790 15.76114000 12.06790000 +Ba 4.03904000 4.02992000 0.05869510 +Ba 3.99796000 4.08314000 4.06779000 +Ba 3.93598000 4.03827000 8.04567000 +Ba 3.89154000 3.86906000 11.95970000 +Ba 4.01650600 7.83579550 15.99161420 +Ba 4.05035000 8.02203000 4.01502000 +Ba 3.96265000 8.09729000 8.02974000 +Ba 3.82360000 7.96670000 12.08160000 +Ba 4.07234400 11.98640450 0.09270000 +Ba 4.05403000 11.92410000 3.98149000 +Ba 3.90272000 11.96830000 7.97117000 +Ba 3.98987000 11.88290000 12.15520000 +Ba 7.90857000 0.05148960 0.04042770 +Ba 7.90224000 -0.00264048 4.10942000 +Ba 7.81699000 -0.00975042 7.96219000 +Ba 7.88363000 -0.03765430 12.02550000 +Ba 7.91716600 3.97326550 15.89935400 +Ba 8.02990000 4.08347000 4.03414000 +Ba 7.92266000 4.01371000 8.02952000 +Ba 7.95659000 3.94970000 11.93510000 +Ba 7.92583600 7.87067550 15.99922860 +Ba 7.95211000 7.97331000 4.09872000 +Ba 7.95093000 7.94931000 8.10395000 +Ba 7.85776000 7.93683000 11.94270000 +Ba 7.95533000 11.94750000 0.01653530 +Ba 8.05186000 11.89650000 4.01585000 +Ba 7.98475000 11.83750000 7.97988000 +Ba 8.00766000 11.93100000 12.07100000 +Ba 11.87458790 15.87212800 16.05710000 +Ba 11.81060000 0.09575110 4.07074000 +Ba 11.89878790 15.96366320 8.05479000 +Ba 11.85750000 -0.03889160 12.08490000 +Ba 11.90003400 3.99106450 0.08950000 +Ba 11.86680000 3.93214000 4.01835000 +Ba 11.93730000 3.79105000 8.13036000 +Ba 12.05050000 3.93845000 12.15450000 +Ba 11.87883400 8.12063450 0.04430000 +Ba 11.99860000 8.02742000 3.97550000 +Ba 11.98970000 8.06643000 7.97844000 +Ba 11.91020000 7.97457000 12.04290000 +Ba 11.85200000 12.00000000 16.07230000 +Ba 12.06310000 11.92920000 3.94886000 +Ba 11.97720000 12.02510000 8.07659000 +Ba 11.83110000 11.97710000 12.17440000 +Ti 1.97219000 2.12495000 2.04418000 +Ti 2.00557000 1.99058000 6.06165000 +Ti 1.99108000 1.78928000 10.07400000 +Ti 1.94553000 1.87969000 14.12820000 +Ti 1.98717000 5.98484000 2.05804000 +Ti 1.94964000 5.95466000 6.15401000 +Ti 1.87676000 5.87259000 10.06890000 +Ti 1.99344000 5.88686000 14.12190000 +Ti 1.90307000 9.93218000 1.83030000 +Ti 2.02193000 10.00990000 5.94244000 +Ti 2.03786000 9.98789000 9.93510000 +Ti 1.92735000 9.94007000 13.99360000 +Ti 2.11692000 13.99270000 1.99441000 +Ti 2.03606000 14.04530000 6.06011000 +Ti 1.91277000 13.87710000 10.06890000 +Ti 2.02867000 13.88590000 14.13330000 +Ti 6.11705000 2.08037000 2.03795000 +Ti 5.99755000 2.06040000 6.08058000 +Ti 5.94713000 1.80729000 10.10310000 +Ti 5.95220000 2.00468000 14.05910000 +Ti 5.98816000 6.00832000 2.01824000 +Ti 5.97217000 6.09139000 6.08497000 +Ti 5.79044000 5.84028000 9.97399000 +Ti 5.95234000 5.92742000 13.98040000 +Ti 5.92883000 9.88844000 1.91186000 +Ti 5.99257000 10.03870000 6.00113000 +Ti 6.00538000 9.85911000 9.98945000 +Ti 6.03451000 9.94992000 14.06050000 +Ti 6.08137000 14.05650000 2.04721000 +Ti 5.87701000 14.01560000 5.97498000 +Ti 5.90206000 13.84730000 9.93509000 +Ti 5.93763000 13.94700000 14.04990000 +Ti 9.92088000 1.93768000 1.97183000 +Ti 10.01680000 2.00881000 6.09825000 +Ti 9.97041000 2.02647000 10.04840000 +Ti 9.95820000 1.83255000 14.01170000 +Ti 10.00870000 5.97225000 1.92964000 +Ti 9.91824000 5.99563000 6.04861000 +Ti 9.82056000 6.03935000 9.92361000 +Ti 10.02370000 5.84724000 13.92650000 +Ti 9.91816000 9.83433000 1.85913000 +Ti 10.12530000 9.96432000 5.89647000 +Ti 9.98404000 10.04450000 9.89670000 +Ti 9.91042000 9.84416000 13.99960000 +Ti 9.93862000 13.85270000 1.97473000 +Ti 9.91364000 13.93110000 5.94487000 +Ti 9.75428000 14.06820000 9.99078000 +Ti 9.82618000 13.89870000 14.03040000 +Ti 13.94230000 1.97181000 2.06499000 +Ti 14.01250000 1.96865000 6.09097000 +Ti 14.02360000 1.96141000 10.14440000 +Ti 13.93070000 1.97716000 14.16990000 +Ti 13.93350000 5.98931000 1.98622000 +Ti 13.82110000 6.07253000 5.95855000 +Ti 13.83950000 6.00699000 9.99035000 +Ti 13.84330000 6.08634000 13.97870000 +Ti 13.93700000 9.89656000 2.04382000 +Ti 14.07200000 10.04510000 6.07135000 +Ti 13.96460000 10.02720000 10.11750000 +Ti 13.94410000 10.05000000 14.13760000 +Ti 13.97460000 13.93070000 2.07388000 +Ti 13.84620000 13.99600000 6.06872000 +Ti 13.85780000 14.01060000 10.16110000 +Ti 13.92300000 14.04590000 14.07970000 +O 15.91340000 2.04612000 1.95334000 +O 15.83910000 2.01829000 5.89019000 +O 15.87870000 2.00934000 10.05770000 +O -0.03942000 1.93454000 13.89020000 +O 15.94620000 5.98046000 1.98768000 +O 0.06018000 5.98678000 5.97758000 +O -0.01812000 6.06723000 9.94443000 +O 15.77520000 6.01216000 13.95440000 +O 15.94040000 9.93276000 1.99114000 +O 15.91630000 10.03390000 6.02517000 +O 15.88330000 10.02550000 9.93587000 +O 15.84140000 10.15400000 14.11650000 +O 15.90470000 13.94870000 1.96085000 +O 0.08528000 13.97100000 5.96917000 +O 0.06448000 13.91620000 10.00380000 +O 15.85220000 13.94900000 14.12980000 +O 3.83410000 2.02425000 1.94889000 +O 3.90857000 1.99605000 5.93983000 +O 3.83693000 1.94395000 9.95206000 +O 3.85183000 2.04438000 14.10940000 +O 4.04987000 5.99272000 1.95601000 +O 3.99552000 5.97509000 6.19648000 +O 3.92777000 5.96367000 9.97506000 +O 3.78030000 5.93457000 14.00870000 +O 4.03099000 9.99323000 1.96746000 +O 3.96779000 10.02770000 6.11146000 +O 3.98968000 10.03830000 10.14900000 +O 3.91178000 9.96020000 14.11530000 +O 4.02612000 13.94060000 2.18136000 +O 4.07514000 13.95320000 5.93051000 +O 4.06464000 13.94830000 9.97647000 +O 3.97192000 13.93990000 14.06620000 +O 7.94241000 2.07899000 1.94752000 +O 7.86183000 1.92971000 6.08656000 +O 7.97888000 1.93724000 9.99235000 +O 7.80259000 2.03597000 13.91230000 +O 7.95980000 6.17919000 2.08768000 +O 7.93732000 5.86688000 6.03714000 +O 8.05343000 5.94510000 10.06550000 +O 7.85934000 6.00167000 14.09080000 +O 7.93886000 9.94907000 2.01322000 +O 7.86905000 9.94673000 6.09314000 +O 8.00192000 9.88429000 10.04540000 +O 7.97258000 9.88121000 14.12610000 +O 8.03196000 14.06860000 2.10506000 +O 8.04040000 13.86990000 6.09111000 +O 7.96137000 13.97260000 10.14910000 +O 7.90487000 14.06590000 14.17460000 +O 11.92790000 2.06926000 2.03385000 +O 11.81620000 1.97534000 6.08442000 +O 11.89850000 1.86095000 10.01320000 +O 11.82000000 1.88353000 14.00840000 +O 11.95060000 6.07997000 2.00090000 +O 12.00280000 6.11477000 6.05488000 +O 12.08570000 6.05687000 10.01110000 +O 11.89680000 6.10017000 14.05650000 +O 11.98940000 10.02920000 1.99934000 +O 11.93450000 9.91155000 5.95499000 +O 11.98380000 9.88209000 10.11430000 +O 11.85640000 9.97762000 14.03630000 +O 11.93740000 14.12450000 2.05118000 +O 11.92930000 13.90980000 6.09929000 +O 12.03940000 14.11860000 10.20290000 +O 11.81370000 13.87030000 14.11240000 +O 1.99402790 15.95733910 2.00207000 +O 1.98326000 -0.01520250 5.93659000 +O 2.01133790 15.94850100 9.98919000 +O 1.98387790 15.89588500 14.06230000 +O 1.89607000 4.07675000 2.04797000 +O 2.03637000 4.01208000 6.02955000 +O 1.83727000 4.09836000 9.96394000 +O 1.90984000 4.01465000 14.09400000 +O 2.07962000 8.02055000 2.08136000 +O 2.03066000 8.00063000 6.15403000 +O 1.86700000 8.15437000 9.95704000 +O 1.94594000 8.02814000 14.00870000 +O 2.05245000 11.97180000 1.91910000 +O 2.03716000 11.95900000 6.00908000 +O 2.06068000 11.98370000 10.13460000 +O 1.99401000 12.00670000 14.09460000 +O 6.05036790 15.96484760 1.94483000 +O 5.91125790 15.90781660 6.01959000 +O 6.03507000 -0.03040400 10.14850000 +O 5.79619000 -0.01070800 14.07290000 +O 6.05140000 3.97242000 2.04348000 +O 5.92433000 3.96672000 6.06921000 +O 5.94699000 4.01426000 10.15110000 +O 5.80562000 4.04466000 14.11040000 +O 5.92190000 7.98301000 2.01549000 +O 6.02274000 7.92316000 6.14354000 +O 5.92850000 7.97602000 10.05420000 +O 5.88294000 7.96828000 14.00270000 +O 6.02273000 11.89610000 2.05697000 +O 5.98317000 11.93350000 6.10181000 +O 6.04127000 12.00000000 10.04090000 +O 5.98446000 11.94120000 14.09500000 +O 9.89234000 0.11576700 1.95218000 +O 9.93188790 15.95145530 6.03410000 +O 9.84701790 15.92214770 10.03880000 +O 9.74789000 0.00863352 14.10570000 +O 9.96799000 4.09596000 1.97367000 +O 9.98889000 4.00415000 5.99180000 +O 10.07970000 3.91066000 9.93580000 +O 9.81033000 4.01538000 13.91750000 +O 9.88471000 8.01738000 1.99433000 +O 9.85992000 7.94979000 6.05506000 +O 10.05710000 7.89904000 10.15840000 +O 9.87321000 7.97747000 14.09850000 +O 9.97284000 12.02910000 1.84402000 +O 9.96012000 11.94750000 5.94158000 +O 10.05280000 11.93240000 10.06440000 +O 9.74610000 11.97200000 14.15420000 +O 13.98420000 0.05757730 2.00243000 +O 13.89768790 15.96944470 6.07369000 +O 14.02690000 -0.00495271 10.15510000 +O 13.80938790 15.91568130 13.98350000 +O 13.93180000 4.01237000 1.97453000 +O 13.93670000 4.11707000 5.97674000 +O 13.85320000 3.84296000 10.07890000 +O 13.80810000 3.81064000 14.12710000 +O 13.91750000 7.95659000 1.94631000 +O 14.01400000 7.95021000 5.94749000 +O 14.05440000 7.96993000 10.09230000 +O 13.85390000 7.90309000 13.94020000 +O 14.04460000 12.02330000 2.05164000 +O 13.88000000 12.00520000 6.11972000 +O 13.98380000 11.93200000 9.93219000 +O 13.79650000 11.93750000 14.03660000 +O 1.85148600 1.94349550 15.98922970 +O 1.95248000 2.01296000 3.96834000 +O 1.90527000 2.09985000 7.95447000 +O 1.94961000 1.98884000 11.96340000 +O 1.95531000 5.98552000 16.05500000 +O 2.07997000 5.99946000 3.96842000 +O 2.00426000 6.08147000 7.96564000 +O 1.85996000 6.07363000 11.97580000 +O 2.00685400 9.97869450 0.05950000 +O 1.96906000 9.88546000 4.05127000 +O 2.07848000 10.01100000 8.07614000 +O 1.92907000 9.98865000 12.10670000 +O 2.08589600 14.01689550 16.03646080 +O 1.99430000 14.08420000 3.97281000 +O 1.98613000 14.09150000 7.90017000 +O 1.91109000 13.91920000 12.04020000 +O 5.78505000 2.03855000 16.00290000 +O 5.98406000 2.08933000 3.97775000 +O 5.98902000 1.94798000 8.02981000 +O 5.88193000 2.03739000 11.96440000 +O 6.01816400 5.99259450 0.08330000 +O 5.92868000 6.02545000 4.14903000 +O 6.05209000 5.89560000 8.10558000 +O 5.89547000 6.01463000 12.15540000 +O 5.93067600 9.88583550 16.01819190 +O 5.97691000 9.95592000 4.10781000 +O 5.89929000 9.98246000 8.11253000 +O 5.98798000 9.96577000 12.09940000 +O 5.90469000 14.07200000 0.19564700 +O 6.00444000 13.93250000 4.02780000 +O 5.95444000 13.92240000 8.09198000 +O 5.93456000 13.89740000 12.20150000 +O 9.91586600 2.16628550 16.01085950 +O 9.99141000 1.98867000 3.88705000 +O 9.84239000 2.00510000 8.04947000 +O 9.94784000 1.91433000 11.99880000 +O 10.02990000 6.03182000 0.04315920 +O 10.04680000 6.02788000 4.18523000 +O 10.00670000 5.96212000 8.13348000 +O 10.00750000 5.98285000 12.13880000 +O 9.96707400 9.93377450 0.02580000 +O 9.97215000 9.96080000 4.02984000 +O 10.01440000 9.98972000 8.08681000 +O 9.91593000 9.99925000 12.17950000 +O 9.93042000 14.01870000 0.12619700 +O 9.97960000 14.01540000 4.00265000 +O 9.88784000 14.01420000 8.12847000 +O 9.88834000 13.98940000 12.09630000 +O 13.81240000 1.84520000 16.00510000 +O 13.85950000 1.96367000 3.94534000 +O 13.93460000 1.99242000 7.89791000 +O 13.88510000 1.96661000 12.06850000 +O 14.04643400 6.06008450 0.03460000 +O 13.89260000 6.09163000 4.03805000 +O 13.92640000 5.98794000 8.08774000 +O 13.93980000 5.82447000 12.06500000 +O 13.88116600 9.91720550 16.03498180 +O 13.87860000 9.89645000 3.95964000 +O 13.97620000 10.01610000 7.94364000 +O 13.96200000 10.11550000 12.05720000 +O 13.80566600 13.95269550 16.04910290 +O 14.05300000 14.09030000 4.07601000 +O 13.99310000 14.04360000 7.98521000 +O 13.93490000 13.90120000 12.03770000 diff --git a/regtest/metatensor/rt-perovskite/forces.reference b/regtest/metatensor/rt-perovskite/forces.reference new file mode 100644 index 0000000000..b072556ddd --- /dev/null +++ b/regtest/metatensor/rt-perovskite/forces.reference @@ -0,0 +1,322 @@ +320 +-39.9356 13.0957 -38.3369 +X -0.4059 0.3028 0.5266 +X -0.3939 0.3158 0.5270 +X -0.4104 0.3222 0.5510 +X -0.4110 0.2820 0.5589 +X -0.3923 0.3118 0.5483 +X -0.4221 0.3054 0.5585 +X -0.3937 0.2964 0.5699 +X -0.3695 0.2738 0.5367 +X -0.3837 0.3062 0.5262 +X -0.4100 0.3032 0.5513 +X -0.4112 0.3184 0.5306 +X -0.3939 0.3071 0.5393 +X -0.3918 0.3132 0.5242 +X -0.3841 0.2676 0.5110 +X -0.3552 0.2919 0.5285 +X -0.3967 0.2676 0.5349 +X -0.3866 0.2880 0.5076 +X -0.4111 0.3278 0.5413 +X -0.4089 0.3624 0.5717 +X -0.4059 0.2718 0.5363 +X -0.4133 0.3039 0.5510 +X -0.4012 0.2821 0.5405 +X -0.3827 0.3450 0.5474 +X -0.4044 0.3043 0.5448 +X -0.3780 0.3259 0.5458 +X -0.4121 0.3255 0.5737 +X -0.4163 0.3633 0.5547 +X -0.4135 0.3119 0.5440 +X -0.4230 0.3121 0.5168 +X -0.3890 0.2878 0.5263 +X -0.4050 0.2998 0.5698 +X -0.3993 0.2926 0.5507 +X -0.3935 0.3192 0.5721 +X -0.3814 0.2960 0.5253 +X -0.4110 0.3077 0.5282 +X -0.4248 0.3337 0.5557 +X -0.3736 0.2791 0.5319 +X -0.3635 0.3038 0.5550 +X -0.3998 0.3382 0.5411 +X -0.4318 0.3217 0.5639 +X -0.3759 0.2860 0.5325 +X -0.4045 0.2726 0.5486 +X -0.4043 0.3800 0.5319 +X -0.4162 0.3337 0.5606 +X -0.3567 0.3110 0.5335 +X -0.3953 0.2612 0.5248 +X -0.3912 0.2967 0.5390 +X -0.3854 0.2933 0.5618 +X -0.4274 0.3188 0.5498 +X -0.4145 0.2858 0.5350 +X -0.4466 0.3222 0.5554 +X -0.4726 0.3519 0.5699 +X -0.4035 0.3461 0.5507 +X -0.4053 0.3061 0.5651 +X -0.3853 0.3003 0.5402 +X -0.4238 0.3499 0.5789 +X -0.4298 0.3155 0.5648 +X -0.4488 0.3218 0.5760 +X -0.4319 0.3355 0.5618 +X -0.4460 0.3066 0.5604 +X -0.4389 0.3367 0.5600 +X -0.4400 0.2819 0.5592 +X -0.3999 0.2517 0.5462 +X -0.4311 0.3045 0.5575 +X 10.0485 -7.2962 -8.3849 +X 8.3451 -9.2085 -10.5412 +X 9.0172 -7.8196 -9.5848 +X 8.6229 -7.0407 -9.4790 +X 6.1250 -9.7223 -8.5688 +X 7.8739 -9.7111 -8.9602 +X 8.2579 -10.9222 -9.7766 +X 8.4444 -8.4972 -8.2567 +X 8.2779 -7.9976 -8.5915 +X 6.5874 -9.9272 -8.1452 +X 5.5494 -11.2281 -8.2985 +X 8.1850 -9.8276 -9.1592 +X 8.1184 -9.6628 -9.0190 +X 8.6587 -8.2107 -10.3300 +X 8.4585 -9.3000 -6.7288 +X 7.1886 -10.6906 -9.3504 +X 7.4488 -8.4056 -8.3168 +X 9.1128 -8.3769 -7.9391 +X 6.7309 -9.6055 -10.2733 +X 9.5245 -7.9691 -9.9140 +X 8.9900 -8.8499 -8.6259 +X 8.4121 -10.0180 -9.8557 +X 8.3305 -9.7075 -7.4692 +X 6.6253 -9.7061 -8.4591 +X 9.1226 -10.2217 -6.6714 +X 9.5992 -8.9904 -9.2959 +X 7.7115 -8.2048 -7.9559 +X 7.6463 -9.5704 -10.2505 +X 7.0422 -6.7997 -9.0947 +X 8.4795 -9.4216 -7.8717 +X 9.6798 -8.4018 -7.2446 +X 9.0323 -8.1665 -9.1024 +X 7.9567 -9.4185 -8.8769 +X 9.5213 -7.3553 -7.8592 +X 8.5724 -8.4949 -9.1434 +X 7.0352 -7.9024 -7.6060 +X 8.2421 -10.6353 -7.8695 +X 7.6046 -9.6741 -10.3869 +X 8.1790 -7.8283 -10.6973 +X 4.4696 -7.5967 -7.5628 +X 6.9716 -7.7332 -7.3685 +X 6.6765 -7.2949 -6.5173 +X 7.2582 -8.7756 -8.5643 +X 9.6790 -7.9138 -9.2173 +X 8.8642 -8.2747 -10.5222 +X 9.7499 -8.7515 -7.9613 +X 7.2514 -8.1383 -10.0717 +X 9.9262 -8.5471 -8.0447 +X 8.5549 -10.0060 -9.4273 +X 7.8062 -5.6061 -10.7389 +X 9.1966 -11.2187 -7.4840 +X 7.7375 -10.3379 -9.8007 +X 8.9938 -10.4499 -9.7486 +X 7.7278 -10.8154 -7.6821 +X 10.2676 -6.2655 -9.7820 +X 9.8027 -9.0783 -9.1753 +X 9.3357 -8.4229 -9.2782 +X 9.1207 -8.4089 -10.2198 +X 9.7913 -9.3336 -8.4585 +X 8.4911 -7.7907 -8.3313 +X 8.9851 -9.3658 -7.9113 +X 6.3694 -9.2859 -9.6254 +X 9.0515 -6.8532 -8.2632 +X 8.8816 -9.8631 -9.3360 +X -7.0546 -0.6649 0.9360 +X -7.6475 -0.8009 1.0511 +X -8.1840 -0.3611 0.9734 +X -7.2054 -0.5513 0.4573 +X -7.2250 -0.3525 0.7839 +X -6.1207 -0.6235 0.1921 +X -7.3320 -0.1999 0.5557 +X -6.4318 -0.3951 0.6308 +X -8.3049 -0.6016 1.2380 +X -8.3621 -0.7560 0.9142 +X -7.0940 -0.4570 1.2507 +X -7.6392 -0.8334 0.2210 +X -6.7778 -0.4759 0.9656 +X -5.3122 -0.1685 0.9474 +X -7.3907 -0.4640 0.5544 +X -7.1430 0.0603 0.7369 +X -6.7534 -0.0500 1.1419 +X -7.1572 -0.8536 0.6491 +X -6.9903 -1.2311 0.6103 +X -6.5257 -0.6931 0.8132 +X -7.0376 -0.4954 0.8172 +X -6.5882 -1.3077 0.5132 +X -8.2910 -0.9627 0.6116 +X -7.8958 -1.3040 0.7963 +X -7.3017 -0.1375 1.0114 +X -7.0055 -1.0319 0.2436 +X -7.3522 -0.6161 0.4390 +X -5.8764 -0.2580 0.8927 +X -6.8225 -0.4084 0.4318 +X -8.5833 -0.9900 0.7441 +X -7.4822 -0.4140 0.9124 +X -7.8744 -0.4299 0.9196 +X -9.9140 -0.6669 0.8694 +X -7.3082 -0.5663 0.3918 +X -6.6346 -0.6099 1.0765 +X -7.3525 -0.5782 1.0411 +X -6.5905 -0.6425 0.3118 +X -7.7853 -0.5886 0.5934 +X -7.1106 -1.7102 0.7957 +X -5.9830 -0.9566 0.1097 +X -7.4876 -0.1205 1.1116 +X -5.9797 -0.5014 0.3331 +X -6.9699 -1.0609 0.5450 +X -8.9954 -0.6331 0.6139 +X -9.0962 -0.2046 0.9860 +X -6.7821 -0.3900 1.3400 +X -8.1285 -1.5306 0.5713 +X -8.2417 -0.9382 0.4187 +X -6.4041 -0.4787 0.8324 +X -7.5591 -0.6391 0.6188 +X -6.7024 -0.6205 0.4285 +X -6.7869 -1.3192 0.2345 +X -7.4867 -0.9639 0.2935 +X -8.2519 -0.9566 0.5298 +X -7.4242 -0.9866 0.5404 +X -7.5250 -1.9995 -0.2139 +X -6.4117 -0.2711 0.6372 +X -7.7102 -0.5290 0.1236 +X -6.7126 -0.2729 0.4100 +X -5.7470 -0.7054 0.6911 +X -5.8021 -0.2938 0.6513 +X -7.4433 -0.2558 0.5507 +X -6.7969 -0.9447 0.1302 +X -5.6998 -0.3502 0.8102 +X -1.1965 8.5193 1.2744 +X -0.4901 10.4991 0.7820 +X 0.1283 11.1953 0.8407 +X -0.6522 10.0700 0.9353 +X -0.1047 11.7134 0.6180 +X -0.7903 10.5860 1.2513 +X -0.1328 10.0813 1.1069 +X -0.1132 9.8221 0.7914 +X -0.9659 9.7983 0.1974 +X -0.7255 8.5159 0.6294 +X 0.1152 8.3107 0.9536 +X -0.8672 9.1878 0.8621 +X -0.3549 8.7454 1.3413 +X -0.6822 9.4869 1.2591 +X -0.9745 11.4273 1.0733 +X -0.1438 10.6680 1.2585 +X -0.3848 9.3189 0.5147 +X -0.2458 9.2573 1.0329 +X -0.8323 10.6580 0.8764 +X -0.4231 8.8755 0.7981 +X -0.9432 11.1321 0.8666 +X -0.9416 9.7202 1.0456 +X -0.9904 9.4812 -0.0188 +X 0.0122 10.3111 0.3094 +X -0.3094 11.1940 0.1322 +X 0.0331 10.5572 0.6076 +X -0.0806 9.2025 0.7409 +X -0.3420 9.2203 1.1807 +X -0.4474 7.6347 1.3767 +X -0.4688 10.4107 0.6949 +X -1.0487 10.1757 0.3738 +X -0.8902 10.0402 0.7223 +X -0.3201 9.5831 0.8832 +X -0.5082 8.6898 1.3232 +X 0.5610 10.2166 0.7610 +X 1.0786 9.8920 -0.0819 +X -0.4450 9.1352 0.7034 +X -0.7282 9.9429 0.5940 +X 0.2458 9.0330 -0.1012 +X 0.2168 9.1481 0.7798 +X -0.2604 11.5455 0.0023 +X 0.1137 9.1946 0.2574 +X 0.5587 8.9970 1.2752 +X -0.4621 9.8960 0.6024 +X -0.2329 10.4890 1.0233 +X -0.7155 10.6243 0.7628 +X -0.4391 9.8031 1.2483 +X 0.0962 8.6352 0.2232 +X -0.4800 9.6300 1.1417 +X 0.1650 9.7142 0.9502 +X 0.1842 9.8578 0.6012 +X -0.5674 10.6971 0.8959 +X -0.7351 9.5123 0.9888 +X -0.8764 8.6781 0.6232 +X -0.4616 9.2421 -0.1937 +X -0.6872 9.1331 0.1571 +X 0.0077 11.0278 0.5633 +X 0.6925 9.6243 0.6793 +X 0.0951 9.0363 0.8252 +X 0.1043 10.5117 0.5838 +X -0.4164 9.9250 0.9309 +X -0.7513 10.9863 0.5085 +X -0.4699 9.6294 0.6564 +X -0.7079 9.7637 0.4996 +X -0.7142 -0.2214 7.8955 +X -0.4201 -0.6748 6.5139 +X -0.7779 -0.2939 6.8370 +X -0.4790 0.4145 7.0742 +X -0.6937 -0.2390 7.5442 +X -0.0750 -0.1569 6.0947 +X -0.0111 -0.7032 8.0501 +X -0.3316 -0.2052 6.5440 +X -0.4008 -1.2453 8.0076 +X -0.1536 -0.1720 6.3624 +X -0.1171 -0.9121 7.1237 +X -0.4377 -0.3155 6.1279 +X -0.1963 -0.3252 7.9889 +X -0.4305 -0.4712 6.5993 +X -0.1887 -0.8426 7.2014 +X -0.3029 -0.0243 6.5623 +X -0.3086 -0.5915 6.5350 +X -0.7983 -0.3251 7.2085 +X -0.3800 -0.9336 6.6453 +X 0.2363 -0.5813 7.8924 +X -0.5204 -0.0894 6.5144 +X -0.1103 -0.2412 6.2104 +X -0.6240 -1.3400 7.5615 +X 0.1102 -1.1115 6.6042 +X -0.7162 -0.9034 7.9977 +X -0.4040 -0.0293 6.6843 +X 0.0993 -1.0609 6.5274 +X -0.1812 -0.5359 6.0749 +X 0.1184 -0.8376 5.6424 +X -0.8116 -0.5223 7.8327 +X 0.1985 -1.1467 7.1197 +X -0.1921 -0.5038 6.5457 +X -0.5266 -0.1282 6.6005 +X -0.2674 -0.3194 6.1188 +X -0.3137 -0.7444 7.5870 +X 0.0889 -1.2420 6.7110 +X -0.3888 -0.5187 6.6922 +X -0.6611 -0.3228 5.9007 +X -0.5377 -0.8871 8.5811 +X 0.0228 -1.3149 6.2198 +X -0.1373 -1.1512 7.2497 +X 0.2603 -0.3802 6.3703 +X 0.2141 -0.9800 7.5466 +X -0.0233 -1.2013 5.3662 +X -0.1185 -1.2610 5.8494 +X -0.4301 -0.4047 7.5581 +X -0.3916 -0.7394 7.1722 +X -0.2031 -0.7252 6.4458 +X -0.5527 -1.0154 7.1673 +X -0.5458 -0.5596 6.7981 +X -0.2927 -0.6768 6.8778 +X -0.2315 -0.6677 7.0357 +X -0.4345 -0.7266 6.0756 +X 0.0619 -0.9473 7.5565 +X -0.4790 -0.5502 6.6948 +X -0.7642 0.1060 7.7578 +X -0.5607 -0.8590 6.7905 +X -0.3239 -0.2476 6.7895 +X -0.6583 -0.6815 6.8213 +X -0.1918 -0.0617 7.0488 +X -0.3980 -0.7417 6.0885 +X -0.5817 -0.3058 7.4043 +X -0.1722 -0.1334 6.0642 +X 0.1488 -0.8110 7.5706 diff --git a/regtest/metatensor/rt-perovskite/plumed.dat b/regtest/metatensor/rt-perovskite/plumed.dat new file mode 100644 index 0000000000..ad9962e25d --- /dev/null +++ b/regtest/metatensor/rt-perovskite/plumed.dat @@ -0,0 +1,60 @@ +r: METATENSOR ... + MODEL=soap_cv.pt + EXTENSIONS_DIRECTORY=extensions + + SPECIES1=1-64 + SPECIES2=65-128 + SPECIES3=129-320 + SPECIES_TO_TYPES=56,22,8 +... + +# r: SPHERICAL_EXPANSION ... +# SPECIES1=1-64 SPECIES2=65-128 SPECIES3=129-320 +# HYPERPARAMS={ +# "max_radial": 6, +# "max_angular": 1, +# "compute_gradients": false, +# "cutoff_function": {"type": "ShiftedCosine", "cutoff": {"value": 6, "unit": "AA"}, "smooth_width": {"value": 0.5, "unit": "AA"}}, +# "gaussian_density": {"type": "Constant", "gaussian_sigma": {"value": 0.5, "unit": "AA"}}, +# "radial_contribution": {"type": "GTO"} +# } +# ... +#DISTANCES IN PLUMED ARE IN NANOMETERS (there's an appropriate conversion of units to be done here - annoying feature, units are ignored and +# constrained to be Angstroms) + +# This vector selects out the Ti atoms +mask: CONSTANT VALUES=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + +# Now transpose the spherical expansion matrix +rT: TRANSPOSE ARG=r + +# And multiply by mask to get vector that contains spherical expansions summed over Ti atoms for each element glob here is a vector with ndescriptors components +glob: MATRIX_VECTOR_PRODUCT ARG=rT,mask +globM: CUSTOM ARG=glob FUNC=x*100 PERIODIC=NO + +# And lets get the three vectors for Q (we have to reorder the features due to the different ordering of the species) +QM1: SELECT_COMPONENTS ARG=globM COMPONENTS=50,54,58,62,66,70,26,30,34,38,42,46,2,6,10,14,18,22 +QP0: SELECT_COMPONENTS ARG=globM COMPONENTS=51,55,59,63,67,71,27,31,35,39,43,47,3,7,11,15,19,23 +QP1: SELECT_COMPONENTS ARG=globM COMPONENTS=52,56,60,64,68,72,28,32,36,40,44,48,4,8,12,16,20,24 + +P: SELECT_COMPONENTS ARG=globM COMPONENTS=50,51,52 +Q: VSTACK ARG=QM1,QP0,QP1 +O: MATRIX_VECTOR_PRODUCT ARG=Q,P + +# Now we need to project on the latent space to get the final two-component CVs (these are derived from a PCA on some meaningful trajectories) +Omean: CONSTANT VALUES=1.288698831095371702e+02,2.617335066408316493e+02,-4.470590442155883011e+02,3.805963661105024016e+02,-3.191211037789739180e+02,3.199499517960481754e+01,2.558077069034212702e-18,-4.767958879095662804e-17,5.535828965091558431e-17,7.901463027613001226e-16,2.834038812988062537e-16,7.773037586123435923e-17,1.083320022495142787e+01,-2.127298042936651612e+01,1.102423521729797642e+02,-7.436487467161546761e+01,-6.057457008395690679e+01,-1.127048489717186719e+01 +PCproj1: CONSTANT VALUES=-1.736605074221235501e-01,-3.439185647804997581e-01,6.000549946713460425e-01,-5.153518601842774771e-01,4.306120091626224333e-01,-4.936419424990570737e-02,5.737224441874260005e-20,5.789200825971290787e-20,1.602354531022834871e-19,-3.734768294581900180e-18,-1.069924852588776739e-18,-1.325919968746099882e-19,-1.427658043531180969e-02,2.831673923664360451e-02,-1.442261845885493277e-01,9.779100322579141469e-02,8.033644780771051486e-02,1.486978404735405865e-02 +PCproj2: CONSTANT VALUES=-1.752179731061346835e-01,1.221739151233948023e-01,9.009355055696890990e-02,2.829699014726243245e-02,-2.364418349971024458e-01,-9.313161193379775327e-01,-8.450667932128574439e-19,1.850794190761883150e-20,-2.827677172092518699e-18,3.498900249925885628e-17,-4.158577488424971303e-18,-9.358198163275448275e-18,-8.393629821959581669e-03,1.337107208596517542e-02,-8.472249327649658546e-02,1.057716443535616641e-01,5.864574806942762786e-02,1.208591791777620904e-02 + +Orel: CUSTOM ARG=O,Omean FUNC=x-y PERIODIC=NO +CV1_vec: CUSTOM ARG=Orel,PCproj1 FUNC=x*y PERIODIC=NO +CV1: SUM ARG=CV1_vec PERIODIC=NO +CV2_vec: CUSTOM ARG=Orel,PCproj2 FUNC=x*y PERIODIC=NO +CV2: SUM ARG=CV2_vec PERIODIC=NO + +PRINT ARG=CV1 FILE=CV1 FMT=%e +PRINT ARG=CV2 FILE=CV2 FMT=%e + +FLUSH STRIDE=1 +BIASVALUE ARG=CV1 + diff --git a/regtest/metatensor/rt-perovskite/soap_cv.py b/regtest/metatensor/rt-perovskite/soap_cv.py new file mode 100644 index 0000000000..9dc8087654 --- /dev/null +++ b/regtest/metatensor/rt-perovskite/soap_cv.py @@ -0,0 +1,113 @@ +from typing import Dict, List, Optional + +import torch +from metatensor.torch import Labels, TensorBlock, TensorMap +from metatensor.torch.atomistic import ( + MetatensorAtomisticModel, + ModelCapabilities, + ModelMetadata, + ModelOutput, + System, +) +from rascaline.torch import SoapPowerSpectrum + + +class SOAP_CV(torch.nn.Module): + def __init__(self, species): + super().__init__() + + self.neighbor_type_pairs = Labels( + names=["neighbor_1_type", "neighbor_2_type"], + values=torch.tensor( + [[t1, t2] for t1 in species for t2 in species if t1 <= t2] + ), + ) + self.calculator = SoapPowerSpectrum( + cutoff=0.6, + max_angular=1, + max_radial=6, + radial_basis={"Gto": {}}, + cutoff_function={"ShiftedCosine": {"width": 0.05}}, + center_atom_weight=1.0, + atomic_gaussian_width=0.05, + ) + + torch.manual_seed(-230623) + self.register_buffer("pca_projection", torch.rand(2520, 3, dtype=torch.float64)) + + def forward( + self, + systems: List[System], + outputs: Dict[str, ModelOutput], + selected_atoms: Optional[Labels], + ) -> Dict[str, TensorMap]: + + if "plumed::cv" not in outputs: + return {} + + output = outputs["plumed::cv"] + + device = torch.device("cpu") + if len(systems) > 0: + device = systems[0].positions.device + + soap = self.calculator(systems, selected_samples=selected_atoms) + soap = soap.keys_to_samples("center_type") + soap = soap.keys_to_properties(self.neighbor_type_pairs) + + if not output.per_atom: + raise ValueError("per_atom=False is not supported") + + soap_block = soap.block() + samples = soap_block.samples.remove("center_type") + + block = TensorBlock( + values=soap_block.values, + samples=samples, + components=[], + properties=soap_block.properties, + ) + cv = TensorMap( + keys=Labels("_", torch.tensor([[0]], device=device)), + blocks=[block], + ) + + return {"plumed::cv": cv} + + +cv = SOAP_CV(species=[56,22,8]) +cv.eval() + + +capabilities = ModelCapabilities( + outputs={ + "plumed::cv": ModelOutput( + quantity="", + unit="", + per_atom=True, + explicit_gradients=["postions"], + ) + }, + interaction_range=4.0, + supported_devices=["cpu", "mps", "cuda"], + length_unit="nm", + atomic_types=[6, 1, 7, 8], + dtype="float64", +) + +metadata = ModelMetadata( + name="Collective Variable test", + description=""" +A simple collective variable for testing purposes +""", + authors=["Some Author"], + references={ + "implementation": ["ref to SOAP code"], + "architecture": ["ref to SOAP"], + "model": ["ref to paper"], + }, +) + + +model = MetatensorAtomisticModel(cv, metadata, capabilities) +model.export("soap_cv.pt", collect_extensions="extensions") diff --git a/regtest/metatensor/rt-unwrapped-perovskite/CV1.reference b/regtest/metatensor/rt-unwrapped-perovskite/CV1.reference new file mode 100644 index 0000000000..8a198f2ff8 --- /dev/null +++ b/regtest/metatensor/rt-unwrapped-perovskite/CV1.reference @@ -0,0 +1,2 @@ +#! FIELDS time CV1 + 0.000000 7.338286e+02 diff --git a/regtest/metatensor/rt-unwrapped-perovskite/CV2.reference b/regtest/metatensor/rt-unwrapped-perovskite/CV2.reference new file mode 100644 index 0000000000..c0cb82333f --- /dev/null +++ b/regtest/metatensor/rt-unwrapped-perovskite/CV2.reference @@ -0,0 +1,2 @@ +#! FIELDS time CV2 + 0.000000 -6.796922e+00 diff --git a/regtest/metatensor/rt-unwrapped-perovskite/Makefile b/regtest/metatensor/rt-unwrapped-perovskite/Makefile new file mode 100644 index 0000000000..3703b27cea --- /dev/null +++ b/regtest/metatensor/rt-unwrapped-perovskite/Makefile @@ -0,0 +1 @@ +include ../../scripts/test.make diff --git a/regtest/metatensor/rt-unwrapped-perovskite/config b/regtest/metatensor/rt-unwrapped-perovskite/config new file mode 100644 index 0000000000..85adf01af8 --- /dev/null +++ b/regtest/metatensor/rt-unwrapped-perovskite/config @@ -0,0 +1,10 @@ +plumed_modules=metatensor +plumed_needs=metatensor +type=driver +# this is to test a different name +arg="--plumed plumed.dat --ixyz config.xyz --dump-forces forces --dump-forces-fmt %8.4f --length-units A" # --debug-forces forces.num" + +function plumed_regtest_before(){ + python soap_cv.py + echo Generated model using soap_cv.py +} diff --git a/regtest/metatensor/rt-unwrapped-perovskite/config.xyz b/regtest/metatensor/rt-unwrapped-perovskite/config.xyz new file mode 100644 index 0000000000..b2ffe1666c --- /dev/null +++ b/regtest/metatensor/rt-unwrapped-perovskite/config.xyz @@ -0,0 +1,322 @@ +320 +15.95322 0.0 0.0 0.0418879 15.9989 0.0 -0.103034 -0.0550045 16.0748 + Ba 1.97376e-03 -1.32584e-01 1.34133e-01 + Ba -5.67893e-02 -2.17588e-03 4.03009e+00 + Ba -6.11944e-02 -7.72060e-02 8.01833e+00 + Ba -1.02399e-01 -3.57740e-02 1.20900e+01 + Ba 1.58991e+01 3.93818e+00 6.16151e-02 + Ba 1.58368e+01 4.12332e+00 3.99476e+00 + Ba 1.58419e+01 4.09458e+00 8.07886e+00 + Ba 1.59432e+01 3.90047e+00 1.20863e+01 + Ba 1.59341e+01 8.00594e+00 1.38825e-01 + Ba 1.60432e+01 7.85922e+00 3.89935e+00 + Ba 1.59206e+01 7.94912e+00 7.98610e+00 + Ba 1.59199e+01 8.00603e+00 1.20570e+01 + Ba 1.59276e+01 1.20573e+01 1.60279e+01 + Ba 1.61136e+01 1.20240e+01 3.99179e+00 + Ba 1.59700e+01 1.19558e+01 8.03406e+00 + Ba 1.59159e+01 1.19499e+01 1.20573e+01 + Ba 3.97329e+00 9.42696e-03 1.39447e-01 + Ba 3.86464e+00 6.46677e-02 3.91390e+00 + Ba 3.94473e+00 -2.89166e-02 7.99678e+00 + Ba 3.86089e+00 -2.37760e-01 1.20679e+01 + Ba 4.03904e+00 4.02992e+00 5.86951e-02 + Ba 3.99796e+00 4.08314e+00 4.06779e+00 + Ba 3.93598e+00 4.03827e+00 8.04567e+00 + Ba 3.89154e+00 3.86906e+00 1.19597e+01 + Ba 4.11954e+00 7.89080e+00 -8.31858e-02 + Ba 4.05035e+00 8.02203e+00 4.01502e+00 + Ba 3.96265e+00 8.09729e+00 8.02974e+00 + Ba 3.82360e+00 7.96670e+00 1.20816e+01 + Ba 3.96931e+00 1.19314e+01 1.61675e+01 + Ba 4.05403e+00 1.19241e+01 3.98149e+00 + Ba 3.90272e+00 1.19683e+01 7.97117e+00 + Ba 3.98987e+00 1.18829e+01 1.21552e+01 + Ba 7.90857e+00 5.14896e-02 4.04277e-02 + Ba 7.90224e+00 -2.64048e-03 4.10942e+00 + Ba 7.81699e+00 -9.75042e-03 7.96219e+00 + Ba 7.88363e+00 -3.76543e-02 1.20255e+01 + Ba 8.02020e+00 4.02827e+00 -1.75446e-01 + Ba 8.02990e+00 4.08347e+00 4.03414e+00 + Ba 7.92266e+00 4.01371e+00 8.02952e+00 + Ba 7.95659e+00 3.94970e+00 1.19351e+01 + Ba 8.02887e+00 7.92568e+00 -7.55714e-02 + Ba 7.95211e+00 7.97331e+00 4.09872e+00 + Ba 7.95093e+00 7.94931e+00 8.10395e+00 + Ba 7.85776e+00 7.93683e+00 1.19427e+01 + Ba 7.95533e+00 1.19475e+01 1.65353e-02 + Ba 8.05186e+00 1.18965e+01 4.01585e+00 + Ba 7.98475e+00 1.18375e+01 7.97988e+00 + Ba 8.00766e+00 1.19310e+01 1.20710e+01 + Ba 1.18327e+01 -1.26772e-01 1.60571e+01 + Ba 1.18106e+01 9.57511e-02 4.07074e+00 + Ba 1.18569e+01 -3.52368e-02 8.05479e+00 + Ba 1.18575e+01 -3.88916e-02 1.20849e+01 + Ba 1.17970e+01 3.93606e+00 1.61643e+01 + Ba 1.18668e+01 3.93214e+00 4.01835e+00 + Ba 1.19373e+01 3.79105e+00 8.13036e+00 + Ba 1.20505e+01 3.93845e+00 1.21545e+01 + Ba 1.17758e+01 8.06563e+00 1.61191e+01 + Ba 1.19986e+01 8.02742e+00 3.97550e+00 + Ba 1.19897e+01 8.06643e+00 7.97844e+00 + Ba 1.19102e+01 7.97457e+00 1.20429e+01 + Ba 1.18520e+01 1.20000e+01 1.60723e+01 + Ba 1.20631e+01 1.19292e+01 3.94886e+00 + Ba 1.19772e+01 1.20251e+01 8.07659e+00 + Ba 1.18311e+01 1.19771e+01 1.21744e+01 + Ti 1.97219e+00 2.12495e+00 2.04418e+00 + Ti 2.00557e+00 1.99058e+00 6.06165e+00 + Ti 1.99108e+00 1.78928e+00 1.00740e+01 + Ti 1.94553e+00 1.87969e+00 1.41282e+01 + Ti 1.98717e+00 5.98484e+00 2.05804e+00 + Ti 1.94964e+00 5.95466e+00 6.15401e+00 + Ti 1.87676e+00 5.87259e+00 1.00689e+01 + Ti 1.99344e+00 5.88686e+00 1.41219e+01 + Ti 1.90307e+00 9.93218e+00 1.83030e+00 + Ti 2.02193e+00 1.00099e+01 5.94244e+00 + Ti 2.03786e+00 9.98789e+00 9.93510e+00 + Ti 1.92735e+00 9.94007e+00 1.39936e+01 + Ti 2.11692e+00 1.39927e+01 1.99441e+00 + Ti 2.03606e+00 1.40453e+01 6.06011e+00 + Ti 1.91277e+00 1.38771e+01 1.00689e+01 + Ti 2.02867e+00 1.38859e+01 1.41333e+01 + Ti 6.11705e+00 2.08037e+00 2.03795e+00 + Ti 5.99755e+00 2.06040e+00 6.08058e+00 + Ti 5.94713e+00 1.80729e+00 1.01031e+01 + Ti 5.95220e+00 2.00468e+00 1.40591e+01 + Ti 5.98816e+00 6.00832e+00 2.01824e+00 + Ti 5.97217e+00 6.09139e+00 6.08497e+00 + Ti 5.79044e+00 5.84028e+00 9.97399e+00 + Ti 5.95234e+00 5.92742e+00 1.39804e+01 + Ti 5.92883e+00 9.88844e+00 1.91186e+00 + Ti 5.99257e+00 1.00387e+01 6.00113e+00 + Ti 6.00538e+00 9.85911e+00 9.98945e+00 + Ti 6.03451e+00 9.94992e+00 1.40605e+01 + Ti 6.08137e+00 1.40565e+01 2.04721e+00 + Ti 5.87701e+00 1.40156e+01 5.97498e+00 + Ti 5.90206e+00 1.38473e+01 9.93509e+00 + Ti 5.93763e+00 1.39470e+01 1.40499e+01 + Ti 9.92088e+00 1.93768e+00 1.97183e+00 + Ti 1.00168e+01 2.00881e+00 6.09825e+00 + Ti 9.97041e+00 2.02647e+00 1.00484e+01 + Ti 9.95820e+00 1.83255e+00 1.40117e+01 + Ti 1.00087e+01 5.97225e+00 1.92964e+00 + Ti 9.91824e+00 5.99563e+00 6.04861e+00 + Ti 9.82056e+00 6.03935e+00 9.92361e+00 + Ti 1.00237e+01 5.84724e+00 1.39265e+01 + Ti 9.91816e+00 9.83433e+00 1.85913e+00 + Ti 1.01253e+01 9.96432e+00 5.89647e+00 + Ti 9.98404e+00 1.00445e+01 9.89670e+00 + Ti 9.91042e+00 9.84416e+00 1.39996e+01 + Ti 9.93862e+00 1.38527e+01 1.97473e+00 + Ti 9.91364e+00 1.39311e+01 5.94487e+00 + Ti 9.75428e+00 1.40682e+01 9.99078e+00 + Ti 9.82618e+00 1.38987e+01 1.40304e+01 + Ti 1.39423e+01 1.97181e+00 2.06499e+00 + Ti 1.40125e+01 1.96865e+00 6.09097e+00 + Ti 1.40236e+01 1.96141e+00 1.01444e+01 + Ti 1.39307e+01 1.97716e+00 1.41699e+01 + Ti 1.39335e+01 5.98931e+00 1.98622e+00 + Ti 1.38211e+01 6.07253e+00 5.95855e+00 + Ti 1.38395e+01 6.00699e+00 9.99035e+00 + Ti 1.38433e+01 6.08634e+00 1.39787e+01 + Ti 1.39370e+01 9.89656e+00 2.04382e+00 + Ti 1.40720e+01 1.00451e+01 6.07135e+00 + Ti 1.39646e+01 1.00272e+01 1.01175e+01 + Ti 1.39441e+01 1.00500e+01 1.41376e+01 + Ti 1.39746e+01 1.39307e+01 2.07388e+00 + Ti 1.38462e+01 1.39960e+01 6.06872e+00 + Ti 1.38578e+01 1.40106e+01 1.01611e+01 + Ti 1.39230e+01 1.40459e+01 1.40797e+01 + O 1.59134e+01 2.04612e+00 1.95334e+00 + O 1.58391e+01 2.01829e+00 5.89019e+00 + O 1.58787e+01 2.00934e+00 1.00577e+01 + O 1.59138e+01 1.93454e+00 1.38902e+01 + O 1.59462e+01 5.98046e+00 1.98768e+00 + O 1.60134e+01 5.98678e+00 5.97758e+00 + O 1.59351e+01 6.06723e+00 9.94443e+00 + O 1.57752e+01 6.01216e+00 1.39544e+01 + O 1.59404e+01 9.93276e+00 1.99114e+00 + O 1.59163e+01 1.00339e+01 6.02517e+00 + O 1.58833e+01 1.00255e+01 9.93587e+00 + O 1.58414e+01 1.01540e+01 1.41165e+01 + O 1.59047e+01 1.39487e+01 1.96085e+00 + O 1.60385e+01 1.39710e+01 5.96917e+00 + O 1.60177e+01 1.39162e+01 1.00038e+01 + O 1.58522e+01 1.39490e+01 1.41298e+01 + O 3.83410e+00 2.02425e+00 1.94889e+00 + O 3.90857e+00 1.99605e+00 5.93983e+00 + O 3.83693e+00 1.94395e+00 9.95206e+00 + O 3.85183e+00 2.04438e+00 1.41094e+01 + O 4.04987e+00 5.99272e+00 1.95601e+00 + O 3.99552e+00 5.97509e+00 6.19648e+00 + O 3.92777e+00 5.96367e+00 9.97506e+00 + O 3.78030e+00 5.93457e+00 1.40087e+01 + O 4.03099e+00 9.99323e+00 1.96746e+00 + O 3.96779e+00 1.00277e+01 6.11146e+00 + O 3.98968e+00 1.00383e+01 1.01490e+01 + O 3.91178e+00 9.96020e+00 1.41153e+01 + O 4.02612e+00 1.39406e+01 2.18136e+00 + O 4.07514e+00 1.39532e+01 5.93051e+00 + O 4.06464e+00 1.39483e+01 9.97647e+00 + O 3.97192e+00 1.39399e+01 1.40662e+01 + O 7.94241e+00 2.07899e+00 1.94752e+00 + O 7.86183e+00 1.92971e+00 6.08656e+00 + O 7.97888e+00 1.93724e+00 9.99235e+00 + O 7.80259e+00 2.03597e+00 1.39123e+01 + O 7.95980e+00 6.17919e+00 2.08768e+00 + O 7.93732e+00 5.86688e+00 6.03714e+00 + O 8.05343e+00 5.94510e+00 1.00655e+01 + O 7.85934e+00 6.00167e+00 1.40908e+01 + O 7.93886e+00 9.94907e+00 2.01322e+00 + O 7.86905e+00 9.94673e+00 6.09314e+00 + O 8.00192e+00 9.88429e+00 1.00454e+01 + O 7.97258e+00 9.88121e+00 1.41261e+01 + O 8.03196e+00 1.40686e+01 2.10506e+00 + O 8.04040e+00 1.38699e+01 6.09111e+00 + O 7.96137e+00 1.39726e+01 1.01491e+01 + O 7.90487e+00 1.40659e+01 1.41746e+01 + O 1.19279e+01 2.06926e+00 2.03385e+00 + O 1.18162e+01 1.97534e+00 6.08442e+00 + O 1.18985e+01 1.86095e+00 1.00132e+01 + O 1.18200e+01 1.88353e+00 1.40084e+01 + O 1.19506e+01 6.07997e+00 2.00090e+00 + O 1.20028e+01 6.11477e+00 6.05488e+00 + O 1.20857e+01 6.05687e+00 1.00111e+01 + O 1.18968e+01 6.10017e+00 1.40565e+01 + O 1.19894e+01 1.00292e+01 1.99934e+00 + O 1.19345e+01 9.91155e+00 5.95499e+00 + O 1.19838e+01 9.88209e+00 1.01143e+01 + O 1.18564e+01 9.97762e+00 1.40363e+01 + O 1.19374e+01 1.41245e+01 2.05118e+00 + O 1.19293e+01 1.39098e+01 6.09929e+00 + O 1.20394e+01 1.41186e+01 1.02029e+01 + O 1.18137e+01 1.38703e+01 1.41124e+01 + O 1.95214e+00 -4.15609e-02 2.00207e+00 + O 1.98326e+00 -1.52025e-02 5.93659e+00 + O 1.96945e+00 -5.03990e-02 9.98919e+00 + O 1.94199e+00 -1.03015e-01 1.40623e+01 + O 1.89607e+00 4.07675e+00 2.04797e+00 + O 2.03637e+00 4.01208e+00 6.02955e+00 + O 1.83727e+00 4.09836e+00 9.96394e+00 + O 1.90984e+00 4.01465e+00 1.40940e+01 + O 2.07962e+00 8.02055e+00 2.08136e+00 + O 2.03066e+00 8.00063e+00 6.15403e+00 + O 1.86700e+00 8.15437e+00 9.95704e+00 + O 1.94594e+00 8.02814e+00 1.40087e+01 + O 2.05245e+00 1.19718e+01 1.91910e+00 + O 2.03716e+00 1.19590e+01 6.00908e+00 + O 2.06068e+00 1.19837e+01 1.01346e+01 + O 1.99401e+00 1.20067e+01 1.40946e+01 + O 6.00848e+00 -3.40524e-02 1.94483e+00 + O 5.86937e+00 -9.10834e-02 6.01959e+00 + O 6.03507e+00 -3.04040e-02 1.01485e+01 + O 5.79619e+00 -1.07080e-02 1.40729e+01 + O 6.05140e+00 3.97242e+00 2.04348e+00 + O 5.92433e+00 3.96672e+00 6.06921e+00 + O 5.94699e+00 4.01426e+00 1.01511e+01 + O 5.80562e+00 4.04466e+00 1.41104e+01 + O 5.92190e+00 7.98301e+00 2.01549e+00 + O 6.02274e+00 7.92316e+00 6.14354e+00 + O 5.92850e+00 7.97602e+00 1.00542e+01 + O 5.88294e+00 7.96828e+00 1.40027e+01 + O 6.02273e+00 1.18961e+01 2.05697e+00 + O 5.98317e+00 1.19335e+01 6.10181e+00 + O 6.04127e+00 1.20000e+01 1.00409e+01 + O 5.98446e+00 1.19412e+01 1.40950e+01 + O 9.89234e+00 1.15767e-01 1.95218e+00 + O 9.89000e+00 -4.74447e-02 6.03410e+00 + O 9.80513e+00 -7.67523e-02 1.00388e+01 + O 9.74789e+00 8.63352e-03 1.41057e+01 + O 9.96799e+00 4.09596e+00 1.97367e+00 + O 9.98889e+00 4.00415e+00 5.99180e+00 + O 1.00797e+01 3.91066e+00 9.93580e+00 + O 9.81033e+00 4.01538e+00 1.39175e+01 + O 9.88471e+00 8.01738e+00 1.99433e+00 + O 9.85992e+00 7.94979e+00 6.05506e+00 + O 1.00571e+01 7.89904e+00 1.01584e+01 + O 9.87321e+00 7.97747e+00 1.40985e+01 + O 9.97284e+00 1.20291e+01 1.84402e+00 + O 9.96012e+00 1.19475e+01 5.94158e+00 + O 1.00528e+01 1.19324e+01 1.00644e+01 + O 9.74610e+00 1.19720e+01 1.41542e+01 + O 1.39842e+01 5.75773e-02 2.00243e+00 + O 1.38558e+01 -2.94553e-02 6.07369e+00 + O 1.40269e+01 -4.95271e-03 1.01551e+01 + O 1.37675e+01 -8.32187e-02 1.39835e+01 + O 1.39318e+01 4.01237e+00 1.97453e+00 + O 1.39367e+01 4.11707e+00 5.97674e+00 + O 1.38532e+01 3.84296e+00 1.00789e+01 + O 1.38081e+01 3.81064e+00 1.41271e+01 + O 1.39175e+01 7.95659e+00 1.94631e+00 + O 1.40140e+01 7.95021e+00 5.94749e+00 + O 1.40544e+01 7.96993e+00 1.00923e+01 + O 1.38539e+01 7.90309e+00 1.39402e+01 + O 1.40446e+01 1.20233e+01 2.05164e+00 + O 1.38800e+01 1.20052e+01 6.11972e+00 + O 1.39838e+01 1.19320e+01 9.93219e+00 + O 1.37965e+01 1.19375e+01 1.40366e+01 + O 1.95452e+00 1.99850e+00 -8.55703e-02 + O 1.95248e+00 2.01296e+00 3.96834e+00 + O 1.90527e+00 2.09985e+00 7.95447e+00 + O 1.94961e+00 1.98884e+00 1.19634e+01 + O 1.95531e+00 5.98552e+00 1.60550e+01 + O 2.07997e+00 5.99946e+00 3.96842e+00 + O 2.00426e+00 6.08147e+00 7.96564e+00 + O 1.85996e+00 6.07363e+00 1.19758e+01 + O 1.90382e+00 9.92369e+00 1.61343e+01 + O 1.96906e+00 9.88546e+00 4.05127e+00 + O 2.07848e+00 1.00110e+01 8.07614e+00 + O 1.92907e+00 9.98865e+00 1.21067e+01 + O 2.18893e+00 1.40719e+01 -3.83392e-02 + O 1.99430e+00 1.40842e+01 3.97281e+00 + O 1.98613e+00 1.40915e+01 7.90017e+00 + O 1.91109e+00 1.39192e+01 1.20402e+01 + O 5.78505e+00 2.03855e+00 1.60029e+01 + O 5.98406e+00 2.08933e+00 3.97775e+00 + O 5.98902e+00 1.94798e+00 8.02981e+00 + O 5.88193e+00 2.03739e+00 1.19644e+01 + O 5.91513e+00 5.93759e+00 1.61581e+01 + O 5.92868e+00 6.02545e+00 4.14903e+00 + O 6.05209e+00 5.89560e+00 8.10558e+00 + O 5.89547e+00 6.01463e+00 1.21554e+01 + O 6.03371e+00 9.94084e+00 -5.66081e-02 + O 5.97691e+00 9.95592e+00 4.10781e+00 + O 5.89929e+00 9.98246e+00 8.11253e+00 + O 5.98798e+00 9.96577e+00 1.20994e+01 + O 5.90469e+00 1.40720e+01 1.95647e-01 + O 6.00444e+00 1.39325e+01 4.02780e+00 + O 5.95444e+00 1.39224e+01 8.09198e+00 + O 5.93456e+00 1.38974e+01 1.22015e+01 + O 1.00189e+01 2.22129e+00 -6.39405e-02 + O 9.99141e+00 1.98867e+00 3.88705e+00 + O 9.84239e+00 2.00510e+00 8.04947e+00 + O 9.94784e+00 1.91433e+00 1.19988e+01 + O 1.00299e+01 6.03182e+00 4.31592e-02 + O 1.00468e+01 6.02788e+00 4.18523e+00 + O 1.00067e+01 5.96212e+00 8.13348e+00 + O 1.00075e+01 5.98285e+00 1.21388e+01 + O 9.86404e+00 9.87877e+00 1.61006e+01 + O 9.97215e+00 9.96080e+00 4.02984e+00 + O 1.00144e+01 9.98972e+00 8.08681e+00 + O 9.91593e+00 9.99925e+00 1.21795e+01 + O 9.93042e+00 1.40187e+01 1.26197e-01 + O 9.97960e+00 1.40154e+01 4.00265e+00 + O 9.88784e+00 1.40142e+01 8.12847e+00 + O 9.88834e+00 1.39894e+01 1.20963e+01 + O 1.38124e+01 1.84520e+00 1.60051e+01 + O 1.38595e+01 1.96367e+00 3.94534e+00 + O 1.39346e+01 1.99242e+00 7.89791e+00 + O 1.38851e+01 1.96661e+00 1.20685e+01 + O 1.39434e+01 6.00508e+00 1.61094e+01 + O 1.38926e+01 6.09163e+00 4.03805e+00 + O 1.39264e+01 5.98794e+00 8.08774e+00 + O 1.39398e+01 5.82447e+00 1.20650e+01 + O 1.39842e+01 9.97221e+00 -3.98182e-02 + O 1.38786e+01 9.89645e+00 3.95964e+00 + O 1.39762e+01 1.00161e+01 7.94364e+00 + O 1.39620e+01 1.01155e+01 1.20572e+01 + O 1.39087e+01 1.40077e+01 -2.56971e-02 + O 1.40530e+01 1.40903e+01 4.07601e+00 + O 1.39931e+01 1.40436e+01 7.98521e+00 + O 1.39349e+01 1.39012e+01 1.20377e+01 diff --git a/regtest/metatensor/rt-unwrapped-perovskite/forces.reference b/regtest/metatensor/rt-unwrapped-perovskite/forces.reference new file mode 100644 index 0000000000..b072556ddd --- /dev/null +++ b/regtest/metatensor/rt-unwrapped-perovskite/forces.reference @@ -0,0 +1,322 @@ +320 +-39.9356 13.0957 -38.3369 +X -0.4059 0.3028 0.5266 +X -0.3939 0.3158 0.5270 +X -0.4104 0.3222 0.5510 +X -0.4110 0.2820 0.5589 +X -0.3923 0.3118 0.5483 +X -0.4221 0.3054 0.5585 +X -0.3937 0.2964 0.5699 +X -0.3695 0.2738 0.5367 +X -0.3837 0.3062 0.5262 +X -0.4100 0.3032 0.5513 +X -0.4112 0.3184 0.5306 +X -0.3939 0.3071 0.5393 +X -0.3918 0.3132 0.5242 +X -0.3841 0.2676 0.5110 +X -0.3552 0.2919 0.5285 +X -0.3967 0.2676 0.5349 +X -0.3866 0.2880 0.5076 +X -0.4111 0.3278 0.5413 +X -0.4089 0.3624 0.5717 +X -0.4059 0.2718 0.5363 +X -0.4133 0.3039 0.5510 +X -0.4012 0.2821 0.5405 +X -0.3827 0.3450 0.5474 +X -0.4044 0.3043 0.5448 +X -0.3780 0.3259 0.5458 +X -0.4121 0.3255 0.5737 +X -0.4163 0.3633 0.5547 +X -0.4135 0.3119 0.5440 +X -0.4230 0.3121 0.5168 +X -0.3890 0.2878 0.5263 +X -0.4050 0.2998 0.5698 +X -0.3993 0.2926 0.5507 +X -0.3935 0.3192 0.5721 +X -0.3814 0.2960 0.5253 +X -0.4110 0.3077 0.5282 +X -0.4248 0.3337 0.5557 +X -0.3736 0.2791 0.5319 +X -0.3635 0.3038 0.5550 +X -0.3998 0.3382 0.5411 +X -0.4318 0.3217 0.5639 +X -0.3759 0.2860 0.5325 +X -0.4045 0.2726 0.5486 +X -0.4043 0.3800 0.5319 +X -0.4162 0.3337 0.5606 +X -0.3567 0.3110 0.5335 +X -0.3953 0.2612 0.5248 +X -0.3912 0.2967 0.5390 +X -0.3854 0.2933 0.5618 +X -0.4274 0.3188 0.5498 +X -0.4145 0.2858 0.5350 +X -0.4466 0.3222 0.5554 +X -0.4726 0.3519 0.5699 +X -0.4035 0.3461 0.5507 +X -0.4053 0.3061 0.5651 +X -0.3853 0.3003 0.5402 +X -0.4238 0.3499 0.5789 +X -0.4298 0.3155 0.5648 +X -0.4488 0.3218 0.5760 +X -0.4319 0.3355 0.5618 +X -0.4460 0.3066 0.5604 +X -0.4389 0.3367 0.5600 +X -0.4400 0.2819 0.5592 +X -0.3999 0.2517 0.5462 +X -0.4311 0.3045 0.5575 +X 10.0485 -7.2962 -8.3849 +X 8.3451 -9.2085 -10.5412 +X 9.0172 -7.8196 -9.5848 +X 8.6229 -7.0407 -9.4790 +X 6.1250 -9.7223 -8.5688 +X 7.8739 -9.7111 -8.9602 +X 8.2579 -10.9222 -9.7766 +X 8.4444 -8.4972 -8.2567 +X 8.2779 -7.9976 -8.5915 +X 6.5874 -9.9272 -8.1452 +X 5.5494 -11.2281 -8.2985 +X 8.1850 -9.8276 -9.1592 +X 8.1184 -9.6628 -9.0190 +X 8.6587 -8.2107 -10.3300 +X 8.4585 -9.3000 -6.7288 +X 7.1886 -10.6906 -9.3504 +X 7.4488 -8.4056 -8.3168 +X 9.1128 -8.3769 -7.9391 +X 6.7309 -9.6055 -10.2733 +X 9.5245 -7.9691 -9.9140 +X 8.9900 -8.8499 -8.6259 +X 8.4121 -10.0180 -9.8557 +X 8.3305 -9.7075 -7.4692 +X 6.6253 -9.7061 -8.4591 +X 9.1226 -10.2217 -6.6714 +X 9.5992 -8.9904 -9.2959 +X 7.7115 -8.2048 -7.9559 +X 7.6463 -9.5704 -10.2505 +X 7.0422 -6.7997 -9.0947 +X 8.4795 -9.4216 -7.8717 +X 9.6798 -8.4018 -7.2446 +X 9.0323 -8.1665 -9.1024 +X 7.9567 -9.4185 -8.8769 +X 9.5213 -7.3553 -7.8592 +X 8.5724 -8.4949 -9.1434 +X 7.0352 -7.9024 -7.6060 +X 8.2421 -10.6353 -7.8695 +X 7.6046 -9.6741 -10.3869 +X 8.1790 -7.8283 -10.6973 +X 4.4696 -7.5967 -7.5628 +X 6.9716 -7.7332 -7.3685 +X 6.6765 -7.2949 -6.5173 +X 7.2582 -8.7756 -8.5643 +X 9.6790 -7.9138 -9.2173 +X 8.8642 -8.2747 -10.5222 +X 9.7499 -8.7515 -7.9613 +X 7.2514 -8.1383 -10.0717 +X 9.9262 -8.5471 -8.0447 +X 8.5549 -10.0060 -9.4273 +X 7.8062 -5.6061 -10.7389 +X 9.1966 -11.2187 -7.4840 +X 7.7375 -10.3379 -9.8007 +X 8.9938 -10.4499 -9.7486 +X 7.7278 -10.8154 -7.6821 +X 10.2676 -6.2655 -9.7820 +X 9.8027 -9.0783 -9.1753 +X 9.3357 -8.4229 -9.2782 +X 9.1207 -8.4089 -10.2198 +X 9.7913 -9.3336 -8.4585 +X 8.4911 -7.7907 -8.3313 +X 8.9851 -9.3658 -7.9113 +X 6.3694 -9.2859 -9.6254 +X 9.0515 -6.8532 -8.2632 +X 8.8816 -9.8631 -9.3360 +X -7.0546 -0.6649 0.9360 +X -7.6475 -0.8009 1.0511 +X -8.1840 -0.3611 0.9734 +X -7.2054 -0.5513 0.4573 +X -7.2250 -0.3525 0.7839 +X -6.1207 -0.6235 0.1921 +X -7.3320 -0.1999 0.5557 +X -6.4318 -0.3951 0.6308 +X -8.3049 -0.6016 1.2380 +X -8.3621 -0.7560 0.9142 +X -7.0940 -0.4570 1.2507 +X -7.6392 -0.8334 0.2210 +X -6.7778 -0.4759 0.9656 +X -5.3122 -0.1685 0.9474 +X -7.3907 -0.4640 0.5544 +X -7.1430 0.0603 0.7369 +X -6.7534 -0.0500 1.1419 +X -7.1572 -0.8536 0.6491 +X -6.9903 -1.2311 0.6103 +X -6.5257 -0.6931 0.8132 +X -7.0376 -0.4954 0.8172 +X -6.5882 -1.3077 0.5132 +X -8.2910 -0.9627 0.6116 +X -7.8958 -1.3040 0.7963 +X -7.3017 -0.1375 1.0114 +X -7.0055 -1.0319 0.2436 +X -7.3522 -0.6161 0.4390 +X -5.8764 -0.2580 0.8927 +X -6.8225 -0.4084 0.4318 +X -8.5833 -0.9900 0.7441 +X -7.4822 -0.4140 0.9124 +X -7.8744 -0.4299 0.9196 +X -9.9140 -0.6669 0.8694 +X -7.3082 -0.5663 0.3918 +X -6.6346 -0.6099 1.0765 +X -7.3525 -0.5782 1.0411 +X -6.5905 -0.6425 0.3118 +X -7.7853 -0.5886 0.5934 +X -7.1106 -1.7102 0.7957 +X -5.9830 -0.9566 0.1097 +X -7.4876 -0.1205 1.1116 +X -5.9797 -0.5014 0.3331 +X -6.9699 -1.0609 0.5450 +X -8.9954 -0.6331 0.6139 +X -9.0962 -0.2046 0.9860 +X -6.7821 -0.3900 1.3400 +X -8.1285 -1.5306 0.5713 +X -8.2417 -0.9382 0.4187 +X -6.4041 -0.4787 0.8324 +X -7.5591 -0.6391 0.6188 +X -6.7024 -0.6205 0.4285 +X -6.7869 -1.3192 0.2345 +X -7.4867 -0.9639 0.2935 +X -8.2519 -0.9566 0.5298 +X -7.4242 -0.9866 0.5404 +X -7.5250 -1.9995 -0.2139 +X -6.4117 -0.2711 0.6372 +X -7.7102 -0.5290 0.1236 +X -6.7126 -0.2729 0.4100 +X -5.7470 -0.7054 0.6911 +X -5.8021 -0.2938 0.6513 +X -7.4433 -0.2558 0.5507 +X -6.7969 -0.9447 0.1302 +X -5.6998 -0.3502 0.8102 +X -1.1965 8.5193 1.2744 +X -0.4901 10.4991 0.7820 +X 0.1283 11.1953 0.8407 +X -0.6522 10.0700 0.9353 +X -0.1047 11.7134 0.6180 +X -0.7903 10.5860 1.2513 +X -0.1328 10.0813 1.1069 +X -0.1132 9.8221 0.7914 +X -0.9659 9.7983 0.1974 +X -0.7255 8.5159 0.6294 +X 0.1152 8.3107 0.9536 +X -0.8672 9.1878 0.8621 +X -0.3549 8.7454 1.3413 +X -0.6822 9.4869 1.2591 +X -0.9745 11.4273 1.0733 +X -0.1438 10.6680 1.2585 +X -0.3848 9.3189 0.5147 +X -0.2458 9.2573 1.0329 +X -0.8323 10.6580 0.8764 +X -0.4231 8.8755 0.7981 +X -0.9432 11.1321 0.8666 +X -0.9416 9.7202 1.0456 +X -0.9904 9.4812 -0.0188 +X 0.0122 10.3111 0.3094 +X -0.3094 11.1940 0.1322 +X 0.0331 10.5572 0.6076 +X -0.0806 9.2025 0.7409 +X -0.3420 9.2203 1.1807 +X -0.4474 7.6347 1.3767 +X -0.4688 10.4107 0.6949 +X -1.0487 10.1757 0.3738 +X -0.8902 10.0402 0.7223 +X -0.3201 9.5831 0.8832 +X -0.5082 8.6898 1.3232 +X 0.5610 10.2166 0.7610 +X 1.0786 9.8920 -0.0819 +X -0.4450 9.1352 0.7034 +X -0.7282 9.9429 0.5940 +X 0.2458 9.0330 -0.1012 +X 0.2168 9.1481 0.7798 +X -0.2604 11.5455 0.0023 +X 0.1137 9.1946 0.2574 +X 0.5587 8.9970 1.2752 +X -0.4621 9.8960 0.6024 +X -0.2329 10.4890 1.0233 +X -0.7155 10.6243 0.7628 +X -0.4391 9.8031 1.2483 +X 0.0962 8.6352 0.2232 +X -0.4800 9.6300 1.1417 +X 0.1650 9.7142 0.9502 +X 0.1842 9.8578 0.6012 +X -0.5674 10.6971 0.8959 +X -0.7351 9.5123 0.9888 +X -0.8764 8.6781 0.6232 +X -0.4616 9.2421 -0.1937 +X -0.6872 9.1331 0.1571 +X 0.0077 11.0278 0.5633 +X 0.6925 9.6243 0.6793 +X 0.0951 9.0363 0.8252 +X 0.1043 10.5117 0.5838 +X -0.4164 9.9250 0.9309 +X -0.7513 10.9863 0.5085 +X -0.4699 9.6294 0.6564 +X -0.7079 9.7637 0.4996 +X -0.7142 -0.2214 7.8955 +X -0.4201 -0.6748 6.5139 +X -0.7779 -0.2939 6.8370 +X -0.4790 0.4145 7.0742 +X -0.6937 -0.2390 7.5442 +X -0.0750 -0.1569 6.0947 +X -0.0111 -0.7032 8.0501 +X -0.3316 -0.2052 6.5440 +X -0.4008 -1.2453 8.0076 +X -0.1536 -0.1720 6.3624 +X -0.1171 -0.9121 7.1237 +X -0.4377 -0.3155 6.1279 +X -0.1963 -0.3252 7.9889 +X -0.4305 -0.4712 6.5993 +X -0.1887 -0.8426 7.2014 +X -0.3029 -0.0243 6.5623 +X -0.3086 -0.5915 6.5350 +X -0.7983 -0.3251 7.2085 +X -0.3800 -0.9336 6.6453 +X 0.2363 -0.5813 7.8924 +X -0.5204 -0.0894 6.5144 +X -0.1103 -0.2412 6.2104 +X -0.6240 -1.3400 7.5615 +X 0.1102 -1.1115 6.6042 +X -0.7162 -0.9034 7.9977 +X -0.4040 -0.0293 6.6843 +X 0.0993 -1.0609 6.5274 +X -0.1812 -0.5359 6.0749 +X 0.1184 -0.8376 5.6424 +X -0.8116 -0.5223 7.8327 +X 0.1985 -1.1467 7.1197 +X -0.1921 -0.5038 6.5457 +X -0.5266 -0.1282 6.6005 +X -0.2674 -0.3194 6.1188 +X -0.3137 -0.7444 7.5870 +X 0.0889 -1.2420 6.7110 +X -0.3888 -0.5187 6.6922 +X -0.6611 -0.3228 5.9007 +X -0.5377 -0.8871 8.5811 +X 0.0228 -1.3149 6.2198 +X -0.1373 -1.1512 7.2497 +X 0.2603 -0.3802 6.3703 +X 0.2141 -0.9800 7.5466 +X -0.0233 -1.2013 5.3662 +X -0.1185 -1.2610 5.8494 +X -0.4301 -0.4047 7.5581 +X -0.3916 -0.7394 7.1722 +X -0.2031 -0.7252 6.4458 +X -0.5527 -1.0154 7.1673 +X -0.5458 -0.5596 6.7981 +X -0.2927 -0.6768 6.8778 +X -0.2315 -0.6677 7.0357 +X -0.4345 -0.7266 6.0756 +X 0.0619 -0.9473 7.5565 +X -0.4790 -0.5502 6.6948 +X -0.7642 0.1060 7.7578 +X -0.5607 -0.8590 6.7905 +X -0.3239 -0.2476 6.7895 +X -0.6583 -0.6815 6.8213 +X -0.1918 -0.0617 7.0488 +X -0.3980 -0.7417 6.0885 +X -0.5817 -0.3058 7.4043 +X -0.1722 -0.1334 6.0642 +X 0.1488 -0.8110 7.5706 diff --git a/regtest/metatensor/rt-unwrapped-perovskite/plumed.dat b/regtest/metatensor/rt-unwrapped-perovskite/plumed.dat new file mode 100644 index 0000000000..79a3d043de --- /dev/null +++ b/regtest/metatensor/rt-unwrapped-perovskite/plumed.dat @@ -0,0 +1,60 @@ +r: METATENSOR ... + MODEL=soap_cv.pt + EXTENSIONS_DIRECTORY=extensions + + SPECIES1=1-64 + SPECIES2=65-128 + SPECIES3=129-320 + SPECIES_TO_TYPES=56,22,8 +... + +# r: SPHERICAL_EXPANSION ... +# SPECIES1=1-64 SPECIES2=65-128 SPECIES3=129-320 +# HYPERPARAMS={ +# "max_radial": 6, +# "max_angular": 1, +# "compute_gradients": false, +# "cutoff_function": {"type": "ShiftedCosine", "cutoff": {"value": 6, "unit": "AA"}, "smooth_width": {"value": 0.5, "unit": "AA"}}, +# "gaussian_density": {"type": "Constant", "gaussian_sigma": {"value": 0.5, "unit": "AA"}}, +# "radial_contribution": {"type": "GTO"} +# } +# ... +#DISTANCES IN PLUMED ARE IN NANOMETERS (there's an appropriate conversion of units to be done here - annoying feature, units are ignored and +# constrained to be Angstroms) + +# This vector selects out the Ti atoms +mask: CONSTANT VALUES=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + +# Now transpose the spherical expansion matrix +rT: TRANSPOSE ARG=r + +# And multiply by mask to get vector that contains spherical expansions summed over Ti atoms for each element glob here is a vector with ndescriptors components +glob: MATRIX_VECTOR_PRODUCT ARG=rT,mask +globM: CUSTOM ARG=glob FUNC=x*100 PERIODIC=NO + +# And lets get the three vectors for Q (we have to reorder the features due to the different ordering of the species) +QM1: SELECT_COMPONENTS ARG=globM COMPONENTS=50,54,58,62,66,70,26,30,34,38,42,46,2,6,10,14,18,22 +QP0: SELECT_COMPONENTS ARG=globM COMPONENTS=51,55,59,63,67,71,27,31,35,39,43,47,3,7,11,15,19,23 +QP1: SELECT_COMPONENTS ARG=globM COMPONENTS=52,56,60,64,68,72,28,32,36,40,44,48,4,8,12,16,20,24 + +P: SELECT_COMPONENTS ARG=globM COMPONENTS=50,51,52 +Q: VSTACK ARG=QM1,QP0,QP1 +O: MATRIX_VECTOR_PRODUCT ARG=Q,P + +# Now we need to project on the latent space to get the final two-component CVs (these are derived from a PCA on some meaningful trajectories) +Omean: CONSTANT VALUES=1.288698831095371702e+02,2.617335066408316493e+02,-4.470590442155883011e+02,3.805963661105024016e+02,-3.191211037789739180e+02,3.199499517960481754e+01,2.558077069034212702e-18,-4.767958879095662804e-17,5.535828965091558431e-17,7.901463027613001226e-16,2.834038812988062537e-16,7.773037586123435923e-17,1.083320022495142787e+01,-2.127298042936651612e+01,1.102423521729797642e+02,-7.436487467161546761e+01,-6.057457008395690679e+01,-1.127048489717186719e+01 +PCproj1: CONSTANT VALUES=-1.736605074221235501e-01,-3.439185647804997581e-01,6.000549946713460425e-01,-5.153518601842774771e-01,4.306120091626224333e-01,-4.936419424990570737e-02,5.737224441874260005e-20,5.789200825971290787e-20,1.602354531022834871e-19,-3.734768294581900180e-18,-1.069924852588776739e-18,-1.325919968746099882e-19,-1.427658043531180969e-02,2.831673923664360451e-02,-1.442261845885493277e-01,9.779100322579141469e-02,8.033644780771051486e-02,1.486978404735405865e-02 +PCproj2: CONSTANT VALUES=-1.752179731061346835e-01,1.221739151233948023e-01,9.009355055696890990e-02,2.829699014726243245e-02,-2.364418349971024458e-01,-9.313161193379775327e-01,-8.450667932128574439e-19,1.850794190761883150e-20,-2.827677172092518699e-18,3.498900249925885628e-17,-4.158577488424971303e-18,-9.358198163275448275e-18,-8.393629821959581669e-03,1.337107208596517542e-02,-8.472249327649658546e-02,1.057716443535616641e-01,5.864574806942762786e-02,1.208591791777620904e-02 + +Orel: CUSTOM ARG=O,Omean FUNC=x-y PERIODIC=NO +CV1_vec: CUSTOM ARG=Orel,PCproj1 FUNC=x*y PERIODIC=NO +CV1: SUM ARG=CV1_vec PERIODIC=NO +CV2_vec: CUSTOM ARG=Orel,PCproj2 FUNC=x*y PERIODIC=NO +CV2: SUM ARG=CV2_vec PERIODIC=NO + +PRINT ARG=CV1 FILE=CV1 FMT=%e +PRINT ARG=CV2 FILE=CV2 FMT=%e + +FLUSH STRIDE=1 +BIASVALUE ARG=CV1 + diff --git a/regtest/metatensor/rt-unwrapped-perovskite/soap_cv.py b/regtest/metatensor/rt-unwrapped-perovskite/soap_cv.py new file mode 100644 index 0000000000..9dc8087654 --- /dev/null +++ b/regtest/metatensor/rt-unwrapped-perovskite/soap_cv.py @@ -0,0 +1,113 @@ +from typing import Dict, List, Optional + +import torch +from metatensor.torch import Labels, TensorBlock, TensorMap +from metatensor.torch.atomistic import ( + MetatensorAtomisticModel, + ModelCapabilities, + ModelMetadata, + ModelOutput, + System, +) +from rascaline.torch import SoapPowerSpectrum + + +class SOAP_CV(torch.nn.Module): + def __init__(self, species): + super().__init__() + + self.neighbor_type_pairs = Labels( + names=["neighbor_1_type", "neighbor_2_type"], + values=torch.tensor( + [[t1, t2] for t1 in species for t2 in species if t1 <= t2] + ), + ) + self.calculator = SoapPowerSpectrum( + cutoff=0.6, + max_angular=1, + max_radial=6, + radial_basis={"Gto": {}}, + cutoff_function={"ShiftedCosine": {"width": 0.05}}, + center_atom_weight=1.0, + atomic_gaussian_width=0.05, + ) + + torch.manual_seed(-230623) + self.register_buffer("pca_projection", torch.rand(2520, 3, dtype=torch.float64)) + + def forward( + self, + systems: List[System], + outputs: Dict[str, ModelOutput], + selected_atoms: Optional[Labels], + ) -> Dict[str, TensorMap]: + + if "plumed::cv" not in outputs: + return {} + + output = outputs["plumed::cv"] + + device = torch.device("cpu") + if len(systems) > 0: + device = systems[0].positions.device + + soap = self.calculator(systems, selected_samples=selected_atoms) + soap = soap.keys_to_samples("center_type") + soap = soap.keys_to_properties(self.neighbor_type_pairs) + + if not output.per_atom: + raise ValueError("per_atom=False is not supported") + + soap_block = soap.block() + samples = soap_block.samples.remove("center_type") + + block = TensorBlock( + values=soap_block.values, + samples=samples, + components=[], + properties=soap_block.properties, + ) + cv = TensorMap( + keys=Labels("_", torch.tensor([[0]], device=device)), + blocks=[block], + ) + + return {"plumed::cv": cv} + + +cv = SOAP_CV(species=[56,22,8]) +cv.eval() + + +capabilities = ModelCapabilities( + outputs={ + "plumed::cv": ModelOutput( + quantity="", + unit="", + per_atom=True, + explicit_gradients=["postions"], + ) + }, + interaction_range=4.0, + supported_devices=["cpu", "mps", "cuda"], + length_unit="nm", + atomic_types=[6, 1, 7, 8], + dtype="float64", +) + +metadata = ModelMetadata( + name="Collective Variable test", + description=""" +A simple collective variable for testing purposes +""", + authors=["Some Author"], + references={ + "implementation": ["ref to SOAP code"], + "architecture": ["ref to SOAP"], + "model": ["ref to paper"], + }, +) + + +model = MetatensorAtomisticModel(cv, metadata, capabilities) +model.export("soap_cv.pt", collect_extensions="extensions")