Skip to content

Instantly share code, notes, and snippets.

@hokru
Created February 14, 2018 10:36
Show Gist options
  • Save hokru/8b2885ebd09483ed89e8540c8a40facb to your computer and use it in GitHub Desktop.
Save hokru/8b2885ebd09483ed89e8540c8a40facb to your computer and use it in GitHub Desktop.
def build_dsd_pbep86_superfunctional(name, npoints, deriv, restricted):
# Call this first
sup = core.SuperFunctional.blank()
sup.set_max_points(npoints)
sup.set_deriv(deriv)
# => User-Customization <= #
# No spaces, keep it short and according to convention
sup.set_name('DSD-PBEP86')
# Tab in, trailing newlines
# sup.set_description(' DSD-PBEP86 Dispersion-corrected SCS Double Hybrid XC Functional (opt. for -D2)\n')
sup.set_description(' DSD-PBEP86 Dispersion-corrected SCS Double Hybrid XC Functional (opt. for -D3BJ)\n')
# Tab in, trailing newlines
# sup.set_citation(' S. Kozuch, Phys. Chem. Chem. Phys., 13, 20104, 2011\n')
sup.set_citation(' S. Kozuch,http://onlinelibrary.wiley.com/doi/10.1002/jcc.23391/full \n')
# Add member functionals
X = core.LibXCFunctional('XC_GGA_X_PBE', restricted)
X.set_alpha(0.30)
sup.add_x_functional(X)
C = core.LibXCFunctional('XC_GGA_C_P86', restricted)
C.set_alpha(0.43)
sup.add_c_functional(C)
# Set GKS up after adding functionals
sup.set_x_omega(0.0)
sup.set_c_omega(0.0)
sup.set_x_alpha(0.70)
sup.set_c_alpha(1.0)
sup.set_c_ss_alpha(0.25)
sup.set_c_os_alpha(0.53)
# => End User-Customization <= #
# Call this last
sup.allocate()
return (sup, False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment