Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / legacyheaders / types / inputrec.h
index 54fa1dfaffab2ee3a0873746b68a43e8adcce8ef..26af01e0efe4865b2dd13aba0d38ee38e05120dd 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
 #ifndef _inputrec_h_
 #define _inputrec_h_
 
+#include <stdio.h>
 
-#include "simple.h"
-#include "../sysstuff.h"
+#include "gromacs/legacyheaders/types/enums.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/swap/enums.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -149,7 +151,7 @@ typedef struct {
                                        valid value if positive)   */
     int      init_fep_state;        /* the initial number of the state                   */
     double   delta_lambda;          /* change of lambda per time step (fraction of (0.1) */
-    gmx_bool bPrintEnergy;          /* Whether to print the energy in the dhdl           */
+    int      edHdLPrintEnergy;      /* print no, total or potential energies in dhdl    */
     int      n_lambda;              /* The number of foreign lambda points               */
     double **all_lambda;            /* The array of all lambda values                    */
     int      lambda_neighbors;      /* The number of neighboring lambda states to
@@ -223,13 +225,15 @@ typedef struct {
     t_pull_coord  *coord;      /* the pull coordinates */
 
     /* Variables not present in mdp, but used at run time */
-    t_pull_group  *dyna;       /* dynamic groups for use with local constraints */
-    rvec          *rbuf;       /* COM calculation buffer */
-    dvec          *dbuf;       /* COM calculation buffer */
-    double        *dbuf_cyl;   /* cylinder ref. groups COM calculation buffer */
+    t_pull_group  *dyna;         /* dynamic groups for use with local constraints */
+    gmx_bool       bSetPBCatoms; /* Do we need to set x_pbc for the groups? */
 
-    FILE          *out_x;      /* output file for pull data */
-    FILE          *out_f;      /* output file for pull data */
+    rvec          *rbuf;         /* COM calculation buffer */
+    dvec          *dbuf;         /* COM calculation buffer */
+    double        *dbuf_cyl;     /* cylinder ref. groups COM calculation buffer */
+
+    FILE          *out_x;        /* output file for pull data */
+    FILE          *out_f;        /* output file for pull data */
 } t_pull;
 
 
@@ -269,6 +273,40 @@ typedef struct {
     gmx_enfrot_t enfrot;     /* Stores non-inputrec enforced rotation data    */
 } t_rot;
 
