Remove obsolete mdp option ns-type
[alexxy/gromacs.git] / src / gromacs / mdtypes / inputrec.h
1 /*
2  * This file is part of the GROMACS molecular simulation package.
3  *
4  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
5  * Copyright (c) 2001-2004, The GROMACS development team.
6  * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
7  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
8  * and including many others, as listed in the AUTHORS file in the
9  * top-level source directory and at http://www.gromacs.org.
10  *
11  * GROMACS is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public License
13  * as published by the Free Software Foundation; either version 2.1
14  * of the License, or (at your option) any later version.
15  *
16  * GROMACS is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU Lesser General Public
22  * License along with GROMACS; if not, see
23  * http://www.gnu.org/licenses, or write to the Free Software Foundation,
24  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
25  *
26  * If you want to redistribute modifications to GROMACS, please
27  * consider that scientific software is very special. Version
28  * control is crucial - bugs must be traceable. We will be happy to
29  * consider code for inclusion in the official distribution, but
30  * derived work must not be called official GROMACS. Details are found
31  * in the README & COPYING files - if they are missing, get the
32  * official version at http://www.gromacs.org.
33  *
34  * To help us fund GROMACS development, we humbly ask that you cite
35  * the research papers on the package. Check out http://www.gromacs.org.
36  */
37 #ifndef GMX_MDTYPES_INPUTREC_H
38 #define GMX_MDTYPES_INPUTREC_H
39
40 #include <cstdio>
41
42 #include <memory>
43
44 #include "gromacs/math/vectypes.h"
45 #include "gromacs/mdtypes/md_enums.h"
46 #include "gromacs/utility/basedefinitions.h"
47 #include "gromacs/utility/real.h"
48
49 #define EGP_EXCL  (1<<0)
50 #define EGP_TABLE (1<<1)
51
52 struct gmx_enfrot;
53 struct gmx_enfrotgrp;
54 struct pull_params_t;
55
56 namespace gmx
57 {
58 class Awh;
59 struct AwhParams;
60 class KeyValueTreeObject;
61 }
62
63 struct t_grpopts
64 {
65     //! Number of T-Coupl groups
66     int    ngtc;
67     //! Number of of Nose-Hoover chains per group
68     int    nhchainlength;
69     //! Number of Accelerate groups
70     int    ngacc;
71     //! Number of Freeze groups
72     int    ngfrz;
73     //! Number of Energy groups
74     int    ngener;
75     //! Number of degrees of freedom in a group
76     real  *nrdf;
77     //! Coupling temperature    per group
78     real  *ref_t;
79     //! No/simple/periodic simulated annealing for each group
80     int   *annealing;
81     //! Number of annealing time points per group
82     int   *anneal_npoints;
83     //! For each group: Time points
84     real **anneal_time;
85     //! For each group: Temperature at these times. Final temp after all intervals is ref_t
86     real **anneal_temp;
87     //! Tau coupling time
88     real  *tau_t;
89     //! Acceleration per group
90     rvec  *acc;
91     //! Whether the group will be frozen in each direction
92     ivec  *nFreeze;
93     //! Exclusions/tables of energy group pairs
94     int   *egp_flags;
95
96     /* QMMM stuff */
97     //! Number of QM groups
98     int       ngQM;
99     //! Level of theory in the QM calculation
100     int      *QMmethod;
101     //! Basisset in the QM calculation
102     int      *QMbasis;
103     //! Total charge in the QM region
104     int      *QMcharge;
105     //! Spin multiplicicty in the QM region
106     int      *QMmult;
107     //! Surface hopping (diabatic hop only)
108     gmx_bool *bSH;
109     //! Number of orbiatls in the active space
110     int      *CASorbitals;
111     //! Number of electrons in the active space
112     int      *CASelectrons;
113     //! At which gap (A.U.) the SA is switched on
114     real     *SAon;
115     //! At which gap (A.U.) the SA is switched off
116     real     *SAoff;
117     //! In how many steps SA goes from 1-1 to 0.5-0.5
118     int      *SAsteps;
119 };
120
121 struct t_simtemp
122 {
123     //! Simulated temperature scaling; linear or exponential
124     int   eSimTempScale;
125     //! The low temperature for simulated tempering
126     real  simtemp_low;
127     //! The high temperature for simulated tempering
128     real  simtemp_high;
129     //! The range of temperatures used for simulated tempering
130     real *temperatures;
131 };
132
133 struct t_lambda
134 {
135     //! The frequency for calculating dhdl
136     int      nstdhdl;
137     //! Fractional value of lambda (usually will use init_fep_state, this will only be for slow growth, and for legacy free energy code. Only has a valid value if positive)
138     double   init_lambda;
139     //! The initial number of the state
140     int      init_fep_state;
141     //! Change of lambda per time step (fraction of (0.1)
142     double   delta_lambda;
143     //! Print no, total or potential energies in dhdl
144     int      edHdLPrintEnergy;
145     //! The number of foreign lambda points
146     int      n_lambda;
147     //! The array of all lambda values
148     double **all_lambda;
149     //! The number of neighboring lambda states to calculate the energy for in up and down directions (-1 for all)
150     int      lambda_neighbors;
151     //! The first lambda to calculate energies for
152     int      lambda_start_n;
153     //! The last lambda +1 to calculate energies for
154     int      lambda_stop_n;
155     //! Free energy soft-core parameter
156     real     sc_alpha;
157     //! Lambda power for soft-core interactions
158     int      sc_power;
159     //! R power for soft-core interactions
160     real     sc_r_power;
161     //! Free energy soft-core sigma when c6 or c12=0
162     real     sc_sigma;
163     //! Free energy soft-core sigma for ?????
164     real     sc_sigma_min;
165     //! Use softcore for the coulomb portion as well (default FALSE)
166     gmx_bool bScCoul;
167     //! Whether to print the dvdl term associated with this term; if it is not specified as separate, it is lumped with the FEP term
168     gmx_bool separate_dvdl[efptNR];
169     //! Whether to write a separate dhdl.xvg file note: NOT a gmx_bool, but an enum
170     int      separate_dhdl_file;
171     //! Whether to calculate+write dhdl derivatives note: NOT a gmx_bool, but an enum
172     int      dhdl_derivatives;
173     //! The maximum table size for the dH histogram
174     int      dh_hist_size;
175     //! The spacing for the dH histogram
176     double   dh_hist_spacing;
177 };
178
179 struct t_expanded {
180     //! The frequency of expanded ensemble state changes
181     int      nstexpanded;
182     //! Which type of move updating do we use for lambda monte carlo (or no for none)
183     int      elamstats;
184     //! What move set will be we using for state space moves
185     int      elmcmove;
186     //! The method we use to decide of we have equilibrated the weights
187     int      elmceq;
188     //! The minumum number of samples at each lambda for deciding whether we have reached a minimum
189     int      equil_n_at_lam;
190     //! Wang-Landau delta at which we stop equilibrating weights
191     real     equil_wl_delta;
192     //! Use the ratio of weights (ratio of minimum to maximum) to decide when to stop equilibrating
193     real     equil_ratio;
194     //! After equil_steps steps we stop equilibrating the weights
195     int      equil_steps;
196     //! After equil_samples total samples (steps/nstfep), we stop equilibrating the weights
197     int      equil_samples;
198     //! Random number seed for lambda mc switches
199     int      lmc_seed;
200     //! Whether to use minumum variance weighting
201     gmx_bool minvar;
202     //! The number of samples needed before kicking into minvar routine
203     int      minvarmin;
204     //! The offset for the variance in MinVar
205     real     minvar_const;
206     //! Range of cvalues used for BAR
207     int      c_range;
208     //! Whether to print symmetrized matrices
209     gmx_bool bSymmetrizedTMatrix;
210     //! How frequently to print the transition matrices
211     int      nstTij;
212     //! Number of repetitions in the MC lambda jumps MRS -- VERIFY THIS
213     int      lmc_repeats;
214     //! Minimum number of samples for each state before free sampling MRS -- VERIFY THIS!
215     int      lmc_forced_nstart;
216     //! Distance in lambda space for the gibbs interval
217     int      gibbsdeltalam;
218     //! Scaling factor for Wang-Landau
219     real     wl_scale;
220     //! Ratio between largest and smallest number for freezing the weights
221     real     wl_ratio;
222     //! Starting delta for Wang-Landau
223     real     init_wl_delta;
224     //! Use one over t convergence for Wang-Landau when the delta get sufficiently small
225     gmx_bool bWLoneovert;
226     //! Did we initialize the weights? TODO: REMOVE FOR 5.0, no longer needed with new logic
227     gmx_bool bInit_weights;
228     //! To override the main temperature, or define it if it's not defined
229     real     mc_temp;
230     //! User-specified initial weights to start with
231     real    *init_lambda_weights;
232 };
233
234 struct t_rotgrp
235 {
236     //! Rotation type for this group
237     int              eType;
238     //! Use mass-weighed positions?
239     int              bMassW;
240     //! Number of atoms in the group
241     int              nat;
242     //! The global atoms numbers
243     int             *ind;
244     //! The reference positions
245     rvec            *x_ref;
246     //! The normalized rotation vector
247     rvec             inputVec;
248     //! Rate of rotation (degree/ps)
249     real             rate;
250     //! Force constant (kJ/(mol nm^2)
251     real             k;
252     //! Pivot point of rotation axis (nm)
253     rvec             pivot;
254     //! Type of fit to determine actual group angle
255     int              eFittype;
256     //! Number of angles around the reference angle for which the rotation potential is also evaluated (for fit type 'potential' only)
257     int              PotAngle_nstep;
258     //! Distance between two angles in degrees (for fit type 'potential' only)
259     real             PotAngle_step;
260     //! Slab distance (nm)
261     real             slab_dist;
262     //! Minimum value the gaussian must have so that the force is actually evaluated
263     real             min_gaussian;
264     //! Additive constant for radial motion2 and flexible2 potentials (nm^2)
265     real             eps;
266 };
267
268 struct t_rot
269 {
270     //! Number of rotation groups
271     int                   ngrp;
272     //! Output frequency for main rotation outfile
273     int                   nstrout;
274     //! Output frequency for per-slab data
275     int                   nstsout;
276     //! Groups to rotate
277     t_rotgrp             *grp;
278 };
279
280 struct t_IMD
281 {
282     //! Number of interactive atoms
283     int              nat;
284     //! The global indices of the interactive atoms
285     int             *ind;
286 };
287
288 struct t_swapGroup
289 {
290     //! Name of the swap group, e.g. NA, CL, SOL
291     char            *molname;
292     //! Number of atoms in this group
293     int              nat;
294     //! The global ion group atoms numbers
295     int             *ind;
296     //! Requested number of molecules of this type per compartment
297     int              nmolReq[eCompNR];
298 };
299
300 struct t_swapcoords
301 {
302     //! Period between when a swap is attempted
303     int      nstswap;
304     //! Use mass-weighted positions in split group
305     gmx_bool massw_split[2];
306     /*! \brief Split cylinders defined by radius, upper and lower
307      * extension. The split cylinders define the channels and are
308      * each anchored in the center of the split group */
309     /**@{*/
310     real cyl0r, cyl1r;
311     real cyl0u, cyl1u;
312     real cyl0l, cyl1l;
313     /**@}*/
314     //! Coupling constant (number of swap attempt steps)
315     int                      nAverage;
316     //! Ion counts may deviate from the requested values by +-threshold before a swap is done
317     real                     threshold;
318     //! Offset of the swap layer (='bulk') with respect to the compartment-defining layers
319     real                     bulkOffset[eCompNR];
320     //! Number of groups to be controlled
321     int                      ngrp;
322     //! All swap groups, including split and solvent
323     t_swapGroup             *grp;
324 };
325
326 struct t_inputrec // NOLINT (clang-analyzer-optin.performance.Padding)
327 {
328     t_inputrec();
329     explicit t_inputrec(const t_inputrec &) = delete;
330     t_inputrec &operator=(const t_inputrec &) = delete;
331     ~t_inputrec();
332
333     //! Integration method
334     int                         eI;
335     //! Number of steps to be taken
336     int64_t                     nsteps;
337     //! Used in checkpointing to separate chunks
338     int                         simulation_part;
339     //! Start at a stepcount >0 (used w. convert-tpr)
340     int64_t                     init_step;
341     //! Frequency of energy calc. and T/P coupl. upd.
342     int                         nstcalcenergy;
343     //! Group or verlet cutoffs
344     int                         cutoff_scheme;
345     //! Number of steps before pairlist is generated
346     int                         nstlist;
347     //! Number of steps after which center of mass motion is removed
348     int                         nstcomm;
349     //! Center of mass motion removal algorithm
350     int                         comm_mode;
351     //! Number of steps after which print to logfile
352     int                         nstlog;
353     //! Number of steps after which X is output
354     int                         nstxout;
355     //! Number of steps after which V is output
356     int                         nstvout;
357     //! Number of steps after which F is output
358     int                         nstfout;
359     //! Number of steps after which energies printed
360     int                         nstenergy;
361     //! Number of steps after which compressed trj (.xtc,.tng) is output
362     int                         nstxout_compressed;
363     //! Initial time (ps)
364     double                      init_t;
365     //! Time step (ps)
366     double                      delta_t;
367     //! Precision of x in compressed trajectory file
368     real                        x_compression_precision;
369     //! Requested fourier_spacing, when nk? not set
370     real                        fourier_spacing;
371     //! Number of k vectors in x dimension for fourier methods for long range electrost.
372     int                         nkx;
373     //! Number of k vectors in y dimension for fourier methods for long range electrost.
374     int                         nky;
375     //! Number of k vectors in z dimension for fourier methods for long range electrost.
376     int                         nkz;
377     //! Interpolation order for PME
378     int                         pme_order;
379     //! Real space tolerance for Ewald, determines the real/reciprocal space relative weight
380     real                        ewald_rtol;
381     //! Real space tolerance for LJ-Ewald
382     real                        ewald_rtol_lj;
383     //! Normal/3D ewald, or pseudo-2D LR corrections
384     int                         ewald_geometry;
385     //! Epsilon for PME dipole correction
386     real                        epsilon_surface;
387     //! Type of combination rule in LJ-PME
388     int                         ljpme_combination_rule;
389     //! Type of periodic boundary conditions
390     int                         ePBC;
391     //! Periodic molecules
392     bool                        bPeriodicMols;
393     //! Continuation run: starting state is correct (ie. constrained)
394     gmx_bool                    bContinuation;
395     //! Temperature coupling
396     int                         etc;
397     //! Interval in steps for temperature coupling
398     int                         nsttcouple;
399     //! Whether to print nose-hoover chains
400     gmx_bool                    bPrintNHChains;
401     //! Pressure coupling
402     int                         epc;
403     //! Pressure coupling type
404     int                         epct;
405     //! Interval in steps for pressure coupling
406     int                         nstpcouple;
407     //! Pressure coupling time (ps)
408     real                        tau_p;
409     //! Reference pressure (kJ/(mol nm^3))
410     tensor                      ref_p;
411     //! Compressibility ((mol nm^3)/kJ)
412     tensor                      compress;
413     //! How to scale absolute reference coordinates
414     int                         refcoord_scaling;
415     //! The COM of the posres atoms
416     rvec                        posres_com;
417     //! The B-state COM of the posres atoms
418     rvec                        posres_comB;
419     //! Random seed for Andersen thermostat (obsolete)
420     int                         andersen_seed;
421     //! Per atom pair energy drift tolerance (kJ/mol/ps/atom) for list buffer
422     real                        verletbuf_tol;
423     //! Short range pairlist cut-off (nm)
424     real                        rlist;
425     //! Radius for test particle insertion
426     real                        rtpi;
427     //! Type of electrostatics treatment
428     int                         coulombtype;
429     //! Modify the Coulomb interaction
430     int                         coulomb_modifier;
431     //! Coulomb switch range start (nm)
432     real                        rcoulomb_switch;
433     //! Coulomb cutoff (nm)
434     real                        rcoulomb;
435     //! Relative dielectric constant
436     real                        epsilon_r;
437     //! Relative dielectric constant of the RF
438     real                        epsilon_rf;
439     //! Always false (no longer supported)
440     bool                        implicit_solvent;
441     //! Type of Van der Waals treatment
442     int                         vdwtype;
443     //! Modify the Van der Waals interaction
444     int                         vdw_modifier;
445     //! Van der Waals switch range start (nm)
446     real                        rvdw_switch;
447     //! Van der Waals cutoff (nm)
448     real                        rvdw;
449     //! Perform Long range dispersion corrections
450     int                         eDispCorr;
451     //! Extension of the table beyond the cut-off, as well as the table length for 1-4 interac.
452     real                        tabext;
453     //! Tolerance for shake
454     real                        shake_tol;
455     //! Free energy calculations
456     int                         efep;
457     //! Data for the FEP state
458     t_lambda                   *fepvals;
459     //! Whether to do simulated tempering
460     gmx_bool                    bSimTemp;
461     //! Variables for simulated tempering
462     t_simtemp                  *simtempvals;
463     //! Whether expanded ensembles are used
464     gmx_bool                    bExpanded;
465     //! Expanded ensemble parameters
466     t_expanded                 *expandedvals;
467     //! Type of distance restraining
468     int                         eDisre;
469     //! Force constant for time averaged distance restraints
470     real                        dr_fc;
471     //! Type of weighting of pairs in one restraints
472     int                         eDisreWeighting;
473     //! Use combination of time averaged and instantaneous violations
474     gmx_bool                    bDisreMixed;
475     //! Frequency of writing pair distances to enx
476     int                         nstdisreout;
477     //! Time constant for memory function in disres
478     real                        dr_tau;
479     //! Force constant for orientational restraints
480     real                        orires_fc;
481     //! Time constant for memory function in orires
482     real                        orires_tau;
483     //! Frequency of writing tr(SD) to energy output
484     int                         nstorireout;
485     //! The stepsize for updating
486     real                        em_stepsize;
487     //! The tolerance
488     real                        em_tol;
489     //! Number of iterations for convergence of steepest descent in relax_shells
490     int                         niter;
491     //! Stepsize for directional minimization in relax_shells
492     real                        fc_stepsize;
493     //! Number of steps after which a steepest descents step is done while doing cg
494     int                         nstcgsteep;
495     //! Number of corrections to the Hessian to keep
496     int                         nbfgscorr;
497     //! Type of constraint algorithm
498     int                         eConstrAlg;
499     //! Order of the LINCS Projection Algorithm
500     int                         nProjOrder;
501     //! Warn if any bond rotates more than this many degrees
502     real                        LincsWarnAngle;
503     //! Number of iterations in the final LINCS step
504     int                         nLincsIter;
505     //! Use successive overrelaxation for shake
506     gmx_bool                    bShakeSOR;
507     //! Friction coefficient for BD (amu/ps)
508     real                        bd_fric;
509     //! Random seed for SD and BD
510     int64_t                     ld_seed;
511     //! The number of walls
512     int                         nwall;
513     //! The type of walls
514     int                         wall_type;
515     //! The potentail is linear for r<=wall_r_linpot
516     real                        wall_r_linpot;
517     //! The atom type for walls
518     int                         wall_atomtype[2];
519     //! Number density for walls
520     real                        wall_density[2];
521     //! Scaling factor for the box for Ewald
522     real                        wall_ewald_zfac;
523
524     /* COM pulling data */
525     //! Do we do COM pulling?
526     gmx_bool       bPull;
527     //! The data for center of mass pulling
528     pull_params_t *pull;
529
530     /* AWH bias data */
531     //! Whether to use AWH biasing for PMF calculations
532     gmx_bool        bDoAwh;
533     //! AWH biasing parameters
534     gmx::AwhParams *awhParams;
535
536     /* Enforced rotation data */
537     //! Whether to calculate enforced rotation potential(s)
538     gmx_bool               bRot;
539     //! The data for enforced rotation potentials
540     t_rot                 *rot;
541
542     //! Whether to do ion/water position exchanges (CompEL)
543     int                           eSwapCoords;
544     //! Swap data structure.
545     t_swapcoords                 *swap;
546
547     //! Whether the tpr makes an interactive MD session possible.
548     gmx_bool               bIMD;
549     //! Interactive molecular dynamics
550     t_IMD                 *imd;
551
552     //! Acceleration for viscosity calculation
553     real   cos_accel;
554     //! Triclinic deformation velocities (nm/ps)
555     tensor deform;
556     /*! \brief User determined parameters */
557     /**@{*/
558     int  userint1;
559     int  userint2;
560     int  userint3;
561     int  userint4;
562     real userreal1;
563     real userreal2;
564     real userreal3;
565     real userreal4;
566     /**@}*/
567     //! Group options
568     t_grpopts opts;
569     //! QM/MM calculation
570     gmx_bool  bQMMM;
571     //! Constraints on QM bonds
572     int       QMconstraints;
573     //! Scheme: ONIOM or normal
574     int       QMMMscheme;
575     //! Factor for scaling the MM charges in QM calc.
576     real      scalefactor;
577
578     /* Fields for removed features go here (better caching) */
579     //! Whether AdResS is enabled - always false if a valid .tpr was read
580     gmx_bool                 bAdress;
581     //! Whether twin-range scheme is active - always false if a valid .tpr was read
582     gmx_bool                 useTwinRange;
583
584     //! KVT object that contains input parameters converted to the new style.
585     gmx::KeyValueTreeObject *params;
586
587     //! KVT for storing simulation parameters that are not part of the mdp file.
588     std::unique_ptr<gmx::KeyValueTreeObject>  internalParameters;
589 };
590
591 int ir_optimal_nstcalcenergy(const t_inputrec *ir);
592
593 int tcouple_min_integration_steps(int etc);
594
595 int ir_optimal_nsttcouple(const t_inputrec *ir);
596
597 int pcouple_min_integration_steps(int epc);
598
599 int ir_optimal_nstpcouple(const t_inputrec *ir);
600
601 /* Returns if the Coulomb force or potential is switched to zero */
602 gmx_bool ir_coulomb_switched(const t_inputrec *ir);
603
604 /* Returns if the Coulomb interactions are zero beyond the rcoulomb.
605  * Note: always returns TRUE for the Verlet cut-off scheme.
606  */
607 gmx_bool ir_coulomb_is_zero_at_cutoff(const t_inputrec *ir);
608
609 /* As ir_coulomb_is_zero_at_cutoff, but also returns TRUE for user tabulated
610  * interactions, since these might be zero beyond rcoulomb.
611  */
612 gmx_bool ir_coulomb_might_be_zero_at_cutoff(const t_inputrec *ir);
613
614 /* Returns if the Van der Waals force or potential is switched to zero */
615 gmx_bool ir_vdw_switched(const t_inputrec *ir);
616
617 /* Returns if the Van der Waals interactions are zero beyond the rvdw.
618  * Note: always returns TRUE for the Verlet cut-off scheme.
619  */
620 gmx_bool ir_vdw_is_zero_at_cutoff(const t_inputrec *ir);
621
622 /* As ir_vdw_is_zero_at_cutoff, but also returns TRUE for user tabulated
623  * interactions, since these might be zero beyond rvdw.
624  */
625 gmx_bool ir_vdw_might_be_zero_at_cutoff(const t_inputrec *ir);
626
627 /*! \brief Free memory from input record.
628  *
629  * All arrays and pointers will be freed.
630  *
631  * \param[in] ir The data structure
632  */
633 void done_inputrec(t_inputrec *ir);
634
635 void pr_inputrec(FILE *fp, int indent, const char *title, const t_inputrec *ir,
636                  gmx_bool bMDPformat);
637
638 void cmp_inputrec(FILE *fp, const t_inputrec *ir1, const t_inputrec *ir2, real ftol, real abstol);
639
640 void comp_pull_AB(FILE *fp, pull_params_t *pull, real ftol, real abstol);
641
642
643 gmx_bool inputrecDeform(const t_inputrec *ir);
644
645 gmx_bool inputrecDynamicBox(const t_inputrec *ir);
646
647 gmx_bool inputrecPreserveShape(const t_inputrec *ir);
648
649 gmx_bool inputrecNeedMutot(const t_inputrec *ir);
650
651 gmx_bool inputrecTwinRange(const t_inputrec *ir);
652
653 gmx_bool inputrecExclForces(const t_inputrec *ir);
654
655 gmx_bool inputrecNptTrotter(const t_inputrec *ir);
656
657 gmx_bool inputrecNvtTrotter(const t_inputrec *ir);
658
659 gmx_bool inputrecNphTrotter(const t_inputrec *ir);
660
661 /*! \brief Return true if the simulation is 2D periodic with two walls. */
662 bool     inputrecPbcXY2Walls(const t_inputrec *ir);
663
664 /*! \brief Returns true for MD integator with T and/or P-coupling that supports
665  * calculating the conserved energy quantity.
666  */
667 bool integratorHasConservedEnergyQuantity(const t_inputrec *ir);
668
669 /*! \brief Returns true when temperature is coupled or constant. */
670 bool integratorHasReferenceTemperature(const t_inputrec *ir);
671
672 /*! \brief Return the number of bounded dimensions
673  *
674  * \param[in] ir The input record with MD parameters
675  * \return the number of dimensions in which
676  * the coordinates of the particles are bounded, starting at X.
677  */
678 int inputrec2nboundeddim(const t_inputrec *ir);
679
680 /*! \brief Returns the number of degrees of freedom in center of mass motion
681  *
682  * \param[in] ir  The inputrec structure
683  * \return the number of degrees of freedom of the center of mass
684  */
685 int ndof_com(const t_inputrec *ir);
686
687 /*! \brief Returns the maximum reference temperature over all coupled groups
688  *
689  * Returns 0 for energy minimization and normal mode computation.
690  * Returns -1 for MD without temperature coupling.
691  *
692  * \param[in] ir  The inputrec structure
693  */
694 real maxReferenceTemperature(const t_inputrec &ir);
695
696 #endif /* GMX_MDTYPES_INPUTREC_H */