mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-22 20:34:58 +01:00
Merge branch 'master' of https://github.com/QuantumPackage/qp2
This commit is contained in:
commit
f64ce601f5
@ -3,7 +3,7 @@
|
|||||||
"""
|
"""
|
||||||
Usage:
|
Usage:
|
||||||
qp_plugins list [-iuq]
|
qp_plugins list [-iuq]
|
||||||
qp_plugins download <url>
|
qp_plugins download <url> [-n <name>]
|
||||||
qp_plugins install <name>...
|
qp_plugins install <name>...
|
||||||
qp_plugins uninstall <name>
|
qp_plugins uninstall <name>
|
||||||
qp_plugins create -n <name> [-r <repo>] [<needed_modules>...]
|
qp_plugins create -n <name> [-r <repo>] [<needed_modules>...]
|
||||||
@ -186,7 +186,10 @@ def main(arguments):
|
|||||||
url.endswith(".zip"))
|
url.endswith(".zip"))
|
||||||
os.chdir(QP_PLUGINS)
|
os.chdir(QP_PLUGINS)
|
||||||
if is_repo:
|
if is_repo:
|
||||||
subprocess.check_call(["git", "clone", url])
|
git_cmd=["git", "clone", url]
|
||||||
|
if arguments["--name"]:
|
||||||
|
git_cmd.append(arguments["--name"])
|
||||||
|
subprocess.check_call(git_cmd)
|
||||||
else:
|
else:
|
||||||
filename = url.split('/')[-1]
|
filename = url.split('/')[-1]
|
||||||
|
|
||||||
|
5
configure
vendored
5
configure
vendored
@ -276,8 +276,7 @@ EOF
|
|||||||
rm ${QP_ROOT}/external/opam_installer.sh
|
rm ${QP_ROOT}/external/opam_installer.sh
|
||||||
source ${OPAMROOT}/opam-init/init.sh > /dev/null 2> /dev/null || true
|
source ${OPAMROOT}/opam-init/init.sh > /dev/null 2> /dev/null || true
|
||||||
|
|
||||||
${QP_ROOT}/bin/opam init --disable-sandboxing --verbose \
|
${QP_ROOT}/bin/opam init --disable-sandboxing --verbose --yes
|
||||||
--yes --comp=4.07.0
|
|
||||||
|
|
||||||
eval $(${QP_ROOT}/bin/opam env)
|
eval $(${QP_ROOT}/bin/opam env)
|
||||||
opam install -y ${OCAML_PACKAGES} || exit 1
|
opam install -y ${OCAML_PACKAGES} || exit 1
|
||||||
@ -292,7 +291,7 @@ EOF
|
|||||||
rm \${QP_ROOT}/external/opam_installer.sh
|
rm \${QP_ROOT}/external/opam_installer.sh
|
||||||
source \${OPAMROOT}/opam-init/init.sh > /dev/null 2> /dev/null || true
|
source \${OPAMROOT}/opam-init/init.sh > /dev/null 2> /dev/null || true
|
||||||
\${QP_ROOT}/bin/opam init --disable-sandboxing --verbose \
|
\${QP_ROOT}/bin/opam init --disable-sandboxing --verbose \
|
||||||
--yes --comp=4.07.0
|
--yes
|
||||||
eval \$(\${QP_ROOT}/bin/opam env)
|
eval \$(\${QP_ROOT}/bin/opam env)
|
||||||
opam install -y \${OCAML_PACKAGES} || exit 1
|
opam install -y \${OCAML_PACKAGES} || exit 1
|
||||||
EOF
|
EOF
|
||||||
|
@ -195,6 +195,20 @@ BEGIN_PROVIDER [double precision, weight_at_r, (n_points_integration_angular,n_p
|
|||||||
enddo
|
enddo
|
||||||
accu = 1.d0/accu
|
accu = 1.d0/accu
|
||||||
weight_at_r(l,k,j) = tmp_array(j) * accu
|
weight_at_r(l,k,j) = tmp_array(j) * accu
|
||||||
|
if(isnan(weight_at_r(l,k,j)))then
|
||||||
|
print*,'isnan(weight_at_r(l,k,j))'
|
||||||
|
print*,l,k,j
|
||||||
|
accu = 0.d0
|
||||||
|
do i = 1, nucl_num
|
||||||
|
! function defined for each atom "i" by equation (13) and (21) with k == 3
|
||||||
|
tmp_array(i) = cell_function_becke(r,i) ! P_n(r)
|
||||||
|
print*,i,tmp_array(i)
|
||||||
|
! Then you compute the summ the P_n(r) function for each of the "r" points
|
||||||
|
accu += tmp_array(i)
|
||||||
|
enddo
|
||||||
|
write(*,'(100(F16.10,X))')tmp_array(j) , accu
|
||||||
|
stop
|
||||||
|
endif
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
@ -221,6 +235,12 @@ BEGIN_PROVIDER [double precision, final_weight_at_r, (n_points_integration_angul
|
|||||||
contrib_integration = derivative_knowles_function(alpha_knowles(int(nucl_charge(j))),m_knowles,x)&
|
contrib_integration = derivative_knowles_function(alpha_knowles(int(nucl_charge(j))),m_knowles,x)&
|
||||||
*knowles_function(alpha_knowles(int(nucl_charge(j))),m_knowles,x)**2
|
*knowles_function(alpha_knowles(int(nucl_charge(j))),m_knowles,x)**2
|
||||||
final_weight_at_r(k,i,j) = weights_angular_points(k) * weight_at_r(k,i,j) * contrib_integration * dr_radial_integral
|
final_weight_at_r(k,i,j) = weights_angular_points(k) * weight_at_r(k,i,j) * contrib_integration * dr_radial_integral
|
||||||
|
if(isnan(final_weight_at_r(k,i,j)))then
|
||||||
|
print*,'isnan(final_weight_at_r(k,i,j))'
|
||||||
|
print*,k,i,j
|
||||||
|
write(*,'(100(F16.10,X))')weights_angular_points(k) , weight_at_r(k,i,j) , contrib_integration , dr_radial_integral
|
||||||
|
stop
|
||||||
|
endif
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
@ -31,6 +31,10 @@ double precision function cell_function_becke(r,atom_number)
|
|||||||
double precision :: mu_ij,nu_ij
|
double precision :: mu_ij,nu_ij
|
||||||
double precision :: distance_i,distance_j,step_function_becke
|
double precision :: distance_i,distance_j,step_function_becke
|
||||||
integer :: j
|
integer :: j
|
||||||
|
if(int(nucl_charge(atom_number))==0)then
|
||||||
|
cell_function_becke = 0.d0
|
||||||
|
return
|
||||||
|
endif
|
||||||
distance_i = (r(1) - nucl_coord_transp(1,atom_number) ) * (r(1) - nucl_coord_transp(1,atom_number))
|
distance_i = (r(1) - nucl_coord_transp(1,atom_number) ) * (r(1) - nucl_coord_transp(1,atom_number))
|
||||||
distance_i += (r(2) - nucl_coord_transp(2,atom_number) ) * (r(2) - nucl_coord_transp(2,atom_number))
|
distance_i += (r(2) - nucl_coord_transp(2,atom_number) ) * (r(2) - nucl_coord_transp(2,atom_number))
|
||||||
distance_i += (r(3) - nucl_coord_transp(3,atom_number) ) * (r(3) - nucl_coord_transp(3,atom_number))
|
distance_i += (r(3) - nucl_coord_transp(3,atom_number) ) * (r(3) - nucl_coord_transp(3,atom_number))
|
||||||
@ -38,6 +42,7 @@ double precision function cell_function_becke(r,atom_number)
|
|||||||
cell_function_becke = 1.d0
|
cell_function_becke = 1.d0
|
||||||
do j = 1, nucl_num
|
do j = 1, nucl_num
|
||||||
if(j==atom_number)cycle
|
if(j==atom_number)cycle
|
||||||
|
if(int(nucl_charge(j))==0)cycle
|
||||||
distance_j = (r(1) - nucl_coord_transp(1,j) ) * (r(1) - nucl_coord_transp(1,j))
|
distance_j = (r(1) - nucl_coord_transp(1,j) ) * (r(1) - nucl_coord_transp(1,j))
|
||||||
distance_j+= (r(2) - nucl_coord_transp(2,j) ) * (r(2) - nucl_coord_transp(2,j))
|
distance_j+= (r(2) - nucl_coord_transp(2,j) ) * (r(2) - nucl_coord_transp(2,j))
|
||||||
distance_j+= (r(3) - nucl_coord_transp(3,j) ) * (r(3) - nucl_coord_transp(3,j))
|
distance_j+= (r(3) - nucl_coord_transp(3,j) ) * (r(3) - nucl_coord_transp(3,j))
|
||||||
|
@ -16,3 +16,10 @@ doc: Type of density
|
|||||||
doc: if [no_core_dm] then all elements of the density matrix involving at least one orbital set as core are set to zero
|
doc: if [no_core_dm] then all elements of the density matrix involving at least one orbital set as core are set to zero
|
||||||
interface: ezfio, provider, ocaml
|
interface: ezfio, provider, ocaml
|
||||||
default: full_density
|
default: full_density
|
||||||
|
|
||||||
|
[normalize_dm]
|
||||||
|
type: logical
|
||||||
|
doc: Type of density
|
||||||
|
doc: if .True., then you normalize the no_core_dm to elec_alpha_num - n_core_orb and elec_beta_num - n_core_orb
|
||||||
|
interface: ezfio, provider, ocaml
|
||||||
|
default: True
|
||||||
|
@ -29,6 +29,20 @@ BEGIN_PROVIDER [double precision, one_e_dm_mo_alpha_for_dft, (mo_num,mo_num, N_s
|
|||||||
one_e_dm_mo_alpha_for_dft(i,j,:) = 0.d0
|
one_e_dm_mo_alpha_for_dft(i,j,:) = 0.d0
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
if(normalize_dm)then
|
||||||
|
double precision :: elec_alpha_frozen_num, elec_alpha_valence(N_states)
|
||||||
|
elec_alpha_frozen_num = elec_alpha_num - n_core_orb
|
||||||
|
elec_alpha_valence = 0.d0
|
||||||
|
integer :: istate
|
||||||
|
do istate = 1, N_states
|
||||||
|
do i = 1, mo_num
|
||||||
|
elec_alpha_valence(istate) += one_e_dm_mo_alpha_for_dft(i,i,istate)
|
||||||
|
enddo
|
||||||
|
elec_alpha_valence(istate) = elec_alpha_frozen_num/elec_alpha_valence(istate)
|
||||||
|
one_e_dm_mo_alpha_for_dft(:,:,istate) = one_e_dm_mo_alpha_for_dft(:,:,istate) * elec_alpha_valence(istate)
|
||||||
|
enddo
|
||||||
|
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
@ -64,6 +78,19 @@ BEGIN_PROVIDER [double precision, one_e_dm_mo_beta_for_dft, (mo_num,mo_num, N_st
|
|||||||
one_e_dm_mo_beta_for_dft(i,j,:) = 0.d0
|
one_e_dm_mo_beta_for_dft(i,j,:) = 0.d0
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
if(normalize_dm)then
|
||||||
|
double precision :: elec_beta_valence(N_states),elec_beta_frozen_num
|
||||||
|
elec_beta_frozen_num = elec_beta_num - n_core_orb
|
||||||
|
elec_beta_valence = 0.d0
|
||||||
|
integer :: istate
|
||||||
|
do istate = 1, N_states
|
||||||
|
do i = 1, mo_num
|
||||||
|
elec_beta_valence(istate) += one_e_dm_mo_beta_for_dft(i,i,istate)
|
||||||
|
enddo
|
||||||
|
elec_beta_valence(istate) = elec_beta_frozen_num/elec_beta_valence(istate)
|
||||||
|
one_e_dm_mo_beta_for_dft(:,:,istate) = one_e_dm_mo_beta_for_dft(:,:,istate) * elec_beta_valence(istate)
|
||||||
|
enddo
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
|
@ -227,6 +227,8 @@ END_PROVIDER
|
|||||||
|
|
||||||
BEGIN_PROVIDER [double precision, one_e_dm_alpha_at_r, (n_points_final_grid,N_states) ]
|
BEGIN_PROVIDER [double precision, one_e_dm_alpha_at_r, (n_points_final_grid,N_states) ]
|
||||||
&BEGIN_PROVIDER [double precision, one_e_dm_beta_at_r, (n_points_final_grid,N_states) ]
|
&BEGIN_PROVIDER [double precision, one_e_dm_beta_at_r, (n_points_final_grid,N_states) ]
|
||||||
|
&BEGIN_PROVIDER [double precision, elec_beta_num_grid_becke , (N_states) ]
|
||||||
|
&BEGIN_PROVIDER [double precision, elec_alpha_num_grid_becke , (N_states) ]
|
||||||
implicit none
|
implicit none
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
! one_e_dm_alpha_at_r(i,istate) = n_alpha(r_i,istate)
|
! one_e_dm_alpha_at_r(i,istate) = n_alpha(r_i,istate)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
BEGIN_PROVIDER [ double precision, slater_bragg_radii, (100)]
|
BEGIN_PROVIDER [ double precision, slater_bragg_radii, (0:100)]
|
||||||
implicit none
|
implicit none
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
! atomic radii in Angstrom defined in table I of JCP 41, 3199 (1964) Slater
|
! atomic radii in Angstrom defined in table I of JCP 41, 3199 (1964) Slater
|
||||||
@ -54,10 +54,10 @@ BEGIN_PROVIDER [ double precision, slater_bragg_radii, (100)]
|
|||||||
|
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
BEGIN_PROVIDER [double precision, slater_bragg_radii_ua, (100)]
|
BEGIN_PROVIDER [double precision, slater_bragg_radii_ua, (0:100)]
|
||||||
implicit none
|
implicit none
|
||||||
integer :: i
|
integer :: i
|
||||||
do i = 1, 100
|
do i = 0, 100
|
||||||
slater_bragg_radii_ua(i) = slater_bragg_radii(i) * 1.889725989d0
|
slater_bragg_radii_ua(i) = slater_bragg_radii(i) * 1.889725989d0
|
||||||
enddo
|
enddo
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
Loading…
Reference in New Issue
Block a user