Merge branch 'origin/release-2020' into merge-2020-into-2021
[gromacs.git] / docs / conf.cmakein.py
blobc5993c6a09e4f8f864fd7c47c93499f2c61fd25c
2 # This file is part of the GROMACS molecular simulation package.
4 # Copyright (c) 2015,2016,2017,2018,2019 by the GROMACS development team.
5 # Copyright (c) 2020, by the GROMACS development team, led by
6 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
7 # and including many others, as listed in the AUTHORS file in the
8 # top-level source directory and at http://www.gromacs.org.
10 # GROMACS is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU Lesser General Public License
12 # as published by the Free Software Foundation; either version 2.1
13 # of the License, or (at your option) any later version.
15 # GROMACS is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 # Lesser General Public License for more details.
20 # You should have received a copy of the GNU Lesser General Public
21 # License along with GROMACS; if not, see
22 # http://www.gnu.org/licenses, or write to the Free Software Foundation,
23 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 # If you want to redistribute modifications to GROMACS, please
26 # consider that scientific software is very special. Version
27 # control is crucial - bugs must be traceable. We will be happy to
28 # consider code for inclusion in the official distribution, but
29 # derived work must not be called official GROMACS. Details are found
30 # in the README & COPYING files - if they are missing, get the
31 # official version at http://www.gromacs.org.
33 # To help us fund GROMACS development, we humbly ask that you cite
34 # the research papers on the package. Check out http://www.gromacs.org.
36 # -*- coding: utf-8 -*-
38 # GROMACS documentation build configuration file, created by
39 # sphinx-quickstart on Tue Jan 13 14:28:44 2015.
41 # This file is execfile()d with the current directory set to its
42 # containing dir.
44 # Note that not all possible configuration values are present in this
45 # autogenerated file.
47 # All configuration values have a default; values that are commented out
48 # serve to show the default.
50 import datetime
51 import os
52 import sys
54 # The following definitions are completed via CMake machinery.
55 gmx_containers_path = '@GMX_ADMIN_DIR@/containers'
56 gmx_sphinx_extension_path = '@SPHINX_EXTENSION_PATH@'
57 gmxapi_staging_path = '@GMXAPI_PYTHON_STAGING_DIR@'
58 releng_path = '@RELENG_PATH@'
59 gmx_version_string = '@GMX_VERSION_STRING@'
60 gmx_version_string_full = '@GMX_VERSION_STRING_FULL@'
61 regressiontest_version = '@REGRESSIONTEST_VERSION@'
62 gmx_min_sphinx = '@EXPECTED_SPHINX_VERSION@'
63 gmx_image_convert = '@IMAGE_CONVERT_STRING@'
64 variables = [
65 ('EXPECTED_DOXYGEN_VERSION', '@EXPECTED_DOXYGEN_VERSION@'),
66 ('EXPECTED_SPHINX_VERSION', '@EXPECTED_SPHINX_VERSION@'),
67 ('CMAKE_MINIMUM_REQUIRED_VERSION', '@CMAKE_MINIMUM_REQUIRED_VERSION@'),
68 ('REQUIRED_CUDA_VERSION', '@REQUIRED_CUDA_VERSION@'),
69 ('REQUIRED_CUDA_COMPUTE_CAPABILITY', '@REQUIRED_CUDA_COMPUTE_CAPABILITY@'),
70 ('REQUIRED_OPENCL_MIN_VERSION', '@REQUIRED_OPENCL_MIN_VERSION@'),
71 ('SOURCE_MD5SUM', '@SOURCE_MD5SUM@'),
72 ('REGRESSIONTEST_MD5SUM', '@REGRESSIONTEST_MD5SUM_STRING@'),
73 ('GMX_TNG_MINIMUM_REQUIRED_VERSION', '@GMX_TNG_MINIMUM_REQUIRED_VERSION@'),
74 ('GMX_LMFIT_REQUIRED_VERSION', '@GMX_LMFIT_REQUIRED_VERSION@'),
75 ('GMX_MANUAL_DOI_STRING', '@GMX_MANUAL_DOI_STRING@'),
76 ('GMX_SOURCE_DOI_STRING', '@GMX_SOURCE_DOI_STRING@')
78 # End of build-time substitutions.
80 sys.path.append(gmx_containers_path)
81 sys.path.append(gmx_sphinx_extension_path)
82 if releng_path and os.path.isdir(releng_path):
83 sys.path.append(releng_path)
84 if gmxapi_staging_path and os.path.isdir(gmxapi_staging_path):
85 sys.path.append(gmxapi_staging_path)
87 # If extensions (or modules to document with autodoc) are in another directory,
88 # add these directories to sys.path here. If the directory is relative to the
89 # documentation root, use os.path.abspath to make it absolute, like shown here.
90 #sys.path.insert(0, os.path.abspath('.'))
92 # -- General configuration ------------------------------------------------
94 # If your documentation needs a minimal Sphinx version, state it here.
95 # gmx_min_sphinx is set from the expected minimum version of Sphinx
96 # in CMakeLists.txt
97 needs_sphinx = gmx_min_sphinx
99 # Add any Sphinx extension module names here, as strings. They can be
100 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
101 # ones.
102 extensions = [
103 'sphinx.ext.autodoc',
104 'sphinx.ext.graphviz',
105 'sphinx.ext.extlinks',
106 'sphinx.ext.napoleon',
107 'sphinx.ext.doctest',
108 'sphinx.ext.ifconfig',
109 'sphinx.ext.intersphinx',
110 'sphinx.ext.mathjax',
111 'sphinx.ext.napoleon',
112 'sphinx.ext.todo',
113 # The viewcode extension requires extra configuration or consideration to
114 # avoid collecting sources for external packages (through intersphninx) or
115 # generating broken links for compiled extension modules that do not have
116 # inspectable 'code' member data.
117 # Ref: https://www.sphinx-doc.org/en/master/usage/extensions/viewcode.html
118 # Please run linkchecker and inspect the generated
119 # docs/html/_modules/index.html page before committing a change that enables
120 # 'sphinx.ext.viewcode',
121 'gmxsphinx'
123 extlinks = {'issue': ('https://gitlab.com/gromacs/gromacs/-/issues/%s',
124 'Issue ')}
126 # Add any paths that contain templates here, relative to this directory.
127 # templates_path = ['_templates']
129 # The suffix of source filenames.
130 source_suffix = '.rst'
132 # The encoding of source files.
133 #source_encoding = 'utf-8-sig'
135 # The master toctree document.
136 master_doc = 'index'
138 # General information about the project.
139 project = u'GROMACS'
140 copyright = str(datetime.datetime.now().year) + u', GROMACS development team'
141 thisyear_string = str(datetime.datetime.now().year)
142 # The version info for the project you're documenting, acts as replacement for
143 # |version| and |release|, also used in various other places throughout the
144 # built documents.
146 # The short X.Y version.
147 version = gmx_version_string
148 # The full version, including alpha/beta/rc tags.
149 release = gmx_version_string_full
150 # default file extension for plots
151 plotext = u'.eps'
153 # The language for content autogenerated by Sphinx. Refer to documentation
154 # for a list of supported languages.
155 #language = None
157 # There are two options for replacing |today|: either, you set today to some
158 # non-false value, then it is used:
159 #today = ''
160 # Else, today_fmt is used as the format for a strftime call.
161 #today_fmt = '%B %d, %Y'
163 # List of patterns, relative to source directory, that match files and
164 # directories to ignore when looking for source files.
165 exclude_patterns = ['fragments']
166 if not tags.has('do_man'):
167 exclude_patterns += ['man']
169 # Set variable if documentation build can convert images or not
170 # to selectively include files in reference manual
171 def setup(app):
172 app.add_config_value('gmx_image_convert', 'impossible', 'env')
174 # The reST default role (used for this markup: `text`) to use for all
175 # documents.
176 default_role = 'any'
178 # If true, '()' will be appended to :func: etc. cross-reference text.
179 #add_function_parentheses = True
181 # If true, the current module name will be prepended to all description
182 # unit titles (such as .. function::).
183 #add_module_names = True
185 # If true, sectionauthor and moduleauthor directives will be shown in the
186 # output. They are ignored by default.
187 #show_authors = False
189 # The name of the Pygments (syntax highlighting) style to use.
190 pygments_style = 'sphinx'
192 # A list of ignored prefixes for module index sorting.
193 #modindex_common_prefix = []
195 # If true, keep warnings as "system message" paragraphs in the built documents.
196 #keep_warnings = False
198 # Configure the values for all the variables that might later configure any of the .rst files.
199 substitutions = ['.. |{0}| replace:: {1}'.format(*x) for x in variables if x[1]]
200 substitutions.extend(['.. |{0}| replace:: unknown'.format(x[0]) for x in variables if x[1] == ''])
201 rst_epilog = "\n".join(substitutions)
202 rst_epilog += """
203 .. |Gromacs| replace:: GROMACS
204 .. _gmx-manual: manual-{gmx_version_string}.pdf
205 .. _gmx-manual-parent-dir: ../manual-{gmx_version_string}.pdf
206 .. |gmx-source-package-ftp| replace:: As ftp ftp://ftp.gromacs.org/pub/gromacs/gromacs-{gmx_version_string}.tar.gz
207 .. |gmx-source-package-http| replace:: As http http://ftp.gromacs.org/pub/gromacs/gromacs-{gmx_version_string}.tar.gz
208 .. |gmx-regressiontests-package| replace:: http://ftp.gromacs.org/pub/regressiontests/regressiontests-{regressiontest_version}.tar.gz
209 .. _up-to-date installation instructions: http://manual.gromacs.org/documentation/current/install-guide/index.html
210 .. _CUDA: http://www.nvidia.com/object/cuda_home_new.html
211 .. _OpenCL: https://www.khronos.org/opencl/
212 .. _OpenMPI: http://www.open-mpi.org
213 .. _MPICH: http://www.mpich.org
214 .. _LAM-MPI: http://www.lam-mpi.org
215 .. _OpenMP: http://en.wikipedia.org/wiki/OpenMP
216 .. _CMake installation page: http://www.cmake.org/install/
217 .. _Ubuntu toolchain ppa page: https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
218 .. _EPEL page: https://fedoraproject.org/wiki/EPEL
219 .. _running CMake: http://www.cmake.org/runningcmake/
220 .. _CMake environment variables: http://cmake.org/Wiki/CMake_Useful_Variables#Environment_Variables
221 .. _FFTW: http://www.fftw.org
222 .. _FFTW installation guide: http://www.fftw.org/doc/Installation-and-Customization.html#Installation-and-Customization
223 .. _MKL: https://software.intel.com/en-us/intel-mkl
224 .. _VMD: http://www.ks.uiuc.edu/Research/vmd/
225 .. _PyMOL: http://www.pymol.org
226 .. _webpage: http://www.gromacs.org
227 .. _ftp site: ftp://ftp.gromacs.org/pub/gromacs/
228 .. _tutorials: http://www.gromacs.org/Documentation/Tutorials
229 .. _issue tracker: https://gitlab.com/gromacs/gromacs/-/issues/
230 .. _gitlab: https://gitlab.com/gromacs/gromacs/
231 .. _download: ../download.html
232 .. |thisyear| replace:: {thisyear_string}
233 """.format(gmx_version_string=gmx_version_string, regressiontest_version=regressiontest_version, thisyear_string=thisyear_string)
235 # -- Options for HTML output ----------------------------------------------
237 # The theme to use for HTML and HTML Help pages. See the documentation for
238 # a list of builtin themes.
239 html_theme = 'classic'
241 # Theme options are theme-specific and customize the look and feel of a theme
242 # further. For a list of options available for each theme, see the
243 # documentation.
244 #html_theme_options = {}
246 # Add any paths that contain custom themes here, relative to this directory.
247 html_theme_path = ['']
249 # The name for this set of Sphinx documents. If None, it defaults to
250 # "<project> v<release> documentation".
251 html_title = u'GROMACS ' + release + ' documentation'
253 # A shorter title for the navigation bar. Default is the same as html_title.
254 html_short_title = u'GROMACS ' + version
256 # The name of an image file (relative to this directory) to place at the top
257 # of the sidebar.
258 #html_logo = None
260 # The name of an image file (within the static path) to use as favicon of the
261 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
262 # pixels large.
263 #html_favicon = None
265 # Add any paths that contain custom static files (such as style sheets) here,
266 # relative to this directory. They are copied after the builtin static files,
267 # so a file named "default.css" will overwrite the builtin "default.css".
268 html_static_path = ['_static']
270 # Add any extra paths that contain custom files (such as robots.txt or
271 # .htaccess) here, relative to this directory. These files are copied
272 # directly to the root of the documentation.
273 #html_extra_path = []
275 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
276 # using the given strftime format.
277 #html_last_updated_fmt = '%b %d, %Y'
279 # If true, SmartyPants will be used to convert quotes and dashes to
280 # typographically correct entities.
281 #html_use_smartypants = True
283 # Custom sidebar templates, maps document names to template names.
284 #html_sidebars = {}
286 # Additional templates that should be rendered to pages, maps page names to
287 # template names.
288 #html_additional_pages = {}
290 # If false, no module index is generated.
291 #html_domain_indices = True
293 # If false, no index is generated.
294 #html_use_index = True
296 # If true, the index is split into individual pages for each letter.
297 #html_split_index = False
299 # If true, links to the reST sources are added to the pages.
300 #html_show_sourcelink = True
302 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
303 #html_show_sphinx = True
305 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
306 #html_show_copyright = True
308 # If true, an OpenSearch description file will be output, and all pages will
309 # contain a <link> tag referring to it. The value of this option must be the
310 # base URL from which the finished HTML is served.
311 #html_use_opensearch = ''
313 # This is the file name suffix for HTML files (e.g. ".xhtml").
314 #html_file_suffix = None
316 # Output file base name for HTML help builder.
317 htmlhelp_basename = 'Gromacsdoc'
320 # -- Options for LaTeX output ---------------------------------------------
322 latex_elements = {
323 # The paper size ('letterpaper' or 'a4paper').
324 'papersize': 'a4paper',
327 # The font size ('10pt', '11pt' or '12pt').
328 'pointsize': '11',
330 # Additional stuff for the LaTeX preamble.
331 # The tocdepth setting is needed to overwrite the default value set by Sphinx
332 # to get a more detailed toctree in the pdf version of the manual.
333 'preamble': r'''
334 \usepackage{here}
335 \usepackage{picins}
336 \usepackage{underscore}
337 \usepackage{tabularx}
338 \usepackage{multicol}
339 \usepackage{dcolumn}
340 \usepackage{makeidx}
341 \usepackage{times}
342 \usepackage{ifthen}
343 \usepackage{enumitem}
344 \usepackage{longtable}
345 \usepackage{pdflscape}
346 \pagenumbering{roman}
347 \usepackage{array}
348 \setcounter{tocdepth}{2}
349 ''',
350 # Format output to avoid empty pages
351 'classoptions': ',openany,oneside'
354 # Grouping the document tree into LaTeX files. List of tuples
355 # (source start file, target name, title,
356 # author, documentclass [howto, manual, or own class]).
357 latex_documents = [
358 ('index', 'gromacs.tex', u'GROMACS Documentation',
359 u'GROMACS development team', 'manual'),
362 # The name of an image file (relative to this directory) to place at the top of
363 # the title page.
364 latex_logo = 'reference-manual/plots/peregrine.png'
366 # For "manual" documents, if this is true, then toplevel headings are parts,
367 # not chapters.
368 latex_use_parts = True
370 # If true, show page references after internal links.
371 latex_show_pagerefs = True
373 # If true, show URL addresses after external links.
374 #latex_show_urls = False
376 # Documents to append as an appendix to all manuals.
377 #latex_appendices = []
379 # If false, no module index is generated.
380 #latex_domain_indices = True
383 # -- Options for manual page output ---------------------------------------
385 # One entry per manual page. List of tuples
386 # (source start file, name, description, authors, manual section).
387 if tags.has('do_man'):
388 exec(open('conf-man.py').read())
390 # If true, show URL addresses after external links.
391 #man_show_urls = False
394 # -- Options for Texinfo output -------------------------------------------
396 # Grouping the document tree into Texinfo files. List of tuples
397 # (source start file, target name, title, author,
398 # dir menu entry, description, category)
399 texinfo_documents = [
400 ('index', 'GROMACS', u'GROMACS Documentation',
401 u'GROMACS development team', 'GROMACS', 'One line description of project.',
402 'Miscellaneous'),
405 # Documents to append as an appendix to all manuals.
406 #texinfo_appendices = []
408 # If false, no module index is generated.
409 #texinfo_domain_indices = True
411 # How to display URL addresses: 'footnote', 'no', or 'inline'.
412 #texinfo_show_urls = 'footnote'
414 # If true, do not generate a @detailmenu in the "Top" node's menu.
415 #texinfo_no_detailmenu = False
417 # Make it possible to use numbered labels for figures and tables
418 numfig = True
420 # -- Options for autodoc extension ----------------------------------------
422 # http://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc-mock-imports
423 autodoc_mock_imports = ['hpccm', 'hpccm.config']
425 # -- Options for intersphinx extension ------------------------------------
427 intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
428 intersphinx_cache_limit = -1
429 intersphinx_timeout = 10