Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ celerybeat-schedule
*.sage.py

# Environments
.envrc
.env
.venv
env/
Expand Down
10 changes: 6 additions & 4 deletions gbasis/wrappers.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Module for interfacing to other quantum chemistry packages."""

from gbasis.contractions import GeneralizedContractionShell
import numpy as np

from gbasis.contractions import GeneralizedContractionShell

CONVENTIONS_LIBCINT = {
(5, "p"): ["s5", "s4", "s3", "s2", "s1", "c0", "c1", "c2", "c3", "c4", "c5"],
Expand Down Expand Up @@ -123,7 +123,9 @@ def from_iodata(mol):
raise ValueError("`mol` must be an IOData instance.")

# GBasis can only work with segmented basis sets.
molbasis = mol.obasis.get_segmented()
from iodata.convert import convert_to_segmented

molbasis = convert_to_segmented(mol.obasis)

cart_conventions = {i[0]: j for i, j in molbasis.conventions.items() if i[1] == "c"}
sph_conventions = {i[0]: j for i, j in molbasis.conventions.items() if i[1] == "p"}
Expand Down Expand Up @@ -187,7 +189,7 @@ def angmom_components_sph(self):
if self.angmom not in sph_conventions:
raise ValueError(
"Given convention does not support spherical contractions for the angular "
"momentum {0}".format(self.angmom)
f"momentum {self.angmom}"
)

return tuple(sph_conventions[self.angmom])
Expand Down Expand Up @@ -228,7 +230,7 @@ def permutation_libcint(self):
if molbasis.primitive_normalization != "L2": # pragma: no cover
raise ValueError(
"Only L2 normalization scheme is supported in `gbasis`. Given `IOData` instance uses "
"primitive normalization scheme, {}".format(molbasis.primitive_normalization)
f"primitive normalization scheme, {molbasis.primitive_normalization}"
)

basis = []
Expand Down