HTML export from the wrapper binary.
authorTeemu Murtola <teemu.murtola@gmail.com>
Thu, 5 Sep 2013 03:25:19 +0000 (06:25 +0300)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Mon, 7 Oct 2013 14:31:49 +0000 (16:31 +0200)
Implement HTML output format for 'gmx help -export'.
Fix an issue that caused 'mdrun -man html' to segfault.
Move the HTML header and footer generation out of wman.cpp and clean it
up (close incomplete tags, remove the date, etc.).

Clean up the layout of the online manual (on the file system) by putting
the generated files into a separate directory.  Also generate an
alphabetical list of programs into its own file instead of directly on
the front page.  By-topic list is currently missing.

Left out installation rules for now; can be reinstantiated once #1242
and the general approach to the whole online manual is clearer.

Will fix hyperlinks etc. in the generated output in separate change(s).

Related to #685, #969, and #1242.

Change-Id: Iaf8fc28d563f05a8e00c7c52d58b91cd1dabf369

share/CMakeLists.txt
share/html/BuildHtmlHelp.cmake [new file with mode: 0644]
share/html/CMakeLists.txt [new file with mode: 0644]
share/html/gmxfaq.html
share/html/images/gmxlogo_small.png [deleted file]
share/html/online.html
src/gromacs/commandline/cmdlinemodulemanager.cpp
src/gromacs/gmxlib/filenm.c
src/gromacs/onlinehelp/helpwritercontext.h
src/gromacs/onlinehelp/wman.cpp

index f4c7842c8656a3a29be5f02668b5ef0981165092..7056506dc9f87d5d79279e4aae98d9464cbd3d8d 100644 (file)
@@ -32,6 +32,7 @@
 # To help us fund GROMACS development, we humbly ask that you cite
 # the research papers on the package. Check out http://www.gromacs.org.
 
+add_subdirectory(html)
 add_subdirectory(man)
 add_subdirectory(template)
 
@@ -42,3 +43,12 @@ install(DIRECTORY top
     DESTINATION ${DATA_INSTALL_DIR}/top
     COMPONENT data
     PATTERN "*~" EXCLUDE)
