quantum-espresso/dft-d3
Paolo Giannozzi d1bb578d48 Minor and not-so-minor bugs and bugs-not-bugs:
- unused array mexx0 was allocated and never deallocated (noticed by
  Massimiaino Fatica)
- a temporary variable was not correctly initialized (most compilers set
  initial values to zero but this is not guaranteed)
- occupancies of Hubbard manifold (variable "ns") were computed independently
  on all processors, but their consistency was not ensured. Now there is a
  broadcast in "new_ns" that ensures consistency. While not a bug in principle,
  in practice this could lead to small divergencies buiding up between the
  ns on different processors, leading to small divergences of the
  self-consistency error (dr2), leading to small divergencies of the
  diagonalization threshold (ethr), leading to different numbers of
  unconverged eigenvalues on different processors, leading to mysterious MPI
  crashes. I am not sure about the origin of the divergence, but broadcasting
  ns seems to fix the problem.
2018-11-01 09:35:14 +01:00
..
Makefile IN all Makefiles, LIBS replaced by QELIBS, to prevent unlikely but not 2018-07-11 19:58:41 +02:00
README Dopcumentation update: acknowledgments for DFT-D3, new developments 2017-10-28 13:05:59 +00:00
api.f90 DFT-D3 wasn't working with NEB due to missing deallocation. Cleanup: api.f90 2018-05-09 12:40:22 +02:00
common.f90 Following Uli Aschauer's example: uniform au to angstrom conversion constant 2018-08-23 22:09:15 +02:00
core.f90 original dft-d3 routines have been moved up and the orginal package has been removed. README and Makefile changed consistently 2017-10-27 20:09:59 +00:00
dftd3_qe.f90 Minor and not-so-minor bugs and bugs-not-bugs: 2018-11-01 09:35:14 +01:00
make.depend.dftd3 adding dft-d3 directory. Courtesy Miha Gunde 2017-10-13 13:39:30 +00:00
pars.f90 original dft-d3 routines have been moved up and the orginal package has been removed. README and Makefile changed consistently 2017-10-27 20:09:59 +00:00
sizes.f90 original dft-d3 routines have been moved up and the orginal package has been removed. README and Makefile changed consistently 2017-10-27 20:09:59 +00:00
test_code.f90 adding dft-d3 directory. Courtesy Miha Gunde 2017-10-13 13:39:30 +00:00

README

This subdirectory contains code from the Grimme DFT-D3 code, version 0.9,
as repackaged by Bàlint Aradi. Both the original library and repackaged one
can be downloaded at
https://www.chemie.uni-bonn.de/pctc/mulliken-center/software/dft-d3/dft-d3

Interface routines for Quantum ESPRESSO are contained in file dftd3_qe.f90.
This file is released under the GPL. The Quantum ESPRESSO group acknowledges 
help from Bálint Aradi in debugging stress calculation.

The original DFT-D3 version 0.9 file api.f90 has been slightly modified.
Changes are highlighted with the label "(QE 2016)".

There is a test program (test.f90), which calculates forces and stresses
directly from dftd3-API code, and compares the results with numericallya
computed forces and stresses from the obtained dispersion energy. 

Parameters for dftd3 calculation are found in ../Modules/input_parameters.f90.
Those values are valid for the PBE functional. Parameter 'version' can take 
values from 2 to 6, but only version=3 (zero-damping) is tested with PWscf. 

The following is the original dftd3-lib-0.9/README.rst file

=====
DFTD3
=====

This is a repackaged version of the `DFTD3 program
<http://www.thch.uni-bonn.de/tc/index.php?section=downloads&subsection=getd3>`_
by S. Grimme and his coworkers. [ NB: obsolete link, correct link above \]

The original program (V3.1 Rev 1) was downloaded at 2016-04-03. It has been
converted to free format and encapsulated into modules. The source has been
split into two parts:

* A library with the core functionality. This can be directly used by third
  party applications wishing to calculate dispersion with the DFT-D3
  approach.
  
* Additional extensions which are necessary for the command line tool DFTD3 and
  the command line tool itself.

* Updated dftd3 code to include refitted/modified zero- and BJ-damped D3
  versions of Sherrill and coworkers (-bjm and -zerom)
  (Functionality corresponds to V3.2 Rev0)

Compilation
===========

Edit the file `make.arch` to reflect your compiler and linker. Then you can
issue one of the following commands:

* ``make lib``: to build the library `libdftd3.a` and the necessary
  module files (`*.mod`) in the directory `lib/`.

* ``make dftd3``: to build the executable `dftd3` in the directory `prg/`.

* ``make testapi``: to build a simple tester for the library (`testapi`) in the
  directory `test/`. The source code of this tester demonstrates how the library
  can be used by third party codes.

If you just issue ``make``, all three targets will be compiled.


Credits
=======

When using the library or the dftd3 tool, please cite:

  S. Grimme, J. Antony, S. Ehrlich and H. Krieg
  J. Chem. Phys, 132 (2010), 154104.
 
If BJ-damping is used 

  S. Grimme, S. Ehrlich and L. Goerigk
  J. Comput. Chem, 32 (2011), 1456-1465.

should be cited as well.


License
=======

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 1, or (at your option) any later version.