From: Teemu Murtola Date: Sun, 8 Feb 2015 05:22:20 +0000 (+0200) Subject: Move flow chart from old-html to Sphinx X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=1876477ef6075e10c27e90fac7d17508bea3f119;p=alexxy%2Fgromacs.git Move flow chart from old-html to Sphinx Get rid of the remaining HTML page generated from old-html/, and all the machinery that was there just to generate and link to these pages. The images used by the flowchart still remain in old-html/ and there is a target to copy them to the output, but this is significantly simpler than what it was. For now, replace the flow chart with raw HTML within rst; using something like sphinx.ext.graphviz could probably work better. did not work when embedded into a Sphinx-generate page; replaced with . Change-Id: Icbcccd36a9cc157a5a8efe1e9054d6a6741c83ca --- diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 8d75986f1b..c06a10193c 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -35,7 +35,7 @@ # This directory provides a unified place for building all kinds of # GROMACS documentation. This includes some "static" content (Doxygen # code documentation, reference manual, install guide, old online HTML -# pages), and content generated from the gmx program for the various +# images), and content generated from the gmx program for the various # tools (man and HTML pages). It also provides the "webpage" target, # that combines all of the above (except man pages in man format) into # a form suitable for automated deployment to the GROMACS website. It @@ -61,7 +61,6 @@ set(MAN_PAGE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) find_package(PythonInterp) find_package(Sphinx 1.2.3 COMPONENTS pygments) -add_subdirectory(old-html) add_subdirectory(doxygen) option(GMX_BUILD_WEBPAGE "Whether to try to configure to build the GROMACS static webpages" OFF) @@ -90,11 +89,11 @@ if (SPHINX_FOUND) set(SPHINX_SOURCE_FILES index.rst download.rst - online.rst install-guide/index.rst man/gromacs.7.rst user-guide/index.rst user-guide/getting-started.rst + user-guide/flow.rst user-guide/cutoff-schemes.rst user-guide/file-formats.rst user-guide/tools.rst @@ -236,11 +235,6 @@ if(GMX_BUILD_WEBPAGE) set(HTML_BUILD_IS_POSSIBLE ON) # Next, turn it off in any of the preconditions are unsatisified - if(NOT GMX_BUILD_HELP) - set(HTML_BUILD_IS_POSSIBLE OFF) - message(STATUS "Cannot build webpage without GMX_BUILD_HELP=on") - endif() - if(NOT MANUAL_BUILD_IS_POSSIBLE) set(HTML_BUILD_IS_POSSIBLE OFF) message(STATUS "Cannot build webpage without being able to build the reference PDF manual") @@ -267,6 +261,13 @@ if(GMX_BUILD_WEBPAGE) endif() endif() +# TODO Get rid of the remaining content in old-html +add_custom_target(webpage-old-images + ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/old-html ${HTML_OUTPUT_DIR} + COMMENT "Copying flowchart images" + VERBATIM + ) + if(HTML_BUILD_IS_POSSIBLE) # If building the webpage from the repo, then tarballs may not # exist, and if so, it would not make sense to build that part of @@ -309,24 +310,6 @@ if(HTML_BUILD_IS_POSSIBLE) VERBATIM ) - # TODO Move content from the "old" html output into the new user - # guide, or delete, as appropriate. - if(NOT SOURCE_IS_SOURCE_DISTRIBUTION) - # TODO If content remains here once the user guide is in - # decent shape, try to make the generated HTML arrive directly - # in ${HTML_OUTPUT_DIR} - add_custom_target(webpage-html - ${CMAKE_COMMAND} -E copy_directory old-html/final ${HTML_OUTPUT_DIR} - ) - add_dependencies(webpage-html html) - else() - # In the source distribution, the html pages are already - # built, so we can avoid making gmx via the html target - add_custom_target(webpage-html - ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/old-html/final ${HTML_OUTPUT_DIR} - ) - endif() - # The Doxygen configuration in doxygen/Doxyfile-common.cmakein # makes all the Doxygen output directly in # ${HTML_OUTPUT_DIR}/doxygen (and makes the directory if it needs @@ -339,7 +322,7 @@ if(HTML_BUILD_IS_POSSIBLE) ${extra_webpage_dependencies} VERBATIM ) - add_dependencies(webpage webpage-sphinx webpage-html doxygen-all) + add_dependencies(webpage webpage-sphinx webpage-old-images doxygen-all) else() add_custom_target(webpage COMMAND ${CMAKE_COMMAND} -E echo "Cannot build webpage because of missing requirements. Check cmake status output for reasons" diff --git a/docs/index.rst b/docs/index.rst index 31d2197bf3..8d0bf87682 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -17,8 +17,6 @@ Contents: user-guide/index - online - * `Reference Manual`_ (PDF format) * Answers to `Frequently Asked Questions `_ diff --git a/docs/old-html/BuildHtmlHelp.cmake b/docs/old-html/BuildHtmlHelp.cmake deleted file mode 100644 index 400ea70318..0000000000 --- a/docs/old-html/BuildHtmlHelp.cmake +++ /dev/null @@ -1,81 +0,0 @@ -# -# This file is part of the GROMACS molecular simulation package. -# -# Copyright (c) 2013,2014,2015, by the GROMACS development team, led by -# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, -# and including many others, as listed in the AUTHORS file in the -# top-level source directory and at http://www.gromacs.org. -# -# GROMACS is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public License -# as published by the Free Software Foundation; either version 2.1 -# of the License, or (at your option) any later version. -# -# GROMACS is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with GROMACS; if not, see -# http://www.gnu.org/licenses, or write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# If you want to redistribute modifications to GROMACS, please -# consider that scientific software is very special. Version -# control is crucial - bugs must be traceable. We will be happy to -# consider code for inclusion in the official distribution, but -# derived work must not be called official GROMACS. Details are found -# in the README & COPYING files - if they are missing, get the -# official version at http://www.gromacs.org. -# -# To help us fund GROMACS development, we humbly ask that you cite -# the research papers on the package. Check out http://www.gromacs.org. - -if (NOT DEFINED GMX_EXECUTABLE OR NOT DEFINED OUTPUT_DIR OR NOT DEFINED SOURCE_HTML_DIR) - message(FATAL_ERROR "Required input parameter not set") -endif() - -file(MAKE_DIRECTORY ${OUTPUT_DIR}) -file(MAKE_DIRECTORY ${OUTPUT_DIR}/programs) -file(COPY ${SOURCE_HTML_DIR}/header.html.in DESTINATION .) -file(COPY ${SOURCE_HTML_DIR}/footer.html DESTINATION .) - -# This is generated by gmx help -export html -set(HEADER_FILE header.html) - -execute_process( - COMMAND ${GMX_EXECUTABLE} -quiet help -export html - RESULT_VARIABLE exitcode) -if (exitcode) - # Ensure that no partial output is left behind. - file(REMOVE_RECURSE ${OUTPUT_DIR}) - file(REMOVE ${HEADER_FILE}) - message(FATAL_ERROR - "Failed to generate HTML help. " - "Set GMX_BUILD_HELP=OFF or GMX_BUILD_HELP=AUTO if you want to skip them.\n" - "Error/exit code: ${exitcode}") -endif() - -set(FOOTER_FILE ${SOURCE_HTML_DIR}/footer.html) -file(READ ${HEADER_FILE} HEADER_TEXT) -file(READ ${FOOTER_FILE} FOOTER_TEXT) -set(_title_re "[Tt][Ii][Tt][Ll][Ee]") - -function(CREATE_HTML_FILE SOURCE_FILE ROOTPATH) - file(RELATIVE_PATH _rel_path ${SOURCE_HTML_DIR} ${SOURCE_FILE}) - file(READ ${SOURCE_FILE} _content) - string(REGEX REPLACE "^ *<${_title_re}>(.*)\n" "" _content "${_content}") - set(TITLE "${CMAKE_MATCH_1}") - string(CONFIGURE "${HEADER_TEXT}" _header @ONLY) - set(_content "${_header}${_content}${FOOTER_TEXT}") - file(WRITE ${OUTPUT_DIR}/${_rel_path} "${_content}") -endfunction() - -file(COPY ${SOURCE_HTML_DIR}/images DESTINATION ${OUTPUT_DIR}) -file(MAKE_DIRECTORY ${OUTPUT_DIR}/online) -file(COPY ${SOURCE_HTML_DIR}/online/style.css DESTINATION ${OUTPUT_DIR}/online) -file(GLOB _source_files ${SOURCE_HTML_DIR}/online/*.html) -foreach(_file ${_source_files}) - create_html_file(${_file} "../") -endforeach() diff --git a/docs/old-html/CMakeLists.txt b/docs/old-html/CMakeLists.txt deleted file mode 100644 index 798916ed58..0000000000 --- a/docs/old-html/CMakeLists.txt +++ /dev/null @@ -1,68 +0,0 @@ -# -# This file is part of the GROMACS molecular simulation package. -# -# Copyright (c) 2013,2014,2015, by the GROMACS development team, led by -# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, -# and including many others, as listed in the AUTHORS file in the -# top-level source directory and at http://www.gromacs.org. -# -# GROMACS is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public License -# as published by the Free Software Foundation; either version 2.1 -# of the License, or (at your option) any later version. -# -# GROMACS is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with GROMACS; if not, see -# http://www.gnu.org/licenses, or write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# If you want to redistribute modifications to GROMACS, please -# consider that scientific software is very special. Version -# control is crucial - bugs must be traceable. We will be happy to -# consider code for inclusion in the official distribution, but -# derived work must not be called official GROMACS. Details are found -# in the README & COPYING files - if they are missing, get the -# official version at http://www.gromacs.org. -# -# To help us fund GROMACS development, we humbly ask that you cite -# the research papers on the package. Check out http://www.gromacs.org. - -include(gmxCustomCommandUtilities) - -set(OUTPUT_DIR final) - -if (GMX_BUILD_HELP) - # Unlike the man and completion targets, this target is not built - # automatically with GMX_BUILD_HELP=AUTO, since most people will not - # notice it missing. - file(GLOB_RECURSE deps - ${CMAKE_CURRENT_SOURCE_DIR}/images/* - ${CMAKE_CURRENT_SOURCE_DIR}/*.html - ${CMAKE_CURRENT_SOURCE_DIR}/*.css - ) - list(APPEND deps - ${CMAKE_CURRENT_SOURCE_DIR}/BuildHtmlHelp.cmake - ${CMAKE_CURRENT_SOURCE_DIR}/header.html.in - ) - - gmx_add_custom_output_target(html OUTPUT STAMP - COMMAND ${CMAKE_COMMAND} - -D GMX_EXECUTABLE=$ - -D SOURCE_HTML_DIR=${CMAKE_CURRENT_SOURCE_DIR} - -D OUTPUT_DIR=${OUTPUT_DIR} - -P ${CMAKE_CURRENT_SOURCE_DIR}/BuildHtmlHelp.cmake - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - DEPENDS gmx ${deps} - COMMENT "Generating HTML help") - - if (GMX_BUILD_HELP_FORCE) - set_target_properties(html PROPERTIES EXCLUDE_FROM_ALL OFF) - endif() - set_directory_properties(PROPERTIES - ADDITIONAL_MAKE_CLEAN_FILES "${OUTPUT_DIR};header.html") -endif() diff --git a/docs/old-html/footer.html b/docs/old-html/footer.html deleted file mode 100644 index cac6e95fbb..0000000000 --- a/docs/old-html/footer.html +++ /dev/null @@ -1,8 +0,0 @@ - -

