convert is_periodic to bool in XYZ

This commit is contained in:
elichad
2022-04-13 16:41:17 +00:00
parent 4de5883388
commit d72aab5322
+2 -2
View File
@@ -1248,9 +1248,9 @@ class XYZ(GenericMolFile):
chemical_formula.append(block.get_chemical_formula())
pbc = block.get_pbc()
try:
p = 1 if pbc else 0
p = bool(pbc)
except ValueError: # pbc is an array
p = 1 if pbc.any() else 0
p = bool(pbc.any())
is_periodic.append(p)
lattice_parameters.append(list(block.get_cell().cellpar()))
except Exception as e: