9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-12 22:53:29 +01:00

Cleaning repo

This commit is contained in:
Anthony Scemama 2019-03-07 14:39:25 +01:00
parent 79748da843
commit 9c361c8838
19 changed files with 4 additions and 875 deletions

View File

@ -0,0 +1,2 @@
*.rst

View File

@ -0,0 +1,2 @@
*.rst

View File

@ -1,83 +0,0 @@
.. _cis:
.. program:: cis
===
cis
===
Configuration Interaction with Single excitations.
This program takes a reference Slater determinant of ROHF-like
occupancy, and performs all single excitations on top of it.
Disregarding spatial symmetry, it computes the `n_states` lowest
eigenstates of that CI matrix. (see :option:`determinants n_states`)
This program can be useful in many cases:
1. Ground state calculation
To be sure to have the lowest |SCF| solution, perform an :ref:`scf`
(see the :ref:`module_hartree_fock` module), then a :ref:`cis`, save the
natural orbitals (see :ref:`save_natorb`) and re-run an :ref:`scf`
optimization from this |MO| guess.
2. Excited states calculations
The lowest excited states are much likely to be dominated by
single-excitations. Therefore, running a :ref:`cis` will save the
`n_states` lowest states within the |CIS| space in the |EZFIO|
directory, which can afterwards be used as guess wave functions for
a further multi-state |FCI| calculation if :option:`determinants
read_wf` is set to |true| before running the :ref:`fci` executable.
If :option:`determinants s2_eig` is set to |true|, the |CIS|
will only retain states having the expected |S^2| value (see
:option:`determinants expected_s2`). Otherwise, the |CIS| will take
the lowest :option:`determinants n_states`, whatever multiplicity
they are.
.. note::
To discard some orbitals, use the :ref:`qp_set_mo_class`
command to specify:
* *core* orbitals which will be always doubly occupied
* *act* orbitals where an electron can be either excited from or to
* *del* orbitals which will be never occupied
Needs:
.. hlist::
:columns: 3
* :c:data:`read_wf`
Calls:
.. hlist::
:columns: 3
* :c:func:`run`
Touches:
.. hlist::
:columns: 3
* :c:data:`fock_matrix_ao_alpha`
* :c:data:`fock_matrix_ao_alpha`
* :c:data:`mo_coef`
* :c:data:`level_shift`
* :c:data:`mo_coef`
* :c:data:`read_wf`

View File

@ -1,79 +0,0 @@
.. _cisd:
.. program:: cisd
====
cisd
====
Configuration Interaction with Single and Double excitations.
This program takes a reference Slater determinant of ROHF-like occupancy,
and performs all single and double excitations on top of it, disregarding
spatial symmetry and compute the "n_states" lowest eigenstates of that CI
matrix (see :option:`determinants n_states`).
This program can be useful in many cases:
* **Ground state calculation**: if even after a :c:func:`cis` calculation, natural
orbitals (see :c:func:`save_natorb`) and then :c:func:`scf` optimization, you are not sure to have the lowest scf
solution,
do the same strategy with the :c:func:`cisd` executable instead of the :c:func:`cis` exectuable to generate the natural
orbitals as a guess for the :c:func:`scf`.
* **Excited states calculations**: the lowest excited states are much likely to
be dominanted by single- or double-excitations.
Therefore, running a :c:func:`cisd` will save the "n_states" lowest states within
the CISD space
in the |EZFIO| directory, which can afterward be used as guess wave functions
for a further multi-state fci calculation if you specify "read_wf" = True
before running the fci executable (see :option:`determinants read_wf`).
Also, if you specify "s2_eig" = True, the cisd will only retain states
having the good value :math:`S^2` value
(see :option:`determinants expected_s2` and :option:`determinants s2_eig`).
If "s2_eig" = False, it will take the lowest n_states, whatever
multiplicity they are.
Note: if you would like to discard some orbitals, use
:ref:`qp_set_mo_class` to specify:
* "core" orbitals which will be always doubly occupied
* "act" orbitals where an electron can be either excited from or to
* "del" orbitals which will be never occupied
Needs:
.. hlist::
:columns: 3
* :c:data:`read_wf`
Calls:
.. hlist::
:columns: 3
* :c:func:`run`
Touches:
.. hlist::
:columns: 3
* :c:data:`fock_matrix_ao_alpha`
* :c:data:`fock_matrix_ao_alpha`
* :c:data:`mo_coef`
* :c:data:`level_shift`
* :c:data:`mo_coef`
* :c:data:`read_wf`

