Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PYSCF-AD backend to environment.yml #107

Merged
merged 4 commits into from
Dec 20, 2024
Merged
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
12 changes: 9 additions & 3 deletions examples/periodic-hamiltonian/periodic-hamiltonian.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,20 @@
import requests
import torch
from matplotlib.animation import FuncAnimation
from mlelec.data.derived_properties import compute_eigenvalues
from mlelec.data.mldataset import MLDataset
from mlelec.data.qmdataset import QMDataset
from mlelec.models.equivariant_lightning import LitEquivariantModel, MSELoss
from mlelec.utils.pbc_utils import blocks_to_matrix
from mlelec.utils.plot_utils import plot_bands_frame


os.environ["PYSCFAD_BACKEND"] = "torch"
from mlelec.data.derived_properties import compute_eigenvalues # noqa: E402
from mlelec.data.mldataset import MLDataset # noqa: E402
from mlelec.models.equivariant_lightning import ( # noqa: E402
LitEquivariantModel,
MSELoss,
)


warnings.filterwarnings("ignore")
torch.set_default_dtype(torch.float64)

Expand Down
Loading