Do not include headers related to ObservablesHistory
[alexxy/gromacs.git] / src / gromacs / mdtypes / swaphistory.h
1 /*
2  * This file is part of the GROMACS molecular simulation package.
3  *
4  * Copyright (c) 2016,2017, 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.
8  *
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.
13  *
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.
18  *
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.
23  *
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.
31  *
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.
34  */
35
36 /*
37  * This file contains data types containing ioin/water position exchange
38  * data to be stored in the checkpoint file.
39  */
40
41 #ifndef GMX_MDLIB_SWAPHISTORY_H
42 #define GMX_MDLIB_SWAPHISTORY_H
43
44 #include "gromacs/mdtypes/md_enums.h"
45
46 /* History of an ion type used in position swapping
47  */
48 typedef struct swapstateIons_t
49 {
50     int  nMolReq[eCompNR];                    // Requested # of molecules per compartment
51     int *nMolReq_p[eCompNR];                  // Pointer to this data (for checkpoint writing)
52     int  inflow_net[eCompNR];                 // Flux determined from the # of swaps
53     int *inflow_net_p[eCompNR];               // Pointer to this data
54     int *nMolPast[eCompNR];                   // Array with nAverage entries for history
55     int *nMolPast_p[eCompNR];                 // Pointer points to the first entry only
56
57     // Channel flux detection, this is counting only and has no influence on whether swaps are performed or not:                                                                 */
58     int            fluxfromAtoB[eCompNR];     // Flux determined from the split cylinders
59     int           *fluxfromAtoB_p[eCompNR];   // Pointer to this data
60     int            nMol;                      // Number of molecules, size of the following arrays
61     unsigned char *comp_from;                 // Ion came from which compartment?
62     unsigned char *channel_label;             // Through which channel did this ion pass?
63 } swapstateIons_t;
64
65 /* Position swapping state
66  *
67  * To also make multimeric channel proteins whole, we save the last whole configuration
68  * of the channels in the checkpoint file. If we have no checkpoint file, we assume
69  * that the starting configuration has the correct PBC representation after making the
70  * individual molecules whole
71  *
72  * \todo move out of this file to ObservablesHistory
73  *
74  */
75 typedef struct swaphistory_t
76 {
77     int              eSwapCoords;             // Swapping along x, y, or z-direction?
78     int              nIonTypes;               // Number of ion types, this is the size of the following arrays
79     int              nAverage;                // Use average over this many swap attempt steps when determining the ion counts
80     int              fluxleak;                // Ions not going through any channel (bad!)
81     int             *fluxleak_p;              // Pointer to this data
82     gmx_bool         bFromCpt;                // Did we start from a checkpoint file?
83     int              nat[eChanNR];            // Size of xc_old_whole, i.e. the number of atoms in each channel
84     rvec            *xc_old_whole[eChanNR];   // Last known whole positions of the two channels (important for multimeric ch.!)
85     rvec           **xc_old_whole_p[eChanNR]; // Pointer to these positions
86     swapstateIons_t *ionType;                 // History information for one ion type
87 }
88 swaphistory_t;
89
90 #endif