Skip to content

Latest commit

 

History

History
 
 

docs

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:

  1. Create and activate a virtual Python environment:

    python3 -m venv ../docs_venv
    source ../docs_venv/bin/activate
    
  2. Install the required Python packages:

    pip3 install -r ./requirements.txt
    
  3. (optional) Build a CP2K binary and use it to generate the cp2k_input.xml file:

    ../exe/local/cp2k.psmp --xml
    
  4. (optional) Generate Markdown pages from the cp2k_input.xml file:

    ./generate_input_reference.py ./cp2k_input.xml
    
  5. Run Sphinx:

    make html
    
  6. Browse the HTML output in the _build/html directory.

Tip

While 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.