View File

@ -1,40 +0,0 @@
.. _diagonalize_h:
.. program:: diagonalize_h
=============
diagonalize_h
=============
Program that extracts the :option:`determinants n_states` lowest
states of the Hamiltonian within the set of Slater determinants stored
in the |EZFIO| directory.
If :option:`determinants s2_eig` = |true|, it will retain only states
which correspond to the desired value of
:option:`determinants expected_s2`.
Needs:
.. hlist::
:columns: 3
* :c:data:`read_wf`
Calls:
.. hlist::
:columns: 3
* :c:func:`routine`
Touches:
.. hlist::
:columns: 3
* :c:data:`read_wf`

View File

@ -1,88 +0,0 @@
.. _fci:
.. program:: fci
===
fci
===
Selected Full Configuration Interaction with stochastic selection
and PT2.
This program performs a |CIPSI|-like selected |CI| using a
stochastic scheme for both the selection of the important Slater
determinants and the computation of the |PT2| correction. This
|CIPSI|-like algorithm will be performed for the lowest states of
the variational space (see :option:`determinants n_states`). The
|FCI| program will stop when reaching at least one the two following
conditions:
* number of Slater determinants > :option:`determinants n_det_max`
* abs(|PT2|) less than :option:`perturbation pt2_max`
The following other options can be of interest:
:option:`determinants read_wf`
When set to |false|, the program starts with a ROHF-like Slater
determinant as a guess wave function. When set to |true|, the
program starts with the wave function(s) stored in the |EZFIO|
directory as guess wave function(s).
:option:`determinants s2_eig`
When set to |true|, the selection will systematically add all the
necessary Slater determinants in order to have a pure spin wave
function with an |S^2| value corresponding to
:option:`determinants expected_s2`.
For excited states calculations, it is recommended to start with
:ref:`cis` or :ref:`cisd` guess wave functions, eventually in
a restricted set of |MOs|, and to set :option:`determinants s2_eig`
to |true|.
Needs:
.. hlist::
:columns: 3
* :c:data:`psi_coef`
* :c:data:`is_zmq_slave`
* :c:data:`do_pt2`
* :c:data:`mo_two_e_integrals_in_map`
* :c:data:`psi_det`
Calls:
.. hlist::
:columns: 3
* :c:func:`run_cipsi`
* :c:func:`run_stochastic_cipsi`
Touches:
.. hlist::
:columns: 3
* :c:data:`ci_electronic_energy`
* :c:data:`ci_electronic_energy`
* :c:data:`ci_energy`
* :c:data:`ci_electronic_energy`
* :c:data:`n_det`
* :c:data:`n_iter`
* :c:data:`psi_occ_pattern`
* :c:data:`c0_weight`
* :c:data:`psi_coef`
* :c:data:`psi_det_sorted_bit`
* :c:data:`psi_det`
* :c:data:`psi_det_size`
* :c:data:`psi_det_sorted_bit`
* :c:data:`psi_energy`
* :c:data:`psi_occ_pattern`
* :c:data:`psi_energy`
* :c:data:`pt2_stoch_istate`
* :c:data:`state_average_weight`
* :c:data:`threshold_generators`

View File

@ -1,45 +0,0 @@
.. _fcidump:
.. program:: fcidump
=======
fcidump
=======
Produce a regular `FCIDUMP` file from the |MOs| stored in the |EZFIO|
directory.
To specify an active space, the class of the |MOs| have to set in the
|EZFIO| directory (see :ref:`qp_set_mo_class`).
The :ref:`fcidump` program supports 3 types of |MO| classes :
* the *core* orbitals which are always doubly occupied in the
calculation
* the *deleted* orbitals that are never occupied in the calculation
* the *active* orbitals that are occupied with a varying number of
electrons
Needs:
.. hlist::
:columns: 3
* :c:data:`elec_beta_num`
* :c:data:`ezfio_filename`
* :c:data:`core_fock_operator`
* :c:data:`elec_num`
* :c:data:`mo_two_e_integrals_in_map`
* :c:data:`elec_alpha_num`
* :c:data:`mo_one_e_integrals`
* :c:data:`n_core_orb`
* :c:data:`mo_integrals_threshold`
* :c:data:`list_inact`
* :c:data:`mo_integrals_map`
* :c:data:`core_energy`

