Skip to content

Commit

Permalink
Update to_xml.py
Browse files Browse the repository at this point in the history
  • Loading branch information
levilentz committed Apr 17, 2018
1 parent 4e00783 commit 442d7bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions to_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ def xml(f,extra_tag=None,p_=10):
species.text = str(ntype)
atoms.append(natoms)
atoms.append(species)
for i in atm.split('\n')[:-1]:
atom = ET.Element("atom",specie=i.split()[0])
atom.text = ' '.join(i.split()[1:4])
for j in atm.split('\n')[:-1]:
atom = ET.Element("atom",specie=j.split()[0])
atom.text = ' '.join(j.split()[1:4])
atoms.append(atom)
system.append(atoms)
target = ET.Element('target')
Expand Down

0 comments on commit 442d7bd

Please sign in to comment.