meld.remd.adaptor.AdaptationPolicy

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

Bases: object

Defines an adaptation policy

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

__init__(growth_factor, burn_in, adapt_every, stop_after=None)[source]

Initialize an AdaptationPolicy

Parameters
  • growth_factor (float) – increase adapt_every by a factor of growth_factor every adaptation

  • burn_in (int) – number of steps to ignore at the beginning

  • adapt_every (int) – how frequently to adapt (in picoseconds)

  • stop_after (Optional[int]) – when to stop adapting

Methods

__init__(growth_factor, burn_in, adapt_every)

Initialize an AdaptationPolicy

should_adapt(step)

Determine if adaptation is required

should_adapt(step)[source]

Determine if adaptation is required

Parameters

step (int) – the current simulation step

Return type

AdaptationRequired

Returns

a AdaptationPolicy.AdaptationRequired object

indicating if adaptation or resetting is necessary