View File

@ -1,35 +0,0 @@
.. _four_idx_transform:
.. program:: four_idx_transform
==================
four_idx_transform
==================
4-index transformation of two-electron integrals from |AO| to |MO|
integrals.
This program will compute the two-electron integrals on the |MO| basis
and store it into the |EZFIO| directory.
This program can be useful if the AO --> MO transformation is an
expensive step by itself.
Needs:
.. hlist::
:columns: 3
* :c:data:`io_mo_two_e_integrals`
* :c:data:`mo_two_e_integrals_in_map`
Touches:
.. hlist::
:columns: 3
* :c:data:`io_mo_two_e_integrals`

View File

@ -1,52 +0,0 @@
.. _ks_scf:
.. program:: ks_scf
======
ks_scf
======
Produce `Kohn_Sham` MO orbital
output: mo_basis.mo_num mo_basis.mo_label mo_basis.ao_md5 mo_basis.mo_coef mo_basis.mo_occ
output: kohn_sham.energy
optional: mo_basis.mo_coef
Needs:
.. hlist::
:columns: 3
* :c:data:`io_mo_one_e_integrals`
* :c:data:`mu_erf_dft`
* :c:data:`density_for_dft`
* :c:data:`io_ao_one_e_integrals`
Calls:
.. hlist::
:columns: 3
* :c:func:`check_coherence_functional`
* :c:func:`create_guess`
* :c:func:`orthonormalize_mos`
* :c:func:`run`
Touches:
.. hlist::
:columns: 3
* :c:data:`fock_matrix_ao_alpha`
* :c:data:`fock_matrix_ao_alpha`
* :c:data:`fock_matrix_ao_alpha`
* :c:data:`fock_matrix_ao_alpha`
* :c:data:`mo_coef`
* :c:data:`density_for_dft`
* :c:data:`io_ao_one_e_integrals`
* :c:data:`io_mo_one_e_integrals`
* :c:data:`level_shift`
* :c:data:`mo_coef`
* :c:data:`mo_label`

View File

@ -1,41 +0,0 @@
.. _molden:
.. program:: molden
======
molden
======
Produces a Molden file
Needs:
.. hlist::
:columns: 3
* :c:data:`nucl_list_shell_aos`
* :c:data:`mo_occ`
* :c:data:`ezfio_filename`
* :c:data:`mo_coef`
* :c:data:`ao_coef`
* :c:data:`ao_power`
* :c:data:`fock_matrix_mo`
* :c:data:`ao_num`
* :c:data:`ao_prim_num`
* :c:data:`mo_num`
* :c:data:`nucl_coord`
* :c:data:`ao_l`
* :c:data:`nucl_charge`
* :c:data:`ao_expo`
* :c:data:`element_name`
* :c:data:`nucl_num`
Calls:
.. hlist::
:columns: 3
* :c:func:`isort`

View File

@ -1,32 +0,0 @@
.. _print_e_conv:
.. program:: print_e_conv
============
print_e_conv
============
program that prints in a human readable format the convergence of the CIPSI algorithm.
for all istate, this program produces
* a file "EZFIO.istate.conv" containing the variational and var+PT2 energies as a function of N_det
* for istate > 1, a file EZFIO.istate.delta_e.conv containing the energy difference (both var and var+PT2) with the ground state as a function of N_det
Needs:
.. hlist::
:columns: 3
* :c:data:`ezfio_filename`
Calls:
.. hlist::
:columns: 3
* :c:func:`routine_e_conv`

View File

@ -1,41 +0,0 @@
.. _print_wf:
.. program:: print_wf
========
print_wf
========
Print the ground state wave function stored in the |EZFIO| directory
in the intermediate normalization.
It also prints a lot of information regarding the excitation
operators from the reference determinant ! and a first-order
perturbative analysis of the wave function.
If the wave function strongly deviates from the first-order analysis,
something funny is going on :)
Needs:
.. hlist::
:columns: 3
* :c:data:`read_wf`
Calls:
.. hlist::
:columns: 3
* :c:func:`routine`
Touches:
.. hlist::
:columns: 3
* :c:data:`read_wf`

