perses.samplers.ProtonationStateSampler

class perses.samplers.ProtonationStateSampler(complex_sampler, solvent_sampler, log_state_penalties, storage=None, verbose=False)[source]

Protonation state sampler with given fixed target probabilities for ligand in solvent.

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 protonation state 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__(complex_sampler, solvent_sampler, log_state_penalties, storage=None, verbose=False)[source]

Initialize a protonation state sampler with fixed target probabilities for ligand in solvent.

Parameters:
complex_sampler : ExpandedEnsembleSampler

Ligand in complex sampler

solvent_sampler : SAMSSampler

Ligand in solution sampler

log_state_penalties : dict

log_state_penalties[smiles] is the log state free energy (in kT) for ligand state ‘smiles’

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

Methods

__init__(complex_sampler, solvent_sampler, …) Initialize a protonation state sampler with fixed target probabilities for ligand in solvent.
run([niterations]) Run the protonation state 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
run(niterations=1)[source]

Run the protonation state sampler for the specified number of iterations.

Parameters:
niterations : int

The number of iterations to run the sampler for.

update()[source]

Run one iteration of the sampler.

update_samplers()[source]

Update all samplers.

update_target_probabilities()[source]

Update all target probabilities.