meld.remd.adaptor

class meld.remd.adaptor.AcceptanceCounter(n_replicas)[source]

Class to keep track of acceptance rates.

class meld.remd.adaptor.AdaptationPolicy(growth_factor, burn_in, adapt_every)[source]

Repeat adaptation on a regular schedule with an optional burn-in and increasing adaptation times.

Parameters:
  • growth_factor – increase adapt_every by a factor of growth_factor every adaptation
  • burn_in – number of steps to ignore at the beginning
  • adapt_every – how frequently to adapt (in picoseconds)
class AdaptationRequired

AdaptationRequired(adapt_now, reset_now)

adapt_now

Alias for field number 0

reset_now

Alias for field number 1

AdaptationPolicy.should_adapt(step)[source]

Is adaptation required?

Parameters:step – the current simulation step
Returns:an AdaptationPolicy.AdaptationRequired object indicating if adaptation or resetting is necessary
class meld.remd.adaptor.EqualAcceptanceAdaptor(n_replicas, adaptation_policy, min_acc_prob=0.1)[source]

Adaptor based on making acceptance rates uniform.

Parameters:
  • n_replicas – number of replicas
  • min_acc_prob – all acceptence probabilities below this value will be raised to this value
adapt(previous_lambdas, step)[source]

Compute new optimal values of lambda.

Parameters:
  • previous_lambdas – a list of the previous lambda values
  • step – the current simulation step
Returns:

a list of the new, optimized lambda values

reset()[source]

Forget about any previous updates.

Resets all internal counters and statistics to zero.

update(i, accepted)[source]

Update adaptor with exchange.

Parameters:
  • i – index of first replica; second replica is i+1
  • accepted – True if the exchange was accepted