-


-
-http://www.gromacs.org
-
- - diff --git a/docs/old-html/header.html.in b/docs/old-html/header.html.in deleted file mode 100644 index 04b7677e28..0000000000 --- a/docs/old-html/header.html.in +++ /dev/null @@ -1,26 +0,0 @@ - - - @TITLE@ - - - - - - - - - - - - -
- - -

@TITLE@

-
- Main Table of Contents - - @VERSION@ -
-
- diff --git a/docs/old-html/images/gmxlogo_small.jpg b/docs/old-html/images/gmxlogo_small.jpg deleted file mode 100644 index 55c9df7847..0000000000 Binary files a/docs/old-html/images/gmxlogo_small.jpg and /dev/null differ diff --git a/docs/old-html/online/flow.html b/docs/old-html/online/flow.html deleted file mode 100644 index 900f04c6c5..0000000000 --- a/docs/old-html/online/flow.html +++ /dev/null @@ -1,208 +0,0 @@ -Flow Chart -

This is a flow chart of a typical GROMACS MD run of a protein -in a box of water. -A more detailed example is available in the -Getting Started -section. Several steps of energy minimization may be necessary, -these consist of cycles: grompp -> mdrun. -

- -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
eiwit.pdb 
Generate a GROMACS topology  gmx pdb2gmx 
conf.gro topol.top