+
+install(DIRECTORY . DESTINATION ${DATA_INSTALL_DIR}
+  COMPONENT data
+  PATTERN "Makefile*" EXCLUDE
+  PATTERN "CMake*" EXCLUDE
+  PATTERN "cmake*" EXCLUDE
+  PATTERN "*~" EXCLUDE
+  PATTERN "template" EXCLUDE
+)
diff --git a/share/html/BuildHtmlHelp.cmake b/share/html/BuildHtmlHelp.cmake
new file mode 100644 (file)
index 0000000..54d45c8
--- /dev/null
@@ -0,0 +1,38 @@
+#
+# This file is part of the GROMACS molecular simulation package.
+#
+# Copyright (c) 2013, by the GROMACS development team, led by
+# David van der Spoel, Berk Hess, 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.
+
+file(GLOB TOP_LEVEL_FILES ${SOURCE_HTML_DIR}/*.html)
+file(COPY ${TOP_LEVEL_FILES} DESTINATION .)
+file(COPY ${SOURCE_HTML_DIR}/images DESTINATION .)
+file(COPY ${SOURCE_HTML_DIR}/online DESTINATION .)
diff --git a/share/html/CMakeLists.txt b/share/html/CMakeLists.txt
new file mode 100644 (file)
index 0000000..5bffbf6
--- /dev/null
@@ -0,0 +1,59 @@
+#
+# This file is part of the GROMACS molecular simulation package.
+#
+# Copyright (c) 2013, by the GROMACS development team, led by
+# David van der Spoel, Berk Hess, 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 CMAKE_CROSSCOMPILING)
+    set(CAN_BUILD_HTMLHELP ON)
+else()
+    set(CAN_BUILD_HTMLHELP OFF)
+endif()
+
+if(CAN_BUILD_HTMLHELP)
+    file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/programs)
+    add_custom_target(html-programs
+        gmx -quiet help -export html
+        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/programs
+        COMMENT "Generating HTML help for programs"
+        VERBATIM)
+    # TODO: May not work for an in-source build.
+    add_custom_target(html
+        ${CMAKE_COMMAND}
+        -D SOURCE_HTML_DIR=${CMAKE_CURRENT_SOURCE_DIR}
+        -P ${CMAKE_CURRENT_SOURCE_DIR}/BuildHtmlHelp.cmake
+        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+        COMMENT "Generating HTML help"
+        VERBATIM)
+    add_dependencies(html html-programs)
+    set_directory_properties(PROPERTIES
+        ADDITIONAL_MAKE_CLEAN_FILES programs)
+endif()
index 66c4204217dd81397c94d85403cef14de8636303..efe14b90e76abc2eb5ad3f196dd4e0b69a95e4d4 100644 (file)
@@ -830,7 +830,6 @@ href="/mailing_lists/users.php">gmx-users mailing list</a>!  <br><br>
 <hr>
 <div ALIGN=RIGHT>
 <font size="-1"><a href="http://www.gromacs.org">http://www.gromacs.org</a></font><br>
-<font size="-1"><a href="mailto:gromacs@gromacs.org">gromacs@gromacs.org</a></font><br>
 </div>
 
 </BODY>
diff --git a/share/html/images/gmxlogo_small.png b/share/html/images/gmxlogo_small.png
deleted file mode 100644 (file)
index 64d59d8..0000000
Binary files a/share/html/images/gmxlogo_small.png and /dev/null differ
index cb41520370bc7e5e89b82b20d831c0b3ff2ee103..1d4b5f016256c9b78b0147bd7debaedc784eec2a 100644 (file)
@@ -43,350 +43,16 @@ Sat 19 Jan 2013</B></td>
 </TD>
 <TD VALIGN=top WIDTH=75%>
 <h3>Programs</h3>
-<multicol cols=5> 
 <A HREF="online/options.html">Options</a>
-<br>
-<br><a href=online/do_dssp.html>do_dssp</a>
-<br><a href=online/editconf.html>editconf</a>
-<br><a href=online/eneconv.html>eneconv</a>
-<br><a href=online/g_anadock.html>g_anadock</a>
-<br><a href=online/g_anaeig.html>g_anaeig</a>
-<br><a href=online/g_analyze.html>g_analyze</a>
-<br><a href=online/g_angle.html>g_angle</a>
-<br><a href=online/g_bar.html>g_bar</a>
-<br><a href=online/g_bond.html>g_bond</a>
-<br><a href=online/g_bundle.html>g_bundle</a>
-<br><a href=online/g_chi.html>g_chi</a>
-<br><a href=online/g_cluster.html>g_cluster</a>
-<br><a href=online/g_clustsize.html>g_clustsize</a>
-<br><a href=online/g_confrms.html>g_confrms</a>
-<br><a href=online/g_covar.html>g_covar</a>
-<br><a href=online/g_current.html>g_current</a>
-<br><a href=online/g_density.html>g_density</a>
-<br><a href=online/g_densmap.html>g_densmap</a>
-<br><a href=online/g_densorder.html>g_densorder</a>
-<br><a href=online/g_dielectric.html>g_dielectric</a>
-<br><a href=online/g_dih.html>g_dih</a>
-<br><a href=online/g_dipoles.html>g_dipoles</a>
-<br><a href=online/g_disre.html>g_disre</a>
-<br><a href=online/g_dist.html>g_dist</a>
-<br><a href=online/g_dos.html>g_dos</a>
-<br><a href=online/g_dyecoupl.html>g_dyecoupl</a>
-<br><a href=online/g_dyndom.html>g_dyndom</a>
-<br><a href=online/genbox.html>genbox</a>
-<br><a href=online/genconf.html>genconf</a>
-<br><a href=online/g_enemat.html>g_enemat</a>
-<br><a href=online/g_energy.html>g_energy</a>
-<br><a href=online/genion.html>genion</a>
-<br><a href=online/genrestr.html>genrestr</a>
-<br><a href=online/g_filter.html>g_filter</a>
-<br><a href=online/g_gyrate.html>g_gyrate</a>
-<br><a href=online/g_h2order.html>g_h2order</a>
-<br><a href=online/g_hbond.html>g_hbond</a>
-<br><a href=online/g_helix.html>g_helix</a>
-<br><a href=online/g_helixorient.html>g_helixorient</a>
-<br><a href=online/g_hydorder.html>g_hydorder</a>
-<br><a href=online/g_kinetics.html>g_kinetics</a>
-<br><a href=online/g_lie.html>g_lie</a>
-<br><a href=online/g_mdmat.html>g_mdmat</a>
-<br><a href=online/g_membed.html>g_membed</a>
-<br><a href=online/g_mindist.html>g_mindist</a>
-<br><a href=online/g_morph.html>g_morph</a>
-<br><a href=online/g_msd.html>g_msd</a>
-<br><a href=online/gmxcheck.html>gmxcheck</a>
-<br><a href=online/gmxdump.html>gmxdump</a>
-<br><a href=online/g_nmeig.html>g_nmeig</a>
-<br><a href=online/g_nmens.html>g_nmens</a>
-<br><a href=online/g_nmtraj.html>g_nmtraj</a>
-<br><a href=online/g_options.html>g_options</a>
-<br><a href=online/g_order.html>g_order</a>
-<br><a href=online/g_pme_error.html>g_pme_error</a>
-<br><a href=online/g_polystat.html>g_polystat</a>
-<br><a href=online/g_potential.html>g_potential</a>
-<br><a href=online/g_principal.html>g_principal</a>
-<br><a href=online/g_protonate.html>g_protonate</a>
-<br><a href=online/g_rama.html>g_rama</a>
-<br><a href=online/g_rdf.html>g_rdf</a>
-<br><a href=online/g_rms.html>g_rms</a>
-<br><a href=online/g_rmsdist.html>g_rmsdist</a>
-<br><a href=online/g_rmsf.html>g_rmsf</a>
-<br><a href=online/grompp.html>grompp</a>
-<br><a href=online/g_rotacf.html>g_rotacf</a>
-<br><a href=online/g_rotmat.html>g_rotmat</a>
-<br><a href=online/g_saltbr.html>g_saltbr</a>
-<br><a href=online/g_sans.html>g_sans</a>
-<br><a href=online/g_sas.html>g_sas</a>
-<br><a href=online/g_select.html>g_select</a>
-<br><a href=online/g_sgangle.html>g_sgangle</a>
-<br><a href=online/g_sham.html>g_sham</a>
-<br><a href=online/g_sigeps.html>g_sigeps</a>
-<br><a href=online/g_sorient.html>g_sorient</a>
-<br><a href=online/g_spatial.html>g_spatial</a>
-<br><a href=online/g_spol.html>g_spol</a>
-<br><a href=online/g_tcaf.html>g_tcaf</a>
-<br><a href=online/g_traj.html>g_traj</a>
-<br><a href=online/g_tune_pme.html>g_tune_pme</a>
-<br><a href=online/g_vanhove.html>g_vanhove</a>
-<br><a href=online/g_velacc.html>g_velacc</a>
-<br><a href=online/g_wham.html>g_wham</a>
-<br><a href=online/g_wheel.html>g_wheel</a>
-<br><a href=online/g_x2top.html>g_x2top</a>
-<br><a href=online/make_edi.html>make_edi</a>
-<br><a href=online/make_ndx.html>make_ndx</a>
-<br><a href=online/mdrun.html>mdrun</a>
-<br><a href=online/mk_angndx.html>mk_angndx</a>
-<br><a href=online/pdb2gmx.html>pdb2gmx</a>
-<br><a href=online/tpbconv.html>tpbconv</a>
-<br><a href=online/trjcat.html>trjcat</a>
-<br><a href=online/trjconv.html>trjconv</a>
-<br><a href=online/trjorder.html>trjorder</a>
-<br><a href=online/xpm2ps.html>xpm2ps</a>
-</multicol>
+<br><br>
+<a href="programs/byname.html">All Programs Alphabetically</a>
 </TD>
 </TR>
 </TABLE>
-<HR>
-<h3>Programs by Topic</h3>
-<multicol cols=3>
-<A HREF="#HNR1">Generating topologies and coordinates</A><br>
-<A HREF="#HNR2">Running a simulation</A><br>
-<A HREF="#HNR3">Viewing trajectories</A><br>
-<A HREF="#HNR4">Processing energies</A><br>
-<A HREF="#HNR5">Converting files</A><br>
-<A HREF="#HNR6">Tools</A><br>
-<A HREF="#HNR7">Distances between structures</A><br>
-<A HREF="#HNR8">Distances in structures over time</A><br>
-<A HREF="#HNR9">Mass distribution properties over time</A><br>
-<A HREF="#HNR10">Analyzing bonded interactions</A><br>
-<A HREF="#HNR11">Structural properties</A><br>
-<A HREF="#HNR12">Kinetic properties</A><br>
-<A HREF="#HNR13">Electrostatic properties</A><br>
-<A HREF="#HNR14">Protein-specific analysis</A><br>
-<A HREF="#HNR15">Interfaces</A><br>
-<A HREF="#HNR16">Covariance analysis</A><br>
-<A HREF="#HNR17">Normal modes</A><br>
-</multicol> 
-
-<A NAME="HNR1">
-<TABLE CELLSPACING=1>
-<TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<TR><TD COLSPAN=2><b>Generating topologies and coordinates</b>
-<TR><TD><A HREF="online/editconf.html">editconf</A></TD><TD>edits the box and writes subgroups </TD>
-<TR><TD><A HREF="online/g_protonate.html">g_protonate</A></TD><TD>protonates structures</TD>
-<TR><TD><A HREF="online/g_x2top.html">g_x2top</A></TD><TD>generates a primitive topology from coordinates </TD>
-<TR><TD><A HREF="online/genbox.html">genbox</A></TD><TD>solvates a system</TD>
-<TR><TD><A HREF="online/genconf.html">genconf</A></TD><TD>multiplies a conformation in 'random' orientations</TD>
-<TR><TD><A HREF="online/genion.html">genion</A></TD><TD>generates mono atomic ions on energetically favorable positions</TD>
-<TR><TD><A HREF="online/genrestr.html">genrestr</A></TD><TD>generates position restraints or distance restraints for index groups</TD>
-<TR><TD><A HREF="online/pdb2gmx.html">pdb2gmx</A></TD><TD>converts coordinate files to topology and FF-compliant coordinate files</TD>
-</TABLE>
-
-<A NAME="HNR2">
-<TABLE CELLSPACING=1>
-<TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<TR><TD COLSPAN=2><b>Running a simulation</b>
-<TR><TD><A HREF="online/grompp.html">grompp</A></TD><TD>makes a run input file</TD>
-<TR><TD><A HREF="online/mdrun.html">mdrun</A></TD><TD>performs a simulation, do a normal mode analysis or an energy minimization</TD>
-<TR><TD><A HREF="online/tpbconv.html">tpbconv</A></TD><TD>makes a run input file for restarting a crashed run</TD>
-</TABLE>
-
-<A NAME="HNR3">
-<TABLE CELLSPACING=1>
-<TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<TR><TD COLSPAN=2><b>Viewing trajectories</b>
-<TR><TD><A HREF="online/g_nmtraj.html">g_nmtraj</A></TD><TD>generate a virtual trajectory from an eigenvector</TD>
-<TR><TD><A HREF="online/ngmx.html">ngmx</A></TD><TD>displays a trajectory</TD>
-</TABLE>
-
-<A NAME="HNR4">
-<TABLE CELLSPACING=1>
-<TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<TR><TD COLSPAN=2><b>Processing energies</b>
-<TR><TD><A HREF="online/g_enemat.html">g_enemat</A></TD><TD>extracts an energy matrix from an energy file</TD>
-<TR><TD><A HREF="online/g_energy.html">g_energy</A></TD><TD>writes energies to xvg files and displays averages</TD>
-<TR><TD><A HREF="online/mdrun.html">mdrun</A></TD><TD>with -rerun (re)calculates energies for trajectory frames</TD>
-</TABLE>
-
-<A NAME="HNR5">
-<TABLE CELLSPACING=1>
-<TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<TR><TD COLSPAN=2><b>Converting files</b>
-<TR><TD><A HREF="online/editconf.html">editconf</A></TD><TD>converts and manipulates structure files</TD>
-<TR><TD><A HREF="online/eneconv.html">eneconv</A></TD><TD>converts energy files</TD>
-<TR><TD><A HREF="online/g_sigeps.html">g_sigeps</A></TD><TD>convert c6/12 or c6/cn combinations to and from sigma/epsilon</TD>
-<TR><TD><A HREF="online/trjcat.html">trjcat</A></TD><TD>concatenates trajectory files</TD>
-<TR><TD><A HREF="online/trjconv.html">trjconv</A></TD><TD>converts and manipulates trajectory files</TD>
-<TR><TD><A HREF="online/xpm2ps.html">xpm2ps</A></TD><TD>converts XPM matrices to encapsulated postscript (or XPM)</TD>
-</TABLE>
-
-<A NAME="HNR6">
-<TABLE CELLSPACING=1>
-<TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<TR><TD COLSPAN=2><b>Tools</b>
-<TR><TD><A HREF="online/g_analyze.html">g_analyze</A></TD><TD>analyzes data sets</TD>
-<TR><TD><A HREF="online/g_dyndom.html">g_dyndom</A></TD><TD>interpolate and extrapolate structure rotations</TD>
-<TR><TD><A HREF="online/g_filter.html">g_filter</A></TD><TD>frequency filters trajectories, useful for making smooth movies</TD>
-<TR><TD><A HREF="online/g_lie.html">g_lie</A></TD><TD>free energy estimate from linear combinations</TD>
-<TR><TD><A HREF="online/g_morph.html">g_morph</A></TD><TD>linear interpolation of conformations </TD>
-<TR><TD><A HREF="online/g_pme_error.html">g_pme_error</A></TD><TD>estimates the error of using PME with a given input file</TD>
-<TR><TD><A HREF="online/g_select.html">g_select</A></TD><TD>selects groups of atoms based on flexible textual selections</TD>
-<TR><TD><A HREF="online/g_sham.html">g_sham</A></TD><TD>read/write xmgr and xvgr data sets</TD>
-<TR><TD><A HREF="online/g_spatial.html">g_spatial</A></TD><TD>calculates the spatial distribution function</TD>
-<TR><TD><A HREF="online/g_traj.html">g_traj</A></TD><TD>plots x, v and f of selected atoms/groups (and more) from a trajectory</TD>
-<TR><TD><A HREF="online/g_tune_pme.html">g_tune_pme</A></TD><TD>time mdrun as a function of PME nodes to optimize settings</TD>
-<TR><TD><A HREF="online/g_wham.html">g_wham</A></TD><TD>weighted histogram analysis after umbrella sampling</TD>
-<TR><TD><A HREF="online/gmxcheck.html">gmxcheck</A></TD><TD>checks and compares files</TD>
-<TR><TD><A HREF="online/gmxdump.html">gmxdump</A></TD><TD>makes binary files human readable</TD>
-<TR><TD><A HREF="online/make_ndx.html">make_ndx</A></TD><TD>makes index files</TD>
-<TR><TD><A HREF="online/mk_angndx.html">mk_angndx</A></TD><TD>generates index files for g_angle</TD>
-<TR><TD><A HREF="online/trjorder.html">trjorder</A></TD><TD>orders molecules according to their distance to a group</TD>
-<TR><TD><A HREF="online/xpm2ps.html">xpm2ps</A></TD><TD>convert XPM (XPixelMap) file to postscript</TD>
-</TABLE>
-
-<A NAME="HNR7">
-<TABLE CELLSPACING=1>
-<TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<TR><TD COLSPAN=2><b>Distances between structures</b>
-<TR><TD><A HREF="online/g_cluster.html">g_cluster</A></TD><TD>clusters structures</TD>
-<TR><TD><A HREF="online/g_confrms.html">g_confrms</A></TD><TD>fits two structures and calculates the rmsd </TD>
-<TR><TD><A HREF="online/g_rms.html">g_rms</A></TD><TD>calculates rmsd's with a reference structure and rmsd matrices</TD>
-<TR><TD><A HREF="online/g_rmsf.html">g_rmsf</A></TD><TD>calculates atomic fluctuations</TD>
-</TABLE>
-
-<A NAME="HNR8">
-<TABLE CELLSPACING=1>
-<TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<TR><TD COLSPAN=2><b>Distances in structures over time</b>
-<TR><TD><A HREF="online/g_bond.html">g_bond</A></TD><TD>calculates distances between atoms</TD>
-<TR><TD><A HREF="online/g_dist.html">g_dist</A></TD><TD>calculates the distances between the centers of mass of two groups</TD>
-<TR><TD><A HREF="online/g_mindist.html">g_mindist</A></TD><TD>calculates the minimum distance between two groups</TD>
-<TR><TD><A HREF="online/g_mdmat.html">g_mdmat</A></TD><TD>calculates residue contact maps</TD>
-<TR><TD><A HREF="online/g_polystat.html">g_polystat</A></TD><TD>calculates static properties of polymers</TD>
-<TR><TD><A HREF="online/g_rmsdist.html">g_rmsdist</A></TD><TD>calculates atom pair distances averaged with power -2, -3 or -6</TD>
-</TABLE>
-
-<A NAME="HNR9">
-<TABLE CELLSPACING=1>
-<TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<TR><TD COLSPAN=2><b>Mass distribution properties over time</b>
-<TR><TD><A HREF="online/g_gyrate.html">g_gyrate</A></TD><TD>calculates the radius of gyration</TD>
-<TR><TD><A HREF="online/g_msd.html">g_msd</A></TD><TD>calculates mean square displacements</TD>
-<TR><TD><A HREF="online/g_polystat.html">g_polystat</A></TD><TD>calculates static properties of polymers</TD>
-<TR><TD><A HREF="online/g_rdf.html">g_rdf</A></TD><TD>calculates radial distribution functions</TD>
-<TR><TD><A HREF="online/g_rotacf.html">g_rotacf</A></TD><TD>calculates the rotational correlation function for molecules</TD>
-<TR><TD><A HREF="online/g_rotmat.html">g_rotmat</A></TD><TD>plots the rotation matrix for fitting to a reference structure</TD>
-<TR><TD><A HREF="online/g_sans.html">g_sans</A></TD><TD>computes the small angle neutron scattering spectra</TD>
-<TR><TD><A HREF="online/g_traj.html">g_traj</A></TD><TD>plots x, v, f, box, temperature and rotational energy</TD>
-<TR><TD><A HREF="online/g_vanhove.html">g_vanhove</A></TD><TD>calculates Van Hove displacement functions</TD>
-</TABLE>
-
-<A NAME="HNR10">
-<TABLE CELLSPACING=1>
-<TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<TR><TD COLSPAN=2><b>Analyzing bonded interactions</b>
-<TR><TD><A HREF="online/g_angle.html">g_angle</A></TD><TD>calculates distributions and correlations for angles and dihedrals</TD>
-<TR><TD><A HREF="online/g_bond.html">g_bond</A></TD><TD>calculates bond length distributions</TD>
-<TR><TD><A HREF="online/mk_angndx.html">mk_angndx</A></TD><TD>generates index files for g_angle</TD>
-</TABLE>
-
-<A NAME="HNR11">
-<TABLE CELLSPACING=1>
-<TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<TR><TD COLSPAN=2><b>Structural properties</b>
-<TR><TD><A HREF="online/g_anadock.html">g_anadock</A></TD><TD>cluster structures from Autodock runs</TD>
-<TR><TD><A HREF="online/g_bundle.html">g_bundle</A></TD><TD>analyzes bundles of axes, e.g. helices</TD>
-<TR><TD><A HREF="online/g_clustsize.html">g_clustsize</A></TD><TD>calculate size distributions of atomic clusters</TD>
-<TR><TD><A HREF="online/g_disre.html">g_disre</A></TD><TD>analyzes distance restraints</TD>
-<TR><TD><A HREF="online/g_hbond.html">g_hbond</A></TD><TD>computes and analyzes hydrogen bonds</TD>
-<TR><TD><A HREF="online/g_order.html">g_order</A></TD><TD>computes the order parameter per atom for carbon tails</TD>
-<TR><TD><A HREF="online/g_principal.html">g_principal</A></TD><TD>calculates axes of inertia for a group of atoms</TD>
-<TR><TD><A HREF="online/g_rdf.html">g_rdf</A></TD><TD>calculates radial distribution functions</TD>
-<TR><TD><A HREF="online/g_saltbr.html">g_saltbr</A></TD><TD>computes salt bridges</TD>
-<TR><TD><A HREF="online/g_sas.html">g_sas</A></TD><TD>computes solvent accessible surface area</TD>
-<TR><TD><A HREF="online/g_sgangle.html">g_sgangle</A></TD><TD>computes the angle and distance between two groups</TD>
-<TR><TD><A HREF="online/g_sorient.html">g_sorient</A></TD><TD>analyzes solvent orientation around solutes</TD>
-<TR><TD><A HREF="online/g_spol.html">g_spol</A></TD><TD>analyzes solvent dipole orientation and polarization around solutes</TD>
-</TABLE>
-
-<A NAME="HNR12">
-<TABLE CELLSPACING=1>
-<TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<TR><TD COLSPAN=2><b>Kinetic properties</b>
-<TR><TD><A HREF="online/g_bar.html">g_bar</A></TD><TD>calculates free energy difference estimates through Bennett's acceptance ratio</TD>
-<TR><TD><A HREF="online/g_current.html">g_current</A></TD><TD>calculate current autocorrelation function of system</TD>
-<TR><TD><A HREF="online/g_dos.html">g_dos</A></TD><TD>analyzes density of states and properties based on that</TD>
-<TR><TD><A HREF="online/g_dyecoupl.html">g_dyecoupl</A></TD><TD>extracts dye dynamics from trajectories</TD>
-<TR><TD><A HREF="online/g_kinetics.html">g_kinetics</A></TD><TD>analyzes kinetic constants from properties based on the Eyring model</TD>
-<TR><TD><A HREF="online/g_principal.html">g_principal</A></TD><TD>calculate principal axes of inertion for a group of atoms</TD>
-<TR><TD><A HREF="online/g_tcaf.html">g_tcaf</A></TD><TD>calculates viscosities of liquids</TD>
-<TR><TD><A HREF="online/g_traj.html">g_traj</A></TD><TD>plots x, v, f, box, temperature and rotational energy</TD>
-<TR><TD><A HREF="online/g_vanhove.html">g_vanhove</A></TD><TD>compute Van Hove correlation function</TD>
-<TR><TD><A HREF="online/g_velacc.html">g_velacc</A></TD><TD>calculates velocity autocorrelation functions</TD>
-</TABLE>
-
-<A NAME="HNR13">
-<TABLE CELLSPACING=1>
-<TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<TR><TD COLSPAN=2><b>Electrostatic properties</b>
-<TR><TD><A HREF="online/g_current.html">g_current</A></TD><TD>calculates dielectric constants for charged systems</TD>
-<TR><TD><A HREF="online/g_dielectric.html">g_dielectric</A></TD><TD>calculates frequency dependent dielectric constants</TD>
-<TR><TD><A HREF="online/g_dipoles.html">g_dipoles</A></TD><TD>computes the total dipole plus fluctuations</TD>
-<TR><TD><A HREF="online/g_potential.html">g_potential</A></TD><TD>calculates the electrostatic potential across the box</TD>
-<TR><TD><A HREF="online/g_spol.html">g_spol</A></TD><TD>analyze dipoles around a solute</TD>
-<TR><TD><A HREF="online/genion.html">genion</A></TD><TD>generates mono atomic ions on energetically favorable positions</TD>
-</TABLE>
-
-<A NAME="HNR14">
-<TABLE CELLSPACING=1>
-<TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<TR><TD COLSPAN=2><b>Protein-specific analysis</b>
-<TR><TD><A HREF="online/do_dssp.html">do_dssp</A></TD><TD>assigns secondary structure and calculates solvent accessible surface area</TD>
-<TR><TD><A HREF="online/g_chi.html">g_chi</A></TD><TD>calculates everything you want to know about chi and other dihedrals</TD>
-<TR><TD><A HREF="online/g_helix.html">g_helix</A></TD><TD>calculates basic properties of alpha helices</TD>
-<TR><TD><A HREF="online/g_helixorient.html">g_helixorient</A></TD><TD>calculates local pitch/bending/rotation/orientation inside helices</TD>
-<TR><TD><A HREF="online/g_rama.html">g_rama</A></TD><TD>computes Ramachandran plots</TD>
-<TR><TD><A HREF="online/g_wheel.html">g_wheel</A></TD><TD>plots helical wheels</TD>
-<TR><TD><A HREF="online/g_xrama.html">g_xrama</A></TD><TD>shows animated Ramachandran plots</TD>
-</TABLE>
-
-<A NAME="HNR15">
-<TABLE CELLSPACING=1>
-<TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<TR><TD COLSPAN=2><b>Interfaces</b>
-<TR><TD><A HREF="online/g_bundle.html">g_bundle</A></TD><TD>analyzes bundles of axes, e.g. transmembrane helices</TD>
-<TR><TD><A HREF="online/g_density.html">g_density</A></TD><TD>calculates the density of the system</TD>
-<TR><TD><A HREF="online/g_densmap.html">g_densmap</A></TD><TD>calculates 2D planar or axial-radial density maps</TD>
-<TR><TD><A HREF="online/g_densorder.html">g_densorder</A></TD><TD>calculate surface fluctuations</TD>
-<TR><TD><A HREF="online/g_h2order.html">g_h2order</A></TD><TD>computes the orientation of water molecules</TD>
-<TR><TD><A HREF="online/g_hydorder.html">g_hydorder</A></TD><TD>computes tetrahedrality parameters around a given atom</TD>
-<TR><TD><A HREF="online/g_order.html">g_order</A></TD><TD>computes the order parameter per atom for carbon tails</TD>
-<TR><TD><A HREF="online/g_membed.html">g_membed</A></TD><TD>embeds a protein into a lipid bilayer</TD>
-<TR><TD><A HREF="online/g_potential.html">g_potential</A></TD><TD>calculates the electrostatic potential across the box</TD>
-</TABLE>
-
-<A NAME="HNR16">
-<TABLE CELLSPACING=1>
-<TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<TR><TD COLSPAN=2><b>Covariance analysis</b>
-<TR><TD><A HREF="online/g_anaeig.html">g_anaeig</A></TD><TD>analyzes the eigenvectors</TD>
-<TR><TD><A HREF="online/g_covar.html">g_covar</A></TD><TD>calculates and diagonalizes the covariance matrix</TD>
-<TR><TD><A HREF="online/make_edi.html">make_edi</A></TD><TD>generate input files for essential dynamics sampling</TD>
-</TABLE>
-
-<A NAME="HNR17">
-<TABLE CELLSPACING=1>
-<TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<TR><TD COLSPAN=2><b>Normal modes</b>
-<TR><TD><A HREF="online/g_anaeig.html">g_anaeig</A></TD><TD>analyzes the normal modes</TD>
-<TR><TD><A HREF="online/g_nmeig.html">g_nmeig</A></TD><TD>diagonalizes the Hessian </TD>
-<TR><TD><A HREF="online/g_nmtraj.html">g_nmtraj</A></TD><TD>generate oscillating trajectory of an eigenmode</TD>
-<TR><TD><A HREF="online/g_nmens.html">g_nmens</A></TD><TD>generates an ensemble of structures from the normal modes</TD>
-<TR><TD><A HREF="online/grompp.html">grompp</A></TD><TD>makes a run input file</TD>
-<TR><TD><A HREF="online/mdrun.html">mdrun</A></TD><TD>finds a potential energy minimum and calculates the Hessian</TD>
-</TABLE>
 <p>
-<hr>
-<div ALIGN=RIGHT>
-<font size="-1"><a href="http://www.gromacs.org">http://www.gromacs.org</a></font><br>
+<HR>
+<div ALIGN=RIGHT><font size="-1">
+<a href="http://www.gromacs.org">http://www.gromacs.org</a><br>
+</font></div>
 </body>
 </html>
index 2fbed0342e217a230925b535de59b5f9eaf602d3..f6dbbbbc53c7d1d9549c7a6ecb13cf3608142e2a 100644 (file)
@@ -244,6 +244,14 @@ class HelpExportInterface
     public:
         virtual ~HelpExportInterface() {};
 
+        /*! \brief
+         * Called once before exporting individual modules.
+         *
+         * Can, e.g., open shared output files (e.g., if the output is written
+         * into a single file, or if a separate index is required) and write
+         * headers into them.
+         */
+        virtual void startModuleExport() = 0;
         /*! \brief
          * Called to export the help for each module.
          *
@@ -252,6 +260,13 @@ class HelpExportInterface
          */
         virtual void exportModuleHelp(const std::string                &tag,
                                       const CommandLineModuleInterface &module) = 0;
+        /*! \brief
+         * Called after all modules have been exported.
+         *
+         * Can close files opened in startModuleExport(), write footers to them
+         * etc.
+         */
+        virtual void finishModuleExport() = 0;
 };
 
 /********************************************************************
@@ -266,8 +281,10 @@ class HelpExportInterface
 class HelpExportMan : public HelpExportInterface
 {
     public:
+        virtual void startModuleExport() {}
         virtual void exportModuleHelp(const std::string                &tag,
                                       const CommandLineModuleInterface &module);
+        virtual void finishModuleExport() {}
 };
 
 void HelpExportMan::exportModuleHelp(const std::string                &tag,
@@ -295,8 +312,100 @@ void HelpExportMan::exportModuleHelp(const std::string                &tag,
     file.writeLine(".BR gromacs(7)");
     file.writeLine();
     file.writeLine("More information about \\fBGROMACS\\fR is available at <\\fIhttp://www.gromacs.org/\\fR>.");
+}
+
+/********************************************************************
+ * HelpExportHtml
+ */
+
+/*! \internal \brief
+ * Implements export for HTML help.
+ *
+ * \ingroup module_commandline
+ */
+class HelpExportHtml : public HelpExportInterface
+{
+    public:
+        virtual void startModuleExport();
+        virtual void exportModuleHelp(const std::string                &tag,
+                                      const CommandLineModuleInterface &module);
+        virtual void finishModuleExport();
+
+    private:
+        void writeHtmlHeader(File *file, const std::string &title) const;
+        void writeHtmlFooter(File *file) const;
+
+        boost::scoped_ptr<File>  byNameFile_;
+};
 
