30f10ecdce51d900b0f8878bcf5f522f36d309cd
[alexxy/gromacs.git] / docs / conf.cmakein.py
1 #
2 # This file is part of the GROMACS molecular simulation package.
3 #
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.
9 #
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.
14 #
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.
19 #
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.
24 #
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.
32 #
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.
35
36 # -*- coding: utf-8 -*-
37 #
38 # GROMACS documentation build configuration file, created by
39 # sphinx-quickstart on Tue Jan 13 14:28:44 2015.
40 #
41 # This file is execfile()d with the current directory set to its
42 # containing dir.
43 #
44 # Note that not all possible configuration values are present in this
45 # autogenerated file.
46 #
47 # All configuration values have a default; values that are commented out
48 # serve to show the default.
49
50 import datetime
51 import os
52 import sys
53
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@')
77 ]
78 # End of build-time substitutions.
79
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)
86
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('.'))
91
92 # -- General configuration ------------------------------------------------
93
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
98
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'
122 ]
123 extlinks = {'issue': ('https://redmine.gromacs.org/issues/%s',
124                       'Issue ')}
125
126 # Add any paths that contain templates here, relative to this directory.
127 # templates_path = ['_templates']
128
129 # The suffix of source filenames.
130 source_suffix = '.rst'
131
132 # The encoding of source files.
133 #source_encoding = 'utf-8-sig'
134
135 # The master toctree document.
136 master_doc = 'index'
137
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.
145 #
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'
152
153 # The language for content autogenerated by Sphinx. Refer to documentation
154 # for a list of supported languages.
155 #language = None
156
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'
162
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']
168
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')
173
174 # The reST default role (used for this markup: `text`) to use for all
175 # documents.
176 default_role = 'any'
177
178 # If true, '()' will be appended to :func: etc. cross-reference text.
179 #add_function_parentheses = True
180
181 # If true, the current module name will be prepended to all description
182 # unit titles (such as .. function::).
183 #add_module_names = True
184
185 # If true, sectionauthor and moduleauthor directives will be shown in the
186 # output. They are ignored by default.
187 #show_authors = False
188
189 # The name of the Pygments (syntax highlighting) style to use.
190 pygments_style = 'sphinx'
191
192 # A list of ignored prefixes for module index sorting.
193 #modindex_common_prefix = []
194
195 # If true, keep warnings as "system message" paragraphs in the built documents.
196 #keep_warnings = False
197
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://gerrit.gromacs.org/download/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 .. _continuous integration server used by GROMACS: http://jenkins.gromacs.org
227 .. _Jenkins: http://jenkins-ci.org
228 .. _webpage: http://www.gromacs.org
229 .. _ftp site: ftp://ftp.gromacs.org/pub/gromacs/
230 .. _tutorials: http://www.gromacs.org/Documentation/Tutorials
231 .. _redmine: http://redmine.gromacs.org
232 .. _gerrit: http://gerrit.gromacs.org
233 .. _download: ../download.html
234 .. |thisyear| replace:: {thisyear_string}
235 """.format(gmx_version_string=gmx_version_string, regressiontest_version=regressiontest_version, thisyear_string=thisyear_string)
236
237 # -- Options for HTML output ----------------------------------------------
238
239 # The theme to use for HTML and HTML Help pages.  See the documentation for
240 # a list of builtin themes.
241 html_theme = 'classic'
242
243 # Theme options are theme-specific and customize the look and feel of a theme
244 # further.  For a list of options available for each theme, see the
245 # documentation.
246 #html_theme_options = {}
247
248 # Add any paths that contain custom themes here, relative to this directory.
249 html_theme_path = ['']
250
251 # The name for this set of Sphinx documents.  If None, it defaults to
252 # "<project> v<release> documentation".
253 html_title = u'GROMACS ' + release + ' documentation'
254
255 # A shorter title for the navigation bar.  Default is the same as html_title.
256 html_short_title = u'GROMACS ' + version
257
258 # The name of an image file (relative to this directory) to place at the top
259 # of the sidebar.
260 #html_logo = None
261
262 # The name of an image file (within the static path) to use as favicon of the
263 # docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
264 # pixels large.
265 #html_favicon = None
266
267 # Add any paths that contain custom static files (such as style sheets) here,
268 # relative to this directory. They are copied after the builtin static files,
269 # so a file named "default.css" will overwrite the builtin "default.css".
270 html_static_path = ['_static']
271
272 # Add any extra paths that contain custom files (such as robots.txt or
273 # .htaccess) here, relative to this directory. These files are copied
274 # directly to the root of the documentation.
275 #html_extra_path = []
276
277 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
278 # using the given strftime format.
279 #html_last_updated_fmt = '%b %d, %Y'
280
281 # If true, SmartyPants will be used to convert quotes and dashes to
282 # typographically correct entities.
283 #html_use_smartypants = True
284
285 # Custom sidebar templates, maps document names to template names.
286 #html_sidebars = {}
287
288 # Additional templates that should be rendered to pages, maps page names to
289 # template names.
290 #html_additional_pages = {}
291
292 # If false, no module index is generated.
293 #html_domain_indices = True
294
295 # If false, no index is generated.
296 #html_use_index = True
297
298 # If true, the index is split into individual pages for each letter.
299 #html_split_index = False
300
301 # If true, links to the reST sources are added to the pages.
302 #html_show_sourcelink = True
303
304 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
305 #html_show_sphinx = True
306
307 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
308 #html_show_copyright = True
309
310 # If true, an OpenSearch description file will be output, and all pages will
311 # contain a <link> tag referring to it.  The value of this option must be the
312 # base URL from which the finished HTML is served.
313 #html_use_opensearch = ''
314
315 # This is the file name suffix for HTML files (e.g. ".xhtml").
316 #html_file_suffix = None
317
318 # Output file base name for HTML help builder.
319 htmlhelp_basename = 'Gromacsdoc'
320
321
322 # -- Options for LaTeX output ---------------------------------------------
323
324 latex_elements = {
325 # The paper size ('letterpaper' or 'a4paper').
326 'papersize': 'a4paper',
327
328
329 # The font size ('10pt', '11pt' or '12pt').
330 'pointsize': '11',
331
332 # Additional stuff for the LaTeX preamble.
333 # The tocdepth setting is needed to overwrite the default value set by Sphinx
334 # to get a more detailed toctree in the pdf version of the manual.
335     'preamble': r'''
336     \usepackage{here}
337     \usepackage{picins}
338     \usepackage{underscore}
339     \usepackage{tabularx}
340     \usepackage{multicol}
341     \usepackage{dcolumn}
342     \usepackage{makeidx}
343     \usepackage{times}
344     \usepackage{ifthen}
345     \usepackage{enumitem}
346     \usepackage{longtable}
347     \usepackage{pdflscape}
348     \pagenumbering{roman}
349     \usepackage{array}
350     \setcounter{tocdepth}{2}
351     ''',
352 # Format output to avoid empty pages
353   'classoptions': ',openany,oneside'
354 }
355
356 # Grouping the document tree into LaTeX files. List of tuples
357 # (source start file, target name, title,
358 #  author, documentclass [howto, manual, or own class]).
359 latex_documents = [
360   ('index', 'gromacs.tex', u'GROMACS Documentation',
361    u'GROMACS development team', 'manual'),
362 ]
363
364 # The name of an image file (relative to this directory) to place at the top of
365 # the title page.
366 latex_logo = 'reference-manual/plots/peregrine.png'
367
368 # For "manual" documents, if this is true, then toplevel headings are parts,
369 # not chapters.
370 latex_use_parts = True
371
372 # If true, show page references after internal links.
373 latex_show_pagerefs = True
374
375 # If true, show URL addresses after external links.
376 #latex_show_urls = False
377
378 # Documents to append as an appendix to all manuals.
379 #latex_appendices = []
380
381 # If false, no module index is generated.
382 #latex_domain_indices = True
383
384
385 # -- Options for manual page output ---------------------------------------
386
387 # One entry per manual page. List of tuples
388 # (source start file, name, description, authors, manual section).
389 if tags.has('do_man'):
390     exec(open('conf-man.py').read())
391
392 # If true, show URL addresses after external links.
393 #man_show_urls = False
394
395
396 # -- Options for Texinfo output -------------------------------------------
397
398 # Grouping the document tree into Texinfo files. List of tuples
399 # (source start file, target name, title, author,
400 #  dir menu entry, description, category)
401 texinfo_documents = [
402   ('index', 'GROMACS', u'GROMACS Documentation',
403    u'GROMACS development team', 'GROMACS', 'One line description of project.',
404    'Miscellaneous'),
405 ]
406
407 # Documents to append as an appendix to all manuals.
408 #texinfo_appendices = []
409
410 # If false, no module index is generated.
411 #texinfo_domain_indices = True
412
413 # How to display URL addresses: 'footnote', 'no', or 'inline'.
414 #texinfo_show_urls = 'footnote'
415
416 # If true, do not generate a @detailmenu in the "Top" node's menu.
417 #texinfo_no_detailmenu = False
418
419 # Make it possible to use numbered labels for figures and tables
420 numfig = True
421
422 # -- Options for autodoc extension ----------------------------------------
423
424 # http://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc-mock-imports
425 autodoc_mock_imports = ['hpccm', 'hpccm.config']
426
427 # -- Options for intersphinx extension ------------------------------------
428
429 intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
430 intersphinx_cache_limit = -1
431 intersphinx_timeout = 10