View File

@ -1,59 +0,0 @@
.. _pt2:
.. program:: pt2
===
pt2
===
Second order perturbative correction to the wave function contained
in the |EZFIO| directory.
This programs runs the stochastic |PT2| correction on all
:option:`determinants n_states` wave functions stored in the |EZFIO|
directory.
The main option for the |PT2| correction is the
:option:`perturbation pt2_relative_error` which is the relative
stochastic error on the |PT2| to reach before stopping the
sampling.
Needs:
.. hlist::
:columns: 3
* :c:data:`is_zmq_slave`
* :c:data:`mo_two_e_integrals_in_map`
* :c:data:`psi_energy`
* :c:data:`threshold_generators`
* :c:data:`read_wf`
Calls:
.. hlist::
:columns: 3
* :c:func:`run`
* :c:func:`run_slave_cipsi`
Touches:
.. hlist::
:columns: 3
* :c:data:`fock_matrix_ao_alpha`
* :c:data:`fock_matrix_ao_alpha`
* :c:data:`mo_coef`
* :c:data:`distributed_davidson`
* :c:data:`level_shift`
* :c:data:`mo_coef`
* :c:data:`pt2_e0_denominator`
* :c:data:`pt2_stoch_istate`
* :c:data:`read_wf`
* :c:data:`state_average_weight`
* :c:data:`threshold_generators`

View File

@ -1,53 +0,0 @@
.. _rs_ks_scf:
.. program:: rs_ks_scf
=========
rs_ks_scf
=========
Produce `Range_separated_Kohn_Sham` MO orbital
output: mo_basis.mo_num mo_basis.mo_label mo_basis.ao_md5 mo_basis.mo_coef mo_basis.mo_occ
output: kohn_sham.energy
optional: mo_basis.mo_coef
Needs:
.. hlist::
:columns: 3
* :c:data:`io_mo_one_e_integrals`
* :c:data:`mu_erf_dft`
* :c:data:`density_for_dft`
* :c:data:`io_ao_one_e_integrals`
* :c:data:`read_wf`
Calls:
.. hlist::
:columns: 3
* :c:func:`check_coherence_functional`
* :c:func:`create_guess`
* :c:func:`orthonormalize_mos`
* :c:func:`run`
Touches:
.. hlist::
:columns: 3
* :c:data:`fock_matrix_ao_alpha`
* :c:data:`fock_matrix_ao_alpha`
* :c:data:`fock_matrix_ao_alpha`
* :c:data:`fock_matrix_ao_alpha`
* :c:data:`mo_coef`
* :c:data:`density_for_dft`
* :c:data:`io_ao_one_e_integrals`
* :c:data:`io_mo_one_e_integrals`
* :c:data:`level_shift`
* :c:data:`mo_coef`
* :c:data:`mo_label`

View File

@ -1,49 +0,0 @@
.. _save_natorb:
.. program:: save_natorb
===========
save_natorb
===========
Save natural |MOs| into the |EZFIO|.
This program reads the wave function stored in the |EZFIO| directory,
extracts the corresponding natural orbitals and setd them as the new
|MOs|.
If this is a multi-state calculation, the density matrix that produces
the natural orbitals is obtained from an average of the density
matrices of each state with the corresponding
:option:`determinants state_average_weight`
Needs:
.. hlist::
:columns: 3
* :c:data:`read_wf`
Calls:
.. hlist::
:columns: 3
* :c:func:`ezfio_set_mo_one_e_ints_io_mo_integrals_e_n`
* :c:func:`ezfio_set_mo_one_e_ints_io_mo_integrals_kinetic`
* :c:func:`ezfio_set_mo_one_e_ints_io_mo_integrals_pseudo`
* :c:func:`ezfio_set_mo_one_e_ints_io_mo_one_e_integrals`
* :c:func:`ezfio_set_mo_two_e_ints_io_mo_two_e_integrals`
* :c:func:`save_natural_mos`
* :c:func:`save_ref_determinant`
Touches:
.. hlist::
:columns: 3
* :c:data:`mo_occ`
* :c:data:`read_wf`

View File

@ -1,42 +0,0 @@
.. _save_one_e_dm:
.. program:: save_one_e_dm
=============
save_one_e_dm
=============
Program that computes the one body density on the |MO| basis
for $\alpha$ and $\beta$ electrons from the wave function
stored in the |EZFIO| directory, and then saves it into the
:ref:`module_aux_quantities`.
Then, the global variable :option:`aux_quantities data_one_e_dm_alpha_mo`
and :option:`aux_quantities data_one_e_dm_beta_mo` will automatically
read this density in the next calculation. This can be used to perform
damping on the density in |RSDFT| calculations (see
:ref:`module_density_for_dft`).
Needs:
.. hlist::
:columns: 3
* :c:data:`read_wf`
Calls:
.. hlist::
:columns: 3
* :c:func:`routine_save_one_e_dm`
Touches:
.. hlist::
:columns: 3
* :c:data:`read_wf`

View File

@ -1,34 +0,0 @@
.. _save_ortho_mos:
.. program:: save_ortho_mos
==============
save_ortho_mos
==============
Save orthonormalized MOs in the EZFIO.
This program reads the current MOs, computes the corresponding overlap matrix in the MO basis
and perform a Lowdin orthonormalization : :math:`MO_{new} = S^{-1/2} MO_{guess}`.
Thanks to the Lowdin orthonormalization, the new MOs are the most similar to the guess MOs.
Calls:
.. hlist::
:columns: 3
* :c:func:`orthonormalize_mos`
* :c:func:`save_mos`
Touches:
.. hlist::
:columns: 3
* :c:data:`mo_coef`
* :c:data:`mo_label`

View File

@ -1,66 +0,0 @@
.. _scf:
.. program:: scf
===
scf
===
The :ref:`scf` program performs *Restricted* Hartree-Fock
calculations (the spatial part of the |MOs| is common for alpha and beta
spinorbitals).
It performs the following actions:
#. Compute/Read all the one- and two-electron integrals, and store them
in memory
#. Check in the |EZFIO| database if there is a set of |MOs|.
If there is, it will read them as initial guess. Otherwise, it will
create a guess.
#. Perform the |SCF| iterations
For the keywords related to the |SCF| procedure, see the ``scf_utils``
directory where you will find all options.
At each iteration, the |MOs| are saved in the |EZFIO| database. Hence,
if the calculation crashes for any unexpected reason, the calculation
can be restarted by running again the |SCF| with the same |EZFIO|
database.
To start again a fresh |SCF| calculation, the |MOs| can be reset by
running the :ref:`qp_reset` command.
The `DIIS`_ algorithm is implemented, as well as the `level-shifting`_
method. If the |SCF| does not converge, try again with a higher value of
:option:`level_shift`.
.. _DIIS: https://en.wikipedia.org/w/index.php?title=DIIS
.. _level-shifting: https://doi.org/10.1002/qua.560070407
Calls:
.. hlist::
:columns: 3
* :c:func:`create_guess`
* :c:func:`orthonormalize_mos`
* :c:func:`run`
Touches:
.. hlist::
:columns: 3
* :c:data:`fock_matrix_ao_alpha`
* :c:data:`fock_matrix_ao_alpha`
* :c:data:`fock_matrix_ao_alpha`
* :c:data:`fock_matrix_ao_alpha`
* :c:data:`mo_coef`
* :c:data:`level_shift`
* :c:data:`mo_coef`
* :c:data:`mo_label`

View File

@ -1,36 +0,0 @@
.. _write_integrals_erf:
.. program:: write_integrals_erf
===================
write_integrals_erf
===================
Saves the two-electron integrals with the $erf(\mu r_{12})/r_{12}$
oprerator into the EZFIO directory.
Needs:
.. hlist::
:columns: 3
* :c:data:`io_mo_two_e_integrals`
* :c:data:`io_ao_two_e_integrals`
Calls:
.. hlist::
:columns: 3
* :c:func:`routine`
Touches:
.. hlist::
:columns: 3
* :c:data:`io_ao_two_e_integrals`
* :c:data:`io_mo_two_e_integrals`