Many-body perturbation theory for atoms, molecules, and clusters
This is a minimalistic README file. Many more details can be found on the web site molgw.org. A tutorial section exists there.
MOLGW implements the following schemes:
LDA (PW, VWN)
GGA (PBE, PW91, BLYP)
potential-only meta-GGA (BJ, RPP)
hybrid functionals (PBE0, B3LYP)
screened hybrid functionals (HSE03, HSE06)
any user-developped range-separated hybrid based on wPBEH
GW@HF or GW@DFT
PT2@HF or PT2@DFT
PT3@HF or PT3@DFT
CI for few electrons
Linear-response TDDFT or TDHF
HF/DFT+NOFT (MULLER, POWER, PNOF5, and PNOF7)
MOLGW needs Fortran 2003 (and a few Fortran2008 features) and C++ compilers.
MOLGW is being tested with
g++ (version 11.x.x) and
ifort (version 21).
MOLGW can run in parallel using OPENMP and MPI parallelization.
All the machine dependent variables should be set in file
Examples for this file can be found in the folder
- BLAS and LAPACK linear algebra libraries are required.
- LIBINT or LIBCINT is required for Gaussian integrals
- LIBXC is required for DFT calculations (else only HF is available)
To run on multi-node computers
- MPI and SCALAPACK are both required
Many standard Gaussian basis sets are shipped with MOLGW.
More basis sets can be obtained from Basis Set Exchange
The file can be generated from a NWChem file using the script
You may even create your own.
/path/to/molgw/molgw helium.in > helium.out
Many example input files can be found in
- QSGW scf loop might be quite unstable for large basis sets, use a large eta
- TDDFT GGA kernel can induce very large numerical values that hinders the numerical stability and breaks some comparison with other codes.
Please use the issues section on MOLGW github.
Information for developers
Besides the wrapper calls to the LIBINT library, MOLGW is entirely written in Fortran2003/2008. Fortran C bindings are used to call LIBXC and LIBCINT. The source files can be found in ~molgw/src/.
The Fortran intent in/out/inout is compulsory for the arguments of a subroutine. One character variable names are discouraged.
The careful developer should try
- to follow the overall layout and the conventions of the code (double space indent, separation of the list of variables arguments/local, loop counters naming, etc.)
- to protect the data contained in a module with private or protected attribute as much as possible.
- to avoid cascading object access, such as a%b%c (Create methods instead)
- to hide the MPI statements with a generic wrapper in subroutine src/m_mpi.f90.
- to hide the SCALAPACK statements with a generic wrapper in subroutine src/m_scalapack.f90 (not implemented as of today).
Automatically generated files
A few fortran source files are generated by python scripts:
- src/revision.f90 are generated by src/prepare_sourcecode.py (that is run at each "make" operation) and
- src/input_variables.f90 is generated by utils/input_variables.py from a YAML file src/input_variables.yaml . Do not attempt to edit the fortran files. You should rather edit the yaml file.
To add a new input variable, append a new variable description in the YAML file src/input_variables.yaml. Then execute the python script utils/input_variables.py. This will generate automatically the Fortran source file src/input_variables.f90 and the HTML and markdown documentation files docs/input_variables.html docs/input_variables.md.
Adding a new source file
It requires the manual editing of the src/Makefile (sorry). Please check carefully the module dependence so to compile and add it to the right "level" of the Makefile. The code should compile properly in parallel with "make -j".
- Fabien Bruneval
- Ivan Maliyov
- Mauricio Rodriguez-Mayorga
- Xixi Qi
- Young-Moo Byun
- Meiyue Shao