+/* Abstract type for IMD only defined in IMD.c */
+typedef struct gmx_IMD *t_gmx_IMD;
+
+typedef struct {
+    int         nat;         /* Number of interactive atoms                   */
+    atom_id    *ind;         /* The global indices of the interactive atoms   */
+    t_gmx_IMD   setup;       /* Stores non-inputrec IMD data                  */
+} t_IMD;
+
+/* Abstract types for position swapping only defined in swapcoords.c */
+typedef struct swap *gmx_swapcoords_t;
+
+typedef struct {
+    int              nstswap;           /* Every how many steps a swap is attempted?    */
+    int              nat;               /* Number of atoms in the ion group             */
+    int              nat_split[2];      /* Number of atoms in the split group           */
+    int              nat_sol;           /* Number of atoms in the solvent group         */
+    atom_id         *ind;               /* The global ion group atoms numbers           */
+    atom_id         *ind_split[2];      /* Split groups for compartment partitioning    */
+    atom_id         *ind_sol;           /* The global solvent group atom numbers        */
+    gmx_bool         massw_split[2];    /* Use mass-weighted positions in split group?  */
+    real             cyl0r, cyl1r;      /* Split cylinders defined by radius, upper and */
+    real             cyl0u, cyl1u;      /* ... lower extension. The split cylinders de- */
+    real             cyl0l, cyl1l;      /* ... fine the channels and are each anchored  */
+                                        /* ... in the center of the split group         */
+    int              nanions[eCompNR];  /* Requested number of anions and               */
+    int              nAverage;          /* Coupling constant (nr of swap attempt steps) */
+    real             threshold;         /* Ion counts may deviate from the requested
+                                           values by +-threshold before a swap is done  */
+    int              ncations[eCompNR]; /* ... cations for both compartments            */
+    gmx_swapcoords_t si_priv;           /* swap private data accessible in
+                                         * swapcoords.c                                 */
+} t_swapcoords;
+
 
 typedef struct {
     int      type;           /* type of AdResS simulation                    */
@@ -291,131 +329,132 @@ typedef struct {
 } t_adress;
 
 typedef struct {
-    int             eI;                     /* Integration method                 */
-    gmx_int64_t     nsteps;                 /* number of steps to be taken                     */
-    int             simulation_part;        /* Used in checkpointing to separate chunks */
-    gmx_int64_t     init_step;              /* start at a stepcount >0 (used w. tpbconv)    */
-    int             nstcalcenergy;          /* frequency of energy calc. and T/P coupl. upd.   */
-    int             cutoff_scheme;          /* group or verlet cutoffs     */
-    int             ns_type;                /* which ns method should we use?               */
-    int             nstlist;                /* number of steps before pairlist is generated    */
-    int             ndelta;                 /* number of cells per rlong                       */
-    int             nstcomm;                /* number of steps after which center of mass      */
-    /* motion is removed                               */
-    int             comm_mode;              /* Center of mass motion removal algorithm      */
-    int             nstcheckpoint;          /* checkpointing frequency                      */
-    int             nstlog;                 /* number of steps after which print to logfile    */
-    int             nstxout;                /* number of steps after which X is output */
-    int             nstvout;                /* id. for V                                       */
-    int             nstfout;                /* id. for F                                       */
-    int             nstenergy;              /* number of steps after which energies printed */
-    int             nstxtcout;              /* id. for compressed trj (.xtc)           */
-    double          init_t;                 /* initial time (ps)              */
-    double          delta_t;                /* time step (ps)                          */
-    real            xtcprec;                /* precision of xtc file                        */
-    real            fourier_spacing;        /* requested fourier_spacing, when nk? not set  */
-    int             nkx, nky, nkz;          /* number of k vectors in each spatial dimension*/
-                                            /* for fourier methods for long range electrost.*/
-    int             pme_order;              /* interpolation order for PME                  */
-    real            ewald_rtol;             /* Real space tolerance for Ewald, determines   */
-                                            /* the real/reciprocal space relative weight    */
-    real            ewald_rtol_lj;          /* Real space tolerance for LJ-Ewald            */
-    int             ewald_geometry;         /* normal/3d ewald, or pseudo-2d LR corrections */
-    real            epsilon_surface;        /* Epsilon for PME dipole correction            */
-    gmx_bool        bOptFFT;                /* optimize the fft plan at start               */
-    int             ljpme_combination_rule; /* Type of combination rule in LJ-PME          */
-    int             ePBC;                   /* Type of periodic boundary conditions            */
-    int             bPeriodicMols;          /* Periodic molecules                           */
-    gmx_bool        bContinuation;          /* Continuation run: starting state is correct     */
-    int             etc;                    /* temperature coupling               */
-    int             nsttcouple;             /* interval in steps for temperature coupling   */
-    gmx_bool        bPrintNHChains;         /* whether to print nose-hoover chains        */
-    int             epc;                    /* pressure coupling                            */
-    int             epct;                   /* pressure coupling type                  */
-    int             nstpcouple;             /* interval in steps for pressure coupling      */
-    real            tau_p;                  /* pressure coupling time (ps)                     */
-    tensor          ref_p;                  /* reference pressure (kJ/(mol nm^3))              */
-    tensor          compress;               /* compressability ((mol nm^3)/kJ)        */
-    int             refcoord_scaling;       /* How to scale absolute reference coordinates  */
-    rvec            posres_com;             /* The COM of the posres atoms                  */
-    rvec            posres_comB;            /* The B-state COM of the posres atoms          */
-    int             andersen_seed;          /* Random seed for Andersen thermostat (obsolete) */
-    real            verletbuf_tol;          /* Per atom pair energy drift tolerance (kJ/mol/ps/atom) for list buffer  */
-    real            rlist;                  /* short range pairlist cut-off (nm)               */
-    real            rlistlong;              /* long range pairlist cut-off (nm)                */
-    int             nstcalclr;              /* Frequency of evaluating direct space long-range interactions */
-    real            rtpi;                   /* Radius for test particle insertion           */
-    int             coulombtype;            /* Type of electrostatics treatment             */
-    int             coulomb_modifier;       /* Modify the Coulomb interaction              */
-    real            rcoulomb_switch;        /* Coulomb switch range start (nm)         */
-    real            rcoulomb;               /* Coulomb cutoff (nm)                             */
-    real            epsilon_r;              /* relative dielectric constant                 */
-    real            epsilon_rf;             /* relative dielectric constant of the RF       */
-    int             implicit_solvent;       /* No (=explicit water), or GBSA solvent models */
-    int             gb_algorithm;           /* Algorithm to use for calculation Born radii  */
-    int             nstgbradii;             /* Frequency of updating Generalized Born radii */
-    real            rgbradii;               /* Cutoff for GB radii calculation              */
-    real            gb_saltconc;            /* Salt concentration (M) for GBSA models       */
-    real            gb_epsilon_solvent;     /* dielectric coeff. of implicit solvent     */
-    real            gb_obc_alpha;           /* 1st scaling factor for Bashford-Case GB      */
-    real            gb_obc_beta;            /* 2nd scaling factor for Bashford-Case GB      */
-    real            gb_obc_gamma;           /* 3rd scaling factor for Bashford-Case GB      */
-    real            gb_dielectric_offset;   /* Dielectric offset for Still/HCT/OBC     */
-    int             sa_algorithm;           /* Algorithm for SA part of GBSA                */
-    real            sa_surface_tension;     /* Energy factor for SA part of GBSA */
-    int             vdwtype;                /* Type of Van der Waals treatment              */
-    int             vdw_modifier;           /* Modify the VdW interaction                   */
-    real            rvdw_switch;            /* Van der Waals switch range start (nm)        */
-    real            rvdw;                   /* Van der Waals cutoff (nm)               */
-    int             eDispCorr;              /* Perform Long range dispersion corrections    */
-    real            tabext;                 /* Extension of the table beyond the cut-off,   *
-                                             * as well as the table length for 1-4 interac. */
-    real            shake_tol;              /* tolerance for shake                             */
-    int             efep;                   /* free energy calculations                     */
-    t_lambda       *fepvals;                /* Data for the FEP state                       */
-    gmx_bool        bSimTemp;               /* Whether to do simulated tempering            */
-    t_simtemp      *simtempvals;            /* Variables for simulated tempering            */
-    gmx_bool        bExpanded;              /* Whether expanded ensembles are used          */
-    t_expanded     *expandedvals;           /* Expanded ensemble parameters              */
-    int             eDisre;                 /* Type of distance restraining                 */
-    real            dr_fc;                  /* force constant for ta_disre                     */
-    int             eDisreWeighting;        /* type of weighting of pairs in one restraints    */
-    gmx_bool        bDisreMixed;            /* Use comb of time averaged and instan. viol's    */
-    int             nstdisreout;            /* frequency of writing pair distances to enx   */
-    real            dr_tau;                 /* time constant for memory function in disres    */
-    real            orires_fc;              /* force constant for orientational restraints  */
-    real            orires_tau;             /* time constant for memory function in orires    */
-    int             nstorireout;            /* frequency of writing tr(SD) to enx           */
-    real            dihre_fc;               /* force constant for dihedral restraints (obsolete)       */
-    real            em_stepsize;            /* The stepsize for updating                       */
-    real            em_tol;                 /* The tolerance                           */
-    int             niter;                  /* Number of iterations for convergence of      */
-                                            /* steepest descent in relax_shells             */
-    real            fc_stepsize;            /* Stepsize for directional minimization        */
-                                            /* in relax_shells                              */
-    int             nstcgsteep;             /* number of steps after which a steepest       */
-                                            /* descents step is done while doing cg         */
-    int             nbfgscorr;              /* Number of corrections to the hessian to keep */
-    int             eConstrAlg;             /* Type of constraint algorithm                 */
-    int             nProjOrder;             /* Order of the LINCS Projection Algorithm      */
-    real            LincsWarnAngle;         /* If bond rotates more than %g degrees, warn   */
-    int             nLincsIter;             /* Number of iterations in the final Lincs step */
-    gmx_bool        bShakeSOR;              /* Use successive overrelaxation for shake      */
-    real            bd_fric;                /* Friction coefficient for BD (amu/ps)         */
-    int             ld_seed;                /* Random seed for SD and BD                    */
-    int             nwall;                  /* The number of walls                          */
-    int             wall_type;              /* The type of walls                            */
-    real            wall_r_linpot;          /* The potentail is linear for r<=wall_r_linpot */
-    int             wall_atomtype[2];       /* The atom type for walls                      */
-    real            wall_density[2];        /* Number density for walls                     */
-    real            wall_ewald_zfac;        /* Scaling factor for the box for Ewald         */
-    int             ePull;                  /* Type of pulling: no, umbrella or constraint  */
-    t_pull         *pull;                   /* The data for center of mass pulling          */
-    gmx_bool        bRot;                   /* Calculate enforced rotation potential(s)?    */
-    t_rot          *rot;                    /* The data for enforced rotation potentials    */
-    real            cos_accel;              /* Acceleration for viscosity calculation       */
-    tensor          deform;                 /* Triclinic deformation velocities (nm/ps)     */
-    int             userint1;               /* User determined parameters                   */
+    int             eI;                      /* Integration method                 */
+    gmx_int64_t     nsteps;                  /* number of steps to be taken                    */
+    int             simulation_part;         /* Used in checkpointing to separate chunks */
+    gmx_int64_t     init_step;               /* start at a stepcount >0 (used w. convert-tpr)    */
+    int             nstcalcenergy;           /* frequency of energy calc. and T/P coupl. upd.  */
+    int             cutoff_scheme;           /* group or verlet cutoffs     */
+    int             ns_type;                 /* which ns method should we use?               */
+    int             nstlist;                 /* number of steps before pairlist is generated   */
+    int             ndelta;                  /* number of cells per rlong                      */
+    int             nstcomm;                 /* number of steps after which center of mass     */
+                                             /* motion is removed                              */
+    int             comm_mode;               /* Center of mass motion removal algorithm      */
+    int             nstlog;                  /* number of steps after which print to logfile   */
+    int             nstxout;                 /* number of steps after which X is output        */
+    int             nstvout;                 /* id. for V                                      */
+    int             nstfout;                 /* id. for F                                      */
+    int             nstenergy;               /* number of steps after which energies printed */
+    int             nstxout_compressed;      /* id. for compressed trj (.xtc,.tng)           */
+    double          init_t;                  /* initial time (ps)              */
+    double          delta_t;                 /* time step (ps)                         */
+    real            x_compression_precision; /* precision of x in compressed trajectory file */
+    real            fourier_spacing;         /* requested fourier_spacing, when nk? not set  */
+    int             nkx, nky, nkz;           /* number of k vectors in each spatial dimension*/
+                                             /* for fourier methods for long range electrost.*/
+    int             pme_order;               /* interpolation order for PME                  */
+    real            ewald_rtol;              /* Real space tolerance for Ewald, determines   */
+                                             /* the real/reciprocal space relative weight    */
+    real            ewald_rtol_lj;           /* Real space tolerance for LJ-Ewald            */
+    int             ewald_geometry;          /* normal/3d ewald, or pseudo-2d LR corrections */
+    real            epsilon_surface;         /* Epsilon for PME dipole correction            */
+    int             ljpme_combination_rule;  /* Type of combination rule in LJ-PME          */
+    int             ePBC;                    /* Type of periodic boundary conditions           */
+    int             bPeriodicMols;           /* Periodic molecules                           */
+    gmx_bool        bContinuation;           /* Continuation run: starting state is correct    */
+    int             etc;                     /* temperature coupling               */
+    int             nsttcouple;              /* interval in steps for temperature coupling   */
+    gmx_bool        bPrintNHChains;          /* whether to print nose-hoover chains        */
+    int             epc;                     /* pressure coupling                            */
+    int             epct;                    /* pressure coupling type                 */
+    int             nstpcouple;              /* interval in steps for pressure coupling      */
+    real            tau_p;                   /* pressure coupling time (ps)                    */
+    tensor          ref_p;                   /* reference pressure (kJ/(mol nm^3))             */
+    tensor          compress;                /* compressability ((mol nm^3)/kJ)        */
+    int             refcoord_scaling;        /* How to scale absolute reference coordinates  */
+    rvec            posres_com;              /* The COM of the posres atoms                  */
+    rvec            posres_comB;             /* The B-state COM of the posres atoms          */
+    int             andersen_seed;           /* Random seed for Andersen thermostat (obsolete) */
+    real            verletbuf_tol;           /* Per atom pair energy drift tolerance (kJ/mol/ps/atom) for list buffer  */
+    real            rlist;                   /* short range pairlist cut-off (nm)              */
+    real            rlistlong;               /* long range pairlist cut-off (nm)               */
+    int             nstcalclr;               /* Frequency of evaluating direct space long-range interactions */
+    real            rtpi;                    /* Radius for test particle insertion           */
+    int             coulombtype;             /* Type of electrostatics treatment             */
+    int             coulomb_modifier;        /* Modify the Coulomb interaction              */
+    real            rcoulomb_switch;         /* Coulomb switch range start (nm)                */
+    real            rcoulomb;                /* Coulomb cutoff (nm)                            */
+    real            epsilon_r;               /* relative dielectric constant                 */
+    real            epsilon_rf;              /* relative dielectric constant of the RF       */
+    int             implicit_solvent;        /* No (=explicit water), or GBSA solvent models */
+    int             gb_algorithm;            /* Algorithm to use for calculation Born radii  */
+    int             nstgbradii;              /* Frequency of updating Generalized Born radii */
+    real            rgbradii;                /* Cutoff for GB radii calculation              */
+    real            gb_saltconc;             /* Salt concentration (M) for GBSA models       */
+    real            gb_epsilon_solvent;      /* dielectric coeff. of implicit solvent     */
+    real            gb_obc_alpha;            /* 1st scaling factor for Bashford-Case GB      */
+    real            gb_obc_beta;             /* 2nd scaling factor for Bashford-Case GB      */
+    real            gb_obc_gamma;            /* 3rd scaling factor for Bashford-Case GB      */
+    real            gb_dielectric_offset;    /* Dielectric offset for Still/HCT/OBC     */
+    int             sa_algorithm;            /* Algorithm for SA part of GBSA                */
+    real            sa_surface_tension;      /* Energy factor for SA part of GBSA */
+    int             vdwtype;                 /* Type of Van der Waals treatment              */
+    int             vdw_modifier;            /* Modify the VdW interaction                   */
+    real            rvdw_switch;             /* Van der Waals switch range start (nm)        */
+    real            rvdw;                    /* Van der Waals cutoff (nm)              */
+    int             eDispCorr;               /* Perform Long range dispersion corrections    */
+    real            tabext;                  /* Extension of the table beyond the cut-off,   *
+                                              * as well as the table length for 1-4 interac. */
+    real            shake_tol;               /* tolerance for shake                            */
+    int             efep;                    /* free energy calculations                     */
+    t_lambda       *fepvals;                 /* Data for the FEP state                       */
+    gmx_bool        bSimTemp;                /* Whether to do simulated tempering            */
+    t_simtemp      *simtempvals;             /* Variables for simulated tempering            */
+    gmx_bool        bExpanded;               /* Whether expanded ensembles are used          */
+    t_expanded     *expandedvals;            /* Expanded ensemble parameters              */
+    int             eDisre;                  /* Type of distance restraining                 */
+    real            dr_fc;                   /* force constant for ta_disre                    */
+    int             eDisreWeighting;         /* type of weighting of pairs in one restraints   */
+    gmx_bool        bDisreMixed;             /* Use comb of time averaged and instan. viol's   */
+    int             nstdisreout;             /* frequency of writing pair distances to enx   */
+    real            dr_tau;                  /* time constant for memory function in disres    */
+    real            orires_fc;               /* force constant for orientational restraints  */
+    real            orires_tau;              /* time constant for memory function in orires    */
+    int             nstorireout;             /* frequency of writing tr(SD) to enx           */
+    real            em_stepsize;             /* The stepsize for updating                      */
+    real            em_tol;                  /* The tolerance                          */
+    int             niter;                   /* Number of iterations for convergence of      */
+                                             /* steepest descent in relax_shells             */
+    real            fc_stepsize;             /* Stepsize for directional minimization        */
+                                             /* in relax_shells                              */
+    int             nstcgsteep;              /* number of steps after which a steepest       */
+                                             /* descents step is done while doing cg         */
+    int             nbfgscorr;               /* Number of corrections to the hessian to keep */
+    int             eConstrAlg;              /* Type of constraint algorithm                 */
+    int             nProjOrder;              /* Order of the LINCS Projection Algorithm      */
+    real            LincsWarnAngle;          /* If bond rotates more than %g degrees, warn   */
+    int             nLincsIter;              /* Number of iterations in the final Lincs step */
+    gmx_bool        bShakeSOR;               /* Use successive overrelaxation for shake      */
+    real            bd_fric;                 /* Friction coefficient for BD (amu/ps)         */
+    gmx_int64_t     ld_seed;                 /* Random seed for SD and BD                    */
+    int             nwall;                   /* The number of walls                          */
+    int             wall_type;               /* The type of walls                            */
+    real            wall_r_linpot;           /* The potentail is linear for r<=wall_r_linpot */
+    int             wall_atomtype[2];        /* The atom type for walls                      */
+    real            wall_density[2];         /* Number density for walls                     */
+    real            wall_ewald_zfac;         /* Scaling factor for the box for Ewald         */
+    int             ePull;                   /* Type of pulling: no, umbrella or constraint  */
+    t_pull         *pull;                    /* The data for center of mass pulling          */
+    gmx_bool        bRot;                    /* Calculate enforced rotation potential(s)?    */
+    t_rot          *rot;                     /* The data for enforced rotation potentials    */
+    int             eSwapCoords;             /* Do ion/water position exchanges (CompEL)?    */
+    t_swapcoords   *swap;
+    gmx_bool        bIMD;                    /* Allow interactive MD sessions for this .tpr? */
+    t_IMD          *imd;                     /* Interactive molecular dynamics               */
+    real            cos_accel;               /* Acceleration for viscosity calculation       */
+    tensor          deform;                  /* Triclinic deformation velocities (nm/ps)     */
+    int             userint1;                /* User determined parameters                   */
     int             userint2;
     int             userint3;
     int             userint4;