Move computeSlowForces into stepWork
[gromacs.git] / src / gromacs / mdtypes / swaphistory.h
blobaeb26465c1f2204e3924281d1834023d07dfb28c
1 /*
2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 2016,2017,2019, 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.
37 * This file contains data types containing ioin/water position exchange
38 * data to be stored in the checkpoint file.
41 #ifndef GMX_MDLIB_SWAPHISTORY_H
42 #define GMX_MDLIB_SWAPHISTORY_H
44 #include "gromacs/mdtypes/md_enums.h"
46 /* History of an ion type used in position swapping
48 typedef struct swapstateIons_t
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
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;
65 /* Position swapping state
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
72 * \todo move out of this file to ObservablesHistory
75 typedef struct swaphistory_t
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 } swaphistory_t;
89 #endif