forked from pyscf/pyscf
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
29 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
# Author: Qiming Sun <[email protected]> | ||
# | ||
|
||
|
||
import sys | ||
import numpy | ||
from pyscf.lib import logger | ||
|
@@ -119,8 +120,8 @@ def aug_etb_for_dfbasis(mol, dfbasis=DFBASIS, beta=ETB_BETA, | |
emax_by_l = [emax[liljsum==ll].max() for ll in range(l_max1*2-1)] | ||
emin_by_l = [emin[liljsum==ll].min() for ll in range(l_max1*2-1)] | ||
# Tune emin and emax | ||
emin_by_l = numpy.array(emin_by_l) * 2 # *2 for alpha+alpha on same center | ||
emax_by_l = numpy.array(emax_by_l) * 2 #/ (numpy.arange(l_max1*2-1)*.5+1) | ||
emin_by_l = numpy.array(emin_by_l) * 2 | ||
emax_by_l = numpy.array(emax_by_l) * 2 | ||
|
||
ns = numpy.log((emax_by_l+emin_by_l)/emin_by_l) / numpy.log(beta) | ||
etb = [] | ||
|
@@ -187,6 +188,7 @@ def make_auxbasis(mol, mp2fit=False): | |
logger.debug(mol, ' ETB auxbasis for %s %s', k, auxbasis[k]) | ||
return auxbasis | ||
|
||
# TODO: add auxbasis keyword etb and auto | ||
def make_auxmol(mol, auxbasis=None): | ||
'''Generate a fake Mole object which uses the density fitting auxbasis as | ||
the basis sets. If auxbasis is not specified, the optimized auxiliary fitting | ||
|
@@ -197,7 +199,6 @@ def make_auxmol(mol, auxbasis=None): | |
even-tempered Gaussian basis set will be generated. | ||
See also the paper JCTC, 13, 554 about generating auxiliary fitting basis. | ||
JCP, 127, 074102 | ||
Kwargs: | ||
auxbasis : str, list, tuple | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
''' | ||
JCTC, 13, 554 | ||
''' | ||
|
||
f = [20, 4.0, 4.0, 3.5, 2.5, 2.0, 2.0] | ||
beta_big = [1.8, 2.0, 2.2, 2.2, 2.2, 2.3, 3.0, 3.0] | ||
beta_small = 1.8 | ||
|
||
def auto_basis(mol, l_inc=1): | ||
l_val = highest_l_in_occupied_shell | ||
l_max = max(mol._bas[:,0]) | ||
l_max_aux = max(l_val*2, l_max+l_inc) | ||
|
||
a_min_aux = a_min[:,None] + a_min | ||
a_max_aux = a_min[:,None] + a_min | ||
r_exp = _gaussian_int(a, l) | ||
a_max_eff = 2 * k(l)**2 / (np.pi * r_exp) | ||
a_max_eff_aux = a_max_eff[:,None] + a_max_eff | ||
a_max_aux = ([max(f[l] * a_max_eff_aux, a_max_aux) for l in range(2*l_val+1)] + | ||
a_max_aux[2*l_val+1:]) | ||
|
||
beta = list(beta_big) | ||
beta[:2*l_val] = beta_small | ||
|
||
ns = np.log(a_max_aux/a_min_aux) / beta |