2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 2012,2013, by the GROMACS development team, led by
5 * David van der Spoel, Berk Hess, Erik Lindahl, and including many
6 * others, as listed in the AUTHORS file in the top-level source
7 * directory and at http://www.gromacs.org.
9 * GROMACS is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * as published by the Free Software Foundation; either version 2.1
12 * of the License, or (at your option) any later version.
14 * GROMACS is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with GROMACS; if not, see
21 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
22 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 * If you want to redistribute modifications to GROMACS, please
25 * consider that scientific software is very special. Version
26 * control is crucial - bugs must be traceable. We will be happy to
27 * consider code for inclusion in the official distribution, but
28 * derived work must not be called official GROMACS. Details are found
29 * in the README & COPYING files - if they are missing, get the
30 * official version at http://www.gromacs.org.
32 * To help us fund GROMACS development, we humbly ask that you cite
33 * the research papers on the package. Check out http://www.gromacs.org.
36 * Registers command-line modules for pre-5.0 binaries.
38 * \author Teemu Murtola <teemu.murtola@gmail.com>
40 #include "legacymodules.h"
42 #include "gromacs/commandline/cmdlinemodule.h"
43 #include "gromacs/commandline/cmdlinemodulemanager.h"
44 #include "gromacs/onlinehelp/helpwritercontext.h"
45 #include "gromacs/utility/exceptions.h"
47 #include "gromacs/gmxana/gmx_ana.h"
49 #include "../mdrun/mdrun_main.h"
54 int gmx_gmxcheck(int argc, char *argv[]);
55 int gmx_gmxdump(int argc, char *argv[]);
56 int gmx_grompp(int argc, char *argv[]);
57 int gmx_pdb2gmx(int argc, char *argv[]);
58 int gmx_protonate(int argc, char *argv[]);
59 int gmx_tpbconv(int argc, char *argv[]);
60 int gmx_x2top(int argc, char *argv[]);
68 * Convenience function for creating and registering a module.
70 * \param[in] manager Module manager to which to register the module.
71 * \param[in] mainFunction Main function to wrap.
72 * \param[in] name Name for the new module.
73 * \param[in] shortDescription One-line description for the new module.
75 void registerModule(gmx::CommandLineModuleManager *manager,
76 gmx::CommandLineModuleManager::CMainFunction mainFunction,
77 const char *name, const char *shortDescription)
79 manager->addModuleCMain(name, shortDescription, mainFunction);
84 void registerLegacyModules(gmx::CommandLineModuleManager *manager)
86 // Modules from this directory (were in src/kernel/).
87 registerModule(manager, &gmx_gmxcheck, "gmxcheck",
88 "Check and compare files");
89 registerModule(manager, &gmx_gmxdump, "gmxdump",
90 "Make binary files human readable");
91 registerModule(manager, &gmx_grompp, "grompp",
92 "Make a run input file");
93 registerModule(manager, &gmx_pdb2gmx, "pdb2gmx",
94 "Convert coordinate files to topology and FF-compliant coordinate files");
95 registerModule(manager, &gmx_tpbconv, "tpbconv",
96 "Make a run input file for restarting a crashed run");
98 registerModule(manager, &gmx_protonate, "protonate",
99 "Protonate structures");
100 registerModule(manager, &gmx_x2top, "x2top",
101 "Generate a primitive topology from coordinates");
103 registerModule(manager, &gmx_mdrun, "mdrun",
104 "Perform a simulation, do a normal mode analysis or an energy minimization");
106 // Modules from gmx_ana.h.
107 registerModule(manager, &gmx_do_dssp, "do_dssp",
108 "Assign secondary structure and calculate solvent accessible surface area");
109 registerModule(manager, &gmx_editconf, "editconf",
110 "Convert and manipulates structure files");
111 registerModule(manager, &gmx_eneconv, "eneconv",
112 "Convert energy files");
113 registerModule(manager, &gmx_genbox, "genbox",
115 registerModule(manager, &gmx_genconf, "genconf",
116 "Multiply a conformation in 'random' orientations");
117 registerModule(manager, &gmx_genion, "genion",
118 "Generate monoatomic ions on energetically favorable positions");
119 registerModule(manager, &gmx_genpr, "genrestr",
120 "Generate position restraints or distance restraints for index groups");
121 registerModule(manager, &gmx_make_edi, "make_edi",
122 "Generate input files for essential dynamics sampling");
123 registerModule(manager, &gmx_make_ndx, "make_ndx",
125 registerModule(manager, &gmx_mk_angndx, "mk_angndx",
126 "Generate index files for 'gmx angle'");
127 registerModule(manager, &gmx_trjcat, "trjcat",
128 "Concatenate trajectory files");
129 registerModule(manager, &gmx_trjconv, "trjconv",
130 "Convert and manipulates trajectory files");
131 registerModule(manager, &gmx_trjorder, "trjorder",
132 "Order molecules according to their distance to a group");
133 registerModule(manager, &gmx_xpm2ps, "xpm2ps",
134 "Convert XPM (XPixelMap) matrices to postscript or XPM");
136 registerModule(manager, &gmx_anadock, "anadock",
137 "Cluster structures from Autodock runs");
138 registerModule(manager, &gmx_anaeig, "anaeig",
139 "Analyze eigenvectors/normal modes");
140 registerModule(manager, &gmx_analyze, "analyze",
141 "Analyze data sets");
142 registerModule(manager, &gmx_g_angle, "angle",
143 "Calculate distributions and correlations for angles and dihedrals");
144 registerModule(manager, &gmx_bar, "bar",
145 "Calculate free energy difference estimates through Bennett's acceptance ratio");
146 registerModule(manager, &gmx_bond, "bond",
147 "Calculate distances between atoms and bond length distributions");
148 registerModule(manager, &gmx_bundle, "bundle",
149 "Analyze bundles of axes, e.g., helices");
150 registerModule(manager, &gmx_chi, "chi",
151 "Calculate everything you want to know about chi and other dihedrals");
152 registerModule(manager, &gmx_cluster, "cluster",
153 "Cluster structures");
154 registerModule(manager, &gmx_clustsize, "clustsize",
155 "Calculate size distributions of atomic clusters");
156 registerModule(manager, &gmx_confrms, "confrms",
157 "Fit two structures and calculates the RMSD");
158 registerModule(manager, &gmx_covar, "covar",
159 "Calculate and diagonalize the covariance matrix");
160 registerModule(manager, &gmx_current, "current",
161 "Calculate dielectric constants and charge autocorrelation function");
162 registerModule(manager, &gmx_density, "density",
163 "Calculate the density of the system");
164 registerModule(manager, &gmx_densmap, "densmap",
165 "Calculate 2D planar or axial-radial density maps");
166 registerModule(manager, &gmx_densorder, "densorder",
167 "Calculate surface fluctuations");
168 registerModule(manager, &gmx_dielectric, "dielectric",
169 "Calculate frequency dependent dielectric constants");
170 registerModule(manager, &gmx_dipoles, "dipoles",
171 "Compute the total dipole plus fluctuations");
172 registerModule(manager, &gmx_disre, "disre",
173 "Analyze distance restraints");
174 registerModule(manager, &gmx_dist, "dist",
175 "Calculate distances between centers of mass of two groups");
176 registerModule(manager, &gmx_dos, "dos",
177 "Analyze density of states and properties based on that");
178 registerModule(manager, &gmx_dyecoupl, "dyecoupl",
179 "Extract dye dynamics from trajectories");
180 registerModule(manager, &gmx_dyndom, "dyndom",
181 "Interpolate and extrapolate structure rotations");
182 registerModule(manager, &gmx_enemat, "enemat",
183 "Extract an energy matrix from an energy file");
184 registerModule(manager, &gmx_energy, "energy",
185 "Writes energies to xvg files and display averages");
186 registerModule(manager, &gmx_filter, "filter",
187 "Frequency filter trajectories, useful for making smooth movies");
188 registerModule(manager, &gmx_gyrate, "gyrate",
189 "Calculate the radius of gyration");
190 registerModule(manager, &gmx_h2order, "h2order",
191 "Compute the orientation of water molecules");
192 registerModule(manager, &gmx_hbond, "hbond",
193 "Compute and analyze hydrogen bonds");
194 registerModule(manager, &gmx_helix, "helix",
195 "Calculate basic properties of alpha helices");
196 registerModule(manager, &gmx_helixorient, "helixorient",
197 "Calculate local pitch/bending/rotation/orientation inside helices");
198 registerModule(manager, &gmx_hydorder, "hydorder",
199 "Compute tetrahedrality parameters around a given atom");
200 registerModule(manager, &gmx_kinetics, "kinetics",
201 "Analyze kinetic constants from properties based on the Eyring model");
202 registerModule(manager, &gmx_lie, "lie",
203 "Estimate free energy from linear combinations");
204 registerModule(manager, &gmx_mdmat, "mdmat",
205 "Calculate residue contact maps");
206 registerModule(manager, &gmx_mindist, "mindist",
207 "Calculate the minimum distance between two groups");
208 registerModule(manager, &gmx_morph, "morph",
209 "Interpolate linearly between conformations");
210 registerModule(manager, &gmx_msd, "msd",
211 "Calculates mean square displacements");
212 registerModule(manager, &gmx_nmeig, "nmeig",
213 "Diagonalize the Hessian for normal mode analysis");
214 registerModule(manager, &gmx_nmens, "nmens",
215 "Generate an ensemble of structures from the normal modes");
216 registerModule(manager, &gmx_nmtraj, "nmtraj",
217 "Generate a virtual oscillating trajectory from an eigenvector");
218 registerModule(manager, &gmx_options, "options", NULL);
219 registerModule(manager, &gmx_order, "order",
220 "Compute the order parameter per atom for carbon tails");
221 registerModule(manager, &gmx_pme_error, "pme_error",
222 "Estimate the error of using PME with a given input file");
223 registerModule(manager, &gmx_polystat, "polystat",
224 "Calculate static properties of polymers");
225 registerModule(manager, &gmx_potential, "potential",
226 "Calculate the electrostatic potential across the box");
227 registerModule(manager, &gmx_principal, "principal",
228 "Calculate principal axes of inertia for a group of atoms");
229 registerModule(manager, &gmx_rama, "rama",
230 "Compute Ramachandran plots");
231 registerModule(manager, &gmx_rdf, "rdf",
232 "Calculate radial distribution functions");
233 registerModule(manager, &gmx_rms, "rms",
234 "Calculate RMSDs with a reference structure and RMSD matrices");
235 registerModule(manager, &gmx_rmsdist, "rmsdist",
236 "Calculate atom pair distances averaged with power -2, -3 or -6");
237 registerModule(manager, &gmx_rmsf, "rmsf",
238 "Calculate atomic fluctuations");
239 registerModule(manager, &gmx_rotacf, "rotacf",
240 "Calculate the rotational correlation function for molecules");
241 registerModule(manager, &gmx_rotmat, "rotmat",
242 "Plot the rotation matrix for fitting to a reference structure");
243 registerModule(manager, &gmx_saltbr, "saltbr",
244 "Compute salt bridges");
245 registerModule(manager, &gmx_sans, "sans",
246 "Compute the small angle neutron scattering spectra");
247 registerModule(manager, &gmx_sas, "sas",
248 "Compute solvent accessible surface area");
249 registerModule(manager, &gmx_saxs, "saxs",
250 "Calculates SAXS structure factors based on Cromer's method");
251 registerModule(manager, &gmx_sgangle, "sgangle",
252 "Compute the angle and distance between two groups");
253 registerModule(manager, &gmx_sham, "sham",
254 "Compute free energies or other histograms from histograms");
255 registerModule(manager, &gmx_sigeps, "sigeps",
256 "Convert c6/12 or c6/cn combinations to and from sigma/epsilon");
257 registerModule(manager, &gmx_sorient, "sorient",
258 "Analyze solvent orientation around solutes");
259 registerModule(manager, &gmx_spatial, "spatial",
260 "Calculate the spatial distribution function");
261 registerModule(manager, &gmx_spol, "spol",
262 "Analyze solvent dipole orientation and polarization around solutes");
263 registerModule(manager, &gmx_tcaf, "tcaf",
264 "Calculate viscosities of liquids");
265 registerModule(manager, &gmx_traj, "traj",
266 "Plot x, v, f, box, temperature and rotational energy from trajectories");
267 registerModule(manager, &gmx_tune_pme, "tune_pme",
268 "Time mdrun as a function of PME nodes to optimize settings");
269 registerModule(manager, &gmx_vanhove, "vanhove",
270 "Compute Van Hove correlation functions");
271 registerModule(manager, &gmx_velacc, "velacc",
272 "Calculate velocity autocorrelation functions");
273 registerModule(manager, &gmx_wham, "wham",
274 "Perform weighted histogram analysis after umbrella sampling");
275 registerModule(manager, &gmx_wheel, "wheel",
276 "Plot helical wheels");
278 // TODO: Also include binaries from other directories than src/tools/:
279 // "g_xrama|Show animated Ramachandran plots");
280 // "mdrun|finds a potential energy minimum and calculates the Hessian");
281 // "mdrun|with -rerun (re)calculates energies for trajectory frames");
282 // "ngmx|Display a trajectory");