+void HelpExportHtml::startModuleExport()
+{
+    byNameFile_.reset(new File("byname.html", "w"));
+    writeHtmlHeader(byNameFile_.get(), "GROMACS Programs by Name");
+    byNameFile_->writeLine("<H3>GROMACS Programs Alphabetically</H3>");
+}
+
+void HelpExportHtml::exportModuleHelp(const std::string                &tag,
+                                      const CommandLineModuleInterface &module)
+{
+    File file(tag + ".html", "w");
+    writeHtmlHeader(&file, tag);
+
+    CommandLineHelpContext context(&file, eHelpOutputFormat_Html);
+    std::string            displayName(tag);
+    std::replace(displayName.begin(), displayName.end(), '-', ' ');
+    context.setModuleDisplayName(displayName);
+    module.writeHelp(context);
+
+    writeHtmlFooter(&file);
     file.close();
+
+    byNameFile_->writeLine(formatString("<a href=\"%s.html\">%s</a> - %s<br>",
+                                        tag.c_str(), displayName.c_str(),
+                                        module.shortDescription()));
+}
+
+void HelpExportHtml::finishModuleExport()
+{
+    writeHtmlFooter(byNameFile_.get());
+    byNameFile_->close();
+}
+
+void HelpExportHtml::writeHtmlHeader(File *file, const std::string &title) const
+{
+    file->writeLine("<HTML>");
+    file->writeLine("<HEAD>");
+    file->writeLine(formatString("<TITLE>%s</TITLE>", title.c_str()));
+    file->writeLine("<LINK rel=stylesheet href=\"../online/style.css\" type=\"text/css\">");
+    file->writeLine("<BODY text=\"#000000\" bgcolor=\"#FFFFFF\" link=\"#0000FF\" vlink=\"#990000\" alink=\"#FF0000\">");
+    file->writeLine("<TABLE WIDTH=\"98%%\" NOBORDER><TR>");
+    file->writeLine("<TD WIDTH=400><TABLE WIDTH=400 NOBORDER>");
+    file->writeLine("<TD WIDTH=116>");
+    file->writeLine("<A HREF=\"http://www.gromacs.org/\">"
+                    "<IMG SRC=\"../images/gmxlogo_small.jpg\" BORDER=0>"
+                    "</A>");
+    file->writeLine("</TD>");
+    file->writeLine(formatString("<TD ALIGN=LEFT VALIGN=TOP WIDTH=280>"
+                                 "<BR><H2>%s</H2>", title.c_str()));
+    file->writeLine("<FONT SIZE=-1><A HREF=\"../online.html\">Main Table of Contents</A></FONT>");
+    file->writeLine("</TD>");
+    file->writeLine("</TABLE></TD>");
+    file->writeLine("<TD WIDTH=\"*\" ALIGN=RIGHT VALIGN=BOTTOM>");
+    file->writeLine(formatString("<P><B>%s</B>", GromacsVersion()));
+    file->writeLine("</TD>");
+    file->writeLine("</TR></TABLE>");
+    file->writeLine("<HR>");
+}
+
+void HelpExportHtml::writeHtmlFooter(File *file) const
+{
+    file->writeLine("<P>");
+    file->writeLine("<HR>");
+    file->writeLine("<DIV ALIGN=RIGHT><FONT SIZE=\"-1\">");
+    file->writeLine("<A HREF=\"http://www.gromacs.org\">http://www.gromacs.org</A><BR>");
+    file->writeLine("</FONT></DIV>");
+    file->writeLine("</BODY>");
+    file->writeLine("</HTML>");
 }
 
 }   // namespace
