-
Notifications
You must be signed in to change notification settings - Fork 20
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
DFT issues #105
Comments
I tried to use the same setting as you did, however the behavior was not reproduced. Can you please provide a runnable example? The case of He dimer should be enough. |
I cannot reproduce the issue. I guess it is not a problem of gpu4pyscf. It's probably just a common issue for PES jobs. There are two tricks may be helpful for PES scanning. You can use the
Another trick is to scan in the reversed direction. This sometimes helps the PES stay on the adiabatic state, than jumping to another state at conical intersections. |
I'm sorry, please run this code: import numpy as np
from gpu4pyscf import dft
from pyscf import gto
import matplotlib.pyplot as plt
res = []
def dft_calc():
for functional in ["b3lyp"]:
for basis_set in ["def2-svp"]:
point_en = []
for distance in np.linspace(4.5, 20, 50):
benzhe = gto.Mole(
atom=f"""He 0.000000 0.000000 0.000000
He 0.000000 0.000000 {distance:.5f}""",
basis=basis_set,
symmetry=True,
verbose=1,
)
dft_ins = dft.rks.RKS(benzhe)
dft_ins.xc = functional
dft_ins.grids.level = 5
dft_ins.kernel()
res.append((dft_ins.e_tot, distance))
dft_calc()
res = np.array(res)
plt.plot(res[:, 1], res[:, 0]) It's returning the following, |
I can confirm the issue now. The same issue can be reproduced in PySCF on CPU too. The fluctuation (around 1e-6) can not be reduced by tightening the criteria, removing pruning, or adding grids. Do you have any insights? @sunqm |
The fluctuation is caused by the discontinuity in the weights of DFT grids wrt geometry. If you use a very small step size in scan, it probably will produce a curve with a more smooth but periodic structure. If you use a very dense radial grids, such as 300 or 500, the curve can be more smooth. And ultimately, it will be a flatten line. |
Thanks @sunqm. Those fluctuation is indeed decreasing when I use denser radial grids. The decreasing trend is just slow when we use the regular DFT grids. Here is the curve when (1000,590) grids is used. @shah-xad |
Hi, I'm trying to run a DFT calculation to get a Potential at different distances but around 15-20A Pyscf is showing very weird behavior.
I ran the same calculation with Turbomole and it's perfectly fine.
This was Benzene and He interaction and then I tried He He interaction and it was the same, particularly for the larger basis sets e.g. def2-QZVPPD
Here's my code:
The text was updated successfully, but these errors were encountered: