mirror of
https://github.com/LCPQ/quantum_package
synced 2024-06-02 11:25:26 +02:00
WOrking on the doc
This commit is contained in:
parent
f06cdef0f2
commit
fc6cad78b2
56
docs/applications.rst
Normal file
56
docs/applications.rst
Normal file
|
@ -0,0 +1,56 @@
|
|||
Research made with the Quantum Package
|
||||
======================================
|
||||
|
||||
.. bibliography:: refs.bib
|
||||
|
||||
#. :cite:`Loos_2018` A Mountaineering Strategy to Excited States: Highly
|
||||
Accurate Reference Energies and Benchmarks
|
||||
|
||||
#. :cite:`Scemama_2018` Deterministic Construction of Nodal Surfaces within
|
||||
Quantum Monte Carlo: The Case of FeS
|
||||
|
||||
#. :cite:`Scemama_2018.2` Excitation energies from diffusion Monte Carlo using
|
||||
selected configuration interaction nodes
|
||||
|
||||
#. :cite:`Dash_2018` Perturbatively Selected Configuration-Interaction Wave
|
||||
Functions for Efficient Geometry Optimization in Quantum Monte Carlo
|
||||
|
||||
#. :cite:`Garniron_2018` Selected configuration interaction dressed by
|
||||
perturbation
|
||||
|
||||
#. :cite:`Giner_2017` A Jeziorski-Monkhorst fully uncontracted multi-reference
|
||||
perturbative treatment. I. Principles, second-order versions, and tests on
|
||||
ground state potential energy curves
|
||||
|
||||
#. :cite:`Garniron_2017` Alternative definition of excitation amplitudes in
|
||||
multi-reference state-specific coupled cluster
|
||||
|
||||
#. :cite:`Garniron_2017.2` Hybrid stochastic-deterministic calculation of the
|
||||
second-order perturbative contribution of multireference perturbation theory
|
||||
|
||||
#. :cite:`Giner_2017.2` Orthogonal Valence Bond Hamiltonians incorporating
|
||||
dynamical correlation effects
|
||||
|
||||
#. :cite:`Giner_2016` A simple approach to the state-specific MR-CC using
|
||||
the intermediate Hamiltonian formalism
|
||||
|
||||
#. :cite:`Caffarel_2016` Communication: Toward an improved control of the
|
||||
fixed-node error in quantum Monte Carlo: The case of the water molecule
|
||||
|
||||
#. :cite:`Caffarel_2016.2` Using CIPSI Nodes in Diffusion Monte Carlo
|
||||
|
||||
#. :cite:`Giner_2015` Fixed-node diffusion Monte Carlo potential energy curve of
|
||||
the fluorine molecule F2 using selected configuration interaction trial
|
||||
wavefunctions
|
||||
|
||||
#. :cite:`Scemama_2014` Accurate nonrelativistic ground-state energies of 3d
|
||||
transition metal atoms
|
||||
|
||||
#. :cite:`Caffarel_2014` Spin Density Distribution in Open-Shell Transition
|
||||
Metal Systems: A Comparative Post-Hartree-Fock, Density Functional Theory,
|
||||
and Quantum Monte Carlo Study of the CuCl2 Molecule
|
||||
|
||||
#. :cite:`Giner_2013` Using perturbatively selected configuration interaction in
|
||||
quantum Monte Carlo calculations
|
||||
|
||||
|
|
@ -1,2 +1,4 @@
|
|||
default:
|
||||
make -C ../ html
|
||||
clean:
|
||||
make -C ../ clean
|
||||
|
|
42
docs/source/_static/links.rst
Normal file
42
docs/source/_static/links.rst
Normal file
|
@ -0,0 +1,42 @@
|
|||
.. _Autoconf: http://www.gnu.org/software/autoconf
|
||||
.. _BLAS: http://www.netlib.org/blas/
|
||||
.. _CHAMP: https://www.utwente.nl/en/tnw/ccp/research/CHAMP.html
|
||||
.. _Core: https://opensource.janestreet.com/core/
|
||||
.. _Dice: https://sanshar.github.io/Dice/
|
||||
.. _EMSL_Basis_Set_Exchange_Local: https://github.com/TApplencourt/EMSL_Basis_Set_Exchange_Local
|
||||
.. _EZFIO: http://gitlab.com/scemama/EZFIO
|
||||
.. _external plugins: https://gitlab.com/scemama/qp_plugins
|
||||
.. _GAMESS: https://www.msg.chem.iastate.edu/gamess/
|
||||
.. _GNU make: http://www.gnu.org/software/make
|
||||
.. _GNU Patch: http://savannah.gnu.org/projects/patch
|
||||
.. _Irene: http://www-hpc.cea.fr/en/complexe/tgcc-Irene.htm
|
||||
.. _IRPF90: http://irpf90.ups-tlse.fr
|
||||
.. _LAPACK: http://www.netlib.org/lapack/
|
||||
.. _Molden: http://cheminf.cmbi.ru.nl/molden/
|
||||
.. _NECI: https://github.com/ghb24/NECI_STABLE
|
||||
.. _Ninja: https://ninja-build.org/
|
||||
.. _NWChem: http://www.nwchem-sw.org/
|
||||
.. _OCaml: http://ocaml.org/
|
||||
.. _OPAM: http://opam.ocaml.org/
|
||||
.. _Olympe: https://www.calmip.univ-toulouse.fr/spip.php?article582&lang=fr
|
||||
.. _Python: http://www.python.org
|
||||
.. _QMC=Chem: https://gitlab.com/scemama/qmcchem
|
||||
.. _QMCPack: https://qmcpack.org
|
||||
.. _SLURM: https://slurm.schedmd.com/
|
||||
.. _resultsFile: http://gitlab.com/scemama/resultsFile
|
||||
.. _ZeroMQ: http://zeromq.org/
|
||||
.. _Zlib: http://zlib.net
|
||||
|
||||
|
||||
.. |BLAS| replace:: `BLAS`_
|
||||
.. |EZFIO| replace:: `EZFIO`_
|
||||
.. |GAMESS| replace:: `GAMESS`_
|
||||
.. |IRPF90| replace:: `IRPF90`_
|
||||
.. |LAPACK| replace:: `LAPACK`_
|
||||
.. |Ninja| replace:: `Ninja`_
|
||||
.. |OCaml| replace:: `OCaml`_
|
||||
.. |OPAM| replace:: `OPAM`_
|
||||
.. |Python| replace:: `Python`_
|
||||
.. |qp| replace:: *Quantum Package*
|
||||
.. |SLURM| replace:: `SLURM`_
|
||||
.. |ZeroMQ| replace:: `ZeroMQ`_
|
|
@ -14,7 +14,7 @@ in 111 MOs.
|
|||
Convergence of the energy
|
||||
-------------------------
|
||||
|
||||
.. figure:: _static/cn3_energy.png
|
||||
.. figure:: ../_static/cn3_energy.png
|
||||
:alt: Convergence of the energy.
|
||||
|
||||
Convergence of the variational energy, with and without the PT2 correction.
|
||||
|
@ -67,7 +67,7 @@ We present the parallel speedup curve, and the wall-clock time in seconds
|
|||
required to compute one iteration for two wave functions measured on Olympe
|
||||
and Irene.
|
||||
|
||||
.. figure:: _static/speedup_davidson.png
|
||||
.. figure:: ../_static/speedup_davidson.png
|
||||
:alt: Parallel speedup of Davidson's diagonalization.
|
||||
|
||||
Parallel speedup of Davidson's diagonalization measured on Olympe and Irene.
|
||||
|
@ -113,7 +113,7 @@ required to compute the PT2 correction for two wave functions measured on
|
|||
Olympe and Irene.
|
||||
|
||||
|
||||
.. figure:: _static/speedup_pt2.png
|
||||
.. figure:: ../_static/speedup_pt2.png
|
||||
:alt: Parallel speedup of the PT2 computation of the ground state.
|
||||
|
||||
Parallel speedup of the PT2 computation of the ground state measured
|
||||
|
@ -153,6 +153,6 @@ Number of 48-core Nodes Ground state (9.3M) Excited state (9.3M) Ground s
|
|||
======================= ====================== ======================= ====================== =======================
|
||||
|
||||
|
||||
.. _Irene: http://www-hpc.cea.fr/en/complexe/tgcc-Irene.htm
|
||||
.. _Olympe: https://www.calmip.univ-toulouse.fr/spip.php?article582&lang=fr
|
||||
|
||||
|
||||
|
8
docs/source/appendix/research.rst
Normal file
8
docs/source/appendix/research.rst
Normal file
|
@ -0,0 +1,8 @@
|
|||
Some research made with the |qp|
|
||||
================================
|
||||
|
||||
.. bibliography:: ../research.bib
|
||||
:style: unsrt
|
||||
:all:
|
||||
|
||||
|
|
@ -35,6 +35,13 @@ release = '1.0'
|
|||
#
|
||||
# needs_sphinx = '1.0'
|
||||
|
||||
with open("_static/links.rst",'r') as f:
|
||||
rst_epilog = f.read()
|
||||
|
||||
suppress_warnings = [
|
||||
'ref.citation'
|
||||
]
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
|
|
|
@ -11,22 +11,47 @@ Quantum Package
|
|||
:align: center
|
||||
:alt: Quantum Package
|
||||
|
||||
|
||||
.. toctree::
|
||||
:caption: Introduction
|
||||
|
||||
intro/intro
|
||||
intro/selected_ci
|
||||
intro/requirements
|
||||
intro/installation
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contents:
|
||||
:caption: User's guide
|
||||
|
||||
intro
|
||||
interfaces
|
||||
installation
|
||||
users_guide
|
||||
benchmarks
|
||||
programming
|
||||
research
|
||||
license
|
||||
users_guide/users_guide
|
||||
users_guide/interfaces
|
||||
users_guide/qp_create_ezfio_from_xyz
|
||||
users_guide/qp_convert_output_to_ezfio
|
||||
users_guide/qp_edit
|
||||
users_guide/qp_run
|
||||
users_guide/qp_set_mo_class
|
||||
users_guide/hartree_fock
|
||||
users_guide/natural_orbitals
|
||||
users_guide/plugins
|
||||
users_guide/excited_states
|
||||
|
||||
users_guide.rst
|
||||
users_guide/interfaces
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Programmer's guide
|
||||
|
||||
programmers_guide/programming
|
||||
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Appendix:
|
||||
|
||||
appendix/benchmarks
|
||||
appendix/research
|
||||
appendix/license
|
||||
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`search`
|
||||
|
|
|
@ -1,77 +0,0 @@
|
|||
Installation
|
||||
============
|
||||
|
||||
Set up the environment::
|
||||
|
||||
./configure <config_file>
|
||||
|
||||
For example you can type::
|
||||
|
||||
./configure config/gfortran.cfg
|
||||
|
||||
This command will :
|
||||
|
||||
- Download and install all the requirements.
|
||||
Installing `OCaml`_ and the `Core`_ library may take some time (up to 20min on an old machine).
|
||||
- Create the file which contains all the dependencies for the binaries.
|
||||
It's not a Makefile, but a `Ninja`_ file (so don't type ``make`` is hopeless, type ``ninja`` instead)
|
||||
|
||||
By default, the OCaml compiler and libraries will be installed in ``$HOME/.opam``.
|
||||
If you want to install it somewhere else, you can change this by setting the ``$OPAMROOT``
|
||||
environment variable to the location of your choice.
|
||||
For more info about the OCaml installation, you can visit the `Opam website <https://opam.ocaml.org/doc/Install.html>`_.
|
||||
|
||||
Compiling Flags
|
||||
---------------
|
||||
|
||||
``<config_file>`` is the path to the file which contains all the flags useful for the compilation : optimization flags, Lapack libary, etc. We have two default configuration files in ``$QP_ROOT/config`` : ``ifort.cfg`` and ``gfortran.cfg``. Copy these files to create a new config file adapted to your architecture.
|
||||
|
||||
Note that the `popcnt` instruction accelerates *a lot* the programs, so the
|
||||
SSE4.2, AVX or AVX2 instruction sets should be enabled if possible.
|
||||
|
||||
If you encounter an error saying that your Fortran compiler can't produce
|
||||
executables, it means that the program was built using an instruction set
|
||||
not supported by the current processor. In that case, use the ``-xHost`` option
|
||||
of the Intel Fortran compiler, or the ``-march=native`` option of gfortran.
|
||||
|
||||
Set environment variables
|
||||
-------------------------
|
||||
|
||||
A configuration file named ``quantum_package.rc`` will be created.
|
||||
To finish the installation and to start using the quantum package, source this file in your shell::
|
||||
|
||||
source quantum_package.rc
|
||||
|
||||
And you can also source it inside your ``.bashrc`` file, or create a system-wide module file.
|
||||
|
||||
If you use a C-shell, you will have to translate the ``quantum_package.rc`` file into
|
||||
C-shell syntax and source it in your shell.
|
||||
|
||||
Add some modules
|
||||
----------------
|
||||
|
||||
The quantum package has **no executable out of the box**. You need to install (and then compile) some modules. The ``qp_module.py`` will help you::
|
||||
|
||||
qp_module.py create -n <name> [<children_modules>...]
|
||||
qp_module.py download -n <name> [<path_folder>...]
|
||||
qp_module.py install <name>...
|
||||
qp_module.py list (--installed | --available-local)
|
||||
qp_module.py uninstall <name>
|
||||
|
||||
|
||||
For exemple you can type ::
|
||||
|
||||
qp_module.py install Full_CI_ZMQ
|
||||
|
||||
This will install the `Full_CI_ZMQ` module. All the modules are installed in the ``$QP_ROOT/src/``, and all the available modules are in ``$QP_ROOT/plugins/``
|
||||
|
||||
Compiling the Fortran
|
||||
---------------------
|
||||
|
||||
Just type ``ninja`` if you are in ``$QP_ROOT`` (or ``ninja -f $QP_ROOT/build.ninja`` elsewhere). The compilation will take approximately 5 min.
|
||||
|
||||
|
||||
.. _Ninja: https://ninja-build.org/
|
||||
.. _OCaml: http://ocaml.org/
|
||||
.. _Core: https://opensource.janestreet.com/core/
|
||||
|
98
docs/source/intro/installation.rst
Normal file
98
docs/source/intro/installation.rst
Normal file
|
@ -0,0 +1,98 @@
|
|||
Installation
|
||||
============
|
||||
|
||||
|
||||
System configuration
|
||||
--------------------
|
||||
|
||||
Set up the environment
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
./configure CONFIG_FILE
|
||||
|
||||
For example
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
./configure config/gfortran.cfg
|
||||
|
||||
This command will download and install all the missing the requirements, if possible.
|
||||
Installing |OCaml| and the `Core`_ library may take some time (around 10 minutes).
|
||||
The, it will create the |Ninja| file for compilation.
|
||||
|
||||
By default, the |OCaml| compiler and libraries will be installed in
|
||||
:file:`$HOME/.opam`. If you want to install it somewhere else, you can change
|
||||
this by setting the :envvar:`OPAMROOT` environment variable to the location of
|
||||
your choice *before* running the :program:`configure` script. For more info
|
||||
about the |OCaml| installation with |OPAM|, you can visit the |OPAM| website.
|
||||
|
||||
|
||||
Compiling Flags
|
||||
---------------
|
||||
|
||||
``CONFIG_FILE`` is the path to the file which contains all the flags useful for
|
||||
the compilation : optimization flags, |BLAS| and |LAPACK| libraries, *etc*.
|
||||
There are two default configuration files in :file:`$QP_ROOT/config` :
|
||||
:file:`ifort.cfg` and :file:`gfortran.cfg`. Copy these files to create a new configuration
|
||||
file adapted to your architecture, and modify it as required. Then, use this
|
||||
new file with the :program:`configure` script.
|
||||
|
||||
.. note::
|
||||
|
||||
The ``popcnt`` instruction accelerates *a lot* the programs, so the
|
||||
SSE4.2, AVX or AVX2 instruction sets should be enabled if possible.
|
||||
|
||||
If you encounter an error saying that the Fortran compiler can't produce
|
||||
executables, it means that the program was built using an instruction set
|
||||
not supported by the current processor. In that case, use the :option:`-xHost` option
|
||||
of the Intel Fortran compiler, or the :option:`-march=native` option of GNU Fortran.
|
||||
|
||||
|
||||
Set environment variables
|
||||
-------------------------
|
||||
|
||||
A configuration file named :file:`quantum_package.rc` will be created (or overwritten)
|
||||
upon completion of the :program:`configure` script. To finish the installation and to
|
||||
start using the |qp|, source this file in your shell
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
source quantum_package.rc
|
||||
|
||||
.. important::
|
||||
The :file:`quantum_package.rc` file should be sourced in the shell before the
|
||||
|qp| can be used. You may want to source it in your :file:`$HOME/.bash_profile`.
|
||||
|
||||
.. important::
|
||||
|
||||
If you are using an Infiniband network, and assuming ``ib0`` is the name of
|
||||
the network interface used for communications on the compute nodes,
|
||||
you will need to add to :file:`quantum_package.rc`
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
export QP_NIC=ib0
|
||||
|
||||
|
||||
.. note::
|
||||
If you use a C-shell, you will have to translate the :file:`quantum_package.rc` file into
|
||||
C-shell syntax and source it in your shell.
|
||||
|
||||
|
||||
|
||||
Compile the Progams
|
||||
-------------------
|
||||
|
||||
Go into :file:`$QP_ROOT` and run
|
||||
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
ninja
|
||||
|
||||
The compilation will take approximately 5 min.
|
||||
|
||||
|
||||
|
||||
|
|
@ -12,7 +12,7 @@ determinant-driven paradigm. The determinant-driven framework allows the
|
|||
programmer to include any arbitrary set of determinants in the variational
|
||||
space, and thus gives a complete freedom in the methodological development. All
|
||||
the programs are developed with the `IRPF90`_ code generator, which simplifies
|
||||
the development of new programs.
|
||||
the collaborative development, and the development of new features.
|
||||
|
||||
|
||||
|
||||
|
@ -25,7 +25,7 @@ their own programs.
|
|||
|
||||
The |qp| has been designed specifically for sCI, so all the
|
||||
algorithms which are programmed are not adapted to run SCF or DFT calculations
|
||||
on thousands of atoms. Currently, the systems targeted have less than 500
|
||||
on thousands of atoms. Currently, the systems targeted have less than 600
|
||||
molecular orbitals.
|
||||
|
||||
The |qp| is *not* a massive production code. For conventional
|
||||
|
@ -35,11 +35,11 @@ fast. Again, the role of the |qp| is to make life simple for the
|
|||
developer. Once a new method is developed and tested, the developer is encouraged
|
||||
to consider re-expressing it with an integral-driven formulation, and to
|
||||
implement the new method in open-source production codes, such as `NWChem`_
|
||||
or `GAMESS`_.
|
||||
or |GAMESS|.
|
||||
|
||||
|
||||
Applications
|
||||
""""""""""""
|
||||
Some Applications
|
||||
"""""""""""""""""
|
||||
|
||||
Multiple programs were developed with the |qp|, such as:
|
||||
|
||||
|
@ -58,10 +58,4 @@ All these programs can generate ground and excited states, and spin pure wave fu
|
|||
(eigenstates of S²).
|
||||
|
||||
|
||||
.. Links ..
|
||||
|
||||
.. _IRPF90: http://irpf90.ups-tlse.fr
|
||||
.. _NWChem: http://www.nwchem-sw.org/
|
||||
.. _GAMESS: https://www.msg.chem.iastate.edu/gamess/
|
||||
|
||||
.. |qp| replace:: Quantum Package
|
21
docs/source/intro/requirements.rst
Normal file
21
docs/source/intro/requirements.rst
Normal file
|
@ -0,0 +1,21 @@
|
|||
Requirements
|
||||
============
|
||||
|
||||
- Linux OS
|
||||
- Fortran compiler : GNU Fortran, Intel Fortran or IBM XL Fortran
|
||||
- `GNU make`_
|
||||
- `Autoconf`_
|
||||
- `Python`_ > 2.6
|
||||
- |IRPF90| : Fortran code generator
|
||||
- |EZFIO| : Easy Fortran Input/Output library generator
|
||||
- |BLAS| and |LAPACK|
|
||||
- `EMSL_Basis_Set_Exchange_Local`_ : Local copy of the data contained in the
|
||||
`EMSL Basis Set Exchange website <https://bse.pnl.gov/bse/portal>`_
|
||||
- `Zlib`_
|
||||
- `GNU Patch`_
|
||||
- |ZeroMQ| : networking library
|
||||
- |OCaml| compiler with |OPAM| package manager
|
||||
- |Ninja| : a parallel build system
|
||||
|
||||
|
||||
|
90
docs/source/intro/selected_ci.rst
Normal file
90
docs/source/intro/selected_ci.rst
Normal file
|
@ -0,0 +1,90 @@
|
|||
Selected Configuration Interaction
|
||||
==================================
|
||||
|
||||
These methods rely on the same principle as the usual CI approaches, except
|
||||
that determinants aren't chosen *a priori* based on an occupation or
|
||||
excitation criterion, but selected *on the fly* among the entire set of
|
||||
determinants based on their estimated contribution to the Full-CI wave function.
|
||||
Conventional CI methods can be seen as an exact resolution of Schrödinger's
|
||||
equation for a complete, well-defined subset of determinants (and for a given
|
||||
atomic basis set), while selected CI methods are closer to a truncation of the
|
||||
Full-CI.
|
||||
|
||||
It has been noticed long ago that, even inside a predefined subspace of
|
||||
determinants, only a small number significantly contributes to the wave
|
||||
function.:cite:`Bytautas_2009,Anderson_2018` Therefore, an *on the fly*
|
||||
selection of determinants is a rather natural idea that has been proposed
|
||||
in the late 60's by Bender and Davidson :cite:`Bender_1969` as well as Whitten
|
||||
and Hackmeyer :cite:`Whitten_1969`.
|
||||
|
||||
The approach we are using in the |qp| is based on :abbr:`CIPSI (Configuration
|
||||
Interaction using a Perturbative Selection` developed by Huron, Rancurel and
|
||||
Malrieu,:cite:`Huron_1973` that iteratively selects *external* determinants
|
||||
|kalpha| (determinants which are not present in the wave
|
||||
function :math:`|\Psi \rangle = \sum_i c_i |i \rangle`) using a perturbative
|
||||
criterion
|
||||
|
||||
.. math::
|
||||
|
||||
e_\alpha = \frac{\langle \Psi |{\hat H}| \alpha \rangle^2 }{E - H_{\alpha\alpha}}
|
||||
|
||||
with |kalpha| the external determinant being considered, and |ealpha| the
|
||||
estimated gain in correlation energy that would be brought by the inclusion of
|
||||
|kalpha| in the wave function. |EPT| is an estimation of the total missing
|
||||
correlation energy:
|
||||
|
||||
.. math::
|
||||
|
||||
\begin{align}
|
||||
E_\text{PT2} & = \sum_{\alpha} e_\alpha \\
|
||||
E_\text{FCI} & \approx E + E_\text{PT2}
|
||||
\end{align}
|
||||
|
||||
There is however a computational downside. In \textit{a priori} selected
|
||||
methods, the rule by which determinants are selected is known \textit{a
|
||||
priori}, and therefore, one can map a particular determinant to some row or
|
||||
column index.\cite{Knowles_1984} As a consequence, it can be systematically
|
||||
determined to which matrix element of $\widehat{H}$ a two-electron integral
|
||||
contributes. This allows for the implementation of so-called
|
||||
\emph{integral-driven} methods, that work essentially by iterating over
|
||||
integrals.
|
||||
|
||||
On the contrary, in selected methods an explicit list has to be maintained, and
|
||||
there is no immediate way to know whether a determinant has been selected, or
|
||||
what its index is. Consequently, so-called \emph{determinant-driven} approaches
|
||||
will be used, in which iteration is done over determinants rather than
|
||||
integrals. This can be a lot more expensive, since the number of determinants
|
||||
is typically much larger than the number of integrals. The number of
|
||||
determinants scales as $\order{\Norb!}$ while the number of integrals scales as
|
||||
$\order{\Norb^4}$ with the number of MOs.
|
||||
|
||||
Furthermore, determinant-driven methods require an effective way to compare
|
||||
determinants in order to extract the corresponding excitation operators, and a
|
||||
way to rapidly fetch the associated integrals involved
|
||||
section~\ref{sec:meth_mel}.
|
||||
|
||||
Because of this high computational cost, approximations have been
|
||||
proposed.\cite{Evangelisti_1983} And recently, the \emph{Heat-Bath
|
||||
Configuration Interaction (HCI)} algorithm has taken farther the idea of a more
|
||||
approximate but extremely cheap selection.\cite{Holmes_2016, Sharma_2017}
|
||||
Compared to CIPSI, the selection criterion is simplified to
|
||||
|
||||
.. math::
|
||||
|
||||
e^{\text{HCI}}_\alpha = \max \qty( \qty| c_I \Hij{D_I}{\alpha} | )
|
||||
|
||||
This algorithmically allows for an extremely fast selection of doubly
|
||||
excited determinants by an integral-driven approach.
|
||||
|
||||
Full Configuration Interaction Quantum Monte Carlo (FCI-QMC) is an alternate
|
||||
approach to selection recently proposed in 2009 by Alavi \textit{et
|
||||
al.},\cite{Booth_2009,Booth_2010,Cleland_2010} where signed walkers spawn from
|
||||
one determinant to connected ones, with a probability that is a function of the
|
||||
associated matrix element. The average proportion of walkers on a determinant
|
||||
converges to its coefficient in the FCI wave function.
|
||||
|
||||
|
||||
.. |kalpha| replace:: :math:`| \alpha \rangle`
|
||||
.. |ealpha| replace:: :math:`e_\alpha `
|
||||
.. |EPT| replace:: :math:`E_{\text PT2}`
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
Programming in the Quantum Package
|
||||
==================================
|
||||
Programming in the |qp|
|
||||
=======================
|
||||
|
||||
To program in the Quantum Package, it is required that you are familiar with
|
||||
To program in the |qp|, it is required that you are familiar with
|
||||
the `IRPF90`_ code generator. A gitbook can be found `here <http://scemama.gitbooks.io/irpf90>`_.
|
||||
|
||||
|
||||
|
@ -10,6 +10,5 @@ the `IRPF90`_ code generator. A gitbook can be found `here <http://scemama.gitbo
|
|||
.. interface integrals MO => FCIDUMP
|
||||
.. TODO : molden module in resultsFile
|
||||
|
||||
.. include:: work.rst
|
||||
.. include:: ../work.rst
|
||||
|
||||
.. _IRPF90: http://irpf90.ups-tlse.fr
|
|
@ -1,3 +1,42 @@
|
|||
%%% ARXIV TO BE UPDATED %%%
|
||||
@article{Giner2018Sep,
|
||||
author = {Giner, Emmanuel and Pradines, Barth\'{e}l\'{e}my and Fert\'{e}, Anthony and Assaraf, Roland and Savin, Andreas and Toulouse, Julien},
|
||||
title = {{Curing basis-set convergence of wave-function theory using density-functional theory: a systematically improvable approach}},
|
||||
journal = {arXiv},
|
||||
year = {2018},
|
||||
month = {Sep},
|
||||
eprint = {1809.01466},
|
||||
url = {https://arxiv.org/abs/1809.01466}
|
||||
}
|
||||
|
||||
@article{Flores2018Nov,
|
||||
author = { {Pineda Flores}, Sergio D. and Neuscamman, Eric},
|
||||
title = {{Excited State Specific Multi-Slater Jastrow Wave Functions}},
|
||||
journal = {arXiv},
|
||||
year = {2018},
|
||||
month = {Nov},
|
||||
eprint = {1811.00583},
|
||||
url = {https://arxiv.org/abs/1811.00583}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%%%% PUBLISHED PAPERS
|
||||
|
||||
@article{Giner2018Oct,
|
||||
author = {Giner, Emmanuel and Tew, David and Garniron, Yann and Alavi, Ali},
|
||||
title = {{Interplay between electronic correlation and metal-ligand delocalization in the spectroscopy of transition metal compounds: case study on a series of planar Cu2+complexes.}},
|
||||
journal = {J. Chem. Theory Comput.},
|
||||
year = {2018},
|
||||
month = {Oct},
|
||||
issn = {1549-9618},
|
||||
publisher = {American Chemical Society},
|
||||
doi = {10.1021/acs.jctc.8b00591}
|
||||
}
|
||||
|
||||
@article{Loos_2018,
|
||||
doi = {10.1021/acs.jctc.8b00406},
|
||||
url = {https://doi.org/10.1021%2Facs.jctc.8b00406},
|
||||
|
@ -114,6 +153,19 @@
|
|||
title = {Orthogonal Valence Bond Hamiltonians incorporating dynamical correlation effects},
|
||||
journal = {Computational and Theoretical Chemistry}
|
||||
}
|
||||
@article{Giner2016Mar,
|
||||
author = {Giner, Emmanuel and Angeli, Celestino},
|
||||
title = {{Spin density and orbital optimization in open shell systems: A rational and computationally efficient proposal}},
|
||||
journal = {J. Chem. Phys.},
|
||||
volume = {144},
|
||||
number = {10},
|
||||
pages = {104104},
|
||||
year = {2016},
|
||||
month = {Mar},
|
||||
issn = {0021-9606},
|
||||
publisher = {American Institute of Physics},
|
||||
doi = {10.1063/1.4943187}
|
||||
}
|
||||
@article{Giner_2016,
|
||||
doi = {10.1063/1.4940781},
|
||||
url = {https://doi.org/10.1063%2F1.4940781},
|
||||
|
@ -127,6 +179,7 @@
|
|||
title = {A simple approach to the state-specific {MR}-{CC} using the intermediate Hamiltonian formalism},
|
||||
journal = {The Journal of Chemical Physics}
|
||||
}
|
||||
|
||||
@article{Caffarel_2016,
|
||||
doi = {10.1063/1.4947093},
|
||||
url = {https://doi.org/10.1063%2F1.4947093},
|
||||
|
@ -164,6 +217,21 @@
|
|||
title = {Fixed-node diffusion Monte Carlo potential energy curve of the fluorine molecule F2 using selected configuration interaction trial wavefunctions},
|
||||
journal = {The Journal of Chemical Physics}
|
||||
}
|
||||
|
||||
@article{Giner2015Sep,
|
||||
author = {Giner, Emmanuel and Angeli, Celestino},
|
||||
title = {{Metal-ligand delocalization and spin density in the CuCl2 and [CuCl4]2{-} molecules: Some insights from wave function theory}},
|
||||
journal = {J. Chem. Phys.},
|
||||
volume = {143},
|
||||
number = {12},
|
||||
pages = {124305},
|
||||
year = {2015},
|
||||
month = {Sep},
|
||||
issn = {0021-9606},
|
||||
publisher = {American Institute of Physics},
|
||||
doi = {10.1063/1.4931639}
|
||||
}
|
||||
|
||||
@article{Scemama_2014,
|
||||
doi = {10.1063/1.4903985},
|
||||
url = {https://doi.org/10.1063%2F1.4903985},
|
||||
|
@ -214,3 +282,6 @@
|
|||
url = {https://arxiv.org/abs/1311.6244}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
Research made with the Quantum Package
|
||||
======================================
|
||||
|
||||
.. bibliography:: research.bib
|
||||
:style: unsrt
|
||||
:all:
|
|
@ -1,213 +0,0 @@
|
|||
User's guide
|
||||
============
|
||||
|
||||
The input data is stored in a `EZFIO`_ database. It is a hierarchical data
|
||||
format which uses the hierarchy of the file system to organize the data, stored
|
||||
in a directory.
|
||||
To access the data in the EZFIO file, you can use the provided API (Fortran,
|
||||
Python, OCaml or Bash), or tools such as ``qp_edit`` provided with the Quantum
|
||||
Package. The data in the EZFIO directory is stroed as plain text files, so
|
||||
it can be read with a text editor.
|
||||
To create an EZFIO directory from scratch, the ``qp_create_ezfio_from_xyz`` should
|
||||
be used.
|
||||
|
||||
qp_create_ezfio_from_xyz
|
||||
------------------------
|
||||
|
||||
Usage ::
|
||||
|
||||
qp_create_ezfio_from_xyz [FLAGS] (xyz_file|zmt_file)
|
||||
|
||||
Flags ::
|
||||
|
||||
-b string Name of basis set.
|
||||
[-au] Input geometry is in atomic units.
|
||||
[-c int] Total charge of the molecule. Default is 0.
|
||||
[-cart] Compute AOs in the Cartesian basis set (6d, 10f, ...)
|
||||
[-d float] Add dummy atoms. x * (covalent radii of the atoms)
|
||||
[-m int] Spin multiplicity (2S+1) of the molecule. Default is 1.
|
||||
[-o file] Name of the created EZFIO file.
|
||||
[-p string] Name of the pseudopotential
|
||||
[-help] print this help text and exit
|
||||
(alias: -?)
|
||||
|
||||
|
||||
This command creates an EZFIO directory from a standard xyz file or from a
|
||||
z-matrix file in Gaussian format. The basis set is defined as a single string
|
||||
if all the atoms are taken from the same basis set, otherwise specific elements
|
||||
can be defined as follows::
|
||||
|
||||
-b "cc-pcvdz | H:cc-pvdz | C:6-31g"
|
||||
-b "cc-pvtz | 1,H:sto-3g | 3,H:6-31g"
|
||||
|
||||
If a file with the same name as the basis set exists, this file will be read.
|
||||
Basis set files should be given in GAMESS format. Otherwise, the basis set is
|
||||
obtained from the local database of the Quantum Package.
|
||||
|
||||
The same rules apply for pseudopotentials.
|
||||
|
||||
|
||||
qp_convert_output_to_ezfio.py
|
||||
-----------------------------
|
||||
|
||||
Usage ::
|
||||
|
||||
qp_convert_output_to_ezfio.py FILE.out [-o EZFIO_DIRECTORY]
|
||||
|
||||
This Python script uses the `resultsFile`_ Python library to gather the geometry,
|
||||
AOs and MOs from output files of GAMESS and Gaussian and create an EZFIO firectory
|
||||
with this information. Some constraints are necessary in the output file : the run
|
||||
needs to be a single point HF, DFT or CASSCF.
|
||||
|
||||
The following keywords are necessary for Gaussian ::
|
||||
|
||||
GFPRINT pop=Full
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
qp_edit
|
||||
-------
|
||||
|
||||
Usage ::
|
||||
|
||||
qp_edit EZFIO_DIRECTORY
|
||||
|
||||
|
||||
Flags ::
|
||||
|
||||
[-c] Checks the input data
|
||||
[-ndet int] Truncate the wavefunction to the target number of determinants
|
||||
[-state int] Pick the state as a new wavefunction.
|
||||
[-help] print this help text and exit
|
||||
(alias: -?)
|
||||
|
||||
This command reads the content of the EZFIO directory and creates a temporary
|
||||
file containing the data. The data is presented as a ReStructured Text (rst)
|
||||
document, where each section corresponds to the corresponding Quantum Package
|
||||
module.
|
||||
The content of the file can be modified to change the input parameters. When
|
||||
the text editor is closed, the updated data is saved into the EZFIO directory.
|
||||
|
||||
When the wave function is too large (more than 10 000 determinants), the
|
||||
determinants are not displayed.
|
||||
|
||||
|
||||
|
||||
qp_set_mo_class
|
||||
---------------
|
||||
|
||||
Usage ::
|
||||
|
||||
qp_set_mo_class [FLAGS] EZFIO_DIRECTORY
|
||||
|
||||
|
||||
Flags ::
|
||||
|
||||
[-act range] Range of active orbitals
|
||||
[-core range] Range of core orbitals
|
||||
[-del range] Range of deleted orbitals
|
||||
[-inact range] Range of inactive orbitals
|
||||
[-q] Query: print the current masks
|
||||
[-virt range] Range of virtual orbitals
|
||||
[-help] print this help text and exit
|
||||
(alias: -?)
|
||||
|
||||
This command sets the orbital classes in an EZFIO directory.
|
||||
|
||||
Core
|
||||
MOs which are always doubly occupied
|
||||
|
||||
Deleted
|
||||
MOs which are never occupied
|
||||
|
||||
Active
|
||||
MOs in which any number of holes/particles can be made
|
||||
|
||||
Inactive
|
||||
MOs in which only holes can be made
|
||||
|
||||
Virtual
|
||||
MOs in which only particles can be made
|
||||
|
||||
To avoid errors, all the MOs should be given a class.
|
||||
The range of MOs are given like the ranges in SLURM commands. For example,
|
||||
``"[36-53,72-107,126-131]"``.
|
||||
|
||||
To quickly setup a frozen core calculation, the script ``qp_set_frozen_core.py``
|
||||
can be used::
|
||||
|
||||
qp_set_frozen_core.py EZFIO_DIRECTORY
|
||||
|
||||
.. warning::
|
||||
For atoms on the right of the periodic table, `qp_set_frozen_core.py` will
|
||||
work as expected. But for atoms on the left, a small core will be chosen. For
|
||||
example, a carbon atom will have 2 core electrons, but a Lithium atom will have
|
||||
zero.
|
||||
|
||||
|
||||
|
||||
Excited states
|
||||
--------------
|
||||
|
||||
It is possible to run excited states calculations with the quantum package. To
|
||||
do this, set the ``n_states`` variable in the ``Determinants`` section to the
|
||||
number of requested states. The selection criterion will be the maximum of the
|
||||
selection criteria for each state. If the Davidson diagonalization has
|
||||
difficulties to converge, increase the ``n_states_diag`` variable in the
|
||||
``Davidson`` section.
|
||||
|
||||
When computing multiple states, it is good to have the ``s2_eig`` flag of the
|
||||
``Determinants`` section set to ``true``. This will force the Davidson algorithm to
|
||||
choose only vectors with a value of S^2 equal to the ``expected_s2``.
|
||||
Otherwise, different spin states will come out in the diagonalization.
|
||||
|
||||
The Quantum Package doesn't take account of the symmetry. Due to numerical
|
||||
noise, excited states of different symmetries may enter in the calculation.
|
||||
Note that it is possible to make state-average calculation of states with
|
||||
different symmetries and/or different spin multiplicities.
|
||||
|
||||
To include excited state of all possible symmetries, a simple trick is to
|
||||
run a preliminary multi-state CIS calculation, and then running the selected
|
||||
FCI restarting from the CIS states, setting the ``read_wf`` flag of the
|
||||
``Determinants`` section to ``true``.
|
||||
|
||||
Usually, it is good practice to use state-averaged MOs so that all states have
|
||||
MOs of comparable quality. For example, when searching for a singly excited
|
||||
state, one can use state-average natural orbitals of a preliminary CIS
|
||||
calculation.
|
||||
|
||||
|
||||
|
||||
Natural orbitals
|
||||
----------------
|
||||
|
||||
To produce state-average natural orbitals, run ::
|
||||
|
||||
qp_run save_natorb file.ezfio
|
||||
|
||||
The MOs will be replaced, so the two-electron integrals and the wave function are invalidated as well.
|
||||
|
||||
|
||||
.. _EZFIO: http://gitlab.com/scemama/EZFIO
|
||||
.. _resultsFile: http://gitlab.com/scemama/resultsFile
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. important:: TODO
|
||||
|
||||
.. include:: work.rst
|
||||
|
||||
* qp_edit
|
||||
* qp_run
|
||||
* qp_convert
|
||||
* Interfaces : molden/fcidump
|
||||
* Natural orbitals
|
||||
* Parameters for Hartree-Fock
|
||||
* Parameters for Davidson
|
||||
* Running in parallel
|
||||
* Parameters for selection (Generators/selectors)
|
||||
|
33
docs/source/users_guide/excited_states.rst
Normal file
33
docs/source/users_guide/excited_states.rst
Normal file
|
@ -0,0 +1,33 @@
|
|||
Excited states
|
||||
==============
|
||||
|
||||
.. TODO
|
||||
|
||||
It is possible to run excited states calculations with the quantum package. To
|
||||
do this, set the ``n_states`` variable in the ``Determinants`` section to the
|
||||
number of requested states. The selection criterion will be the maximum of the
|
||||
selection criteria for each state. If the Davidson diagonalization has
|
||||
difficulties to converge, increase the ``n_states_diag`` variable in the
|
||||
``Davidson`` section.
|
||||
|
||||
When computing multiple states, it is good to have the ``s2_eig`` flag of the
|
||||
``Determinants`` section set to ``true``. This will force the Davidson algorithm to
|
||||
choose only vectors with a value of S^2 equal to the ``expected_s2``.
|
||||
Otherwise, different spin states will come out in the diagonalization.
|
||||
|
||||
The Quantum Package doesn't take account of the symmetry. Due to numerical
|
||||
noise, excited states of different symmetries may enter in the calculation.
|
||||
Note that it is possible to make state-average calculation of states with
|
||||
different symmetries and/or different spin multiplicities.
|
||||
|
||||
To include excited state of all possible symmetries, a simple trick is to
|
||||
run a preliminary multi-state CIS calculation, and then running the selected
|
||||
FCI restarting from the CIS states, setting the ``read_wf`` flag of the
|
||||
``Determinants`` section to ``true``.
|
||||
|
||||
Usually, it is good practice to use state-averaged MOs so that all states have
|
||||
MOs of comparable quality. For example, when searching for a singly excited
|
||||
state, one can use state-average natural orbitals of a preliminary CIS
|
||||
calculation.
|
||||
|
||||
|
5
docs/source/users_guide/hartree_fock.rst
Normal file
5
docs/source/users_guide/hartree_fock.rst
Normal file
|
@ -0,0 +1,5 @@
|
|||
.. _Hartree_Fock:
|
||||
|
||||
.. Fetch the documentation provided in the module.
|
||||
.. include:: ../../../src/Hartree_Fock/README.rst
|
||||
|
|
@ -1,6 +1,20 @@
|
|||
Interfaces
|
||||
==========
|
||||
|
||||
.. TODO
|
||||
|
||||
A few interfaces to external codes are available.
|
||||
|
||||
\* -> |qp|
|
||||
----------
|
||||
|
||||
`GAMESS`_ / Gaussian
|
||||
Using the resultsFile Python library, the geometr and molecular orbitals can be read.
|
||||
This is useful to make calculations with CAS-SCF orbitals
|
||||
|
||||
|qp| -> \*
|
||||
----------
|
||||
|
||||
`Molden`_
|
||||
3D plots of Molecular Orbitals
|
||||
|
||||
|
@ -8,18 +22,10 @@ FCIDUMP
|
|||
Interface with the FCI-QMC program `NECI`_, or the semi-stochastic Heat-Bath CI
|
||||
program `Dice`_.
|
||||
|
||||
`GAMESS`_ / Gaussian
|
||||
Using the resultsFile Python library, the geometr and molecular orbitals can be read.
|
||||
This is useful to make calculations with CAS-SCF orbitals
|
||||
|
||||
`QMCPack`_ / `CHAMP`_ / `QMC=Chem`_
|
||||
Trial wave functions can be used for Quantum Monte Carlo, with or without pseudo-potentials.
|
||||
These interfaces are provided as `external plugins`_.
|
||||
|
||||
|
||||
|
||||
|
||||
.. _Molden: http://cheminf.cmbi.ru.nl/molden/
|
||||
.. _GAMESS: https://www.msg.chem.iastate.edu/gamess/
|
||||
.. _QMC=Chem: https://gitlab.com/scemama/qmcchem
|
||||
.. _CHAMP: https://www.utwente.nl/en/tnw/ccp/research/CHAMP.html
|
||||
.. _NECI: https://github.com/ghb24/NECI_STABLE
|
||||
.. _Dice: https://sanshar.github.io/Dice/
|
||||
.. _QMCPack: https://qmcpack.org
|
14
docs/source/users_guide/natural_orbitals.rst
Normal file
14
docs/source/users_guide/natural_orbitals.rst
Normal file
|
@ -0,0 +1,14 @@
|
|||
Natural orbitals
|
||||
================
|
||||
|
||||
.. TODO
|
||||
|
||||
To produce state-average natural orbitals, run ::
|
||||
|
||||
qp_run save_natorb file.ezfio
|
||||
|
||||
The MOs will be replaced, so the two-electron integrals and the wave function
|
||||
are invalidated as well.
|
||||
|
||||
|
||||
|
23
docs/source/users_guide/plugins.rst
Normal file
23
docs/source/users_guide/plugins.rst
Normal file
|
@ -0,0 +1,23 @@
|
|||
External plugins
|
||||
----------------
|
||||
|
||||
.. TODO
|
||||
|
||||
The |qp| has very few executables out of the box. Most of the time, external
|
||||
plugins need to be downloaded and copied in the ``$QP_ROOT/plugins`` directory.
|
||||
The ``qp_module.py`` script will be needed::
|
||||
|
||||
qp_module.py create -n NAME [CHILDREN_MODULE...]
|
||||
qp_module.py install NAME ...
|
||||
qp_module.py uninstall NAME
|
||||
|
||||
|
||||
For example you can type ::
|
||||
|
||||
qp_module.py install QMCChem
|
||||
|
||||
This will install the `QMCChem` module. All the modules are installed in the
|
||||
``$QP_ROOT/src/``, and all the available modules are in ``$QP_ROOT/plugins/``.
|
||||
|
||||
|
||||
|
21
docs/source/users_guide/qp_convert_output_to_ezfio.rst
Normal file
21
docs/source/users_guide/qp_convert_output_to_ezfio.rst
Normal file
|
@ -0,0 +1,21 @@
|
|||
.. _qp_convert_output_to_ezfio.py:
|
||||
|
||||
qp_convert_output_to_ezfio.py
|
||||
=============================
|
||||
|
||||
.. TODO
|
||||
|
||||
Usage ::
|
||||
|
||||
qp_convert_output_to_ezfio.py FILE.out [-o EZFIO_DIRECTORY]
|
||||
|
||||
This Python script uses the `resultsFile`_ Python library to gather the geometry,
|
||||
AOs and MOs from output files of |GAMESS| and Gaussian and create an |EZFIO| directory
|
||||
with this information. Some constraints are necessary in the output file : the run
|
||||
needs to be a single point HF, DFT or CASSCF.
|
||||
|
||||
.. note::
|
||||
The following keywords are necessary for Gaussian ::
|
||||
|
||||
GFPRINT pop=Full
|
||||
|
128
docs/source/users_guide/qp_create_ezfio_from_xyz.rst
Normal file
128
docs/source/users_guide/qp_create_ezfio_from_xyz.rst
Normal file
|
@ -0,0 +1,128 @@
|
|||
.. _qp_create_ezfio_from_xyz:
|
||||
|
||||
qp_create_ezfio_from_xyz
|
||||
========================
|
||||
|
||||
.. TODO
|
||||
|
||||
Usage ::
|
||||
|
||||
qp_create_ezfio_from_xyz [FLAGS] (xyz_file|zmt_file)
|
||||
|
||||
Flags ::
|
||||
|
||||
-b string Name of basis set.
|
||||
[-au] Input geometry is in atomic units.
|
||||
[-c int] Total charge of the molecule. Default is 0.
|
||||
[-cart] Compute AOs in the Cartesian basis set (6d, 10f, ...)
|
||||
[-d float] Add dummy atoms. x * (covalent radii of the atoms)
|
||||
[-m int] Spin multiplicity (2S+1) of the molecule. Default is 1.
|
||||
[-o file] Name of the created EZFIO file.
|
||||
[-p string] Name of the pseudo-potential
|
||||
[-help] print this help text and exit
|
||||
(alias: -?)
|
||||
|
||||
|
||||
This command creates an |EZFIO| directory from a standard `xyz` file or from a
|
||||
`z-matrix` file in Gaussian format. The basis set is defined as a single string
|
||||
if all the atoms are taken from the same basis set, otherwise specific elements
|
||||
can be defined as follows::
|
||||
|
||||
-b "cc-pcvdz | H:cc-pvdz | C:6-31g"
|
||||
-b "cc-pvtz | 1,H:sto-3g | 3,H:6-31g"
|
||||
|
||||
By default, the basis set is obtained from the local database of the |qp|.
|
||||
|
||||
|
||||
Using custom atomic basis sets
|
||||
------------------------------
|
||||
|
||||
If a file with the same name as the basis set exists, this file will be read.
|
||||
For example, if the file containing the basis set is named ``custom.basis``,
|
||||
and the *xyz* geometry is in ``molecule.xyz``, the following should be used::
|
||||
|
||||
qp_create_ezfio_from_xyz -b custom.basis molecule.xyz
|
||||
|
||||
Basis set files should be given in |GAMESS| format, where the full names of the
|
||||
atoms are given, and the basis sets for each element are separated by a blank line.
|
||||
Here is an example ::
|
||||
|
||||
HYDROGEN
|
||||
S 3
|
||||
1 13.0100000 0.0196850
|
||||
2 1.9620000 0.1379770
|
||||
3 0.4446000 0.4781480
|
||||
S 1
|
||||
1 0.1220000 1.0000000
|
||||
P 1
|
||||
1 0.7270000 1.0000000
|
||||
|
||||
BORON
|
||||
S 8
|
||||
1 4570.0000000 0.0006960
|
||||
2 685.9000000 0.0053530
|
||||
3 156.5000000 0.0271340
|
||||
4 44.4700000 0.1013800
|
||||
5 14.4800000 0.2720550
|
||||
6 5.1310000 0.4484030
|
||||
7 1.8980000 0.2901230
|
||||
8 0.3329000 0.0143220
|
||||
S 8
|
||||
1 4570.0000000 -0.0001390
|
||||
2 685.9000000 -0.0010970
|
||||
3 156.5000000 -0.0054440
|
||||
4 44.4700000 -0.0219160
|
||||
5 14.4800000 -0.0597510
|
||||
6 5.1310000 -0.1387320
|
||||
7 1.8980000 -0.1314820
|
||||
8 0.3329000 0.5395260
|
||||
S 1
|
||||
1 0.1043000 1.0000000
|
||||
P 3
|
||||
1 6.0010000 0.0354810
|
||||
2 1.2410000 0.1980720
|
||||
3 0.3364000 0.5052300
|
||||
P 1
|
||||
1 0.0953800 1.0000000
|
||||
D 1
|
||||
1 0.3430000 1.0000000
|
||||
|
||||
|
||||
Using custom pseudo-potentials
|
||||
------------------------------
|
||||
|
||||
As for the basis set, if a file with the same name as the pseudo-potential
|
||||
exists, this file will be read.
|
||||
For example, if the file containing the custom pseudo-potential is named
|
||||
``custom.pseudo``, the basis set is named ``custom.basis``, and the *xyz*
|
||||
geometry is in ``molecule.xyz``, the following command should be used::
|
||||
|
||||
qp_create_ezfio_from_xyz -b custom.basis -p custom.pseudo molecule.xyz
|
||||
|
||||
Pseudo-potential files should be given in a format very close to |GAMESS|
|
||||
format. The first line should be formatted as ``"%s GEN %d %d"`` where the
|
||||
first string is the chemical symbol, the first integer is the number of
|
||||
core electrons to be removed and the second integer is LMAX+1 as in |GAMESS|
|
||||
format.
|
||||
The pseudo-potential for each element are separated by a blank line.
|
||||
Here is an example ::
|
||||
|
||||
Ne GEN 2 1
|
||||
3
|
||||
8.00000000 1 10.74945199
|
||||
85.99561593 3 10.19801460
|
||||
-56.79004456 2 10.18694048
|
||||
1
|
||||
55.11144535 2 12.85042963
|
||||
|
||||
F GEN 2 1
|
||||
3
|
||||
7.00000000 1 11.39210685
|
||||
79.74474797 3 10.74911370
|
||||
-49.45159098 2 10.45120693
|
||||
1
|
||||
50.25646328 2 11.30345826
|
||||
|
||||
|
||||
|
||||
|
39
docs/source/users_guide/qp_edit.rst
Normal file
39
docs/source/users_guide/qp_edit.rst
Normal file
|
@ -0,0 +1,39 @@
|
|||
.. _qp_edit:
|
||||
|
||||
qp_edit
|
||||
=======
|
||||
|
||||
.. TODO
|
||||
|
||||
Usage ::
|
||||
|
||||
qp_edit EZFIO_DIRECTORY
|
||||
|
||||
|
||||
Flags ::
|
||||
|
||||
[-c] Checks the input data
|
||||
[-ndet int] Truncate the wavefunction to the target number of determinants
|
||||
[-state int] Pick the state as a new wavefunction.
|
||||
[-help] print this help text and exit
|
||||
(alias: -?)
|
||||
|
||||
This command reads the content of the |EZFIO| directory and creates a temporary
|
||||
file containing the data. The data is presented as a *ReStructured Text* (rst)
|
||||
document, where each section corresponds to the corresponding |qp| module.
|
||||
The content of the file can be modified to change the input parameters. When
|
||||
the text editor is closed, the updated data is saved into the |EZFIO| directory.
|
||||
|
||||
.. warning::
|
||||
When the wave function is too large (more than 10 000 determinants), the
|
||||
determinants are not displayed.
|
||||
|
||||
Here is a short list of important control parameters :
|
||||
|
||||
read_wf
|
||||
If ``false``, initialize the calculation with a single-determinant wave
|
||||
function. If ``true``, initialize the calculation with the wave function stored
|
||||
in the |EZFIO| directory.
|
||||
|
||||
|
||||
|
11
docs/source/users_guide/qp_run.rst
Normal file
11
docs/source/users_guide/qp_run.rst
Normal file
|
@ -0,0 +1,11 @@
|
|||
.. _qp_run:
|
||||
|
||||
qp_run
|
||||
======
|
||||
|
||||
.. TODO
|
||||
|
||||
``qp_run`` is the command used to run a calculation.
|
||||
|
||||
|
||||
|
59
docs/source/users_guide/qp_set_mo_class.rst
Normal file
59
docs/source/users_guide/qp_set_mo_class.rst
Normal file
|
@ -0,0 +1,59 @@
|
|||
.. _qp_set_mo_class:
|
||||
|
||||
qp_set_mo_class
|
||||
===============
|
||||
|
||||
.. TODO
|
||||
|
||||
Usage ::
|
||||
|
||||
qp_set_mo_class [FLAGS] EZFIO_DIRECTORY
|
||||
|
||||
|
||||
Flags ::
|
||||
|
||||
[-act range] Range of active orbitals
|
||||
[-core range] Range of core orbitals
|
||||
[-del range] Range of deleted orbitals
|
||||
[-inact range] Range of inactive orbitals
|
||||
[-q] Query: print the current masks
|
||||
[-virt range] Range of virtual orbitals
|
||||
[-help] print this help text and exit
|
||||
(alias: -?)
|
||||
|
||||
This command sets the orbital classes in an |EZFIO| directory.
|
||||
|
||||
Core
|
||||
MOs which are always doubly occupied
|
||||
|
||||
Deleted
|
||||
MOs which are never occupied
|
||||
|
||||
Active
|
||||
MOs in which any number of holes/particles can be made
|
||||
|
||||
Inactive
|
||||
MOs in which only holes can be made
|
||||
|
||||
Virtual
|
||||
MOs in which only particles can be made
|
||||
|
||||
To avoid errors, all the MOs should be given a class.
|
||||
The range of MOs are given like the ranges in |SLURM| commands. For example,
|
||||
``"[36-53,72-107,126-131]"``.
|
||||
|
||||
.. tip::
|
||||
To quickly setup a frozen core calculation, the script ``qp_set_frozen_core.py``
|
||||
can be used::
|
||||
|
||||
qp_set_frozen_core.py EZFIO_DIRECTORY
|
||||
|
||||
.. warning::
|
||||
For elements on the right of the periodic table, `qp_set_frozen_core.py` will
|
||||
work as expected. But for elements on the left, a small core will be chosen. For
|
||||
example, a Carbon atom will have 2 core electrons, but a Lithium atom will have
|
||||
zero.
|
||||
|
||||
|
||||
|
||||
|
82
docs/source/users_guide/users_guide.rst
Normal file
82
docs/source/users_guide/users_guide.rst
Normal file
|
@ -0,0 +1,82 @@
|
|||
Tutorial
|
||||
========
|
||||
|
||||
.. TODO
|
||||
|
||||
In this tutorial, we will run a CIPSI calculation on the HCN molecule.
|
||||
|
||||
Before using the |qp|, it is required to source the file :file:`quantum_package.rc`
|
||||
if it has not been done already in the current shell.
|
||||
|
||||
|
||||
Create the EZFIO database
|
||||
-------------------------
|
||||
|
||||
The data relative to calculations are stored in an |EZFIO| database.
|
||||
|EZFIO| is a hierarchical data format which uses the hierarchy of the file
|
||||
system to organize the data, as files stored in a directory.
|
||||
The data in the |EZFIO| directory are stored as plain text files, so it can be
|
||||
opened with any text editor.
|
||||
To access the data of the |EZFIO| database, the APIs (Fortran, |Python|,
|
||||
|OCaml| or Bash) provided by |EZFIO| should be used, or tools using these APIs
|
||||
such as :ref:`qp_edit` provided with the |qp|.
|
||||
|
||||
First, create an `xyz` file containing the coordinates of the molecule.
|
||||
The file :file:`hcn.xyz` contains::
|
||||
|
||||
3
|
||||
HCN molecule
|
||||
C 0.0 0.0 0.0
|
||||
H 0.0 0.0 1.064
|
||||
N 0.0 0.0 -1.156
|
||||
|
||||
|
||||
This xyz file is now used with the :ref:`qp_create_ezfio_from_xyz` command to
|
||||
create an |EZFIO| database with the 6-31G basis set:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
qp_create_ezfio_from_xyz -b "6-31G" hcn.xyz -o hcn
|
||||
|
||||
The EZFIO database now contains data relative to the nuclear coordinates and the atomic
|
||||
basis set:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ ls hcn
|
||||
ao_basis/ electrons/ ezfio/ nuclei/ pseudo/
|
||||
|
||||
|
||||
Run a Hartree-Fock calculation
|
||||
------------------------------
|
||||
|
||||
The program ref:`qp_run` is the driver program of the |qp|. To run an SCF calculation,
|
||||
just run
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
qp_run SCF hcn
|
||||
|
||||
The expected energy is ``-92.8278566979`` au.
|
||||
|
||||
.. seealso::
|
||||
|
||||
The documentation of the :ref:`Hartree_Fock` module.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. important:: TODO
|
||||
|
||||
.. include:: ../work.rst
|
||||
|
||||
* qp_run
|
||||
* qp_convert
|
||||
* Interfaces : molden/fcidump
|
||||
* Natural orbitals
|
||||
* Parameters for Hartree-Fock
|
||||
* Parameters for Davidson
|
||||
* Running in parallel
|
||||
* Parameters for selection (Generators/selectors)
|
||||
|
|
@ -96,13 +96,25 @@ end = struct
|
|||
let n_states =
|
||||
States_number.to_int n
|
||||
in
|
||||
Ezfio.set_determinants_n_states n_states;
|
||||
let data =
|
||||
Array.create n_states 1.
|
||||
|> Array.to_list
|
||||
let old_nstates, read_wf =
|
||||
Ezfio.get_determinants_n_states (),
|
||||
Ezfio.get_determinants_read_wf ()
|
||||
in
|
||||
Ezfio.ezfio_array_of_list ~rank:1 ~dim:[| n_states |] ~data
|
||||
|> Ezfio.set_determinants_state_average_weight
|
||||
Printf.eprintf "nstates : %d\n" n_states;
|
||||
Printf.eprintf "old_nstates : %d\n" old_nstates;
|
||||
Printf.eprintf "read_wf : %s\n" (if read_wf then "true" else "false");
|
||||
if read_wf && old_nstates <> n_states then
|
||||
Printf.eprintf "Warning : n_states could not be changed because read_wf is true\n%!"
|
||||
else
|
||||
begin
|
||||
Ezfio.set_determinants_n_states n_states;
|
||||
let data =
|
||||
Array.create n_states 1.
|
||||
|> Array.to_list
|
||||
in
|
||||
Ezfio.ezfio_array_of_list ~rank:1 ~dim:[| n_states |] ~data
|
||||
|> Ezfio.set_determinants_state_average_weight
|
||||
end
|
||||
;;
|
||||
|
||||
let write_state_average_weight data =
|
||||
|
|
|
@ -3,3 +3,31 @@ Hartree-Fock Module
|
|||
===================
|
||||
|
||||
|
||||
The Hartree-Fock module performs *Restricted* Hartree-Fock calculations (the
|
||||
spatial part of the MOs is common for alpha and beta spinorbitals).
|
||||
|
||||
The Hartree-Fock program does the following:
|
||||
|
||||
#. 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
|
||||
|
||||
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.
|
||||
|
||||
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 ``level_shift``.
|
||||
|
||||
To start a calculation from scratch, the simplest way is to remove the
|
||||
``mo_basis`` directory from the |EZFIO| database, and run the SCF again.
|
||||
|
||||
|
||||
|
||||
|
||||
.. _DIIS: https://en.wikipedia.org/w/index.php?title=DIIS
|
||||
.. _level-shifting: https://doi.org/10.1002/qua.560070407
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user