meld.helpers.setup_replica_exchange
- meld.helpers.setup_replica_exchange(system, n_replicas, n_steps, n_trials=None, adaptation_growth_factor=2.0, adaptation_burn_in=50, adaptation_adapt_every=50, adaptation_stop_after=None, adaptation_min_acc_prob=0.02, mpi_timeout=60000)[source]
Setup replica exchange
- Parameters
system (
ISystem
) – The system to be simulatedn_replicas (
int
) – The number of replicas to be simulatedn_steps (
int
) – The number of steps of replica exchange to runn_trials (
Optional
[int
]) – The number of trials to run per exchangeadaptation_growth_factor (
float
) – The growth factor for adaptationadaptation_burn_in (
int
) – The number of steps to ignore after adaptingadaptation_adapt_every (
int
) – The number of steps to run between adaptationadaptation_stop_after (
Optional
[int
]) – The number of steps to run before stopping adaptationadaptation_min_acc_prob (
float
) – The minimum acceptance probability when adaptingmpi_timeout (
int
) – The number of seconds to wait for MPI communication to complete
Note
Replica exchange adaptation works as follows. First adaptation_burn_in steps are run and no statistics about exchange are collected. Then adaptation_adapt_every steps are run and the average acceptance rate is calculated. Any acceptance rates below adaptation_min_acc_prob are clamped at the minimum. Then adaptation is performed to equalize the acceptance rates. After each adaptation, the values of adaptation_burn_in and adaptation_adapt_every are multiplied by adaptation_growth_factor.
Note
If n_trials is None, then the number of trials is n_replicas**2.
- Return type