#include <cstdint>
#include <cstdio>
#include <memory>
#include <string_view>
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/vectypes.h"
The "Computational Electrophysiology" protocol for ion/water position swapping.
- Author
- Carsten Kutzner ckutz.nosp@m.ne@g.nosp@m.wdg.d.nosp@m.e
|
| std::unique_ptr< SwapCoords > | init_swapcoords (FILE *fplog, const t_inputrec *ir, const char *fn, const gmx_mtop_t &mtop, const t_state *globalState, ObservablesHistory *oh, const gmx::MpiComm &mpiComm, const gmx_domdec_t *dd, gmx::LocalAtomSetManager *atomSets, const gmx_output_env_t *oenv, const gmx::MdrunOptions &mdrunOptions, gmx::StartingBehavior startingBehavior) |
| | Initialize ion / water position swapping ("Computational Electrophysiology"). More...
|
| |
| gmx_bool | do_swapcoords (const gmx::MpiComm &mpiComm, int64_t step, double t, const t_inputrec *ir, SwapCoords *s, gmx_wallcycle *wcycle, gmx::ArrayRef< gmx::RVec > x, matrix box, gmx_bool bVerbose, gmx_bool bRerun) |
| | "Computational Electrophysiology" main routine within MD loop. More...
|
| |
"Computational Electrophysiology" main routine within MD loop.
- Parameters
-
| [in] | mpiComm | Communicator object for my group. |
| [in] | step | The number of the MD time step. |
| [in] | t | The time. |
| [in] | ir | Structure containing MD input parameters |
| [in,out] | s | The structure needed for position swapping. |
| [in] | wcycle | Count wallcycles of swap routines for diagnostic output. |
| [in] | x | Positions of home particles this node owns. |
| [in] | box | The simulation box. |
| [in] | bVerbose | Should we be quiet or verbose? |
| [in] | bRerun | Are we doing a rerun? |
- Returns
- Whether at least one pair of molecules was swapped.
| std::unique_ptr<SwapCoords> init_swapcoords |
( |
FILE * |
fplog, |
|
|
const t_inputrec * |
ir, |
|
|
const char * |
fn, |
|
|
const gmx_mtop_t & |
mtop, |
|
|
const t_state * |
globalState, |
|
|
ObservablesHistory * |
oh, |
|
|
const gmx::MpiComm & |
mpiComm, |
|
|
const gmx_domdec_t * |
dd, |
|
|
gmx::LocalAtomSetManager * |
atomSets, |
|
|
const gmx_output_env_t * |
oenv, |
|
|
const gmx::MdrunOptions & |
mdrunOptions, |
|
|
gmx::StartingBehavior |
startingBehavior |
|
) |
| |
Initialize ion / water position swapping ("Computational Electrophysiology").
This routine does the memory allocation for various helper arrays, opens the output file, sets up swap data checkpoint writing, etc. and returns it.
- Parameters
-
| [in] | fplog | General output file, normally md.log. |
| [in] | ir | Structure containing MD input parameters, among those also the structure needed for position swapping. |
| [in] | fn | Output file name for swap data. |
| [in] | mtop | Molecular topology. |
| [in] | globalState | The global state, only used on the main rank. |
| [in] | oh | Contains struct with swap data that is read from or written to checkpoint. |
| [in] | mpiComm | Communicator object for my group. |
| [in] | dd | Domain decomposition object, is nullptr when DD is not active. |
| [in] | atomSets | Manager tending to swap atom indices. |
| [in] | oenv | Needed to open the swap output XVGR file. |
| [in] | mdrunOptions | Options for mdrun. |
| [in] | startingBehavior | Describes whether this is a restart appending to output files |