Commit 3c09356
fix(abacus): fix bug in read LATTICE_CONSTANT in md (#450)
In ABACUS version >= v3.1.4, the format of file "MD_dump" is different.
The lattice constant line is added by the unit "Angstrom" at the end,
and the position is the real cartesian coordinate.
MD_dump is changed from
```
MDSTEP: 0
LATTICE_CONSTANT: 23.453780000000
LATTICE_VECTORS
1.000000000000 0.000000000000 0.000000000000
0.000000000000 1.000000000000 0.000000000000
0.000000000000 0.000000000000 1.000000000000
VIRIAL (KBAR)
36.689617311102 0.000000000001 -0.000000000000
0.000000000001 36.689617311104 -0.000000000001
-0.000000000000 -0.000000000001 36.689617311147
INDEX LABEL POSITIONS FORCE (eV/Angstrom)
0 Sn 0.000000000000 0.000000000000 0.000000000000 -0.000000000000 0.000000000000 -0.000000000000
1 Sn 0.000000000000 0.250000000000 0.250000000000 -0.000186795145 -0.000453823732 -0.000453823732
```
to
```
MDSTEP: 0
LATTICE_CONSTANT: 12.411200939060 Angstrom
LATTICE_VECTORS
1.000000000000 0.000000000000 0.000000000000
0.000000000000 1.000000000000 0.000000000000
0.000000000000 0.000000000000 1.000000000000
VIRIAL (kbar)
36.689617311101 0.000000000003 -0.000000000000
0.000000000003 36.689617311089 -0.000000000001
-0.000000000000 -0.000000000001 36.689617311135
INDEX LABEL POSITION (Angstrom) FORCE (eV/Angstrom) VELOCITY (Angstrom/fs)
0 Sn 0.000000000000 0.000000000000 0.000000000000 -0.000000000000 -0.000000000001 -0.000000000001 0.001244557166 -0.000346684288 0.000768457739
1 Sn 0.000000000000 3.102800034079 3.102800034079 -0.000186795145 -0.000453823768 -0.000453823768 0.000550996187 -0.000886442775 0.001579501983
```
---------
Signed-off-by: pxlxingliang <91927439+pxlxingliang@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>1 parent 593bb1e commit 3c09356
9 files changed
Lines changed: 5454 additions & 68 deletions
File tree
- dpdata/abacus
- tests
- abacus.md.newversion
- OUT.Sn_nve
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
| |||
68 | 67 | | |
69 | 68 | | |
70 | 69 | | |
71 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
72 | 78 | | |
73 | 79 | | |
74 | 80 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
| 86 | + | |
89 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
90 | 94 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
127 | 110 | | |
128 | 111 | | |
129 | 112 | | |
130 | 113 | | |
131 | 114 | | |
132 | | - | |
133 | | - | |
134 | 115 | | |
135 | 116 | | |
136 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
0 commit comments