91ee9f00d7d2e4afed8d34be4af8eeddf87fcab9
[alexxy/gromacs.git] / src / gromacs / mdtypes / mdatom.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) 2012,2013,2014,2015,2016 by the GROMACS development team.
7  * Copyright (c) 2017,2019,2020,2021, by the GROMACS development team, led by
8  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
9  * and including many others, as listed in the AUTHORS file in the
10  * top-level source directory and at http://www.gromacs.org.
11  *
12  * GROMACS is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public License
14  * as published by the Free Software Foundation; either version 2.1
15  * of the License, or (at your option) any later version.
16  *
17  * GROMACS is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20  * Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with GROMACS; if not, see
24  * http://www.gnu.org/licenses, or write to the Free Software Foundation,
25  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
26  *
27  * If you want to redistribute modifications to GROMACS, please
28  * consider that scientific software is very special. Version
29  * control is crucial - bugs must be traceable. We will be happy to
30  * consider code for inclusion in the official distribution, but
31  * derived work must not be called official GROMACS. Details are found
32  * in the README & COPYING files - if they are missing, get the
33  * official version at http://www.gromacs.org.
34  *
35  * To help us fund GROMACS development, we humbly ask that you cite
36  * the research papers on the package. Check out http://www.gromacs.org.
37  */
38 /*! \brief
39  * Declares mdatom data structure.
40  *
41  * \inpublicapi
42  * \ingroup module_mdtypes
43  */
44 #ifndef GMX_MDTYPES_MDATOM_H
45 #define GMX_MDTYPES_MDATOM_H
46
47 #include "gromacs/math/vectypes.h"
48 #include "gromacs/utility/real.h"
49
50 enum class ParticleType : int;
51
52 typedef struct t_mdatoms
53 {
54     //! Total mass in state A
55     real tmassA;
56     //! Total mass in state B
57     real tmassB;
58     //! Total mass
59     real tmass;
60     //! Number of atoms in arrays
61     int nr;
62     //! Number of elements in arrays
63     int nalloc;
64     //! Number of energy groups
65     int nenergrp;
66     //! Do we have multiple center of mass motion removal groups
67     bool bVCMgrps;
68     //! Do we have any virtual sites?
69     bool haveVsites;
70     //! Do we have atoms that are frozen along 1 or 2 (not 3) dimensions?
71     bool havePartiallyFrozenAtoms;
72     //! Number of perturbed atoms
73     int nPerturbed;
74     //! Number of atoms for which the mass is perturbed
75     int nMassPerturbed;
76     //! Number of atoms for which the charge is perturbed
77     int nChargePerturbed;
78     //! Number of atoms for which the type is perturbed
79     int nTypePerturbed;
80     //! Do we have orientation restraints
81     bool bOrires;
82     //! Atomic mass in A state
83     real* massA;
84     //! Atomic mass in B state
85     real* massB;
86     //! Atomic mass in present state
87     real* massT;
88     //! Inverse atomic mass per atom, 0 for vsites and shells
89     real* invmass;
90     //! Inverse atomic mass per atom and dimension, 0 for vsites, shells and frozen dimensions
91     rvec* invMassPerDim;
92     //! Atomic charge in A state
93     real* chargeA;
94     //! Atomic charge in B state
95     real* chargeB;
96     //! Dispersion constant C6 in A state
97     real* sqrt_c6A;
98     //! Dispersion constant C6 in A state
99     real* sqrt_c6B;
100     //! Van der Waals radius sigma in the A state
101     real* sigmaA;
102     //! Van der Waals radius sigma in the B state
103     real* sigmaB;
104     //! Van der Waals radius sigma^3 in the A state
105     real* sigma3A;
106     //! Van der Waals radius sigma^3 in the B state
107     real* sigma3B;
108     //! Is this atom perturbed
109     bool* bPerturbed;
110     //! Type of atom in the A state
111     int* typeA;
112     //! Type of atom in the B state
113     int* typeB;
114     //! Particle type
115     ParticleType* ptype;
116     //! Group index for temperature coupling
117     unsigned short* cTC;
118     //! Group index for energy matrix
119     unsigned short* cENER;
120     //! Group index for freezing
121     unsigned short* cFREEZE;
122     //! Group index for center of mass motion removal
123     unsigned short* cVCM;
124     //! Group index for user 1
125     unsigned short* cU1;
126     //! Group index for user 2
127     unsigned short* cU2;
128     //! Group index for orientation restraints
129     unsigned short* cORF;
130     //! Number of atoms on this processor. TODO is this still used?
131     int homenr;
132     //! The lambda value used to create the contents of the struct
133     real lambda;
134 } t_mdatoms;
135
136 #endif