meld.remd.adaptor.EqualAcceptanceAdaptor

class meld.remd.adaptor.EqualAcceptanceAdaptor(n_replicas, adaptation_policy, min_acc_prob=0.1)[source]

Bases: _AcceptanceCounter

Adaptor based on making acceptance rates uniform

__init__(n_replicas, adaptation_policy, min_acc_prob=0.1)[source]

Initialize EqualAcceptanceAdaptor

Parameters
  • n_replicas (int) – number of replicas

  • adaptation_policy (AdaptationPolicy) – policy to use to decide when to adapt

  • min_acc_prob (float) – floor on the acceptance probability used for adaptation

Methods

__init__(n_replicas, adaptation_policy[, ...])

Initialize EqualAcceptanceAdaptor

adapt(previous_lambdas, step)

Compute new optimal values of lambda.

get_acceptance_probabilities()

Get acceptance probabilities

reset()

Forget about any previous updates.

update(i, accepted)

Update statistics

Attributes

accept_probs

t_lens

adapt(previous_lambdas, step)[source]

Compute new optimal values of lambda.

Parameters
  • previous_lambdas (List[float]) – the previous lambda values

  • step (int) – the current simulation step

Return type

List[float]

Returns

the new, optimized lambda values

reset()[source]

Forget about any previous updates.

Resets all internal counters and statistics to zero.

Return type

None

update(i, accepted)[source]

Update statistics

Parameters
  • i (int) – lower replica index of pair with attempted swap

  • accepted (bool) – True if swap was successful

Return type

None