BioSimSpace.Protocol.FreeEnergy

class BioSimSpace.Protocol.FreeEnergy(lam=0.0, lam_vals=None, min_lam=0.0, max_lam=1.0, num_lam=11, timestep=2.0000 fs, runtime=4.0000 ns, temperature=300.0000 K, pressure=1.0000 atm, report_interval=200000, restart_interval=20000, perturbation_type='full')

A class for storing free energy protocols.

__init__(lam=0.0, lam_vals=None, min_lam=0.0, max_lam=1.0, num_lam=11, timestep=2.0000 fs, runtime=4.0000 ns, temperature=300.0000 K, pressure=1.0000 atm, report_interval=200000, restart_interval=20000, perturbation_type='full')

Constructor.

Parameters
  • lam (float) – The perturbation parameter: [0.0, 1.0]

  • lam_vals ([float]) – The list of lambda parameters.

  • min_lam (float) – The minimum lambda value.

  • max_lam (float) – The maximum lambda value.

  • num_lam (int) – The number of lambda values.

  • timestep (Time) – The integration timestep.

  • runtime (Time) – The running time.

  • temperature (Temperature) – The temperature.

  • pressure (Pressure) – The pressure. Pass pressure=None to use the NVT ensemble.

  • report_interval (int) – The frequency at which statistics are recorded. (In integration steps.)

  • restart_interval (int) – The frequency at which restart configurations and trajectory

  • perturbation_type (str) –

    The type of perturbation to perform. Options are:

    ”full” : A full perturbation of all terms (default option). “discharge_soft” : Perturb all discharging soft atom charge terms (i.e. value->0.0). “vanish_soft” : Perturb all vanishing soft atom LJ terms (i.e. value->0.0). “flip” : Perturb all hard atom terms as well as bonds/angles. “grow_soft” : Perturb all growing soft atom LJ terms (i.e. 0.0->value). “charge_soft” : Perturb all charging soft atom LJ terms (i.e. 0.0->value).

    Currently perturubation_type != “full” is only supported by BioSimSpace.Process.Somd.

Methods

__init__([lam, lam_vals, min_lam, max_lam, …])

Constructor.

getLambda()

Get the value of the perturbation parameter.

getLambdaIndex()

Get the index of the lambda value within the lambda array.

getLambdaValues()

Get the list of lambda values.

getPerturbationType()

Get the perturbation type.

getPressure()

Return the pressure.

getReportInterval()

Return the interval between reporting statistics.

getRestartInterval()

Return the interval between saving restart confiugrations, and/or trajectory frames.

getRunTime()

Return the running time.

getTemperature()

Return temperature.

getTimeStep()

Return the time step.

setLambdaValues(lam[, lam_vals, min_lam, …])

Set the list of lambda values.

setPerturbationType(perturbation_type)

Set the perturbation type.

setPressure(pressure)

Set the pressure.

setReportInterval(report_interval)

Set the interval at which statistics are reported.

setRestartInterval(restart_interval)

Set the interval between saving restart confiugrations, and/or trajectory frames.

setRunTime(runtime)

Set the running time.

setTemperature(temperature)

Set the temperature.

setTimeStep(timestep)

Set the time step.

getLambda()

Get the value of the perturbation parameter.

Returns

lam – The value of the perturbation parameter.

Return type

float

getLambdaIndex()

Get the index of the lambda value within the lambda array.

Returns

index – The index of the lambda value in teh lambda array.

Return type

int

getLambdaValues()

Get the list of lambda values.

Returns

lam_vals – The list of lambda values.

Return type

[float]

getPerturbationType()

Get the perturbation type.

Returns

perturbation_type – The perturbation type.

Return type

str

getPressure()

Return the pressure.

Returns

pressure – The pressure.

Return type

Pressure

getReportInterval()

Return the interval between reporting statistics. (In integration steps.).

Returns

report_interval – The number of integration steps between reporting statistics.

Return type

int

getRestartInterval()

Return the interval between saving restart confiugrations, and/or trajectory frames. (In integration steps.).

Returns

restart_interval – The number of integration steps between saving restart configurations and/or trajectory frames.

Return type

int

getRunTime()

Return the running time.

Returns

runtime – The simulation run time.

Return type

Time

getTemperature()

Return temperature.

Returns

temperature – The simulation temperature.

Return type

Temperature

getTimeStep()

Return the time step.

Returns

timestep – The integration time step.

Return type

Time

setLambdaValues(lam, lam_vals=None, min_lam=None, max_lam=None, num_lam=None)

Set the list of lambda values.

Parameters
  • lam (float) – The perturbation parameter: [0.0, 1.0]

  • lam_vals ([float]) – A list of lambda values.

  • min_lam (float) – The minimum lambda value.

  • max_lam (float) – The maximum lambda value.

  • num_lam (int) – The number of lambda values.

setPerturbationType(perturbation_type)

Set the perturbation type.

Parameters

perturbation_type (str) –

The type of perturbation to perform. Options are:

”full” : A full perturbation of all terms (default option). “discharge_soft” : Perturb all discharging soft atom charge terms (i.e. value->0.0). “vanish_soft” : Perturb all vanishing soft atom LJ terms (i.e. value->0.0). “flip” : Perturb all hard atom terms as well as bonds/angles. “grow_soft” : Perturb all growing soft atom LJ terms (i.e. 0.0->value). “charge_soft” : Perturb all charging soft atom LJ terms (i.e. 0.0->value).

setPressure(pressure)

Set the pressure.

Parameters

pressure (Pressure) – The pressure.

setReportInterval(report_interval)

Set the interval at which statistics are reported. (In integration steps.).

Parameters

report_interval (int) – The number of integration steps between reporting statistics.

setRestartInterval(restart_interval)

Set the interval between saving restart confiugrations, and/or trajectory frames. (In integration steps.).

Parameters

restart_interval (int) – The number of integration steps between saving restart configurations and/or trajectory frames.

setRunTime(runtime)

Set the running time.

Parameters

runtime (Time) – The simulation run time.

setTemperature(temperature)

Set the temperature.

Parameters

temperature (Temperature) – The simulation temperature.

setTimeStep(timestep)

Set the time step.

Parameters

timestep (Time) – The integration time step.