Enlarge the box  gmx editconf  
conf.gro
Solvate protein gmx solvate 
conf.gro topol.top
grompp.mdp 
Generate mdrun input file  gmx grompp  
-Continuation
topol.tpr  state.cpt  
-
-
Run the simulation (EM or MD) gmx mdrun 
traj.xtc / -traj.trr ener.edr
Analysis  g_...  
  gmx view  
  gmx energy  
-
diff --git a/docs/old-html/online/style.css b/docs/old-html/online/style.css deleted file mode 100644 index a296f99f08..0000000000 --- a/docs/old-html/online/style.css +++ /dev/null @@ -1,15 +0,0 @@ -H1 { text-indent: 0em; font-size: 24pt; font-family: serif } -H2 { text-indent: 0em; font-size: 24pt; font-weight: bold; font-family: arial,helvetica,verdana,sans-serif } -H3 { text-indent: 0em; font-size: 18pt; font-weight: bold; font-family: arial,helvetica,verdana,sans-serif } -H4 { font-family: arial,helvetica,verdana,sans-serif } -A:link { text-decoration: none } -A:active { text-decoration: none } -A:visited { text-decoration: none } -tt { font-family: courier,"lucida console",serif } - - - - - - - diff --git a/docs/online.rst b/docs/online.rst deleted file mode 100644 index 041e1fbf4d..0000000000 --- a/docs/online.rst +++ /dev/null @@ -1,4 +0,0 @@ -Online reference -================ - -* `Flow Chart `_ diff --git a/docs/user-guide/flow.rst b/docs/user-guide/flow.rst new file mode 100644 index 0000000000..6579c7c008 --- /dev/null +++ b/docs/user-guide/flow.rst @@ -0,0 +1,210 @@ +Flow Chart +========== + +This is a flow chart of a typical GROMACS MD run of a protein +in a box of water. +A more detailed example is available in :doc:`getting-started`. +Several steps of energy minimization may be necessary, +these consist of cycles: :ref:`gmx grompp` -> :ref:`gmx mdrun`. + +.. raw:: html + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
eiwit.pdb
Generate a GROMACS topology gmx pdb2gmx
conf.gro topol.top




