10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-22 20:34:58 +01:00

Minor changes

This commit is contained in:
Anthony Scemama 2022-01-28 20:50:10 +01:00
parent bd188abd39
commit dc42b639af
6 changed files with 31 additions and 5 deletions

View File

@ -6,6 +6,7 @@ Usage:
qp_plugins download <url> [-n <name>] qp_plugins download <url> [-n <name>]
qp_plugins install <name>... qp_plugins install <name>...
qp_plugins uninstall <name> qp_plugins uninstall <name>
qp_plugins remove <name>
qp_plugins update [-r <repo>] qp_plugins update [-r <repo>]
qp_plugins create -n <name> [-r <repo>] [<needed_modules>...] qp_plugins create -n <name> [-r <repo>] [<needed_modules>...]
@ -24,6 +25,8 @@ Options:
uninstall Uninstall a plugin uninstall Uninstall a plugin
remove Uninstall a plugin
update Update the repository update Update the repository
create create
@ -274,7 +277,7 @@ def main(arguments):
subprocess.check_call(["qp_create_ninja", "update"]) subprocess.check_call(["qp_create_ninja", "update"])
print("[ OK ]") print("[ OK ]")
elif arguments["uninstall"]: elif arguments["uninstall"] or arguments["remove"]:
m_instance = ModuleHandler([QP_SRC]) m_instance = ModuleHandler([QP_SRC])
d_descendant = m_instance.dict_descendant d_descendant = m_instance.dict_descendant

View File

@ -204,6 +204,9 @@ _qp_Complete()
uninstall) uninstall)
COMPREPLY=( $(compgen -W "$(qp_plugins list -i)" -- $cur ) ) COMPREPLY=( $(compgen -W "$(qp_plugins list -i)" -- $cur ) )
return 0;; return 0;;
remove)
COMPREPLY=( $(compgen -W "$(qp_plugins list -i)" -- $cur ) )
return 0;;
create) create)
COMPREPLY=( $(compgen -W "-n " -- $cur ) ) COMPREPLY=( $(compgen -W "-n " -- $cur ) )
return 0;; return 0;;

View File

@ -116,6 +116,7 @@ def get_l_module_descendant(d_child, l_module):
print("Error: ", file=sys.stderr) print("Error: ", file=sys.stderr)
print("`{0}` is not a submodule".format(module), file=sys.stderr) print("`{0}` is not a submodule".format(module), file=sys.stderr)
print("Check the typo (spelling, case, '/', etc.) ", file=sys.stderr) print("Check the typo (spelling, case, '/', etc.) ", file=sys.stderr)
# pass
sys.exit(1) sys.exit(1)
return list(set(l)) return list(set(l))

View File

@ -38,6 +38,8 @@ subroutine convertWFfromDETtoCSF(N_st,psi_coef_det_in, psi_coef_cfg_out)
integer s, bfIcfg integer s, bfIcfg
integer countcsf integer countcsf
integer MS
MS = elec_alpha_num-elec_beta_num
countcsf = 0 countcsf = 0
phasedet = 1.0d0 phasedet = 1.0d0
do i = 1,N_configuration do i = 1,N_configuration
@ -61,7 +63,24 @@ subroutine convertWFfromDETtoCSF(N_st,psi_coef_det_in, psi_coef_cfg_out)
if (psi_configuration(k,1,i) == 0_bit_kind) cycle if (psi_configuration(k,1,i) == 0_bit_kind) cycle
s = s + popcnt(psi_configuration(k,1,i)) s = s + popcnt(psi_configuration(k,1,i))
enddo enddo
bfIcfg = max(1,nint((binom(s,(s+1)/2)-binom(s,((s+1)/2)+1))))
! Test 1
! if(iand(MS,1) .EQ. 0) then
! bfIcfg = max(1,nint((binom(i,i/2)-binom(i,i/2+1))))
! else
! bfIcfg = max(1,nint((binom(s,(s+1)/2)-binom(s,((s+1)/2)+1))))
! endif
! Test 2
! double precision :: binom1, binom2
! double precision, external :: logabsgamma
! binom1 = dexp(logabsgamma(1.0d0*(s+1)) &
! - logabsgamma(1.0d0*(((s+1)/2)+1)) &
! - logabsgamma(1.0d0*(s-(((s+1)/2))+1)));
! binom2 = dexp(logabsgamma(1.0d0*(s+1)) &
! - logabsgamma(1.0d0*((((s+3)/2)+1)+1)) &
! - logabsgamma(1.0d0*(s-(((s+3)/2)+1)+1)));
! bfIcfg = max(1,nint(binom1 - binom2))
! perhaps blocking with CFGs of same seniority ! perhaps blocking with CFGs of same seniority
! can be more efficient ! can be more efficient

View File

@ -585,7 +585,7 @@ END_PROVIDER
enddo enddo
!$OMP ENDDO !$OMP ENDDO
!$OMP END PARALLEL !$OMP END PARALLEL
call i8radix_sort(to_sort, psi_bilinear_matrix_transp_order, N_det,-1) call i8sort(to_sort, psi_bilinear_matrix_transp_order, N_det)
call iset_order(psi_bilinear_matrix_transp_rows,psi_bilinear_matrix_transp_order,N_det) call iset_order(psi_bilinear_matrix_transp_rows,psi_bilinear_matrix_transp_order,N_det)
call iset_order(psi_bilinear_matrix_transp_columns,psi_bilinear_matrix_transp_order,N_det) call iset_order(psi_bilinear_matrix_transp_columns,psi_bilinear_matrix_transp_order,N_det)
!$OMP PARALLEL DO DEFAULT(SHARED) PRIVATE(l) !$OMP PARALLEL DO DEFAULT(SHARED) PRIVATE(l)