Moved pull params to mdtypes/pull-params.h
[gromacs.git] / src / gromacs / mdtypes / pull-params.h
blob8552fc796497b2ee979e23ca848754b885764881
1 /*
2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 2015, by the GROMACS development team, led by
5 * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
6 * and including many others, as listed in the AUTHORS file in the
7 * top-level source 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 /*! \libinternal \file
39 * \brief
40 * This file contains datatypes for the mdp options used by the pull code.
42 * \author Berk Hess
44 * \inlibraryapi
45 * \ingroup module_mdtypes
48 #ifndef GMX_MDTYPES_PULL_PARAMS_H
49 #define GMX_MDTYPES_PULL_PARAMS_H
51 #include "gromacs/math/vectypes.h"
52 #include "gromacs/mdtypes/md_enums.h"
53 #include "gromacs/utility/basedefinitions.h"
54 #include "gromacs/utility/real.h"
56 /*! \cond INTERNAL */
58 /*! \brief Struct that defines a pull group */
59 typedef struct {
60 int nat; /**< Number of atoms in the pull group */
61 int *ind; /**< The global atoms numbers */
62 int nweight; /**< The number of weights (0 or nat) */
63 real *weight; /**< Weights (use all 1 when weight==NULL) */
64 int pbcatom; /**< The reference atom for pbc (global number) */
65 } t_pull_group;
67 /*! Maximum number of pull groups that can be used in a pull coordinate */
68 #define PULL_COORD_NGROUP_MAX 4
70 /*! \brief Struct that defines a pull coordinate */
71 typedef struct {
72 int eType; /**< The pull type: umbrella, constraint, ... */
73 int eGeom; /**< The pull geometry */
74 int ngroup; /**< The number of groups, depends on eGeom */
75 int group[PULL_COORD_NGROUP_MAX]; /**< The pull groups: indices into the group arrays in pull_t and pull_params_t, ngroup indices are used */
76 ivec dim; /**< Used to select components for constraint */
77 rvec origin; /**< The origin for the absolute reference */
78 rvec vec; /**< The pull vector, direction or position */
79 gmx_bool bStart; /**< Set init based on the initial structure */
80 real init; /**< Initial reference displacement */
81 real rate; /**< Rate of motion (nm/ps) */
82 real k; /**< Force constant */
83 real kB; /**< Force constant for state B */
84 } t_pull_coord;
86 /*! \brief Struct containing all pull parameters */
87 typedef struct pull_params_t {
88 int ngroup; /**< Number of pull groups */
89 int ncoord; /**< Number of pull coordinates */
90 real cylinder_r; /**< Radius of cylinder for dynamic COM */
91 real constr_tol; /**< Absolute tolerance for constraints in (nm) */
92 gmx_bool bPrintCOM1; /**< Print coordinates of COM 1 for each coord */
93 gmx_bool bPrintCOM2; /**< Print coordinates of COM 2 for each coord */
94 gmx_bool bPrintRefValue; /**< Print the reference value for each coord */
95 gmx_bool bPrintComp; /**< Print cartesian components for each coord with geometry=distance */
96 int nstxout; /**< Output interval for pull x */
97 int nstfout; /**< Output interval for pull f */
99 t_pull_group *group; /**< groups to pull/restrain/etc/ */
100 t_pull_coord *coord; /**< the pull coordinates */
101 } pull_params_t;
103 /*! \endcond */
105 #endif /* GMX_MDTYPES_PULL_PARAMS_H */