Skip to content

Commit 55bd69f

Browse files
authored
fix wrong atom order from fdf when the coordinates are not in natural order (#971)
1 parent 8cabef5 commit 55bd69f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sisl/io/siesta/orb_indx.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,15 @@ def crt_atom(i_s, tag, orbs):
101101
def crt_atom(i_s, tag, orbs):
102102
# Get the atom and add the orbitals
103103
kwargs = {}
104-
if atoms[i_s].tag != tag:
104+
if atoms.atom[i_s].tag != tag:
105105
# we know ORB_INDX tag is correct
106106
kwargs["tag"] = tag
107-
if len(atoms[i_s]) != len(orbs):
107+
if len(atoms.atom[i_s]) != len(orbs):
108108
# only overwrite if # of orbitals don't match
109109
kwargs["orbitals"] = orbs
110110
if kwargs:
111-
return atoms[i_s].copy(**kwargs)
112-
return atoms[i_s]
111+
return atoms.atom[i_s].copy(**kwargs)
112+
return atoms.atom[i_s]
113113

114114
# Now we begin by reading the atoms
115115
atom, orbs = [], []

0 commit comments

Comments
 (0)