From 25f3b2ee01edc7ad1db610dd719207baef90ea89 Mon Sep 17 00:00:00 2001 From: Thomas Applencourt Date: Mon, 13 Apr 2015 15:04:27 +0200 Subject: [PATCH] Working for Li2 but with **WARNING** bad convergence in int_prod_bessel --- scripts/pseudo/put_pseudo_in_ezfio.py | 43 ++++++++++++++------------- src/MonoInts/pot_ao_ints.irp.f | 4 +-- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/scripts/pseudo/put_pseudo_in_ezfio.py b/scripts/pseudo/put_pseudo_in_ezfio.py index 182e699b..47e3d0d8 100755 --- a/scripts/pseudo/put_pseudo_in_ezfio.py +++ b/scripts/pseudo/put_pseudo_in_ezfio.py @@ -55,18 +55,21 @@ def get_pseudo_str(l_atom): EMSL_path = "{0}/EMSL_api.py".format(EMSL_root) db_path = "{0}/db/Pseudo.db".format(EMSL_root) - l_cmd_atom = [] + str_ = "" + for a in l_atom: - l_cmd_atom += ["--atom", a] + l_cmd_atom = ["--atom", a] - l_cmd_head = [EMSL_path, "get_basis_data", - "--db_path", db_path, - "--basis", "BFD-Pseudo"] + l_cmd_head = [EMSL_path, "get_basis_data", + "--db_path", db_path, + "--basis", "BFD-Pseudo"] - 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() - return stdout.strip() + stdout, _ = process.communicate() + str_ += stdout.strip() + "\n" + + return str_ 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 # # ~#~#~#~#~#~#~ # - m = re.search('Element Symbol: ([a-zA-Z]+)', str_ele) - name = m.group(1).capitalize() +# m = re.search('Element Symbol: ([a-zA-Z]+)', str_ele) +# name = m.group(1).capitalize() + name = str_ele.split("\n")[0].strip().capitalize() m = re.search('Number of replaced protons: (\d+)', str_ele) 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 - alpha = alpha - (z_remove / 2) - beta = beta - (z_remove / 2) + alpha = (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 # # ~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~ # - zeff, alpha, beta = get_zeff_alpha_beta(str_) + zeff, alpha, beta = get_zeff_alpha_beta(str_ele) alpha_tot += alpha beta_tot += beta 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_beta_num = beta_tot - ezfio.nuclei_nucl_charge = l_zeff diff --git a/src/MonoInts/pot_ao_ints.irp.f b/src/MonoInts/pot_ao_ints.irp.f index 6f35a117..bf01649d 100644 --- a/src/MonoInts/pot_ao_ints.irp.f +++ b/src/MonoInts/pot_ao_ints.irp.f @@ -150,8 +150,8 @@ c = c - Z*NAI_pol_mult(A_center,B_center,power_A,power_B,alpha,beta,C_center,n_pt_in) - c = c + Vloc( klocmax ,v_k ,n_k ,dz_k, A_center,power_A,alpha,B_center,power_B,beta,C_center) - c = c + Vpseudo(lmax,kmax,v_kl,n_kl,dz_kl,A_center,power_A,alpha,B_center,power_B,beta,C_center) + c = c + Vloc( klocmax ,v_k ,n_k ,dz_k, A_center,power_A,alpha,B_center,power_B,beta,C_center) + c = c + Vpseudo(lmax,kmax,v_kl,n_kl,dz_kl,A_center,power_A,alpha,B_center,power_B,beta,C_center) ! c = c - Vps(A_center,power_A,alpha,B_center,power_B,beta,C_center,klocmax,v_k,n_k,dz_k,lmax,kmax,v_kl,n_kl,dz_kl) enddo