10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-06-02 11:25:26 +02:00

added 21.rsks.bats

This commit is contained in:
Emmanuel Giner 2019-01-02 16:10:15 +01:00
parent 599a91d5aa
commit 75ca9b2160
12 changed files with 124 additions and 20 deletions

View File

@ -55,14 +55,17 @@ Multiple programs were developed with the |qp|, such as:
- Selected Full-CI + Epstein-Nesbet PT2 (CIPSI) :cite:`Caffarel_2016,Caffarel_2016.2,Loos_2018,Scemama_2018,Dash_2018`
- Hybrid stochastic/deterministic MR-PT2 :cite:`Garniron_2017.2,Loos_2018`
- Orbital optimization for open-shell systems :cite:`Giner2016Mar,Giner_2017.3`
- CIS, CISD, MP2
- Selected CISD
- Jeziorsky-Monkhorst MR-PT2 :cite:`Giner_2017`
- Effective Hamiltonian for variational MR wave functions :cite:`Giner_2017.2`
- Selected CAS+SD
- Selected difference-dedicated CI (DD-CI)
- Multi-Reference Coupled Cluster (MR-CCSD) :cite:`Giner_2016,Garniron_2017`
- Shifted-Bk with CIPSI :cite:`Garniron_2018`
- CIPSI with range-separated DFT
- CIPSI with range-separated DFT (plugins at `<https://gitlab.com/eginer/qp_plugins_eginer>`_)
- DFT for basis set corrections :cite:`Giner_2018`
All these programs can generate ground and excited states, and spin pure wave
functions (eigenstates of |S^2|).

View File

@ -10,13 +10,17 @@ becke_numerical_grid
This module contains all quantities needed to build the Becke's grid used in general for DFT integration. Note that it can be used for whatever integration in R^3 as long as the functions to be integrated are mostly concentrated near the atomic regions.
This grid is built as the reunion of a spherical grid around each atom. Each spherical grid contains a certain number of radial and angular points.
This grid is built as the reunion of a spherical grid around each atom. Each spherical grid contains
a certain number of radial and angular points. No pruning is done on the angular part of the grid.
The main keyword for that modue is:
* :option:`becke_numerical_grid grid_type_sgn` which controls the precision of the grid according the standard **SG-n** grids. This keyword controls the two providers `n_points_integration_angular` `n_points_radial_grid`.
The main providers of that module are:
* :option:`becke_numerical_grid n_points_integration_angular` which is the number of angular integration points. WARNING: it obeys to specific rules so it cannot be any integer number. Some of the possible values are [ 50 | 74 | 266 | 590 | 1202 | 2030 | 5810 ] for instance. See :file:`angular.f` for more details.
* :option:`becke_numerical_grid n_points_radial_grid` which is the number of radial angular points. This can be any strictly positive integer. Nevertheless, a minimum of 50 is in general necessary.
* `n_points_integration_angular` which is the number of angular integration points. WARNING: it obeys to specific rules so it cannot be any integer number. Some of the possible values are [ 50 | 74 | 170 | 194 | 266 | 302 | 590 | 1202 | 2030 | 5810 ] for instance. See :file:`angular.f` for more details.
* `n_points_radial_grid` which is the number of radial angular points. This can be any strictly positive integer. Nevertheless, a minimum of 50 is in general necessary.
* `final_grid_points` which are the (x,y,z) coordinates of the grid points.
* `final_weight_at_r_vector` which are the weights at each grid point
@ -78,17 +82,11 @@ See next section for explanations and citation policies.
EZFIO parameters
----------------
.. option:: n_points_integration_angular
.. option:: grid_type_sgn
Number of angular points per atom for 3d numerical integration, needed for DFT for example [ 50 | 74 | 266 | 590 | 1202 | 2030 | 5810 ]
Type of grid used for the Becke's numerical grid. Can be, by increasing accuracy: [ 0 | 1 | 2 | 3 ]
Default: 590
.. option:: n_points_radial_grid
Number of radial points per atom for 3d numerical integration, needed for DFT for example
Default: 60
Default: 2
Providers
@ -291,6 +289,38 @@ Providers
.. c:var:: n_points_integration_angular
.. code:: text
integer :: n_points_radial_grid
integer :: n_points_integration_angular
File: :file:`grid_becke.irp.f`
n_points_radial_grid = number of radial grid points per atom
n_points_integration_angular = number of angular grid points per atom
These numbers are automatically set by setting the grid_type_sgn parameter
.. c:var:: n_points_radial_grid
.. code:: text
integer :: n_points_radial_grid
integer :: n_points_integration_angular
File: :file:`grid_becke.irp.f`
n_points_radial_grid = number of radial grid points per atom
n_points_integration_angular = number of angular grid points per atom
These numbers are automatically set by setting the grid_type_sgn parameter
.. c:var:: weight_at_r
.. code:: text

View File

@ -73,6 +73,20 @@ Subroutines / functions
.. c:function:: print_r2
.. code:: text
subroutine print_r2
File: :file:`print_r2.irp.f`
.. c:function:: print_wf
.. code:: text

View File

