352681430aa077e109c5801e1d6e27280f004bb9
[alexxy/gromacs.git] / docs / user-guide / faq.rst
1 Answers to frequently asked questions (FAQs)
2 ============================================
3
4 .. _reference manual: `gmx-manual-parent-dir`_
5
6 .. Migrated from old website
7
8 .. toctree::
9    :maxdepth: 2
10    :hidden:
11
12 Questions regarding |Gromacs| installation
13 ------------------------------------------
14
15 #. Do I need to compile all utilities with MPI?
16
17    With one rarely-used exception (:ref:`pme_error <gmx pme_error>`), only the
18    :ref:`mdrun <gmx mdrun>` binary is able to use the :ref:`MPI <mpi-support>`
19    parallelism. So you only need to use the ``-DGMX_MPI=on`` flag
20    when :ref:`configuring <configure-cmake>` for a build intended to run
21    the main simulation engine :ref:`mdrun <gmx mdrun>`.
22
23
24 #. Should my version be compiled using double precision?
25
26    In general, |Gromacs| only needs to be build in its default mixed-precision mode.
27    For more details, see the discussion in Chapter 2 of the `reference manual`_.
28    Sometimes, usage may also depend on your target system, and should be decided
29    upon according to the :ref:`individual instructions <gmx-special-build>`.
30
31 Questions concerning system preparation and preprocessing
32 ---------------------------------------------------------
33
34 #. Where can I find a solvent :ref:`coordinate file <gmx-structure-files>` for use with :ref:`solvate <gmx solvate>`?
35
36    Suitable equilibrated boxes of solvent :ref:`structure files <gmx-structure-files>` can be found
37    in the ``$GMXDIR/share/gromacs/top`` directory. That location will be searched by default
38    by :ref:`solvate <gmx solvate>`, for example by using ``-cs spc216.gro`` as an argument.
39    Other solvent boxes can be prepared by the user as described
40    on the manual page for :ref:`solvate <gmx solvate>` and elsewhere.
41    Note that suitable topology files will be needed for the solvent boxes to be useful in
42    :ref:`grompp <gmx grompp>`. These are available for some force fields, and may be
43    found in the respective subfolder of ``$GMXDIR/share/gromacs/top``.
44
45 #. How to prevent :ref:`solvate <gmx solvate>` from placing waters in undesired places?
46
47    Water placement is generally well behaved when solvating proteins, but can be difficult when setting up
48    membrane or micelle simulations. In those cases, waters may be placed in between the
49    alkyl chains of the lipids, leading to problems later :ref:`during the simulation <blowing-up>`.
50    You can either remove those waters by hand (and do the accounting for molecule types in the
51    :ref:`topology <top>` file), or set up a local copy of the ``vdwradii.dat`` file from the ``$GMXLIB``
52    directory, specific for your project and located in your working directory. In it, you can
53    increase the vdW radius of the atoms, to suppress such interstitial insertions.
54    Recommended e.g. at a common `tutorial`_ is the use of 0.375 instead of 0.15.
55
56 .. _tutorial: http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin/gmx-tutorials/membrane_protein/03_solvate.html
57
58 #. How do I provide multiple definitions of bonds / dihedrals in a topology?
59
60    You can add additional bonded terms beyond those that are normally defined for a residue (e.g. when defining
61    a special ligand) by including additional copies of the respective lines under the
62    ``[ bonds ]``, ``[ pairs ]``, ``[ angles ]`` and ``[ dihedrals ]`` sections in the ``[ moleculetype ]``
63    section for your molecule, found either in the :ref:`itp` file
64    or the :ref:`topology <top>` file. This will **add** those extra terms to the potential energy evaluation,
65    but **will not** remove the previous ones. So be careful with duplicate entries. Also keep in mind that this **does not**
66    apply to duplicated entries for ``[ bondtypes ]``, ``[ angletypes ]``, or ``[ dihedraltypes ]``, in force-field
67    definition files, where duplicates overwrite the previous values.
68
69 #. Do I really need a :ref:`gro` file?
70
71    The :ref:`gro` file is used in |Gromacs| as a unified :ref:`structure file <gmx-structure-files>` format
72    that can be read by all utilities. The large majority of |Gromacs| routines can also use other file
73    types such as :ref:`pdb`, with the limitations that no velocities are available in :ref:`this case <gmx-need-for-gro>`.
74    If you need a text-based format with more digits of precision, the :ref:`g96` format is suitable and supported.
75
76 #. Do I always need to run :ref:`pdb2gmx <gmx pdb2gmx>` when I already produced an :ref:`itp` file elsewhere?
77
78    You don't need to prepare additional files if you already have all :ref:`itp` and :ref:`top` files prepared through other tools.
79
80    Examples for those are `CHARMM-GUI <http://www.charmm-gui.org/>`__, `ATB (Automated Topology Builder) <https://atb.uq.edu.au/>`__,
81    `pmx <http://pmx.mpibpc.mpg.de/instructions.html>`__. and `PRODRG <http://davapc1.bioch.dundee.ac.uk/cgi-bin/prodrg>`__.
82
83 #. How can I build in missing atoms?
84
85    |Gromacs| has no support for building coordinates of missing non-hydrogen atoms. If your system is missing some part,
86    you will have to add the missing pieces using external programs to avoid the :ref:`missing atom <gmx-atom-missing>`
87    error. This can be done using programs such as `Chimera <https://www.cgl.ucsf.edu/chimera/>`__ in combination
88    with `Modeller <https://salilab.org/modeller/>`__, `Swiss PDB Viewer <https://spdbv.vital-it.ch/>`__,
89    `Maestro <https://www.schrodinger.com/maestro>`__. **Do not run** a simulation that had missing atoms unless
90    you know exactly why it will be stable.
91
92 #. Why is the total charge of my system not an integer like it should be?
93
94    In :ref:`floating point <gmx-floating-point>` math, real numbers can not be displayed to arbitrary precision
95    (for more on this, see e.g. `Wikipedia <https://en.wikipedia.org/wiki/Floating-point_arithmetic>`__). This means
96    that very small differences to the final integer value will persist, and |Gromacs| will not lie to you and
97    round those values up or down. If your charge differs from the integer value by a larger amount, e.g. at least
98    0.01, this usually means that something went wrong during your system preparation
99
100 Questions regarding simulation methodology
101 ------------------------------------------
102
103 #.  Should I couple a handful of ions to their own temperature-coupling bath?
104
105     **No**. You need to consider the minimal size of your
106     temperature coupling groups, as explained in :ref:`gmx-thermostats` and more
107     specifically in :ref:`gmx-thermostats-dont`, as well as the implementation
108     of your chosen thermostat as described in the `reference manual`_.
109
110 #.  Why do my grompp restarts always start from time zero?
111
112     You can choose different values for :mdp:`tinit` and :mdp:`init-step`.
113
114     .. TODO make links work :ref:`Continuing simulations <gmx-cont-simulation>`.
115
116 #.  Why can't I do conjugate gradient minimization with constraints?
117
118     Minimization with the conjugate gradient scheme can not be performed with constraints
119     as described in the `reference manual`_, and some additional information
120     on `Wikipedia <https://en.wikipedia.org/wiki/Conjugate_gradient_method>`__.
121
122 #.  How do I hold atoms in place in my energy minimization or simulation?
123
124     Groups may be frozen in place using ``freeze groups`` (see the `reference manual`_).
125     It is more common to use a set of position
126     restraints, to place penalties on movement of the atoms. Files that control this
127     kind of behaviour can be created using :ref:`genrestr <gmx genrestr>`.
128
129 #.  How do I extend a completed a simulation to longer times?
130
131     Please see the section on :ref:`managing long simulations`.
132     You can either prepare a new :ref:`mdp` file, or extend the simulation time
133     in the original :ref:`tpr` file using :ref:`convert-tpr <gmx convert-tpr>`.
134
135     .. TODO #.  How do I complete a crashed simulation?
136
137     .. This can be easily achieved using the checkpoint reading
138        :ref:`available <gmx-cont-crash>` in |Gromacs| versions newer than 4.
139
140     .. TODO #.  How can I do a simulation at constant pH?
141
142     .. This is a rather large topic, and you should at least read the short
143        :ref:`Constant pH How-To <gmx-howto-cph>` and all of the literature
144        included there to get an overview over the topic.
145
146 #.  How should I compute a single-point energy?
147
148     This is best achieved with the ``-rerun`` option to :ref:`mdrun <gmx mdrun>`.
149     See the :ref:`single-point energy` section.
150
151 Parameterization and Force Fields
152 ---------------------------------
153
154 #.  I want to simulate a molecule (protein, DNA, etc.) which complexes with
155     various transition metal ions, iron-sulfur clusters, or other exotic species.
156     Parameters for these exotic species aren't available in force field X.
157     What should I do?
158
159     First, you should consider how well :ref:`MD <gmx-md>` will actually describe your
160     system (e.g. see some of the `recent literature <https://dx.doi.org/10.1021%2Facs.chemrev.6b00440>`__).
161     Many species are infeasible to model without either atomic polarizability, or QM treatments.
162     Then you need to prepare your own set of parameters and add a new residue
163     to your :ref:`force field <gmx-force-field>` of choice. Then you will have to validate that
164     your system behaves in a physical way, before continuing your simulation studies. You could
165     also try to build a more simplified model that does not rely on the complicated additions,
166     as long as it still represents the correct *real* object in the laboratory.
167
168 #.  Should I take parameters from one force field and apply them inside another that is missing them?
169
170     **NO**. Molecules parametrized for a given
171     :ref:`force field <gmx-force-field>` will not behave in a physical manner when interacting with
172     other molecules that have been parametrized according to different standards. If your
173     required molecule is not included in the force field you need to use, you will
174     have to parametrize it yourself according to the methodology of this force field.
175
176 Analysis and Visualization
177 --------------------------
178
179     .. TODO #.  How do I visualize a trajectory?
180
181     .. Use one of the number of different programs that can visualize
182        coordinate :ref:`files and trajectories <gmx-howto-visualize>`.
183
184 #.  Why am I seeing bonds being created when I watch the trajectory?
185
186     Most visualization softwares determine the bond status of atoms depending
187     on a set of predefined distances. So the bonding pattern created by them
188     might not be the one defined in your :ref:`topology <top>` file. What
189     matters is the information encoded in there. If the software has read
190     a :ref:`tpr <tpr>` file, then the information is in reliable agreement
191     with the topology you supplied to :ref:`grompp <gmx grompp>`.
192
193 #.  When visualizing a trajectory from a simulation using PBC, why are there holes or my peptide leaving the simulation box?
194
195     Those holes and molecules moving around are just a result of molecules
196     ranging over the :ref:`box boundaries and wrapping around <gmx-pbc>`,
197     and are not a reason for concern. You can fix the visualization using :ref:`trjconv <gmx trjconv>`
198     to prepare the structure for analysis.
199
200 #.  Why is my total simulation time not an integer like it should be?
201
202     As the simulation time is calculated using :ref:`floating point arithmetic <gmx-floating-point>`,
203     rounding errors can occur but are not of concern.