mirror of
https://github.com/LCPQ/quantum_package
synced 2024-09-27 03:51:01 +02:00
some cleaning and more explicit README
This commit is contained in:
parent
9dc1408907
commit
d926b20eab
5
TODO
5
TODO
@ -7,12 +7,7 @@
|
||||
|
||||
* Creer une page web pas trop degueu et la mettre ici : http://lcpq.github.io/quantum_package
|
||||
* Manu : README
|
||||
* data_energy_and_density
|
||||
* dft_keywords
|
||||
* dft_quantities_on_grid
|
||||
* dft_utils_one_body
|
||||
* dm_for_dft
|
||||
* integrals_erf
|
||||
* prendre des bouts du src/README.rst et en mettre partout
|
||||
|
||||
|
||||
|
@ -67,13 +67,13 @@ just run
|
||||
|
||||
.. code:: bash
|
||||
|
||||
qp_run SCF hcn
|
||||
qp_run scf hcn
|
||||
|
||||
The expected energy is ``-92.827856698`` au.
|
||||
|
||||
.. seealso::
|
||||
|
||||
The documentation of the :ref:`Hartree_Fock` module.
|
||||
The documentation of the :ref:`hartree_fock` module.
|
||||
|
||||
|
||||
Choose the target |MO| space
|
||||
@ -95,7 +95,7 @@ We will now use the |CIPSI| algorithm to estimate the |FCI| energy.
|
||||
|
||||
.. code::
|
||||
|
||||
qp_run FCI hcn
|
||||
qp_run fci hcn
|
||||
|
||||
|
||||
The program will start with a single determinant and will iteratively:
|
||||
@ -116,7 +116,7 @@ The estimated |FCI| energy of HCN is ``-93.0501`` au.
|
||||
|
||||
.. seealso::
|
||||
|
||||
The documentation of the :ref:`FCI` module.
|
||||
The documentation of the :ref:`fci` module.
|
||||
|
||||
|
||||
.. important:: TODO
|
||||
|
11
src/density_for_dft/EZFIO.cfg
Normal file
11
src/density_for_dft/EZFIO.cfg
Normal file
@ -0,0 +1,11 @@
|
||||
[density_for_dft]
|
||||
type: character*(32)
|
||||
doc: Type of density used for DFT calculation. If set to WFT , it uses the density of the wave function stored in (psi_det,psi_coef). If set to input_density it uses the one-body dm stored in aux_quantities/ . If set to damping_rs_dft it uses the damped density between WFT and input_density. In the ks_scf and rs_ks_scf programs, it is set to WFT.
|
||||
interface: ezfio, provider, ocaml
|
||||
default: WFT
|
||||
|
||||
[damping_for_rs_dft]
|
||||
type: double precision
|
||||
doc: damping factor for the density used in RSFT.
|
||||
interface: ezfio,provider,ocaml
|
||||
default: 0.5
|
@ -1,4 +1,12 @@
|
||||
==========
|
||||
DM_for_dft
|
||||
==========
|
||||
===============
|
||||
density_for_dft
|
||||
===============
|
||||
|
||||
|
||||
This module defines the *provider* of the density used for the DFT related calculations.
|
||||
This definition is done through the keyword :option:`density_for_dft density_for_dft`.
|
||||
The density can be:
|
||||
|
||||
# WFT : the density is computed with a potentially multi determinant wave function (see variables `psi_det` and `psi_det`)# input_density : the density is set to a density previously stored in the |EZFIO| folder (see ``aux_quantities``)
|
||||
# damping_rs_dft : the density is damped between the input_density and the WFT density, with a damping factor of :option:`density_for_dft damping_for_rs_dft`
|
||||
|
||||
|
@ -2,4 +2,4 @@
|
||||
Determinants
|
||||
============
|
||||
|
||||
Contains everything for the computation of the Hamiltonian in the basis of Slater determinants.
|
||||
Contains everything for the computation of the Hamiltonian matrix elements in the basis of orthogonal Slater determinants built on a restricted spin-orbitals basis.
|
||||
|
@ -16,14 +16,3 @@ doc: Percentage of HF exchange in the DFT model
|
||||
interface: ezfio,provider,ocaml
|
||||
default: 0.
|
||||
|
||||
[density_for_dft]
|
||||
type: character*(32)
|
||||
doc: Type of density used for DFT calculation. If WFT it uses the density of the WFT stored in terms of determinants. If input_density it uses the one-body dm stored in data_.../ . If damping_rs_dft it uses the damping density between WFT and input_density
|
||||
interface: ezfio, provider, ocaml
|
||||
default: WFT
|
||||
|
||||
[damping_for_rs_dft]
|
||||
type: double precision
|
||||
doc: damping factor for the density used in RSFT.
|
||||
interface: ezfio,provider,ocaml
|
||||
default: 0.5
|
||||
|
@ -2,6 +2,11 @@
|
||||
DFT Keywords
|
||||
============
|
||||
|
||||
This module contains all keywords which are related to a DFT calculation
|
||||
This module contains the main keywords related to a DFT calculation or RS-DFT calculation, such as:
|
||||
|
||||
# :option:exchange_functional
|
||||
# :option:correlation_functional
|
||||
# :option:HF_exchange : only relevent for the :ref:`ks_scf` program
|
||||
# :option:density_for_dft : mainly relevent for multi-determinant range separated DFT, see the plugins of eginer.
|
||||
|
||||
The keyword for the range separation parameter :math:`\mu` is the :option:`ao_two_e_erf_integrals mu_erf` keyword.
|
||||
|
@ -1,5 +1,4 @@
|
||||
dft_keywords
|
||||
determinants
|
||||
ao_basis
|
||||
mo_basis
|
||||
becke_numerical_grid
|
||||
|
@ -1,4 +1,21 @@
|
||||
===========
|
||||
RSDFT_Utils
|
||||
===========
|
||||
===============
|
||||
dft_utils_one_e
|
||||
===============
|
||||
|
||||
This module contains all the one-body related quantities needed to perform DFT or RS-DFT calculations.
|
||||
Therefore, it contains most of the properties which depends on the one-body density and density matrix.
|
||||
|
||||
The most important files and variables are:
|
||||
# The general *providers* for the x/c energies in :file:`e_xc_general.irp.f`
|
||||
# The general *providers* for the x/c potentials in :file:`pot_general.irp.f`
|
||||
# The short-range hartree operator and all related quantities in :file:`sr_coulomb.irp.f`
|
||||
These *providers* will be used in many DFT-related programs, such as :file:`ks_scf.irp.f` or :file:`rs_ks_scf.irp.f`.
|
||||
It is also needed to compute the effective one-body operator needed in multi-determinant RS-DFT (see plugins by eginer).
|
||||
|
||||
Some other interesting quantities:
|
||||
# The LDA and PBE *providers* for the x/c energies in :file:`e_xc.irp.f` and :file:`sr_exc.irp.f`
|
||||
# The LDA and PBE *providers* for the x/c potentials on the AO basis in :file:`pot_ao.irp.f` and :file:`sr_pot_ao.irp.f`
|
||||
# The :math:`h_{core}` energy computed directly with the one-body density matrix in :file:`one_e_energy_dft.irp.f`
|
||||
# LDA and PBE short-range functionals *subroutines* in :file:`exc_sr_lda.irp.f` and :file:`exc_sr_pbe.irp.f`
|
||||
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
BEGIN_PROVIDER [double precision, mu_erf_dft]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! range separation parameter used in RS-DFT. It is set to mu_erf in order to be consistent with the two electrons integrals erf
|
||||
END_DOC
|
||||
mu_erf_dft = mu_erf
|
||||
|
||||
END_PROVIDER
|
||||
|
@ -14,6 +14,12 @@
|
||||
else if(exchange_functional.EQ."short_range_PBE")then
|
||||
potential_x_alpha_ao = potential_sr_x_alpha_ao_PBE
|
||||
potential_x_beta_ao = potential_sr_x_beta_ao_PBE
|
||||
else if(trim(exchange_functional)=="LDA")then
|
||||
potential_x_alpha_ao = potential_x_alpha_ao_LDA
|
||||
potential_x_beta_ao = potential_x_beta_ao_LDA
|
||||
else if(exchange_functional.EQ."PBE")then
|
||||
potential_x_alpha_ao = potential_x_alpha_ao_PBE
|
||||
potential_x_beta_ao = potential_x_beta_ao_PBE
|
||||
else if(exchange_functional.EQ."None")then
|
||||
potential_x_alpha_ao = 0.d0
|
||||
potential_x_beta_ao = 0.d0
|
||||
@ -26,9 +32,15 @@
|
||||
if(trim(correlation_functional)=="short_range_LDA")then
|
||||
potential_c_alpha_ao = potential_sr_c_alpha_ao_LDA
|
||||
potential_c_beta_ao = potential_sr_c_beta_ao_LDA
|
||||
else if(trim(correlation_functional)=="LDA")then
|
||||
potential_c_alpha_ao = potential_c_alpha_ao_LDA
|
||||
potential_c_beta_ao = potential_c_beta_ao_LDA
|
||||
else if(correlation_functional.EQ."short_range_PBE")then
|
||||
potential_c_alpha_ao = potential_sr_c_alpha_ao_PBE
|
||||
potential_c_beta_ao = potential_sr_c_beta_ao_PBE
|
||||
else if(correlation_functional.EQ."PBE")then
|
||||
potential_c_alpha_ao = potential_c_alpha_ao_PBE
|
||||
potential_c_beta_ao = potential_c_beta_ao_PBE
|
||||
else if(correlation_functional.EQ."None")then
|
||||
potential_c_alpha_ao = 0.d0
|
||||
potential_c_beta_ao = 0.d0
|
||||
|
@ -3,6 +3,9 @@ subroutine GGA_sr_type_functionals(r,rho_a,rho_b,grad_rho_a_2,grad_rho_b_2,grad_
|
||||
ex,vx_rho_a,vx_rho_b,vx_grad_rho_a_2,vx_grad_rho_b_2,vx_grad_rho_a_b, &
|
||||
ec,vc_rho_a,vc_rho_b,vc_grad_rho_a_2,vc_grad_rho_b_2,vc_grad_rho_a_b )
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! routine that helps in building the x/c potentials on the AO basis for a GGA functional with a short-range interaction
|
||||
END_DOC
|
||||
double precision, intent(in) :: r(3),rho_a(N_states),rho_b(N_states),grad_rho_a_2(N_states),grad_rho_b_2(N_states),grad_rho_a_b(N_states)
|
||||
double precision, intent(out) :: ex(N_states),vx_rho_a(N_states),vx_rho_b(N_states),vx_grad_rho_a_2(N_states),vx_grad_rho_b_2(N_states),vx_grad_rho_a_b(N_states)
|
||||
double precision, intent(out) :: ec(N_states),vc_rho_a(N_states),vc_rho_b(N_states),vc_grad_rho_a_2(N_states),vc_grad_rho_b_2(N_states),vc_grad_rho_a_b(N_states)
|
||||
@ -54,13 +57,16 @@ subroutine GGA_type_functionals(r,rho_a,rho_b,grad_rho_a_2,grad_rho_b_2,grad_rho
|
||||
ex,vx_rho_a,vx_rho_b,vx_grad_rho_a_2,vx_grad_rho_b_2,vx_grad_rho_a_b, &
|
||||
ec,vc_rho_a,vc_rho_b,vc_grad_rho_a_2,vc_grad_rho_b_2,vc_grad_rho_a_b )
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! routine that helps in building the x/c potentials on the AO basis for a GGA functional
|
||||
END_DOC
|
||||
double precision, intent(in) :: r(3),rho_a(N_states),rho_b(N_states),grad_rho_a_2(N_states),grad_rho_b_2(N_states),grad_rho_a_b(N_states)
|
||||
double precision, intent(out) :: ex(N_states),vx_rho_a(N_states),vx_rho_b(N_states),vx_grad_rho_a_2(N_states),vx_grad_rho_b_2(N_states),vx_grad_rho_a_b(N_states)
|
||||
double precision, intent(out) :: ec(N_states),vc_rho_a(N_states),vc_rho_b(N_states),vc_grad_rho_a_2(N_states),vc_grad_rho_b_2(N_states),vc_grad_rho_a_b(N_states)
|
||||
integer :: istate
|
||||
double precision :: r2(3),dr2(3), local_potential,r12,dx2,mu
|
||||
double precision :: r2(3),dr2(3), local_potential,r12,dx2
|
||||
double precision :: mu_local
|
||||
mu_local = 1.d+9
|
||||
mu_local = 1.d-9
|
||||
do istate = 1, N_states
|
||||
if(exchange_functional.EQ."short_range_PBE")then
|
||||
call ex_pbe_sr(mu_local,rho_a(istate),rho_b(istate),grad_rho_a_2(istate),grad_rho_b_2(istate),grad_rho_a_b(istate),ex(istate),vx_rho_a(istate),vx_rho_b(istate),vx_grad_rho_a_2(istate),vx_grad_rho_b_2(istate),vx_grad_rho_a_b(istate))
|
||||
|
Loading…
Reference in New Issue
Block a user