10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-07-12 06:13:51 +02:00

removed stupid bug in scf_utils/scf_density_matrix_ao.irp.f in the case of elec_beta_num==0

This commit is contained in:
eginer 2022-06-30 18:02:04 +02:00
parent 25201fc4be
commit 17d20c6880
2 changed files with 11 additions and 7 deletions

View File

@ -68,5 +68,5 @@ interface: ezfio,provider,ocaml
type: Threshold type: Threshold
doc: Thresholds of non-symetric Davidson's algorithm doc: Thresholds of non-symetric Davidson's algorithm
interface: ezfio,provider,ocaml interface: ezfio,provider,ocaml
default: 1.e-5 default: 1.e-6

View File

@ -3,11 +3,13 @@ BEGIN_PROVIDER [double precision, SCF_density_matrix_ao_alpha, (ao_num,ao_num) ]
BEGIN_DOC BEGIN_DOC
! $C.C^t$ over $\alpha$ MOs ! $C.C^t$ over $\alpha$ MOs
END_DOC END_DOC
SCF_density_matrix_ao_alpha = 0.d0
call dgemm('N','T',ao_num,ao_num,elec_alpha_num,1.d0, & if(elec_alpha_num.gt.0)then
mo_coef, size(mo_coef,1), & call dgemm('N','T',ao_num,ao_num,elec_alpha_num,1.d0, &
mo_coef, size(mo_coef,1), 0.d0, & mo_coef, size(mo_coef,1), &
SCF_density_matrix_ao_alpha, size(SCF_density_matrix_ao_alpha,1)) mo_coef, size(mo_coef,1), 0.d0, &
SCF_density_matrix_ao_alpha, size(SCF_density_matrix_ao_alpha,1))
endif
END_PROVIDER END_PROVIDER
@ -16,11 +18,13 @@ BEGIN_PROVIDER [ double precision, SCF_density_matrix_ao_beta, (ao_num,ao_num)
BEGIN_DOC BEGIN_DOC
! $C.C^t$ over $\beta$ MOs ! $C.C^t$ over $\beta$ MOs
END_DOC END_DOC
SCF_density_matrix_ao_beta = 0.d0
if(elec_beta_num.gt.0)then
call dgemm('N','T',ao_num,ao_num,elec_beta_num,1.d0, & call dgemm('N','T',ao_num,ao_num,elec_beta_num,1.d0, &
mo_coef, size(mo_coef,1), & mo_coef, size(mo_coef,1), &
mo_coef, size(mo_coef,1), 0.d0, & mo_coef, size(mo_coef,1), 0.d0, &
SCF_density_matrix_ao_beta, size(SCF_density_matrix_ao_beta,1)) SCF_density_matrix_ao_beta, size(SCF_density_matrix_ao_beta,1))
endif
END_PROVIDER END_PROVIDER