Gromacs  2025.0-dev-20241011-013a99c
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Functions
replicaexchange.h File Reference
#include <cstdint>
#include <cstdio>
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/real.h"
+ Include dependency graph for replicaexchange.h:
+ This graph shows which files directly or indirectly include this file:

Description

Declares the routines for replica exchange.

Author
David van der Spoel david.nosp@m..van.nosp@m.dersp.nosp@m.oel@.nosp@m.icm.u.nosp@m.u.se
Mark Abraham mark..nosp@m.j.ab.nosp@m.raham.nosp@m.@gma.nosp@m.il.co.nosp@m.m

Classes

struct  ReplicaExchangeParameters
 The parameters for the replica exchange algorithm. More...
 

Typedefs

typedef struct gmx_repl_exgmx_repl_ex_t
 Abstract type for replica exchange.
 

Functions

gmx_repl_ex_t init_replica_exchange (FILE *fplog, const gmx_multisim_t *ms, int numAtomsInSystem, const t_inputrec *ir, const ReplicaExchangeParameters &replExParams)
 Setup function. More...
 
gmx_bool replica_exchange (FILE *fplog, const t_commrec *cr, const gmx_multisim_t *ms, gmx_repl_ex_t re, t_state *state, const gmx_enerdata_t *enerd, t_state *state_local, int64_t step, real time)
 Attempts replica exchange. More...
 
void print_replica_exchange_statistics (FILE *fplog, gmx_repl_ex_t re)
 Prints replica exchange statistics to the log file. More...
 

Function Documentation

gmx_repl_ex_t init_replica_exchange ( FILE *  fplog,
const gmx_multisim_t ms,
int  numAtomsInSystem,
const t_inputrec *  ir,
const ReplicaExchangeParameters replExParams 
)

Setup function.

Should only be called on the main ranks

void print_replica_exchange_statistics ( FILE *  fplog,
gmx_repl_ex_t  re 
)

Prints replica exchange statistics to the log file.

Should only be called on the main ranks

gmx_bool replica_exchange ( FILE *  fplog,
const t_commrec *  cr,
const gmx_multisim_t ms,
gmx_repl_ex_t  re,
t_state state,
const gmx_enerdata_t enerd,
t_state state_local,
int64_t  step,
real  time 
)

Attempts replica exchange.

Should be called on all ranks. When running each replica in parallel, this routine collects the state on the main rank before exchange. With domain decomposition, the global state after exchange is stored in state and still needs to be redistributed over the ranks.

Returns
TRUE if the state has been exchanged.