Skip to content

Commit b3e52dd

Browse files
committed
Adds gpaw documentation
1 parent e3af7c3 commit b3e52dd

File tree

5 files changed

+117
-1
lines changed

5 files changed

+117
-1
lines changed

docs/src/developer_notes/index.rst

+13-1
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,20 @@ Code Organization
2020
settings/
2121
tags_and_groups.json
2222
...
23-
base_recipes/
23+
calculation_presets/
2424
scf.json
2525
vc-relax.json
2626
...
27+
gpaw/
28+
gpaw.py
29+
...
30+
settings/
31+
tags_and_groups.json
32+
...
33+
calculation_presets/
34+
bulk_opt.json
35+
bulk_opt_hcp.json
36+
...
2737
vasp/
2838
...
2939

@@ -33,6 +43,8 @@ Code Organization
3343
- ``dftinputgen.qe``: derived classes that can generate input files for various
3444
DFT-based and postprocessing codes in the Quantum Espresso suite (more
3545
:ref:`here <ssec-qe>`)
46+
- ``dftinputgen.gpaw``: derived classes that can generate input python scripts
47+
for the GPAW package (more :ref:`here <ssec-gpaw>`).
3648
- ``dftinputgen.vasp``: [under development] derived classes that can generate
3749
input files for the VASP package.
3850
- ``dftinputgen.utils``: general-purpose helper functions, e.g. chemical formula
+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
.. _sssec-gpaw:
2+
3+
Input GPAW
4+
++++++++++
5+
6+
The :class:`GPAWInputGenerator <dftinputgen.gpaw.GPAWInputGenerator>` class
7+
(derived from :class:`DftInputGenerator <dftinputgen.base.DftInputGenerator>`)
8+
implements functionality to generate python scripts for the `GPAW`_
9+
package.
10+
11+
Python scripts are written that use `ASE`_ with GPAW specified via a
12+
calculator object. This calculator object is where all settings for
13+
the DFT calculation is given. An example of the calculator object
14+
that is automatically written is given below.
15+
16+
.. code-block:: python
17+
18+
slab.calc = GPAW(
19+
h=0.16,
20+
kpts={'size': [4, 4, 1]},
21+
occupations={'name': 'fermi-dirac', 'width': 0.05},
22+
poissonsolver={'dipolelayer': 'xy'},
23+
xc='BEEF-vdW'
24+
)
25+
26+
For each calculator setting, a list of valid parameters is looked up from
27+
a ``GPAW_TAGS`` dictionary which is then defined within the written
28+
calculator object (more information about the valid calculator parameters
29+
and defaults provided as ``calculation_presets`` is :ref:`here
30+
<sssec-gpaw-input-settings>`).
31+
32+
Currently supported calculations include relaxations, bulk optimizations,
33+
and total energy.
34+
35+
**Note:** The scripts are written assuming that the crystal structure
36+
is stored in an `ASE readable format`_ (e.g. traj, cif, etc..) with
37+
the desired initial magnetic moments defined.
38+
39+
.. _`GPAW`: https://wiki.fysik.dtu.dk/gpaw/index.html
40+
.. _`ASE`: https://wiki.fysik.dtu.dk/ase/
41+
.. _`ASE readable format`: https://wiki.fysik.dtu.dk/ase/ase/io/io.html
42+
43+
Interfaces
44+
==========
45+
46+
.. automodule:: dftinputgen.gpaw.gpaw
47+
:members:
48+
:inherited-members:
49+
:undoc-members:
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.. _ssec-gpaw:
2+
3+
Input generators for GPAW
4+
+++++++++++++++++++++++++
5+
6+
``dftinputgen`` provides an input generator class for the `GPAW`_ package.
7+
More information :ref:`here <sssec-gpaw>`
8+
9+
.. _`GPAW`: https://wiki.fysik.dtu.dk/gpaw/index.html
10+
11+
12+
.. automodule:: dftinputgen.gpaw
13+
:members:
14+
:undoc-members:
15+
16+
.. toctree::
17+
:maxdepth: 2
18+
:hidden:
19+
20+
gpaw
21+
settings
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
.. _sssec-gpaw-input-settings:
2+
3+
Input settings
4+
++++++++++++++
5+
6+
All input settings have been parsed from the `GPAW manual`_
7+
(last updated January 2021).
8+
The calculator parameter names are stored in `tags_and_groups.json`_.
9+
These parameter names are then made available to the user via
10+
a module level variable ``GPAW_TAGS``.
11+
12+
The settings module also makes available a few sets of default settings
13+
to be used for common DFT calculations such as ``surface_relax``,
14+
and ``bulk_opt``.
15+
The defaults are stored in JSON files in the `calculation_presets`_ module.
16+
These can be accessed by the user via a module level variable ``GPAW_PRESETS``.
17+
Note that these presets are only reasonable defaults and are not meant to be
18+
prescriptive.
19+
20+
.. _`GPAW manual`: https://wiki.fysik.dtu.dk/gpaw/documentation/manual.html#parameters
21+
.. _`tags_and_groups.json`: https://github.com/CitrineInformatics/dft-input-gen/blob/master/src/dftinputgen/qe/settings/tags_and_groups.json
22+
.. _`calculation_presets`: https://github.com/CitrineInformatics/dft-input-gen/tree/master/src/dftinputgen/qe/settings/calculation_presets
23+
24+
.. automodule:: dftinputgen.gpaw.settings
25+
:members:
26+
:undoc-members:
27+
:special-members:
28+
29+
.. automodule:: dftinputgen.gpaw.settings.calculation_presets
30+
:members:
31+
:undoc-members:
32+
:special-members:
33+

docs/src/module_reference/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ Module reference
99

1010
base
1111
qe/index
12+
gpaw/index
1213
utils
1314
data

0 commit comments

Comments
 (0)