Skip to content

Commit

Permalink
Update common_utils.py
Browse files Browse the repository at this point in the history
This checks the pyscf version and prints a BIG FAT WARNING to the stdout if it is not 2.0.1
  • Loading branch information
egull authored Nov 8, 2024
1 parent 02bd639 commit fd3577a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions green_mbtools/mint/common_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from pyscf import dft as mdft
from pyscf import df as mdf
from pyscf.pbc import tools, gto, df, scf, dft
from pyscf import __version__ as pyscf_version

import importlib.metadata as imd

Expand Down Expand Up @@ -700,6 +701,12 @@ def construct_gdf(args, mycell, kmesh=None):
Construct Gaussian Density Fitting obejct for a given parameters and unit cell.
We make sure to disable range-separeting implementation
'''
#pyscf version check for our specific df requirement
if(pyscf_version != "2.0.1")
print("###WARNING*****************************************************************###")
print("###WARNING POSSIBLE INCOMPATIBILITY OF DF INTEGRALS USE ONLY VERSION 2.0.1 ###")
print("###WARNING*****************************************************************###")
print("current pyscf version is",pyscf_version," should be 2.0.1")
# Use gaussian density fitting to get fitted densities
mydf = df.GDF(mycell)
if hasattr(mydf, "_prefer_ccdf"):
Expand Down

0 comments on commit fd3577a

Please sign in to comment.