I am trying to reproduce some results from LC-blyp, which makes me to customize functional. And I found http://forum.psicode.org/t/implementing-lc-blyp/ has already a solution to this question. However, when I add the same code from the post to my code, and using psi4.energy(“awLCBLYP”) for a test. It reports functional no found. Is there any way to add new functional from the python side?
psi4 version: 1.3.2
Thank you very much
March 20, 2020, 5:09pm
could you post your input?
The whole code is quite lengthy, here is the main part:
import numpy as np
def mod_lcblyp(name, npoints, deriv, restricted=True):
# Build a empty superfunctional
sup = core.SuperFunctional.blank()
# Name the functional and provide a description
sup.set_description(' LC-BLYP Hyb-GGA Exchange-Correlation Functional\n')
# Set the correlation functional
b_x = core.LibXCFunctional('XC_GGA_X_B88', restricted)
#Set exchange functional ( static + long-range contribution)
# set the parameters for S7:
molecule_geo = psi4.geometry("
C -0.66631400 0.00000000 0.00000000
C 0.66631400 0.00000000 0.00000000
H -1.23960500 0.91940200 0.00000000
H -1.23960500 -0.91940200 0.00000000
H 1.23960500 -0.91940200 0.00000000
H 1.23960500 0.91940200 0.00000000")
eng, wfn = psi4.energy('scf', dft_functional='awLCBLYP', return_wfn=True, molecule=molecule_geo_dimer)
if __name__ == '__main__':
March 20, 2020, 7:44pm
At this stage PSI4 doesn’t know your functional name.
You want to use
The other thread talked about some modified LC-BLYP, I think. So be careful about the used parameters!
There usually isn’t a global HF exchange (set_x_alpha(0.30)) in the LC scheme.
It could be easier to use the dictionary interface like shown here:
Thanks!! It works.
I will check the parameter.
May 20, 2020, 5:41pm
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.