Skip to content

Commit

Permalink
update molecular data pyscf wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsung committed Dec 3, 2023
1 parent 410dd97 commit 1e826c4
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion python/ffsim/molecular_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ class MolecularData:
"""Class for storing molecular data.
Attributes:
atom: The coordinates of the atoms in the molecule.
basis: The basis set, e.g. "sto-6g".
spin: The spin of the molecule.
symmetry: The symmetry of the molecule.
norb: The number of spatial orbitals.
nelec: The number of alpha and beta electrons.
mo_coeff: Hartree-Fock canonical orbital coefficients in the AO basis.
Expand All @@ -77,7 +81,12 @@ class MolecularData:
orbital_symmetries: The orbital symmetries.
"""

# molecule information
# molecule information corresponding to attributes of pyscf.gto.Mole
atom: list[tuple[str, tuple[float, float, float]]]
basis: str
spin: int
symmetry: str | None
# active space information
norb: int
nelec: tuple[int, int]
active_space: list[int]
Expand Down Expand Up @@ -188,6 +197,10 @@ def from_scf(
orbsym = orbital_symmetries(hartree_fock, active_space)

return MolecularData(
atom=hartree_fock.mol.atom,
basis=hartree_fock.mol.basis,
spin=hartree_fock.mol.spin,
symmetry=hartree_fock.mol.symmetry or None,
norb=norb,
nelec=(n_alpha, n_beta),
mo_coeff=hartree_fock.mo_coeff,
Expand Down

0 comments on commit 1e826c4

Please sign in to comment.