schrodinger.application.desmond.gconfig module¶
Utilities for handling gDesmond config files.
Copyright Schrodinger, LLC. All rights reserved.
-
schrodinger.application.desmond.gconfig.
add_plugin
(desmond_exec, plugin_name, position=None)[source]¶ Wrap config.add_plugin, making sure to place added plugins before GCMC
-
schrodinger.application.desmond.gconfig.
real_to_int
(val)[source]¶ round up to the closest integer when the difference is less than 1e-7
-
schrodinger.application.desmond.gconfig.
optimize_key
(msj, cfg, box: List[float])[source]¶ Optimizes the simulation parameters in ‘cfg’, where ‘cfg’ must represent a complete config file.
- Parameters
box – Simulation box dimensions.
-
class
schrodinger.application.desmond.gconfig.
LambdaSchedule
[source]¶ Bases:
object
Base class for lambda schedules.
-
lambdas
: List[float] = []¶
-
classmethod
schedule
(n_win: int) → List[float][source]¶ Return schedule with the desired number of windows.
This method constructs a piecewise linear spline interpolator of the prototype lambda schedule and evaluates it on the specified number of windows to obtain the new lambda schedule.
- Parameters
n_win – Number of lambda windows to use.
- Returns
New lambda schedule.
-
-
class
schrodinger.application.desmond.gconfig.
ScheduleAngleCorePhysical
[source]¶ Bases:
schrodinger.application.desmond.gconfig.LambdaSchedule
Schedule for angle_core_physical terms.
-
lambdas
: List[float] = [1.0, 0.8, 0.6, 0.35, 0.2, 0.1, 0.03, 0.01, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]¶
-
classmethod
schedule
(n_win: int) → List[float]¶ Return schedule with the desired number of windows.
This method constructs a piecewise linear spline interpolator of the prototype lambda schedule and evaluates it on the specified number of windows to obtain the new lambda schedule.
- Parameters
n_win – Number of lambda windows to use.
- Returns
New lambda schedule.
-
-
class
schrodinger.application.desmond.gconfig.
ScheduleAngleCoreDummy
[source]¶ Bases:
schrodinger.application.desmond.gconfig.LambdaSchedule
Schedule for angle_core_dummy terms.
-
lambdas
: List[float] = [1.0, 0.8, 0.65, 0.5, 0.4, 0.3, 0.2, 0.16, 0.12, 0.08, 0.04, 0.01, 0.0, 0.0, 0.0, 0.0]¶
-
classmethod
schedule
(n_win: int) → List[float]¶ Return schedule with the desired number of windows.
This method constructs a piecewise linear spline interpolator of the prototype lambda schedule and evaluates it on the specified number of windows to obtain the new lambda schedule.
- Parameters
n_win – Number of lambda windows to use.
- Returns
New lambda schedule.
-
-
class
schrodinger.application.desmond.gconfig.
ScheduleBondCorePhysical
[source]¶ Bases:
schrodinger.application.desmond.gconfig.LambdaSchedule
Schedule for bond_core_physical terms.
-
lambdas
: List[float] = [1.0, 0.3, 0.1, 0.05, 0.03, 0.01, 0.002, 0.001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]¶
-
classmethod
schedule
(n_win: int) → List[float]¶ Return schedule with the desired number of windows.
This method constructs a piecewise linear spline interpolator of the prototype lambda schedule and evaluates it on the specified number of windows to obtain the new lambda schedule.
- Parameters
n_win – Number of lambda windows to use.
- Returns
New lambda schedule.
-
-
class
schrodinger.application.desmond.gconfig.
ScheduleBondCoreDummy
[source]¶ Bases:
schrodinger.application.desmond.gconfig.LambdaSchedule
Schedule for bond_core_dummy terms.
-
lambdas
: List[float] = [1.0, 0.6, 0.35, 0.22, 0.18, 0.14, 0.12, 0.11, 0.09, 0.08, 0.06, 0.02, 0.005, 0.0, 0.0, 0.0]¶
-
classmethod
schedule
(n_win: int) → List[float]¶ Return schedule with the desired number of windows.
This method constructs a piecewise linear spline interpolator of the prototype lambda schedule and evaluates it on the specified number of windows to obtain the new lambda schedule.
- Parameters
n_win – Number of lambda windows to use.
- Returns
New lambda schedule.
-
-
class
schrodinger.application.desmond.gconfig.
ScheduleAngleAttachment
[source]¶ Bases:
schrodinger.application.desmond.gconfig.LambdaSchedule
Schedule for angle_attachment terms.
-
lambdas
: List[float] = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.95, 0.9, 0.85, 0.8, 0.75, 0.6, 0.35, 0.1, 0.0]¶
-
classmethod
schedule
(n_win: int) → List[float]¶ Return schedule with the desired number of windows.
This method constructs a piecewise linear spline interpolator of the prototype lambda schedule and evaluates it on the specified number of windows to obtain the new lambda schedule.
- Parameters
n_win – Number of lambda windows to use.
- Returns
New lambda schedule.
-
-
class
schrodinger.application.desmond.gconfig.
ScheduleLinear
[source]¶ Bases:
schrodinger.application.desmond.gconfig.LambdaSchedule
Linear lambda schedule.
-
lambdas
: List[float] = [1.0, 0.0]¶
-
classmethod
schedule
(n_win: int) → List[float]¶ Return schedule with the desired number of windows.
This method constructs a piecewise linear spline interpolator of the prototype lambda schedule and evaluates it on the specified number of windows to obtain the new lambda schedule.
- Parameters
n_win – Number of lambda windows to use.
- Returns
New lambda schedule.
-
-
schrodinger.application.desmond.gconfig.
get_simbox_output_filename
(msj)[source]¶ Returns ‘None’ if the simbox_output plugin is turned off.
-
schrodinger.application.desmond.gconfig.
get_energy_group_output_filename
(msj)[source]¶ Returns ‘None’ if the energy_groups plugin is turned off.
-
schrodinger.application.desmond.gconfig.
gen_temperature_for_solute_tempering
(setting, model, base_temp, asl, printer=None)[source]¶
-
schrodinger.application.desmond.gconfig.
concatenate_cfgs
(simulate_cfgs, base_cfg)[source]¶ Create a single backend config file from a list of simulate configs created from the simulate block of a concatenate front-end config and the backend config created from the rest of the concatenate front-end config.
- Parameters
simulate_cfgs (
list
ofsea.Map
) – The list of backend config files created from the simulate block of a concatenate front-end configbase_cfg (
sea.Map
) – The backend config file created from a concatenate front-end config, with its simulate block removed.
- Returns
A copy of the base concatenate config with the information from the simulate configs merged in.
- Return type
sea.Map
-
schrodinger.application.desmond.gconfig.
set_relative_restrain_scaling
(first_restrain, restrain, this_integrator)[source]¶ Set each integrator’s posre_scaling attribute to the ratio between the desired restraint force constant and the first force constant. This allows us to modulate the restraint force constant between concatenate stages.
- Parameters
first_restrain (
sea.Map
) – the restrain parameter from the first stage’s config, or None if updating the first stagerestrain (
sea.Map
) – this stage’s restrain parameterthis_integrator (
sea.Map
) – this stage’s integrator
- Returns
the first restrain parameter and the first force constant
-
schrodinger.application.desmond.gconfig.
restrain_force_constant
(restraints: schrodinger.utils.sea.sea.Map) → float[source]¶ Get restraints force constant.
- Parameters
restraints – the restraints block for a given stage
- Returns
the (first) restraint force constant