perses.rjmc.topology_proposal.NullProposalEngine

class perses.rjmc.topology_proposal.NullProposalEngine(system_generator, residue_name='MOL', atom_expr=None, bond_expr=None, proposal_metadata=None, storage=None, always_change=True)[source]

Base class for NaphthaleneProposalEngine and ButantProposalEngine Not intended for use on its own

Attributes:
chemical_state_list

Methods

canonicalize_smiles(smiles) Convert a SMILES string into canonical isomeric smiles
clean_molecule_list(smiles_list, atom_opts, …) A utility function to determine which molecules can be proposed from any other molecule.
compute_state_key(topology) For this test system, the topologies for the two states are identical; therefore a custom attribute _state_key has been added to the topology itself, to track whether a switch has been accepted
propose(current_system, current_topology[, …]) Custom proposal for NaphthaleneTestSystem will switch from current naphthalene “state” (either ‘naphthalene-A’ or ‘naphthalene-B’) to the other
__init__(system_generator, residue_name='MOL', atom_expr=None, bond_expr=None, proposal_metadata=None, storage=None, always_change=True)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(system_generator[, residue_name, …]) Initialize self.
canonicalize_smiles(smiles) Convert a SMILES string into canonical isomeric smiles
clean_molecule_list(smiles_list, atom_opts, …) A utility function to determine which molecules can be proposed from any other molecule.
compute_state_key(topology) For this test system, the topologies for the two states are identical; therefore a custom attribute _state_key has been added to the topology itself, to track whether a switch has been accepted
propose(current_system, current_topology[, …]) Custom proposal for NaphthaleneTestSystem will switch from current naphthalene “state” (either ‘naphthalene-A’ or ‘naphthalene-B’) to the other

Attributes

chemical_state_list
static canonicalize_smiles(smiles)

Convert a SMILES string into canonical isomeric smiles

Parameters:
smiles : str

Any valid SMILES for a molecule

Returns:
iso_can_smiles : str

OpenEye isomeric canonical smiles corresponding to the input

static clean_molecule_list(smiles_list, atom_opts, bond_opts)

A utility function to determine which molecules can be proposed from any other molecule.

Parameters:
smiles_list
atom_opts
bond_opts
Returns:
safe_smiles
removed_smiles
compute_state_key(topology)[source]

For this test system, the topologies for the two states are identical; therefore a custom attribute _state_key has been added to the topology itself, to track whether a switch has been accepted

compute_state_key will return topology._state_key rather than SMILES, because SMILES are identical in the two states.

propose(current_system, current_topology, current_metadata=None)[source]

Custom proposal for NaphthaleneTestSystem will switch from current naphthalene “state” (either ‘naphthalene-A’ or ‘naphthalene-B’) to the other

This proposal engine can only be used with input topology of naphthalene, and propose() will first confirm naphthalene is residue “MOL” The topology may have water but should not have any other carbon-containing residue.

The “new” system and topology are deep copies of the old, but the atom_map is custom defined to only match one of the two rings.