1
0
mirror of https://gitlab.com/scemama/qp_plugins_scemama.git synced 2024-11-07 14:43:41 +01:00

Fix ECP part

This commit is contained in:
Anthony Scemama 2022-01-03 01:43:01 +01:00
parent e789983821
commit d9237ab271
3 changed files with 9 additions and 11 deletions

View File

@ -1,2 +1,2 @@
-ltrexio
-ltrexio -L/home/scemama/.conda/envs/trexio_v2/lib

View File

@ -84,7 +84,7 @@ subroutine run
end do
end do
do l=1,pseudo_lmax
do l=0,pseudo_lmax
do k=1,pseudo_kmax
do i=1,nucl_num
if (pseudo_dz_kl(i,k,l) /= 0.d0) then
@ -101,8 +101,8 @@ subroutine run
lmax(nucl_num) )
do i=1,nucl_num
lmax(i) = 0
do l=1,pseudo_lmax
lmax(i) = -1
do l=0,pseudo_lmax
do k=1,pseudo_kmax
if (pseudo_dz_kl_transp(k,l,i) /= 0.d0) then
lmax(i) = max(lmax(i), l)
@ -124,7 +124,7 @@ subroutine run
end if
end do
do l=1,lmax(i)
do l=0,lmax(i)
do k=1,pseudo_kmax
if (pseudo_dz_kl_transp(k,l,i) /= 0.d0) then
j = j+1

View File

@ -297,8 +297,8 @@ def write_ezfio(trexio_filename, filename):
ecp[center] = { "lmax": max_ang_mom_plus_1[center],
"zcore": z_core[center],
"contr": {} }
for i in range(max_ang_mom_plus_1[center]+1):
ecp[center]["contr"][i] = []
for j in range(max_ang_mom_plus_1[center]+1):
ecp[center]["contr"][j] = []
ecp[center]["contr"][ang_mom[i]].append( (coefficient[i], power[i], exponent[i]) )
prev_center = center
@ -328,7 +328,7 @@ def write_ezfio(trexio_filename, filename):
pseudo_dz_kl = [[[0. for _ in range(nucl_num)] for _ in range(kmax)] for _ in range(lmax+1)]
for center in ecp_loc:
for k in range( len(ecp_loc[center]) ):
v, n, dz = ecp_loc[center]
v, n, dz = ecp_loc[center][k]
pseudo_n_k[k][center] = n
pseudo_v_k[k][center] = v
pseudo_dz_k[k][center] = dz
@ -340,7 +340,7 @@ def write_ezfio(trexio_filename, filename):
for center in ecp_nl:
for k in range( len(ecp_nl[center]) ):
for l in range( len(ecp_nl[center][k]) ):
v, n, dz = ecp_nl[center][k]
v, n, dz = ecp_nl[center][k][l]
pseudo_n_kl[l][k][center] = n
pseudo_v_kl[l][k][center] = v
pseudo_dz_kl[l][k][center] = dz
@ -349,8 +349,6 @@ def write_ezfio(trexio_filename, filename):
ezfio.set_pseudo_pseudo_v_kl(pseudo_v_kl)
ezfio.set_pseudo_pseudo_dz_kl(pseudo_dz_kl)
charge = [ x-y for x,y in zip(charge,z_core) ]
ezfio.set_nuclei_nucl_charge(charge)
print("OK")