10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-22 12:23:43 +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 install <name>...
qp_plugins uninstall <name>
qp_plugins remove <name>
qp_plugins update [-r <repo>]
qp_plugins create -n <name> [-r <repo>] [<needed_modules>...]
@ -24,6 +25,8 @@ Options:
uninstall Uninstall a plugin
remove Uninstall a plugin
update Update the repository
create
@ -274,7 +277,7 @@ def main(arguments):
subprocess.check_call(["qp_create_ninja", "update"])
print("[ OK ]")
elif arguments["uninstall"]:
elif arguments["uninstall"] or arguments["remove"]:
m_instance = ModuleHandler([QP_SRC])
d_descendant = m_instance.dict_descendant

View File

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

View File

@ -116,6 +116,7 @@ def get_l_module_descendant(d_child, l_module):
print("Error: ", file=sys.stderr)
print("`{0}` is not a submodule".format(module), file=sys.stderr)
print("Check the typo (spelling, case, '/', etc.) ", file=sys.stderr)
# pass
sys.exit(1)
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 countcsf
integer MS
MS = elec_alpha_num-elec_beta_num
countcsf = 0
phasedet = 1.0d0
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
s = s + popcnt(psi_configuration(k,1,i))
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
! can be more efficient

View File

@ -65,7 +65,7 @@
dimcsfpercfg = 2
else
if(iand(MS,1) .EQ. 0) then
!dimcsfpercfg = max(1,nint((binom(i,i/2)-binom(i,i/2+1))))
! dimcsfpercfg = max(1,nint((binom(i,i/2)-binom(i,i/2+1))))
binom1 = dexp(logabsgamma(1.0d0*(i+1)) &
- logabsgamma(1.0d0*((i/2)+1)) &
- logabsgamma(1.0d0*(i-((i/2))+1)));
@ -74,7 +74,7 @@
- logabsgamma(1.0d0*(i-((i/2)+1)+1)));
dimcsfpercfg = max(1,nint(binom1 - binom2))
else
!dimcsfpercfg = max(1,nint((binom(i,(i+1)/2)-binom(i,(i+3)/2))))
! dimcsfpercfg = max(1,nint((binom(i,(i+1)/2)-binom(i,(i+3)/2))))
binom1 = dexp(logabsgamma(1.0d0*(i+1)) &
- logabsgamma(1.0d0*(((i+1)/2)+1)) &
- logabsgamma(1.0d0*(i-(((i+1)/2))+1)));

View File

@ -585,7 +585,7 @@ END_PROVIDER
enddo
!$OMP ENDDO
!$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_columns,psi_bilinear_matrix_transp_order,N_det)
!$OMP PARALLEL DO DEFAULT(SHARED) PRIVATE(l)