perses.samplers.MultiTargetDesign¶
-
class
perses.samplers.
MultiTargetDesign
(target_samplers, storage=None, verbose=False)[source]¶ Multi-objective design using self-adjusted mixture sampling with additional recursion steps that update target weights on the fly.
Parameters: - samplers : list of SAMSSampler
The SAMS samplers whose relative partition functions go into the design objective computation.
- sampler_exponents : dict of SAMSSampler
samplers.keys() are the samplers, and samplers[key]
- log_target_probabilities : dict of hashable object
log_target_probabilities[key] is the computed log objective function (target probability) for chemical state key
- verbose : bool
If True, verbose output is printed.
Attributes: - state_keys
Methods
run
([niterations])Run the multi-target design sampler for the specified number of iterations. update
()Run one iteration of the sampler. update_samplers
()Update all samplers. update_target_probabilities
()Update all target probabilities. -
__init__
(target_samplers, storage=None, verbose=False)[source]¶ Initialize a multi-objective design sampler with the specified target sampler powers.
Parameters: - target_samplers : dict
target_samplers[sampler] is the exponent associated with SAMS sampler sampler in the multi-objective design.
- storage : NetCDFStorage, optional, default=None
If specified, will use the storage layer to write trajectory data.
- verbose : bool, optional, default=False
If true, will print verbose output
- The target sampler weights for N samplers with specified exponents lpha_n are given by
- pi_{nk} propto prod_{n=1}^N Z_{nk}^{alpha_n}
- where pi_{nk} is the target weight for sampler n state k,
- and Z_{nk} is the relative partition function of sampler n among states k.
Examples
Set up a mutation sampler to maximize implicit solvent hydration free energy. >>> from perses.tests.testsystems import AlanineDipeptideTestSystem >>> testsystem = AlanineDipeptideTestSystem() >>> # Set up target samplers. >>> target_samplers = { testsystem.sams_samplers[‘implicit’] : 1.0, testsystem.sams_samplers[‘vacuum’] : -1.0 } >>> # Set up the design sampler. >>> designer = MultiTargetDesign(target_samplers)
Methods
__init__
(target_samplers[, storage, verbose])Initialize a multi-objective design sampler with the specified target sampler powers. run
([niterations])Run the multi-target design sampler for the specified number of iterations. update
()Run one iteration of the sampler. update_samplers
()Update all samplers. update_target_probabilities
()Update all target probabilities. Attributes
state_keys