@@ -399,6 +508,10 @@ int CommandLineHelpModule::run(int argc, char *argv[])
         {
             exporter.reset(new HelpExportMan);
         }
+        else if (exportFormat == "html")
+        {
+            exporter.reset(new HelpExportHtml);
+        }
         else
         {
             GMX_THROW(NotImplementedError("This help format is not implemented"));
@@ -455,6 +568,7 @@ void CommandLineHelpModule::exportHelp(HelpExportInterface *exporter) const
     const char *const program =
         ProgramInfo::getInstance().invariantProgramName().c_str();
 
+    exporter->startModuleExport();
     CommandLineModuleMap::const_iterator module;
     for (module = modules_.begin(); module != modules_.end(); ++module)
     {
@@ -465,6 +579,7 @@ void CommandLineHelpModule::exportHelp(HelpExportInterface *exporter) const
             exporter->exportModuleHelp(tag, *module->second);
         }
     }
+    exporter->finishModuleExport();
 }
 
 namespace
@@ -537,6 +652,9 @@ class CMainCommandLineModule : public CommandLineModuleInterface
                 case eHelpOutputFormat_Man:
                     type = "nroff";
                     break;
+                case eHelpOutputFormat_Html:
+                    type = "html";
+                    break;
                 default:
                     GMX_THROW(NotImplementedError(
                                       "Command-line help is not implemented for this output format"));
