Skip to content

Commit a48bb43

Browse files
authored
Merge pull request #16 from skyirm/correct-scripts
Correct scripts/xdatcar_to_arc.py
2 parents 3650b3e + 0d2d3b7 commit a48bb43

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/xdatcar_to_arc.py

+2-2
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)