10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-23 12:56:14 +01:00

Working for Li2 but with **WARNING** bad convergence in int_prod_bessel

This commit is contained in:
Thomas Applencourt 2015-04-13 15:04:27 +02:00
parent e07351c729
commit 25f3b2ee01
2 changed files with 24 additions and 23 deletions

View File

@ -55,9 +55,10 @@ def get_pseudo_str(l_atom):
EMSL_path = "{0}/EMSL_api.py".format(EMSL_root) EMSL_path = "{0}/EMSL_api.py".format(EMSL_root)
db_path = "{0}/db/Pseudo.db".format(EMSL_root) db_path = "{0}/db/Pseudo.db".format(EMSL_root)
l_cmd_atom = [] str_ = ""
for a in l_atom: for a in l_atom:
l_cmd_atom += ["--atom", a] l_cmd_atom = ["--atom", a]
l_cmd_head = [EMSL_path, "get_basis_data", l_cmd_head = [EMSL_path, "get_basis_data",
"--db_path", db_path, "--db_path", db_path,
@ -66,7 +67,9 @@ def get_pseudo_str(l_atom):
process = Popen(l_cmd_head + l_cmd_atom, stdout=PIPE, stderr=PIPE) process = Popen(l_cmd_head + l_cmd_atom, stdout=PIPE, stderr=PIPE)
stdout, _ = process.communicate() stdout, _ = process.communicate()
return stdout.strip() str_ += stdout.strip() + "\n"
return str_
def get_v_n_dz_local(str_ele): def get_v_n_dz_local(str_ele):
@ -146,19 +149,13 @@ def get_zeff_alpha_beta(str_ele):
# s t r _ e l e # # s t r _ e l e #
# ~#~#~#~#~#~#~ # # ~#~#~#~#~#~#~ #
m = re.search('Element Symbol: ([a-zA-Z]+)', str_ele) # m = re.search('Element Symbol: ([a-zA-Z]+)', str_ele)
name = m.group(1).capitalize() # name = m.group(1).capitalize()
name = str_ele.split("\n")[0].strip().capitalize()
m = re.search('Number of replaced protons: (\d+)', str_ele) m = re.search('Number of replaced protons: (\d+)', str_ele)
z_remove = int(m.group(1)) z_remove = int(m.group(1))
# ~#~#~#~#~#~#~#~#~#~ #
# F r o m _ e z f i o #
# ~#~#~#~#~#~#~#~#~#~ #
alpha = ezfio.get_electrons_elec_alpha_num()
beta = ezfio.get_electrons_elec_beta_num()
# _ # _
# |_) _. ._ _ _ # |_) _. ._ _ _
# | (_| | _> (/_ # | (_| | _> (/_
@ -169,8 +166,8 @@ def get_zeff_alpha_beta(str_ele):
z_eff = z - z_remove z_eff = z - z_remove
alpha = alpha - (z_remove / 2) alpha = (z_remove / 2)
beta = beta - (z_remove / 2) beta = (z_remove / 2)
# _ # _
# |_) _ _|_ ._ ._ # |_) _ _|_ ._ ._
@ -252,12 +249,16 @@ if __name__ == "__main__":
# Z _ e f f , a l p h a / b e t a _ e l e c # # Z _ e f f , a l p h a / b e t a _ e l e c #
# ~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~ # # ~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~ #
zeff, alpha, beta = get_zeff_alpha_beta(str_) zeff, alpha, beta = get_zeff_alpha_beta(str_ele)
alpha_tot += alpha alpha_tot += alpha
beta_tot += beta beta_tot += beta
l_zeff.append(zeff) l_zeff.append(zeff)
ezfio.nuclei_nucl_charge = l_zeff
alpha_tot = ezfio.get_electrons_elec_alpha_num() - alpha_tot
beta_tot = ezfio.get_electrons_elec_beta_num() - beta_tot
ezfio.electrons_elec_alpha_num = alpha_tot ezfio.electrons_elec_alpha_num = alpha_tot
ezfio.electrons_elec_beta_num = beta_tot ezfio.electrons_elec_beta_num = beta_tot
ezfio.nuclei_nucl_charge = l_zeff