10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-09-27 03:51:01 +02:00

Merge pull request #43 from scemama/master

poulet basquaise
This commit is contained in:
Emmanuel Giner 2018-12-31 00:11:53 +01:00 committed by GitHub
commit 8d75b5b609
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 218 additions and 62 deletions

View File

@ -2,14 +2,15 @@
source $QP_ROOT/tests/bats/common.bats.sh
function run_CIS() {
thresh=5.e-9
function run() {
thresh=5.e-7
test_exe cis || skip
qp_edit -c $1
ezfio set_file $1
ezfio set determinants n_states 3
ezfio set davidson threshold_davidson 1.e-10
ezfio set davidson threshold_davidson 1.e-12
# echo "Write" > $1/mo_two_e_integrals/disk_access_mo_integrals
qp_set_frozen_core $1
qp_run cis $1
energy1="$(ezfio get cis energy | tr '[]' ' ' | cut -d ',' -f 1)"
energy2="$(ezfio get cis energy | tr '[]' ' ' | cut -d ',' -f 2)"
@ -21,18 +22,95 @@ function run_CIS() {
#=== H2O
@test "qp_set_mo_class H2O cc-pVDZ" {
qp_set_mo_class h2o.ezfio -core "[1]" -act "[2-12]" -del "[13-24]"
@test "HBO" {
run hbo.ezfio -100.018582307658 -99.6982685747284 -99.6982685747283
}
@test "CIS H2O cc-pVDZ" {
run_CIS h2o.ezfio -76.0270218693035 -75.6812512934229 -75.6174524564961
@test "H2O" {
run h2o.ezfio -76.0270218681105 -75.6854407469221 -75.6196755733432
}
@test "CIS H2O VDZ pseudo" {
qp_set_frozen_core h2o_pseudo.ezfio
run_CIS h2o_pseudo.ezfio -16.9483703905542 -16.5790993717898 -16.5074569116264
@test "[Cu(NH3)4]2+" {
run cu_nh3_4_2plus.ezfio -1862.97958709248 -1862.92454796197 -1862.91130872182
}
@test "C2H2" {
run c2h2.ezfio -12.1214401949631 -11.86823108084437 -11.86823108084389
}
@test "ClO" {
run clo.ezfio -534.263560525680 -534.256601571199 -534.062020844428
}
@test "DHNO" {
run dhno.ezfio -130.447228845699 -130.357180876975 -130.219625729558
}
@test "H3COH" {
run h3coh.ezfio -114.986503059639 -114.649121836046 -114.578365912794
}
@test "HCN" {
run hcn.ezfio -92.8871750003801 -92.6089719727410 -92.6089719727409
}
@test "N2" {
run n2.ezfio -108.9834897853049 -108.6496539410780 -108.6496539410771
}
@test "SiH2_3B1" {
run sih2_3b1.ezfio -289.952916622430 -289.901707301173 -289.715063453770
}
@test "SO" {
run so.ezfio -25.7502241401925 -25.5862791897799 -25.5829342971276
}
@test "CH4" {
run ch4.ezfio -40.1996180778616 -39.7936150141939 -39.7936150141734
}
@test "CO2" {
run co2.ezfio -187.650710886151 -187.291641391714 -187.291641391713
}
@test "F2" {
run f2.ezfio -198.764357823385 -198.575548537096 -198.575548537096
}
@test "HCO" {
run hco.ezfio -113.094024225042 -113.002362525915 -112.894730863318
}
@test "NH3" {
run nh3.ezfio -56.2178342898186 -55.9199930723028 -55.8475617160862
}
@test "SiH3" {
run sih3.ezfio -5.45916474249436 -5.23512810272682 -5.23512806272007
}
@test "ClF" {
run clf.ezfio -558.844257066356 -558.664418728406 -558.664418728405
}
@test "H2O2" {
run h2o2.ezfio -150.780660847001 -150.546208866263 -150.483274551717
}
@test "H2S" {
run h2s.ezfio -398.694413042222 -398.447164835271 -398.412784774083
}
@test "N2H4" {
run n2h4.ezfio -111.179991667947 -110.894116344878 -110.855788839735
}
@test "OH" {
run oh.ezfio -75.4314648243896 -75.4254639668256 -75.2707675632313
}
@test "SO2" {
run so2.ezfio -41.5580019075504 -41.3823293845389 -41.3551232664878
}

View File

@ -3,101 +3,101 @@
source $QP_ROOT/tests/bats/common.bats.sh
function run {
INPUT=$1
EZ=${INPUT/.xyz/.ezfio}
EZ=${EZ/.zmt/.ezfio}
MULT=$2
CHARGE=$3
BASIS=$4
local INPUT=$1
local EZ=${INPUT/.xyz/.ezfio}
local EZ=${EZ/.zmt/.ezfio}
local MULT=$2
local CHARGE=$3
local BASIS=$4
if [[ -n $5 ]] ; then
PSEUDO="-p $5"
local PSEUDO="-p $5"
fi
cp ${QP_ROOT}/tests/input/$INPUT .
rm -rf $EZ
qp_create_ezfio_from_xyz \
$INPUT -b "$BASIS" -m $MULT -c $CHARGE $PSEUDO -o $EZ
qp_edit -c $EZ
echo "Write" > ${EZ}/ao_two_e_integrals/disk_access_ao_integrals
# echo "Write" > ${EZ}/ao_two_e_integrals/disk_access_ao_integrals
}
@test "qp_create c2h2.xyz" {
@test "C2H2" {
run c2h2.xyz 1 0 vdz-bfd bfd
}
@test "qp_create clo.xyz" {
@test "ClO" {
run clo.xyz 2 0 cc-pvdz
}
@test "qp_create dhno.xyz" {
run dhno.xyz 2 0 chipman-dzp
@test "DHNO" {
run dhno.xyz 2 0 "chipman-dzp"
}
@test "qp_create h3coh.xyz" {
@test "H3COH" {
run h3coh.xyz 1 0 6-31g
}
@test "qp_create hcn.xyz" {
@test "HCN" {
run hcn.xyz 1 0 aug-cc-pvdz
}
@test "qp_create n2.xyz" {
@test "N2" {
run n2.xyz 1 0 cc-pvtz
}
@test "qp_create sih2_3b1.xyz" {
@test "SiH2_3B1" {
run sih2_3b1.xyz 1 0 6-31g
}
@test "qp_create so.xyz" {
@test "SO" {
run so.xyz 3 0 vdz-bfd bfd
}
@test "qp_create ch4.xyz" {
run ch4.xyz 1 0 aug-cc-pvtz
@test "CH4" {
run ch4.xyz 1 0 aug-cc-pvdz
}
@test "qp_create co2.xyz" {
@test "CO2" {
run co2.xyz 1 0 cc-pvdz
}
@test "qp_create f2.zmt" {
@test "F2" {
run f2.zmt 1 0 "Def2-TZVP"
}
@test "qp_create hco.xyz" {
@test "HCO" {
run hco.xyz 2 0 "Ahlrichs VDZ"
}
@test "qp_create nh3.xyz" {
run nh3.xyz 1 0 cc-pvdz
@test "NH3" {
run nh3.xyz 1 0 cc-pvtz
}
@test "qp_create sih3.xyz" {
@test "SiH3" {
run sih3.xyz 2 0 vdz-bfd bfd
}
@test "qp_create clf.xyz" {
@test "ClF" {
run clf.xyz 1 0 cc-pvdz
}
@test "qp_create h2o2.zmt" {
@test "H2O2" {
run h2o2.zmt 1 0 cc-pvdz
}
@test "qp_create h2s.xyz" {
@test "H2S" {
run h2s.xyz 1 0 cc-pvdz
}
@test "qp_create n2h4.zmt" {
@test "N2H4" {
run n2h4.zmt 1 0 cc-pvdz
}
@test "qp_create oh.xyz" {
@test "OH" {
run oh.xyz 2 0 "Roos Augmented Double Zeta ANO"
}
@test "qp_create so2.xyz" {
@test "SO2" {
run so2.xyz 1 0 vtz-bfd bfd
}

View File

@ -3,23 +3,22 @@
source $QP_ROOT/tests/bats/common.bats.sh
function run {
INPUT=$1
EZ=$2
local INPUT=$1
local EZ=$2
cp ${QP_ROOT}/tests/input/$INPUT .
qp_convert_output_to_ezfio $INPUT -o $EZ
qp_edit -c $EZ
echo "Write" > ${EZ}/ao_two_e_integrals/disk_access_ao_integrals
}
#=== Convert
@test "gamess convert hbo.gms.out" {
@test "HBO GAMESS" {
run hbo.gms.out hbo.ezfio
}
@test "g09 convert h2o.log" {
@test "H2O G09" {
run h2o.log h2o.ezfio
}
@test "gamess convert cu_nh3_4_2plus.gms.out" {
@test "[Cu(NH3)4]2+ GAMESS" {
run cu_nh3_4_2plus.gms.out cu_nh3_4_2plus.ezfio
}

View File

@ -16,20 +16,95 @@ function run() {
@test "SCF HBO" {
@test "HBO" {
run hbo.ezfio -100.018582259096
}
@test "SCF H2O" {
@test "H2O" {
run h2o.ezfio -0.760270218692179E+02
}
@test "SCF H2O" {
@test "[Cu(NH3)4]2+" {
run cu_nh3_4_2plus.ezfio -1862.97590388214
}
@test "SCF DHNO chipman-dzp" {
@test "C2H2" {
run c2h2.ezfio -12.12144019495306
}
@test "ClO" {
run clo.ezfio -534.2496714154559
}
@test "DHNO" {
run dhno.ezfio -130.4278777822
}
@test "H3COH" {
run h3coh.ezfio -114.9865030596373
}
@test "HCN" {
run hcn.ezfio -92.88717500035233
}
@test "N2" {
run n2.ezfio -108.9834897852979
}
@test "SiH2_3B1" {
run sih2_3b1.ezfio -289.9529166224221
}
@test "SO" {
run so.ezfio -25.71752633718843
}
@test "CH4" {
run ch4.ezfio -40.19961807784367
}
@test "CO2" {
run co2.ezfio -187.6507108861204
}
@test "F2" {
run f2.ezfio -198.7643578233773
}
@test "HCO" {
run hco.ezfio -113.0862778269114
}
@test "NH3" {
run nh3.ezfio -56.21783428976567
}
@test "SiH3" {
run sih3.ezfio -5.455398769158780
}
@test "ClF" {
run clf.ezfio -558.8442570663570
}
@test "H2O2" {
run h2o2.ezfio -150.7806608469964
}
@test "H2S" {
run h2s.ezfio -398.6944130421982
}
@test "N2H4" {
run n2h4.ezfio -111.1799916679009
}
@test "OH" {
run oh.ezfio -75.42025413469165
}
@test "SO2" {
run so2.ezfio -41.55800190733211
}

View File

@ -2,5 +2,4 @@
type: Threshold
doc: Energy HF
interface: ezfio
default: 0.

View File

@ -20,7 +20,7 @@
if (do_direct_integrals) then
!$OMP PARALLEL DEFAULT(NONE) &
!$OMP PRIVATE(i,j,l,k1,k,integral,ii,jj,kk,ll,i8,keys,values,p,q,r,s,i0,j0,k0,l0, &
!$OMP PRIVATE(i,j,l,k1,k,integral,ii,jj,kk,ll,keys,values,p,q,r,s,i0,j0,k0,l0, &
!$OMP ao_bi_elec_integral_alpha_tmp,ao_bi_elec_integral_beta_tmp, c0, c1, c2, &
!$OMP local_threshold)&
!$OMP SHARED(ao_num,SCF_density_matrix_ao_alpha,SCF_density_matrix_ao_beta,&
@ -34,7 +34,7 @@
ao_bi_elec_integral_beta_tmp = 0.d0
q = ao_num*ao_num*ao_num*ao_num
!$OMP DO SCHEDULE(dynamic)
!$OMP DO SCHEDULE(static,1)
do p=1_8,q
call bielec_integrals_index_reverse(kk,ii,ll,jj,p)
if ( (kk(1)>ao_num).or. &
@ -100,7 +100,7 @@
PROVIDE ao_bielec_integrals_in_map
integer(omp_lock_kind) :: lck(ao_num)
integer*8 :: i8
integer(map_size_kind) :: i8
integer :: ii(8), jj(8), kk(8), ll(8), k2
integer(cache_map_size_kind) :: n_elements_max, n_elements
integer(key_kind), allocatable :: keys(:)
@ -120,7 +120,6 @@
ao_bi_elec_integral_beta_tmp = 0.d0
!$OMP DO SCHEDULE(static,1)
!DIR$ NOVECTOR
do i8=0_8,ao_integrals_map%map_size
n_elements = n_elements_max
call get_cache_map(ao_integrals_map,i8,keys,values,n_elements)
@ -144,10 +143,12 @@
enddo
enddo
enddo
!$OMP END DO NOWAIT
!$OMP END DO
!$OMP BARRIER
!$OMP CRITICAL
ao_bi_elec_integral_alpha += ao_bi_elec_integral_alpha_tmp
!$OMP END CRITICAL
!$OMP BARRIER
!$OMP CRITICAL
ao_bi_elec_integral_beta += ao_bi_elec_integral_beta_tmp
!$OMP END CRITICAL

View File

@ -26,7 +26,7 @@ default: 500
type: Positive_float
doc: Energy shift on the virtual MOs to improve SCF convergence
interface: ezfio,provider,ocaml
default: 0.1
default: 0.
[scf_algorithm]
type: character*(32)

View File

@ -110,7 +110,11 @@ END_DOC
do while (Delta_energy_SCF .ge. 0.d0)
mo_coef(1:ao_num,1:mo_tot_num) = mo_coef_save
TOUCH mo_coef
if (level_shift <= 0.d0) then
level_shift = 1.d0
else
level_shift = level_shift * 2.0d0
endif
mo_coef(1:ao_num,1:mo_tot_num) = eigenvectors_Fock_matrix_MO(1:ao_num,1:mo_tot_num)
if(no_oa_or_av_opt)then
call reorder_active_orb