Enlarge the boxgmx editconf
conf.gro
Solvate protein gmx solvate 
conf.gro topol.top
grompp.mdp 
Generate mdrun input filegmx grompp
Continuation
topol.tprstate.cpt
+
+
Run the simulation (EM or MD) gmx mdrun 
traj.xtc / + traj.trr ener.edr
Analysisg_...
gmx view
gmx energy
+
+ diff --git a/docs/user-guide/getting-started.rst b/docs/user-guide/getting-started.rst index d35bf01b99..5c325d7657 100644 --- a/docs/user-guide/getting-started.rst +++ b/docs/user-guide/getting-started.rst @@ -1,6 +1,11 @@ Getting started =============== +.. toctree:: + :hidden: + + flow + In this chapter we assume the reader is familiar with Molecular Dynamics and familiar with Unix, including the use of a text editor such as ``jot``, ``emacs`` or ``vi``. We furthermore assume the |Gromacs| software is installed properly on @@ -36,7 +41,7 @@ administrator for more information, and then follow the advice for Flowchart of typical simulation ------------------------------- -A typical simulation workflow with |Gromacs| is `illustrated here <../online/flow.html>`_. +A typical simulation workflow with |Gromacs| is :doc:`illustrated here `. Important files --------------- diff --git a/src/gromacs/commandline/cmdlinehelpmodule.cpp b/src/gromacs/commandline/cmdlinehelpmodule.cpp index b4fce4cb31..78903210dc 100644 --- a/src/gromacs/commandline/cmdlinehelpmodule.cpp +++ b/src/gromacs/commandline/cmdlinehelpmodule.cpp @@ -406,45 +406,6 @@ void initProgramLinks(HelpLinks *links, const CommandLineHelpModuleImpl &helpMod } } -/******************************************************************** - * HelpExportHtml - */ - -/*! \internal - * \brief - * Implements export for HTML help. - * - * This whole class can go once docs/old-html/ no longer requires header.html - * that it generates. - * - * \ingroup module_commandline - */ -class HelpExportHtml : public HelpExportInterface -{ - public: - //! Initializes HTML exporter. - HelpExportHtml(); - - virtual void startModuleExport() {} - virtual void exportModuleHelp( - const CommandLineModuleInterface & /*module*/, - const std::string & /*tag*/, - const std::string & /*displayName*/) {} - virtual void finishModuleExport() {} - - virtual void startModuleGroupExport() {} - virtual void exportModuleGroup(const char * /*title*/, - const ModuleGroupContents & /*modules*/) {} - virtual void finishModuleGroupExport() {} -}; - -HelpExportHtml::HelpExportHtml() -{ - std::string header = gmx::File::readToString("header.html.in"); - header = replaceAll(header, "@VERSION@", gmx_version()); - gmx::File::writeFileFromString("header.html", header); -} - /******************************************************************** * HelpExportReStructuredText */ @@ -758,7 +719,7 @@ int CommandLineHelpModule::run(int argc, char *argv[]) // Add internal topics lazily here. addTopic(HelpTopicPointer(new CommandsHelpTopic(*impl_))); - const char *const exportFormats[] = { "html", "rst", "completion" }; + const char *const exportFormats[] = { "rst", "completion" }; std::string exportFormat; Options options(NULL, NULL); options.addOption(StringOption("export").store(&exportFormat) @@ -767,11 +728,7 @@ int CommandLineHelpModule::run(int argc, char *argv[]) if (!exportFormat.empty()) { boost::scoped_ptr exporter; - if (exportFormat == "html") - { - exporter.reset(new HelpExportHtml()); - } - else if (exportFormat == "rst") + if (exportFormat == "rst") { exporter.reset(new HelpExportReStructuredText(*impl_)); }