index 424fb9b1cc378b841f2a71936a1acaef324048f5..1f96cc160f3f3874e4fe65e0416f8f277cfebf8e 100644 (file)
@@ -239,7 +239,7 @@ const char *ftp2ext(int ftp)
 {
     if ((0 <= ftp) && (ftp < efNR))
     {
-        return deffile[ftp].ext + 1;
+        return deffile[ftp].ext[0] != '\0' ? deffile[ftp].ext + 1 : "";
     }
     else
     {
index 397e78f5ac3e32432e4564bb45d824059f196344..3b09280793ca51d0db71a18f74a351d08ef0ea39 100644 (file)
@@ -58,6 +58,7 @@ enum HelpOutputFormat
 {
     eHelpOutputFormat_Console,  //!< Plain text directly on the console.
     eHelpOutputFormat_Man,      //!< Man page.
+    eHelpOutputFormat_Html,     //!< Html output for online manual.
     eHelpOutputFormat_NR        //!< Used for the number of output formats.
 };
 //! \endcond
index af7ec6e08f709a2e6da13957c42ad876c9d64487..c67324bd289b6e12ba238da2884ab116bcbb6650 100644 (file)
  * And Hey:
  * GROningen Mixture of Alchemy and Childrens' Stories
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <time.h>
-
 #include <string>
 
 #include "gromacs/commandline/cmdlinehelpcontext.h"
@@ -305,30 +299,6 @@ const t_sandr_const sandrHTML[] = {
 #define NSRHTML asize(sandrHTML)
 
 
-static char *mydate(char buf[], int maxsize)
-{
-    const char *mon[] = {
-        "Jan", "Feb", "Mar", "Apr", "May", "Jun",
-        "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
-    };
-    const char *day[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
-    time_t      now;
-    struct tm   tm;
-
-    time(&now);
-#ifdef GMX_NATIVE_WINDOWS
-    /* Native windows */
-    localtime_s(&tm, &now);
-#else
-    localtime_r(&now, &tm);
-#endif
-
-    sprintf(buf, "%s %d %s %d", day[tm.tm_wday], tm.tm_mday,
-            mon[tm.tm_mon], tm.tm_year+1900);
-
-    return buf;
-}
-
 /* Data structure for saved HTML links */
 typedef struct t_linkdata {
     int      nsr;
@@ -786,20 +756,6 @@ static void write_htmlman(FILE *out,
     int  i;
     char tmp[255];
 
-    fprintf(out, "<HTML>\n<HEAD>\n<TITLE>%s</TITLE>\n", program);
-    fprintf(out, "<LINK rel=stylesheet href=\"style.css\" type=\"text/css\">\n");
-    fprintf(out, "<BODY text=\"#000000\" bgcolor=\"#FFFFFF\" link=\"#0000FF\" vlink=\"#990000\" alink=\"#FF0000\">\n");
-    fprintf(out, "<TABLE WIDTH=\"98%%\" NOBORDER >\n<TR><TD WIDTH=400>\n");
-    fprintf(out, "<TABLE WIDTH=400 NOBORDER>\n<TD WIDTH=116>\n");
-    fprintf(out, "<a href=\"http://www.gromacs.org/\">"
-            "<img SRC=\"../images/gmxlogo_small.png\""
-            "BORDER=0 </a></td>\n");
-    fprintf(out, "<td ALIGN=LEFT VALIGN=TOP WIDTH=280>"
-            "<br><h2>%s</h2>", program);
-    fprintf(out, "<font size=-1><A HREF=\"../online.html\">Main Table of Contents</A></font><br>");
-    fprintf(out, "<br></td>\n</TABLE></TD><TD WIDTH=\"*\" ALIGN=RIGHT VALIGN=BOTTOM><p><B>%s<br>\n", GromacsVersion());
-    fprintf(out, "%s</B></td></tr></TABLE>\n<HR>\n", mydate(tmp, 255));
-
     if (nldesc > 0)
     {
         fprintf(out, "<H3>Description</H3>\n<p>\n");
@@ -851,14 +807,6 @@ static void write_htmlman(FILE *out,
         }
         fprintf(out, "</UL>\n");
     }
-    fprintf(out, "<P>\n");
-    fprintf(out, "<hr>\n<div ALIGN=RIGHT>\n");
-    fprintf(out, "<font size=\"-1\"><a href=\"http://www.gromacs.org\">"
-            "http://www.gromacs.org</a></font><br>\n");
-    fprintf(out, "<font size=\"-1\"><a href=\"mailto:gromacs@gromacs.org\">"
-            "gromacs@gromacs.org</a></font><br>\n");
-    fprintf(out, "</div>\n");
-    fprintf(out, "</BODY>\n");
 }
 
 static void pr_opts(FILE *fp,