Skip to content

Commit e00697a

Browse files
authored
Add PYSCF-AD backend to environment.yml (#107)
* Set pyscf-ad backend to torch * Changed setting of PYSCFAD-BACKEND to in python file with #noqa
1 parent f7a606f commit e00697a

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

examples/periodic-hamiltonian/periodic-hamiltonian.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,20 @@
2525
import requests
2626
import torch
2727
from matplotlib.animation import FuncAnimation
28-
from mlelec.data.derived_properties import compute_eigenvalues
29-
from mlelec.data.mldataset import MLDataset
3028
from mlelec.data.qmdataset import QMDataset
31-
from mlelec.models.equivariant_lightning import LitEquivariantModel, MSELoss
3229
from mlelec.utils.pbc_utils import blocks_to_matrix
3330
from mlelec.utils.plot_utils import plot_bands_frame
3431

3532

33+
os.environ["PYSCFAD_BACKEND"] = "torch"
34+
from mlelec.data.derived_properties import compute_eigenvalues # noqa: E402
35+
from mlelec.data.mldataset import MLDataset # noqa: E402
36+
from mlelec.models.equivariant_lightning import ( # noqa: E402
37+
LitEquivariantModel,
38+
MSELoss,
39+
)
40+
41+
3642
warnings.filterwarnings("ignore")
3743
torch.set_default_dtype(torch.float64)
3844

0 commit comments

Comments
 (0)