Skip to content

Commit 0991325

Browse files
committed
Don't gen xyz when checking if a species is monoatomic
to avoid inf. recursions (is_monoatomic → get_xyz → get_cheap_conformer → is_monoatomic), don't generate a cheap xyz when checking if a species is monoatomic
1 parent 155f5af commit 0991325

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

arc/species/species.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,9 @@ def is_monoatomic(self) -> Optional[bool]:
10201020
"""
10211021
if self.mol is not None and len(self.mol.atoms):
10221022
return len(self.mol.atoms) == 1
1023-
xyz = self.get_xyz()
1023+
if self.mol_list is not None and len(self.mol_list):
1024+
return len(self.mol_list[0].atoms) == 1
1025+
xyz = self.get_xyz(generate=False)
10241026
if xyz is not None:
10251027
return len(xyz['symbols']) == 1
10261028
return None

0 commit comments

Comments
 (0)