Skip to content

Commit

Permalink
pass lattice vectors if pyscf object has them
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Izvorski committed Jul 26, 2024
1 parent a13813a commit 335e9dd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions python/dftd3/pyscf.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,17 @@ def kernel(self) -> Tuple[float, np.ndarray]:
"""
mol = self.mol

lattice = None
periodic = None
if callable(getattr(mol, 'lattice_vectors')):
lattice = mol.lattice_vectors()
periodic = np.array([True,True,True], dtype=bool)

disp = DispersionModel(
np.array([gto.charge(mol.atom_symbol(ia)) for ia in range(mol.natm)]),
mol.atom_coords(),
lattice=lattice,
periodic=periodic,
)

if self.param is not None:
Expand Down

0 comments on commit 335e9dd

Please sign in to comment.