From e94866144d13730b8244a671177d940bf8e4ef2c Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Tue, 7 Nov 2023 00:20:23 -0500 Subject: [PATCH] fix duplicated elements in vasp/xml (#575) Fix #480. #250 doesn't handle this situation. --------- Signed-off-by: Jinzhe Zeng --- dpdata/vasp/xml.py | 14 +- tests/poscars/vasprun.h2o.md.duplicate.xml | 1754 ++++++++++++++++++++ tests/test_vasp_xml.py | 11 + 3 files changed, 1772 insertions(+), 7 deletions(-) create mode 100644 tests/poscars/vasprun.h2o.md.duplicate.xml diff --git a/dpdata/vasp/xml.py b/dpdata/vasp/xml.py index 062a8f28..cf94bc8e 100755 --- a/dpdata/vasp/xml.py +++ b/dpdata/vasp/xml.py @@ -22,14 +22,14 @@ def analyze_atominfo(atominfo_xml): check_name(atominfo_xml.find("array"), "atoms") eles = [] types = [] + visited = set() for ii in atominfo_xml.find("array").find("set"): - eles.append(ii.findall("c")[0].text.strip()) - types.append(int(ii.findall("c")[1].text)) - uniq_ele = [] - for ii in eles: - if ii not in uniq_ele: - uniq_ele.append(ii) - return uniq_ele, types + atom_type = int(ii.findall("c")[1].text) + if atom_type not in visited: + eles.append(ii.findall("c")[0].text.strip()) + visited.add(atom_type) + types.append(atom_type) + return eles, types def analyze_calculation(cc): diff --git a/tests/poscars/vasprun.h2o.md.duplicate.xml b/tests/poscars/vasprun.h2o.md.duplicate.xml new file mode 100644 index 00000000..4e87df3a --- /dev/null +++ b/tests/poscars/vasprun.h2o.md.duplicate.xml @@ -0,0 +1,1754 @@ + + + + vasp + 5.4.4.18Apr17-6-g9f103f2a35 + (build Sep 18 2018 16:57:57) complex parallel + LinuxIFC + 2019 04 10 + 04:05:36 + + + a + fast + 4 + 0 + 0.00000100 + 3 + 2 + 0 + 800.00000000 + 1.00000000 + -3.00000000 + A + 0 + 0.05000000 + 0.80000000 + F + 0.00000000 + F + F + T + -1 0 0 0 + T + + + + + 10.00000000 0.00000000 0.00000000 + -0.01140900 10.00000000 0.00000000 + 0.14110830 -0.05955690 10.00000000 + + 1000.00000000 + + 0.10000000 0.00011409 -0.00141040 + 0.00000000 0.10000000 0.00059557 + 0.00000000 0.00000000 0.10000000 + + + + 0.42800000 0.42400000 -0.48000000 + 0.45800000 0.35200000 0.45800000 + 0.38900000 0.38400000 -0.39700000 + 0.23000000 -0.37200000 0.11300000 + 0.13700000 -0.37400000 0.15000000 + 0.23100000 -0.41100000 0.02100000 + + + + 1 + 3 + 4 + 2 + 5 + 6 + + + + 1 1 1 + 0.00000000 0.00000000 0.00000000 + 1.00000000 0.00000000 0.00000000 + 0.00000000 1.00000000 -0.00000000 + 0.00000000 0.00000000 1.00000000 + 0.00000000 0.00000000 0.00000000 + + + 0.00000000 0.00000000 0.00000000 + + + 1.00000000 + + + + + unknown system + F + + + a + 800.00000000 + 605.39200000 + 0.00000100 + 68 + 12 + 12 + 16.00000000 + 0 + 0 + 0 + 0 + 0.00000000 + + 0 + 0.05000000 + 0.80000000 + F + + + T + -0.00025000 -0.00025000 + -100 + 2 + F + + + 0 + 2 + 1 + + + 1 + F + 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 + -1.00000000 + F + 0.00000000 0.00000000 1.00000000 + F + 0.00000000 0.00000000 0.00000000 + F + + + T + F + + + 60 + 0 + 4 + 800.00000000 + + T + F + 0.00100000 + 0.00000002 + 0.30000000 + 4 + 0.40000000 + + + + 0.40000000 + 1.00000000 + 0.10000000 + 1.60000000 + 1.00000000 + + 4 + F + -45 + 100.00000000 + 1 + 1 + 5 + + + + F + F + 0 + 1.00000000 + -100.00000000 -100.00000000 -100.00000000 + 0.00000000 + + + + 96 + 96 + 96 + 192 + 192 + 192 + F + + + 3 + 0 + 0 + 2 + 0.00000000 + 0.00001000 + 0 + 1.00000000 + -3.00000000 + 1.00000000 + + + 0.00010000 + 0.00010000 + 1 + 3 + 256 + 16.00000000 + + + 0 + 0.00001000 + + + 0 + -1.00000000 -1.00000000 + 301 + 10.00000000 + -10.00000000 + 0.00000000 + + + 2 + F + F + F + F + F + F + F + F + 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 + + + 1 + 4 + -1 + T + F + F + F + F + F + + + 3 + 0 + F + 16.00000000 1.00000000 + 0.00000000 0.00000000 + 1.00000000 1.00000000 + T + + T + F + 0 + F + 0 + + -- + 0 + F + + F + F + F + F + F + -1.00000000 + 0 + 0 + 0.00000000 + 0.00000000 + 0.00000000 + 1.00000000 + 1.00000000 + 1.00000000 + 1.00000000 + 1 + 1 + 1 + F + F + F + 0 + 0 + F + 0.00000000 + 0.00000000 + 0 + + + F + -0.84910000 + 0.12340000 + 1.00000000 + 0.00000000 + + + 0 + 100.00000000 + 1.00000000 + + + F + F + F + F + 0 + 0.10000000 + -1.00000000 + 0.00200000 + -0.10000000 + 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 + + + F + 0.00000000 0.00000000 0.00000000 + T + F + F + F + T + 0 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + + + F + F + F + T + 0 + -1 0 0 0 + F + F + F + F + F + 2 + F + F + F + -2.00000000 + -2.00000000 + -1.00000000 + -1 + 0.00000000 + 0 + 0 + -1 + -1 + -1 + 1 + 1 + 3 + 0 + -30.00000000 + -30.00000000 + -200.00000000 + 140 + -0.10000000 + F + F + F + F + F + F + F + 1 + 1 + 1 + 2800 + 0 + 1 + -1 + 1.00000000 + + + 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 + 0.00000000 + 0.00000000 + + + + 6 + 3 + + ion + element + atomtype + + O 1 + O 1 + H 2 + H 2 + H 3 + H 3 + + + + type + atomspertype + element + mass + valence + pseudopotential + + 2O 16.00000000 6.00000000 PAW_PBE O 08Apr2002 + 2H 1.00000000 1.00000000 PAW_PBE H 15Jun2001 + 2H 1.00000000 1.00000000 PAW_PBE H 15Jun2001 + + + + + + + 10.00000000 0.00000000 0.00000000 + -0.01140900 10.00000000 0.00000000 + 0.14110830 -0.05955690 10.00000000 + + 1000.00000000 + + 0.10000000 0.00011409 -0.00141040 + 0.00000000 0.10000000 0.00059557 + 0.00000000 0.00000000 0.10000000 + + + + 0.42800000 0.42400000 0.52000000 + 0.23000000 0.62800000 0.11300000 + 0.45800000 0.35200000 0.45800000 + 0.38900000 0.38400000 0.60300000 + 0.13700000 0.62600000 0.15000000 + 0.23100000 0.58900000 0.02100000 + + + -0.00000011 0.00000005 0.00000015 + 0.00000004 0.00000022 -0.00000009 + 0.00000015 -0.00000029 -0.00000083 + 0.00000144 -0.00000188 -0.00000016 + -0.00000093 -0.00000062 -0.00000055 + 0.00000050 -0.00000157 0.00000048 + + + + + + + + 0.89700515 + 68.87223147 + -796.12263672 + 64.16083839 + 701.63506352 + -705.26791599 + -0.00000000 + -57.83011466 + 914.70206254 + 191.04653371 + 191.04653371 + 191.04653371 + + + + + + + 64.00508535 + 64.00508535 + 64.00508535 + + + + + + + -26.54080392 + -26.54080392 + -26.54080392 + + + + + + + -32.30215016 + -32.30215016 + -32.30215016 + + + + + + + -32.34334203 + -32.34334203 + -32.34334203 + + + + + + + + + -28.70590591 + -28.70590591 + -28.70590591 + + + + + + + + + -28.51267621 + -28.51267621 + -28.51267621 + + + + + + + + + -28.37548639 + -28.37548639 + -28.37548639 + + + + + + + + + -28.34611968 + -28.34611968 + -28.34611968 + + + + + + + + + -28.36838009 + -28.36838009 + -28.36838009 + + + + + + + + + -28.37004789 + -28.37004789 + -28.37004789 + + + + + + + + + -28.38048438 + -28.38048438 + -28.38048438 + + + + + + + + + -28.38270588 + -28.38270588 + -28.38270588 + + + + + + + + + -28.38512817 + -28.38512817 + -28.38512817 + + + + + + + + + -28.38595520 + -28.38595520 + -28.38595520 + + + + + + + + + -28.38611873 + -28.38611873 + -28.38611873 + + + + + + + + + -28.38619657 + -28.38619657 + -28.38619657 + + + + + + + + + -28.38621909 + -28.38621909 + -28.38621909 + + + + + + + + + -28.38622453 + -28.38622453 + -28.38622453 + + + + + + + + + -28.38622585 + -28.38622585 + -28.38622585 + + + + + + + + + 0.89700515 + 68.87223147 + -863.50988411 + 67.69329751 + 1063.34603123 + -1067.49607372 + -0.00000000 + -212.89089632 + 914.70206254 + -28.38622624 + -28.38622624 + -28.38622624 + + + + + + 10.00000000 0.00000000 0.00000000 + -0.01140900 10.00000000 0.00000000 + 0.14110830 -0.05955690 10.00000000 + + 1000.00000000 + + 0.10000000 0.00011409 -0.00141040 + 0.00000000 0.10000000 0.00059557 + 0.00000000 0.00000000 0.10000000 + + + + 0.42800000 0.42400000 0.52000000 + 0.23000000 0.62800000 0.11300000 + 0.45800000 0.35200000 0.45800000 + 0.38900000 0.38400000 0.60300000 + 0.13700000 0.62600000 0.15000000 + 0.23100000 0.58900000 0.02100000 + + + + -0.14198623 -0.57372915 0.35651545 + -0.60356923 -0.28901930 -0.41162906 + -0.44650270 0.45327887 0.92197198 + 0.58421798 0.12104103 -1.26706605 + 1.01416035 -0.14940903 -0.79482260 + -0.41217025 0.43581142 1.20365916 + + + -2.15814474 0.35445016 2.40094609 + 0.35445050 -0.95563765 -0.97820894 + 2.40095090 -0.97821330 -4.85014392 + + + -28.38622624 + -28.38622624 + -0.00000000 + 0.00816770 + 0.00000000 + 0.00000000 + 0.00000000 + -28.37805854 + + + + + + + + + 0.89700515 + 73.32198224 + -865.87808935 + 67.80887378 + 1063.34382299 + -1067.49383233 + -0.00000000 + -215.14192616 + 914.70206254 + -28.44010115 + -28.44010115 + -28.44010115 + + + + + + + + + -28.43884553 + -28.43884553 + -28.43884553 + + + + + + + + + -28.43872518 + -28.43872518 + -28.43872518 + + + + + + + + + -28.43870457 + -28.43870457 + -28.43870457 + + + + + + + + + -28.43869372 + -28.43869372 + -28.43869372 + + + + + + + + + -28.43871746 + -28.43871746 + -28.43871746 + + + + + + + + + -28.43872083 + -28.43872083 + -28.43872083 + + + + + + + + + -28.43873347 + -28.43873347 + -28.43873347 + + + + + + + + + -28.43873932 + -28.43873932 + -28.43873932 + + + + + + + + + -28.43874125 + -28.43874125 + -28.43874125 + + + + + + + + + -28.43874359 + -28.43874359 + -28.43874359 + + + + + + + + + 0.89700515 + 73.32198224 + -867.00003177 + 67.87061708 + 1077.36177636 + -1081.53720451 + -0.00000000 + -214.05495115 + 914.70206254 + -28.43874406 + -28.43874406 + -28.43874406 + + + + + + 10.00000000 0.00000000 0.00000000 + -0.01140900 10.00000000 0.00000000 + 0.14110830 -0.05955690 10.00000000 + + 1000.00000000 + + 0.10000000 0.00011409 -0.00141040 + 0.00000000 0.10000000 0.00059557 + 0.00000000 0.00000000 0.10000000 + + + + 0.42799114 0.42396564 0.52002142 + 0.22996413 0.62798270 0.11297486 + 0.45755746 0.35244241 0.45888850 + 0.38958266 0.38410768 0.60177708 + 0.13798840 0.62585071 0.14923233 + 0.23058707 0.58942589 0.02216160 + + + + -0.06710097 -0.12191181 0.18482451 + -0.19798053 -0.10305844 -0.15323167 + -0.29609191 0.17430758 0.60144518 + 0.35827299 -0.05156427 -0.77287795 + 0.54803039 -0.13537467 -0.54830711 + -0.35207269 0.23559460 0.69829153 + + + -1.24113476 0.30293617 1.56372885 + 0.30293666 -0.39521168 -0.61958125 + 1.56373426 -0.61958660 -2.93781687 + + + -28.43874406 + -28.43874406 + -0.00000000 + 0.05533417 + 0.00000000 + 0.00000000 + 0.00000000 + -28.38340989 + + + + + + + + + 0.89700515 + 80.52437211 + -872.56999640 + 68.15559307 + 1100.24489929 + -1104.46162064 + -0.00000000 + -215.95823771 + 914.70206254 + -28.46592258 + -28.46592258 + -28.46592258 + + + + + + + + + -28.46664533 + -28.46664533 + -28.46664533 + + + + + + + + + -28.46661049 + -28.46661049 + -28.46661049 + + + + + + + + + -28.46658280 + -28.46658280 + -28.46658280 + + + + + + + + + -28.46658399 + -28.46658399 + -28.46658399 + + + + + + + + + 0.89700515 + 80.52437211 + -872.55780043 + 68.15437980 + 1100.43491193 + -1104.65062337 + -0.00000000 + -215.97089241 + 914.70206254 + -28.46658469 + -28.46658469 + -28.46658469 + + + + + + 10.00000000 0.00000000 0.00000000 + -0.01140900 10.00000000 0.00000000 + 0.14110830 -0.05955690 10.00000000 + + 1000.00000000 + + 0.10000000 0.00011409 -0.00141040 + 0.00000000 0.10000000 0.00059557 + 0.00000000 0.00000000 0.10000000 + + + + 0.42797826 0.42392404 0.52005371 + 0.22991664 0.62795917 0.11294021 + 0.45682143 0.35305651 0.46035704 + 0.39052166 0.38416122 0.59980816 + 0.13951307 0.62556770 0.14793536 + 0.22982540 0.59008316 0.02399668 + + + + 0.07241276 0.66735904 -0.13411144 + 0.52152234 0.22680249 0.30591551 + -0.03643823 -0.30624674 0.04674253 + -0.04129957 -0.36160381 0.10178573 + -0.27530788 -0.11129771 -0.11342283 + -0.24949747 -0.11861001 -0.19768740 + + + 0.37701983 0.23178538 0.15979504 + 0.23178625 0.62269157 -0.02474807 + 0.15980153 -0.02475535 0.35853426 + + + -28.46658469 + -28.46658469 + -0.00000000 + 0.08004725 + 0.00000000 + 0.00000000 + 0.00000000 + -28.38653744 + + + -6.68644624 + + + gridpoints + spin + energy + total + integrated + + + -26.3582 0.0000 0.0000 + -26.2633 0.0000 0.0000 + -26.1683 0.0000 0.0000 + -26.0733 0.0000 0.0000 + -25.9783 0.0000 0.0000 + -25.8834 0.0000 0.0000 + -25.7884 0.0000 0.0000 + -25.6934 0.0000 0.0000 + -25.5984 0.0000 0.0000 + -25.5035 0.0000 0.0000 + -25.4085 0.0000 0.0000 + -25.3135 0.0000 0.0000 + -25.2185 0.0005 0.0001 + -25.1236 4.2966 0.4054 + -25.0286 94.9144 9.3542 + -24.9336 28.0429 11.9950 + -24.8386 0.0536 12.0000 + -24.7437 0.0000 12.0000 + -24.6487 0.0000 12.0000 + -24.5537 0.0000 12.0000 + -24.4587 0.0000 12.0000 + -24.3638 0.0000 12.0000 + -24.2688 0.0000 12.0000 + -24.1738 0.0000 12.0000 + -24.0788 0.0000 12.0000 + -23.9839 0.0000 12.0000 + -23.8889 0.0000 12.0000 + -23.7939 0.0000 12.0000 + -23.6989 0.0000 12.0000 + -23.6040 0.0000 12.0000 + -23.5090 0.0000 12.0000 + -23.4140 0.0000 12.0000 + -23.3190 0.0000 12.0000 + -23.2241 0.0000 12.0000 + -23.1291 0.0000 12.0000 + -23.0341 0.0000 12.0000 + -22.9391 0.0000 12.0000 + -22.8442 0.0000 12.0000 + -22.7492 0.0000 12.0000 + -22.6542 0.0000 12.0000 + -22.5592 0.0000 12.0000 + -22.4643 0.0000 12.0000 + -22.3693 0.0000 12.0000 + -22.2743 0.0000 12.0000 + -22.1793 0.0000 12.0000 + -22.0843 0.0000 12.0000 + -21.9894 0.0000 12.0000 + -21.8944 0.0000 12.0000 + -21.7994 0.0000 12.0000 + -21.7044 0.0000 12.0000 + -21.6095 0.0000 12.0000 + -21.5145 0.0000 12.0000 + -21.4195 0.0000 12.0000 + -21.3245 0.0000 12.0000 + -21.2296 0.0000 12.0000 + -21.1346 0.0000 12.0000 + -21.0396 0.0000 12.0000 + -20.9446 0.0000 12.0000 + -20.8497 0.0000 12.0000 + -20.7547 0.0000 12.0000 + -20.6597 0.0000 12.0000 + -20.5647 0.0000 12.0000 + -20.4698 0.0000 12.0000 + -20.3748 0.0000 12.0000 + -20.2798 0.0000 12.0000 + -20.1848 0.0000 12.0000 + -20.0899 0.0000 12.0000 + -19.9949 0.0000 12.0000 + -19.8999 0.0000 12.0000 + -19.8049 0.0000 12.0000 + -19.7100 0.0000 12.0000 + -19.6150 0.0000 12.0000 + -19.5200 0.0000 12.0000 + -19.4250 0.0000 12.0000 + -19.3301 0.0000 12.0000 + -19.2351 0.0000 12.0000 + -19.1401 0.0000 12.0000 + -19.0451 0.0000 12.0000 + -18.9502 0.0000 12.0000 + -18.8552 0.0000 12.0000 + -18.7602 0.0000 12.0000 + -18.6652 0.0000 12.0000 + -18.5703 0.0000 12.0000 + -18.4753 0.0000 12.0000 + -18.3803 0.0000 12.0000 + -18.2853 0.0000 12.0000 + -18.1904 0.0000 12.0000 + -18.0954 0.0000 12.0000 + -18.0004 0.0000 12.0000 + -17.9054 0.0000 12.0000 + -17.8105 0.0000 12.0000 + -17.7155 0.0000 12.0000 + -17.6205 0.0000 12.0000 + -17.5255 0.0000 12.0000 + -17.4305 0.0000 12.0000 + -17.3356 0.0000 12.0000 + -17.2406 0.0000 12.0000 + -17.1456 0.0000 12.0000 + -17.0506 0.0000 12.0000 + -16.9557 0.0000 12.0000 + -16.8607 0.0000 12.0000 + -16.7657 0.0000 12.0000 + -16.6707 0.0000 12.0000 + -16.5758 0.0000 12.0000 + -16.4808 0.0000 12.0000 + -16.3858 0.0000 12.0000 + -16.2908 0.0000 12.0000 + -16.1959 0.0000 12.0000 + -16.1009 0.0000 12.0000 + -16.0059 0.0000 12.0000 + -15.9109 0.0000 12.0000 + -15.8160 0.0000 12.0000 + -15.7210 0.0000 12.0000 + -15.6260 0.0000 12.0000 + -15.5310 0.0000 12.0000 + -15.4361 0.0000 12.0000 + -15.3411 0.0000 12.0000 + -15.2461 0.0000 12.0000 + -15.1511 0.0000 12.0000 + -15.0562 0.0000 12.0000 + -14.9612 0.0000 12.0000 + -14.8662 0.0000 12.0000 + -14.7712 0.0000 12.0000 + -14.6763 0.0000 12.0000 + -14.5813 0.0000 12.0000 + -14.4863 0.0000 12.0000 + -14.3913 0.0000 12.0000 + -14.2964 0.0000 12.0000 + -14.2014 0.0000 12.0000 + -14.1064 0.0000 12.0000 + -14.0114 0.0000 12.0000 + -13.9165 0.0000 12.0000 + -13.8215 0.0000 12.0000 + -13.7265 0.0000 12.0000 + -13.6315 0.0000 12.0000 + -13.5366 0.0000 12.0000 + -13.4416 0.0000 12.0000 + -13.3466 0.0000 12.0000 + -13.2516 0.0007 12.0001 + -13.1567 3.0669 12.2907 + -13.0617 70.9396 18.9889 + -12.9667 51.8438 23.8633 + -12.8717 1.4569 24.0000 + -12.7768 0.0002 24.0000 + -12.6818 0.0000 24.0000 + -12.5868 0.0000 24.0000 + -12.4918 0.0000 24.0000 + -12.3968 0.0000 24.0000 + -12.3019 0.0000 24.0000 + -12.2069 0.0000 24.0000 + -12.1119 0.0000 24.0000 + -12.0169 0.0000 24.0000 + -11.9220 0.0000 24.0000 + -11.8270 0.0000 24.0000 + -11.7320 0.0000 24.0000 + -11.6370 0.0000 24.0000 + -11.5421 0.0000 24.0000 + -11.4471 0.0000 24.0000 + -11.3521 0.0000 24.0000 + -11.2571 0.0000 24.0000 + -11.1622 0.0000 24.0000 + -11.0672 0.0000 24.0000 + -10.9722 0.0000 24.0000 + -10.8772 0.0000 24.0000 + -10.7823 0.0000 24.0000 + -10.6873 0.0000 24.0000 + -10.5923 0.0000 24.0000 + -10.4973 0.0000 24.0000 + -10.4024 0.0000 24.0000 + -10.3074 0.0000 24.0000 + -10.2124 0.0000 24.0000 + -10.1174 0.0000 24.0000 + -10.0225 0.0000 24.0000 + -9.9275 0.0000 24.0000 + -9.8325 0.0000 24.0000 + -9.7375 0.0000 24.0000 + -9.6426 0.0000 24.0000 + -9.5476 0.0000 24.0000 + -9.4526 0.0000 24.0000 + -9.3576 0.0000 24.0000 + -9.2627 0.0000 24.0000 + -9.1677 0.0000 24.0000 + -9.0727 0.0000 24.0000 + -8.9777 0.1380 24.0130 + -8.8828 37.0673 27.5024 + -8.7878 87.2552 35.7311 + -8.6928 2.8475 36.0000 + -8.5978 0.0003 36.0000 + -8.5029 0.0000 36.0000 + -8.4079 0.0000 36.0000 + -8.3129 0.0000 36.0000 + -8.2179 0.0000 36.0000 + -8.1230 0.0000 36.0000 + -8.0280 0.0000 36.0000 + -7.9330 0.0000 36.0000 + -7.8380 0.0000 36.0000 + -7.7430 0.0000 36.0000 + -7.6481 0.0000 36.0000 + -7.5531 0.0000 36.0000 + -7.4581 0.0000 36.0000 + -7.3631 0.0000 36.0000 + -7.2682 0.0000 36.0000 + -7.1732 0.0001 36.0000 + -7.0782 1.3067 36.1227 + -6.9832 67.5209 42.4802 + -6.8883 57.8538 47.9407 + -6.7933 0.6265 48.0000 + -6.6983 0.0000 48.0000 + -6.6033 0.0000 48.0000 + -6.5084 0.0000 48.0000 + -6.4134 0.0000 48.0000 + -6.3184 0.0000 48.0000 + -6.2234 0.0000 48.0000 + -6.1285 0.0000 48.0000 + -6.0335 0.0000 48.0000 + -5.9385 0.0000 48.0000 + -5.8435 0.0000 48.0000 + -5.7486 0.0000 48.0000 + -5.6536 0.0000 48.0000 + -5.5586 0.0000 48.0000 + -5.4636 0.0000 48.0000 + -5.3687 0.0000 48.0000 + -5.2737 0.0000 48.0000 + -5.1787 0.0000 48.0000 + -5.0837 0.0000 48.0000 + -4.9888 0.0000 48.0000 + -4.8938 0.0000 48.0000 + -4.7988 0.0000 48.0000 + -4.7038 0.0000 48.0000 + -4.6089 0.0000 48.0000 + -4.5139 0.0000 48.0000 + -4.4189 0.0000 48.0000 + -4.3239 0.0000 48.0000 + -4.2290 0.0000 48.0000 + -4.1340 0.0000 48.0000 + -4.0390 0.0000 48.0000 + -3.9440 0.0000 48.0000 + -3.8491 0.0000 48.0000 + -3.7541 0.0000 48.0000 + -3.6591 0.0000 48.0000 + -3.5641 0.0000 48.0000 + -3.4692 0.0000 48.0000 + -3.3742 0.0000 48.0000 + -3.2792 0.0000 48.0000 + -3.1842 0.0000 48.0000 + -3.0892 0.0000 48.0000 + -2.9943 0.0000 48.0000 + -2.8993 0.0000 48.0000 + -2.8043 0.0000 48.0000 + -2.7093 0.0000 48.0000 + -2.6144 0.0000 48.0000 + -2.5194 0.0000 48.0000 + -2.4244 0.0000 48.0000 + -2.3294 0.0000 48.0000 + -2.2345 0.0000 48.0000 + -2.1395 0.0000 48.0000 + -2.0445 0.0000 48.0000 + -1.9495 0.0000 48.0000 + -1.8546 0.0000 48.0000 + -1.7596 0.0000 48.0000 + -1.6646 0.0000 48.0000 + -1.5696 0.0000 48.0000 + -1.4747 0.0000 48.0000 + -1.3797 0.0003 48.0000 + -1.2847 1.3895 48.1302 + -1.1897 24.4697 50.4264 + -1.0948 32.7729 53.5233 + -0.9998 5.0156 53.9994 + -0.9048 0.0060 54.0000 + -0.8098 0.0000 54.0000 + -0.7149 0.0000 54.0000 + -0.6199 0.0008 54.0001 + -0.5249 2.0408 54.1913 + -0.4299 23.9282 56.4362 + -0.3350 30.4556 59.3138 + -0.2400 7.2107 59.9983 + -0.1450 0.0180 60.0000 + -0.0500 0.0000 60.0000 + 0.0449 0.0000 60.0000 + 0.1399 0.0000 60.0000 + 0.2349 0.0000 60.0000 + 0.3299 0.0195 60.0018 + 0.4248 8.1144 60.7628 + 0.5198 43.7318 64.8834 + 0.6148 11.7517 65.9965 + 0.7098 0.0456 66.0008 + 0.8047 10.5677 66.9969 + 0.8997 50.2197 71.7307 + 0.9947 2.8573 72.0000 + 1.0897 0.0004 72.0000 + 1.1846 0.0000 72.0000 + 1.2796 0.0000 72.0000 + 1.3746 0.0000 72.0000 + 1.4696 0.0000 72.0000 + 1.5646 0.0000 72.0000 + 1.6595 0.0000 72.0000 + 1.7545 0.0000 72.0000 + 1.8495 0.0000 72.0000 + 1.9445 0.0000 72.0000 + 2.0394 0.0000 72.0000 + 2.1344 0.0000 72.0000 + + + + + + + + + band + kpoint + spin + eigene + occ + + + + -25.2611 1.0000 + -25.2524 1.0000 + -13.1898 1.0000 + -13.1834 1.0000 + -8.9335 1.0000 + -8.9243 1.0000 + -7.0140 1.0000 + -6.9953 1.0000 + -1.0760 0.0000 + -0.3002 0.0000 + 0.5689 0.0000 + 0.9081 0.0000 + + + + + + + 0.00000000 0.00000000 0.00000000 + + + -6.70112128 + + + gridpoints + spin + energy + total + integrated + + + -26.5696 0.0000 0.0000 + -26.4736 0.0000 0.0000 + -26.3777 0.0000 0.0000 + -26.2817 0.0000 0.0000 + -26.1858 0.0000 0.0000 + -26.0898 0.0000 0.0000 + -25.9939 0.0000 0.0000 + -25.8979 0.0000 0.0000 + -25.8020 0.0000 0.0000 + -25.7060 0.0000 0.0000 + -25.6101 0.0000 0.0000 + -25.5141 0.0000 0.0000 + -25.4182 0.0001 0.0000 + -25.3222 1.3806 0.1325 + -25.2262 32.1431 3.2167 + -25.1303 8.1548 3.9992 + -25.0343 0.0080 4.0000 + -24.9384 0.0000 4.0000 + -24.8424 0.0000 4.0000 + -24.7465 0.0000 4.0000 + -24.6505 0.0000 4.0000 + -24.5546 0.0000 4.0000 + -24.4586 0.0000 4.0000 + -24.3627 0.0000 4.0000 + -24.2667 0.0000 4.0000 + -24.1707 0.0000 4.0000 + -24.0748 0.0000 4.0000 + -23.9788 0.0000 4.0000 + -23.8829 0.0000 4.0000 + -23.7869 0.0000 4.0000 + -23.6910 0.0000 4.0000 + -23.5950 0.0000 4.0000 + -23.4991 0.0000 4.0000 + -23.4031 0.0000 4.0000 + -23.3072 0.0000 4.0000 + -23.2112 0.0000 4.0000 + -23.1153 0.0000 4.0000 + -23.0193 0.0000 4.0000 + -22.9233 0.0000 4.0000 + -22.8274 0.0000 4.0000 + -22.7314 0.0000 4.0000 + -22.6355 0.0000 4.0000 + -22.5395 0.0000 4.0000 + -22.4436 0.0000 4.0000 + -22.3476 0.0000 4.0000 + -22.2517 0.0000 4.0000 + -22.1557 0.0000 4.0000 + -22.0598 0.0000 4.0000 + -21.9638 0.0000 4.0000 + -21.8679 0.0000 4.0000 + -21.7719 0.0000 4.0000 + -21.6759 0.0000 4.0000 + -21.5800 0.0000 4.0000 + -21.4840 0.0000 4.0000 + -21.3881 0.0000 4.0000 + -21.2921 0.0000 4.0000 + -21.1962 0.0000 4.0000 + -21.1002 0.0000 4.0000 + -21.0043 0.0000 4.0000 + -20.9083 0.0000 4.0000 + -20.8124 0.0000 4.0000 + -20.7164 0.0000 4.0000 + -20.6204 0.0000 4.0000 + -20.5245 0.0000 4.0000 + -20.4285 0.0000 4.0000 + -20.3326 0.0000 4.0000 + -20.2366 0.0000 4.0000 + -20.1407 0.0000 4.0000 + -20.0447 0.0000 4.0000 + -19.9488 0.0000 4.0000 + -19.8528 0.0000 4.0000 + -19.7569 0.0000 4.0000 + -19.6609 0.0000 4.0000 + -19.5650 0.0000 4.0000 + -19.4690 0.0000 4.0000 + -19.3730 0.0000 4.0000 + -19.2771 0.0000 4.0000 + -19.1811 0.0000 4.0000 + -19.0852 0.0000 4.0000 + -18.9892 0.0000 4.0000 + -18.8933 0.0000 4.0000 + -18.7973 0.0000 4.0000 + -18.7014 0.0000 4.0000 + -18.6054 0.0000 4.0000 + -18.5095 0.0000 4.0000 + -18.4135 0.0000 4.0000 + -18.3176 0.0000 4.0000 + -18.2216 0.0000 4.0000 + -18.1256 0.0000 4.0000 + -18.0297 0.0000 4.0000 + -17.9337 0.0000 4.0000 + -17.8378 0.0000 4.0000 + -17.7418 0.0000 4.0000 + -17.6459 0.0000 4.0000 + -17.5499 0.0000 4.0000 + -17.4540 0.0000 4.0000 + -17.3580 0.0000 4.0000 + -17.2621 0.0000 4.0000 + -17.1661 0.0000 4.0000 + -17.0702 0.0000 4.0000 + -16.9742 0.0000 4.0000 + -16.8782 0.0000 4.0000 + -16.7823 0.0000 4.0000 + -16.6863 0.0000 4.0000 + -16.5904 0.0000 4.0000 + -16.4944 0.0000 4.0000 + -16.3985 0.0000 4.0000 + -16.3025 0.0000 4.0000 + -16.2066 0.0000 4.0000 + -16.1106 0.0000 4.0000 + -16.0147 0.0000 4.0000 + -15.9187 0.0000 4.0000 + -15.8227 0.0000 4.0000 + -15.7268 0.0000 4.0000 + -15.6308 0.0000 4.0000 + -15.5349 0.0000 4.0000 + -15.4389 0.0000 4.0000 + -15.3430 0.0000 4.0000 + -15.2470 0.0000 4.0000 + -15.1511 0.0000 4.0000 + -15.0551 0.0000 4.0000 + -14.9592 0.0000 4.0000 + -14.8632 0.0000 4.0000 + -14.7673 0.0000 4.0000 + -14.6713 0.0000 4.0000 + -14.5753 0.0000 4.0000 + -14.4794 0.0000 4.0000 + -14.3834 0.0000 4.0000 + -14.2875 0.0000 4.0000 + -14.1915 0.0000 4.0000 + -14.0956 0.0000 4.0000 + -13.9996 0.0000 4.0000 + -13.9037 0.0000 4.0000 + -13.8077 0.0000 4.0000 + -13.7118 0.0000 4.0000 + -13.6158 0.0000 4.0000 + -13.5199 0.0000 4.0000 + -13.4239 0.0000 4.0000 + -13.3279 0.0014 4.0001 + -13.2320 4.1848 4.4017 + -13.1360 34.2807 7.6911 + -13.0401 3.2189 7.9999 + -12.9441 0.0008 8.0000 + -12.8482 0.0000 8.0000 + -12.7522 0.0000 8.0000 + -12.6563 0.0000 8.0000 + -12.5603 0.0000 8.0000 + -12.4644 0.0000 8.0000 + -12.3684 0.0000 8.0000 + -12.2725 0.0000 8.0000 + -12.1765 0.0000 8.0000 + -12.0805 0.0000 8.0000 + -11.9846 0.0000 8.0000 + -11.8886 0.0000 8.0000 + -11.7927 0.0000 8.0000 + -11.6967 0.0000 8.0000 + -11.6008 0.0000 8.0000 + -11.5048 0.0000 8.0000 + -11.4089 0.0000 8.0000 + -11.3129 0.0000 8.0000 + -11.2170 0.0000 8.0000 + -11.1210 0.0000 8.0000 + -11.0250 0.0000 8.0000 + -10.9291 0.0000 8.0000 + -10.8331 0.0000 8.0000 + -10.7372 0.0000 8.0000 + -10.6412 0.0000 8.0000 + -10.5453 0.0000 8.0000 + -10.4493 0.0000 8.0000 + -10.3534 0.0000 8.0000 + -10.2574 0.0000 8.0000 + -10.1615 0.0000 8.0000 + -10.0655 0.0000 8.0000 + -9.9696 0.0000 8.0000 + -9.8736 0.0000 8.0000 + -9.7776 0.0000 8.0000 + -9.6817 0.0000 8.0000 + -9.5857 0.0000 8.0000 + -9.4898 0.0000 8.0000 + -9.3938 0.0000 8.0000 + -9.2979 0.0000 8.0000 + -9.2019 0.0000 8.0000 + -9.1060 0.0000 8.0000 + -9.0100 0.4767 8.0457 + -8.9141 27.0922 10.6453 + -8.8181 14.0785 11.9962 + -8.7222 0.0392 12.0000 + -8.6262 0.0000 12.0000 + -8.5302 0.0000 12.0000 + -8.4343 0.0000 12.0000 + -8.3383 0.0000 12.0000 + -8.2424 0.0000 12.0000 + -8.1464 0.0000 12.0000 + -8.0505 0.0000 12.0000 + -7.9545 0.0000 12.0000 + -7.8586 0.0000 12.0000 + -7.7626 0.0000 12.0000 + -7.6667 0.0000 12.0000 + -7.5707 0.0000 12.0000 + -7.4748 0.0000 12.0000 + -7.3788 0.0000 12.0000 + -7.2828 0.0000 12.0000 + -7.1869 0.0000 12.0000 + -7.0909 0.3779 12.0363 + -6.9950 24.7894 14.4149 + -6.8990 16.4397 15.9924 + -6.8031 0.0796 16.0000 + -6.7071 0.0000 16.0000 + -6.6112 0.0000 16.0000 + -6.5152 0.0000 16.0000 + -6.4193 0.0000 16.0000 + -6.3233 0.0000 16.0000 + -6.2273 0.0000 16.0000 + -6.1314 0.0000 16.0000 + -6.0354 0.0000 16.0000 + -5.9395 0.0000 16.0000 + -5.8435 0.0000 16.0000 + -5.7476 0.0000 16.0000 + -5.6516 0.0000 16.0000 + -5.5557 0.0000 16.0000 + -5.4597 0.0000 16.0000 + -5.3638 0.0000 16.0000 + -5.2678 0.0000 16.0000 + -5.1719 0.0000 16.0000 + -5.0759 0.0000 16.0000 + -4.9799 0.0000 16.0000 + -4.8840 0.0000 16.0000 + -4.7880 0.0000 16.0000 + -4.6921 0.0000 16.0000 + -4.5961 0.0000 16.0000 + -4.5002 0.0000 16.0000 + -4.4042 0.0000 16.0000 + -4.3083 0.0000 16.0000 + -4.2123 0.0000 16.0000 + -4.1164 0.0000 16.0000 + -4.0204 0.0000 16.0000 + -3.9245 0.0000 16.0000 + -3.8285 0.0000 16.0000 + -3.7325 0.0000 16.0000 + -3.6366 0.0000 16.0000 + -3.5406 0.0000 16.0000 + -3.4447 0.0000 16.0000 + -3.3487 0.0000 16.0000 + -3.2528 0.0000 16.0000 + -3.1568 0.0000 16.0000 + -3.0609 0.0000 16.0000 + -2.9649 0.0000 16.0000 + -2.8690 0.0000 16.0000 + -2.7730 0.0000 16.0000 + -2.6770 0.0000 16.0000 + -2.5811 0.0000 16.0000 + -2.4851 0.0000 16.0000 + -2.3892 0.0000 16.0000 + -2.2932 0.0000 16.0000 + -2.1973 0.0000 16.0000 + -2.1013 0.0000 16.0000 + -2.0054 0.0000 16.0000 + -1.9094 0.0000 16.0000 + -1.8135 0.0000 16.0000 + -1.7175 0.0000 16.0000 + -1.6216 0.0000 16.0000 + -1.5256 0.0000 16.0000 + -1.4296 0.0000 16.0000 + -1.3337 0.0000 16.0000 + -1.2377 0.0000 16.0000 + -1.1418 0.6557 16.0629 + -1.0458 16.0923 17.6070 + -0.9499 4.0915 17.9996 + -0.8539 0.0037 18.0000 + -0.7580 0.0000 18.0000 + -0.6620 0.0000 18.0000 + -0.5661 0.0000 18.0000 + -0.4701 0.0000 18.0000 + -0.3742 0.3797 18.0364 + -0.2782 14.8989 19.4661 + -0.1822 5.5558 19.9992 + -0.0863 0.0089 20.0000 + 0.0097 0.0000 20.0000 + 0.1056 0.0000 20.0000 + 0.2016 0.0000 20.0000 + 0.2975 0.0000 20.0000 + 0.3935 0.0000 20.0000 + 0.4894 0.2566 20.0246 + 0.5854 13.9091 21.3593 + 0.6813 6.6624 21.9985 + 0.7773 0.0176 22.0002 + 0.8732 3.3711 22.3237 + 0.9692 16.5929 23.9158 + 1.0652 0.8769 24.0000 + 1.1611 0.0001 24.0000 + 1.2571 0.0000 24.0000 + 1.3530 0.0000 24.0000 + 1.4490 0.0000 24.0000 + 1.5449 0.0000 24.0000 + 1.6409 0.0000 24.0000 + 1.7368 0.0000 24.0000 + 1.8328 0.0000 24.0000 + 1.9287 0.0000 24.0000 + 2.0247 0.0000 24.0000 + 2.1207 0.0000 24.0000 + 2.2166 0.0000 24.0000 + + + + + + + + + + 10.00000000 0.00000000 0.00000000 + -0.01140900 10.00000000 0.00000000 + 0.14110830 -0.05955690 10.00000000 + + 1000.00000000 + + 0.10000000 0.00011409 -0.00141040 + 0.00000000 0.10000000 0.00059557 + 0.00000000 0.00000000 0.10000000 + + + + 0.42797015 0.42392273 0.52007767 + 0.22990059 0.62794953 0.11292376 + 0.45604950 0.35337550 0.46187043 + 0.39141925 0.38386655 0.59793722 + 0.14077376 0.62517675 0.14652870 + 0.22882579 0.59062494 0.02564077 + + + -0.00000812 -0.00000131 0.00002396 + -0.00001605 -0.00000964 -0.00001645 + -0.00077193 0.00031898 0.00151339 + 0.00089760 -0.00029467 -0.00187095 + 0.00126069 -0.00039095 -0.00140666 + -0.00099961 0.00054179 0.00164409 + + + diff --git a/tests/test_vasp_xml.py b/tests/test_vasp_xml.py index ae057eee..cc0bbb41 100644 --- a/tests/test_vasp_xml.py +++ b/tests/test_vasp_xml.py @@ -18,6 +18,17 @@ def setUp(self): self.system_2 = xml_sys.sub_system([-1]) +class TestVaspXmlDup(unittest.TestCase, CompSys, IsPBC): + def setUp(self): + self.places = 6 + xml_sys = dpdata.LabeledSystem() + xml_sys.from_vasp_xml("poscars/vasprun.h2o.md.duplicate.xml") + finl_sys = dpdata.System() + finl_sys.from_vasp_poscar("poscars/CONTCAR.h2o.md") + self.system_1 = finl_sys + self.system_2 = xml_sys.sub_system([-1]) + + class TestVaspXmlRotSys(unittest.TestCase, CompLabeledSys, IsPBC): def setUp(self): self.places = 4