@ -258,6 +258,7 @@ Index of Providers
* :c:data:`grad_aos_dvx_beta_pbe_w`
* :c:data:`grid_points_per_atom`
* :c:data:`grid_points_radial`
* :c:data:`grid_type_sgn`
* :c:data:`h0_type`
* :c:data:`h_apply_buffer_allocated`
* :c:data:`h_apply_buffer_lock`
@ -1156,6 +1157,7 @@ Index of Subroutines/Functions
* :c:func:`print_generators_bitmasks_particles`
* :c:func:`print_generators_bitmasks_particles_for_one_generator`
* :c:func:`print_memory_usage`
* :c:func:`print_r2`
* :c:func:`print_spindet`
* :c:func:`print_summary`
* :c:func:`print_wf`

View File

@ -177,6 +177,20 @@
title = {Orthogonal Valence Bond Hamiltonians incorporating dynamical correlation effects},
journal = {Computational and Theoretical Chemistry}
}
@article{Giner_2017.3,
author = {Giner, Emmanuel and Tenti, Lorenzo and Angeli, Celestino and Ferré, Nicolas},
title = {Computation of the Isotropic Hyperfine Coupling Constant: Efficiency and Insights from a New Approach Based on Wave Function Theory},
journal = {Journal of Chemical Theory and Computation},
volume = {13},
number = {2},
pages = {475-487},
year = {2017},
doi = {10.1021/acs.jctc.6b00827},
note ={PMID: 28094936},
URL = {https://doi.org/10.1021/acs.jctc.6b00827},
eprint = {https://doi.org/10.1021/acs.jctc.6b00827}
}
@article{Giner2016Mar,
author = {Giner, Emmanuel and Angeli, Celestino},
title = {{Spin density and orbital optimization in open shell systems: A rational and computationally efficient proposal}},

View File

@ -20,7 +20,7 @@ BEGIN_PROVIDER [integer, n_points_final_grid]
enddo
enddo
print*,'n_points_final_grid = ',n_points_final_grid
print*,'n max point = ',n_points_integration_angular*n_points_radial_grid*nucl_num
print*,'n max point = ',n_points_integration_angular*(n_points_radial_grid*nucl_num - 1)
END_PROVIDER
BEGIN_PROVIDER [double precision, final_grid_points, (3,n_points_final_grid)]

View File

@ -18,6 +18,12 @@ subroutine run
print *, 'energy = ',CI_energy(i)
print *, 'E_corr = ',CI_electronic_energy(i) - ref_bitmask_energy
enddo
print*,'******************************'
print*,'Excitation energy '
do i = 2, N_states
print*, i ,CI_energy(i) - CI_energy(1)
enddo
call ezfio_set_cis_energy(CI_energy)
psi_coef = ci_eigenvectors
SOFT_TOUCH psi_coef

View File

@ -52,7 +52,6 @@
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0,aos_in_r_array,ao_num,aos_sr_vx_beta_LDA_w(1,1,istate) ,n_points_final_grid,0.d0,potential_sr_x_beta_ao_LDA(1,1,istate),ao_num)
enddo
call wall_time(wall_2)
print*,'time to provide potential_sr_x/c_alpha/beta_ao_LDA = ',wall_2 - wall_1
END_PROVIDER

View File

@ -58,6 +58,7 @@ subroutine run
! Choose SCF algorithm
call Roothaan_Hall_SCF
call ezfio_set_hartree_fock_energy(SCF_energy)
end

View File

@ -0,0 +1,37 @@
#!/usr/bin/env bats
source $QP_ROOT/tests/bats/common.bats.sh
function run() {
thresh=1.e-8
qp_edit -c $1
ezfio set_file $1
ezfio set scf_utils thresh_scf 1.e-10
echo "short_range_PBE" > $1/dft_keywords/exchange_functional
echo "short_range_PBE" > $1/dft_keywords/correlation_functional
echo "0.5" > $1/ao_two_e_erf_integrals/mu_erf
echo "1" > $1/becke_numerical_grid/grid_type_sgn
qp_run rs_ks_scf $1
energy="$(ezfio get kohn_sham_rs energy)"
eq $energy $2 $thresh
}
@test "H3COH" {
run h3coh.ezfio -115.50238225208
}
@test "HCN" {
run hcn.ezfio -93.26674673761752
}
@test "N2" {
run n2.ezfio -109.404692225719
}
@test "SiH2_3B1" {
run sih2_3b1.ezfio -290.371745382958
}

View File

@ -92,10 +92,8 @@ subroutine run
mo_label = "Canonical"
! Choose SCF algorithm
! call damping_SCF ! Deprecated routine
call Roothaan_Hall_SCF
call ezfio_set_kohn_sham_rs_energy(SCF_energy)
write(*, '(A22,X,F16.10)') 'one_electron_energy = ',one_electron_energy
write(*, '(A22,X,F16.10)') 'two_electron_energy = ',two_electron_energy

View File

@ -158,8 +158,8 @@ END_DOC
call save_mos
endif
call write_double(6, Energy_SCF, 'Hartree-Fock energy')
call ezfio_set_hartree_fock_energy(Energy_SCF)
call write_double(6, Energy_SCF, 'SCF energy ')
! call ezfio_set_hartree_fock_energy(Energy_SCF)
call write_time(6)