Skip to content

Commit

Permalink
systems: fix pyscf system wrapper in case pbc not imported
Browse files Browse the repository at this point in the history
  • Loading branch information
liam-o-marsh committed Oct 30, 2024
1 parent b70b19e commit 86c0fdf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/rascaline/rascaline/systems/pyscf.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ def __init__(self, frame):
symb = self._frame.atom_symbol(atm_i)
chg = pyscf.data.elements.index(symb)
self._types[atm_i] = -chg
self.is_periodic = isinstance(self._frame, pyscf.pbc.gto.cell.Cell)
if hasattr(pyscf, "pbc"):
self.is_periodic = isinstance(self._frame, pyscf.pbc.gto.cell.Cell)
else:
self.is_periodic = False

def size(self):
return self._frame.natm
Expand Down

0 comments on commit 86c0fdf

Please sign in to comment.