10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-06-01 02:45:29 +02:00
quantum_package/src
2014-10-30 12:25:20 +01:00
..
AOs Added qp_print.ml 2014-10-07 19:33:11 +02:00
BiInts Checking map_integrals.irp.f 2014-10-27 12:40:30 +01:00
Bitmask Starting work on DDCI 2014-10-24 19:28:54 +02:00
CID Put do_mono/diexcitations in generate_h_apply.py 2014-06-20 15:23:04 +02:00
CID_SC2_selected Put do_mono/diexcitations in generate_h_apply.py 2014-06-20 15:23:04 +02:00
CID_selected Put do_mono/diexcitations in generate_h_apply.py 2014-06-20 15:23:04 +02:00
CIS save wavefunction general merged 2014-07-09 14:52:42 +02:00
CIS_dressed Added ezfio_defaults in data 2014-07-29 14:23:33 +02:00
CISD Put do_mono/diexcitations in generate_h_apply.py 2014-06-20 15:23:04 +02:00
CISD_SC2_selected minor changes 2014-10-06 15:49:16 +02:00
CISD_selected Wall_0 2014-07-16 14:03:05 +02:00
DensityMatrix Hartree-Fock works well 2014-06-25 14:58:58 +02:00
Dets Bug in psi_det N_det psi_coef 2014-10-28 17:16:51 +01:00
Electrons Updated documentation 2014-05-14 00:01:31 +02:00
Ezfio_files Updated documentation 2014-05-14 00:01:31 +02:00
Full_CI Optimized provides in if statements 2014-10-15 15:19:34 +02:00
Generators_full Selectors and generators default -> 0.999 of norm 2014-09-06 01:04:48 +02:00
Hartree_Fock Integrals AO not recalcaulated if not necessary 2014-10-10 14:59:03 +02:00
include Added Utils, Electrons, Ezfio, Nuclei, include, AOs. 2014-04-01 18:38:51 +02:00
MOGuess Added ~mo_tot_num in MO_number.of_int 2014-10-30 12:25:20 +01:00
MonoInts NEEDS IRPF90 1.4.1 -- Cleaned all PROVIDEs 2014-10-08 23:24:55 +02:00
MOs Test fock orb 2014-10-04 09:28:35 +02:00
MP2 NEEDS IRPF90 1.4.1 -- Cleaned all PROVIDEs 2014-10-08 23:24:55 +02:00
Nuclei Optimized provides in if statements 2014-10-15 15:19:34 +02:00
Output Added ezfio_defaults in data 2014-07-29 14:23:33 +02:00
Perturbation Corrected S^2 eigenfunction bug 2014-10-28 17:56:29 +01:00
Selectors_full Optimized provides in if statements 2014-10-15 15:19:34 +02:00
SingleRefMethod Started to introduce coarray Fortran in integrals 2014-07-10 02:33:46 +02:00
Utils Logfactorial for binom 2014-10-16 23:13:38 +02:00
.gitignore Make all_modules and all_clean compiles in parallel. Added NEEDED_MODULES 2014-04-03 11:19:41 +02:00
ASSUMPTIONS.rst Auto-update README.rst 2014-04-04 00:41:43 +02:00
Makefile Added ocaml qp_run 2014-10-10 00:26:49 +02:00
Makefile.common Added molecule in ocaml 2014-08-24 20:00:26 +02:00
Makefile.config.example NEEDS IRPF90 1.4.1 -- Cleaned all PROVIDEs 2014-10-08 23:24:55 +02:00
Makefile.config.gfortran NEEDS IRPF90 1.4.1 -- Cleaned all PROVIDEs 2014-10-08 23:24:55 +02:00
Makefile.config.ifort NEEDS IRPF90 1.4.1 -- Cleaned all PROVIDEs 2014-10-08 23:24:55 +02:00
NEEDED_MODULES Corrected NEEDED_MODULES 2014-10-09 10:36:29 +02:00
q_package.ezfio_config Added scripts 2014-04-03 01:45:22 +02:00
README.rst Added xyz types in symmetry (ocaml) 2014-08-27 16:38:13 +02:00

======================
Programming guidelines
======================

Each module (directory) contains the following:

* A ``README.rst`` file to document the current module.
* An ``ASSUMPTIONS.rst`` file. This file should document all the implicit
  assumptions used in the module. For example, if the atomic orbitals are
  assumed to be normalized, this should be mentioned in the
  ``AOs/ASSUMPTIONS.rst`` file.
* A ``NEEDED_MODULES`` file which contains the list of modules on which the
  current module depends
* A set of ``.irp.f`` files containing provider, subroutines and functions
* A ``tests`` directory that should contain the test programs of the module
  (see testing section)
* A ``Makefile`` that should compile
* Optionally some ``*.ezfio_config`` configuration files for the EZFIO
  library

A new module may be created by invoking the ``create_module.sh`` script.

Every subroutine, function or provider should be documented using the
BEGIN_DOC ... END_DOC block. The documentation should be written in
ReStructured Text format to enable the automatic generation of the Sphinx
documentation.

When the current module depends on other modules, the list of modules should
be added in the ``NEEDED_MODULES`` file.


Creating a new module
=====================

Every new module should be created using the interactive ``create_module.sh``
script located in the ``${QPACKAGE_ROOT}/scripts`` directory. This will create
all the required files with correct templates.


Makefiles
=========

Use the structure of Makefiles provided by the ``create_module.sh`` script. If
you need to re-create the Makefile, you can use the ``create_Makefile.sh``
script in the current module directory.

If you need to add some Fortran or C files that should not be tracked by IRPF90,
you have to add them manually to the Makefile in the ``SRC`` variable.
You also need to add the corresponding ``*.o`` file prefixed by ``IRPF90_temp/``.
For example

.. code-block:: Makefile

  SRC=map_module.f90
  OBJ=IRPF90_temp/map_module.o



Testing
=======

Each module contains a ``tests/`` directory which contains the test script.
Each module should be tested by running::

  make test

Before merging into the master branch, the module should pass **all** the tests.
This enables the possibility to use ``git bisect`` to quickly find bugs.


Input data
==========

Every program is supposed to use an EZFIO database containing all the
persistent data. This database can be modified in using the generated Fortran
functions or the generated Python module.

The definition of the data needed by the module should be put in the
``*.ezfio_config`` file.

Input data can also be read from the standard input to enable the use of
a program with a pipe, but the read statements should be present **only** in
the main program.


Output data
===========

Print to stdout statements should only appear in programs, not in providers,
subroutines or functions. This enables the possibility easily use the programs
with pipes.

To print, you should write in an output file provided by the ``Output``
module. Every module has its own output file. Before printing something,
a timestamp should be put in the output with the ``write_time`` function.
This allows an external script to read all the pieces of the output files
and put them in a sequential order. The format of the output should be
in ReStructured Text for easy transformation of the output data to pdf,
HTML, man, etc.


Creating a shell script
=======================

Shell scripts should be located in the ``${QPACKAGE_ROOT}/scripts`` directory.
Relative paths should be avoided as much as possible, and the result of commands
should be always checked. For example, when creating a directory the existence
of the directory has to be checked.


Documentation
=============

.. Do not edit this section. It was auto-generated from the
.. NEEDED_MODULES file.



Needed Modules
==============

.. Do not edit this section. It was auto-generated from the
.. NEEDED_MODULES file.

* `Utils <http://github.com/LCPQ/quantum_package/tree/master/src/Utils>`_