Expanded on some concepts in the documentation and added snippets of example output. Also harmonized the contents with the review paper which is in preparation. |
||
|---|---|---|
| .. | ||
| _static | ||
| getting-started | ||
| methods | ||
| conf.py | ||
| fix_github_links.py | ||
| generate_input_reference.py | ||
| index.md | ||
| Makefile | ||
| README.md | ||
| requirements.txt | ||
| versions.md | ||
CP2K Documentation
These are the source of the CP2K manual. They are published daily by this script.
To build a local version of the manual perform the following steps:
-
Create and activate a virtual Python environment:
python3 -m venv ../docs_venv source ../docs_venv/bin/activate -
Install the required Python packages:
pip3 install -r ./requirements.txt -
(optional) Build a CP2K binary and use it to generate the
cp2k_input.xmlfile:../exe/local/cp2k.psmp --xml -
(optional) Generate Markdown pages from the
cp2k_input.xmlfile:./generate_input_reference.py ./cp2k_input.xml -
Run Sphinx:
make html -
Browse the HTML output in the
_build/htmldirectory.
!TIPWhile the first invocation of Sphinx can be quite slow, subsequent builds are significantly faster thanks to its doctree cache. Nevertheless, a build with the full input reference can take several minutes and requires a lot of memory. So for development it's advisable to build without the input reference. To check cross-references one can generate the input reference and then remove all pages except the relevant ones.