Skip to content

Commit 7e9f7b3

Browse files
committed
Fix bugs in XdatCar attributes getting.
1 parent 3650b3e commit 7e9f7b3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/xdatcar_to_arc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333
data = xdatcar.dir2cart(xdatcar.bases, data)
3434

3535
atom_names = []
36-
for n, atom in zip(xdatcar.atoms_num, xdatcar.atoms):
36+
for n, atom in zip(xdatcar.atom_numbers, xdatcar.atom_types):
3737
atom_names.extend([atom]*n)
3838
for atom_name, coord in zip(atom_names, data):
39-
coord = coord.tolist()[0]
39+
coord = coord.tolist()
4040
content += '%2s%16.9f%16.9f%16.9f%5s%2d%8s%8s%7.3f\n' %\
4141
(atom_name, coord[0], coord[1], coord[2],
4242
'XXXX', 1, 'xx', atom_name, 0.0)

0 commit comments

Comments
 (0)