perses.rjmc.topology_proposal.PremappedSmallMoleculeSetProposalEngine¶
-
class
perses.rjmc.topology_proposal.
PremappedSmallMoleculeSetProposalEngine
(atom_mapper: perses.rjmc.topology_proposal.SmallMoleculeAtomMapper, system_generator: perses.rjmc.topology_proposal.SystemGenerator, residue_name: str = 'MOL', storage: perses.storage.storage.NetCDFStorageView = None)[source]¶ This proposal engine uses the SmallMoleculeAtomMapper to have all atoms premapped and the proposal distribution pre-formed and checked. It is intended to be substantially faster, as well as more robust (having excluded mappings that would not lead to a valid geometry proposal)
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)Given a topology, come up with a state key string. propose
(current_system, current_topology[, …])Propose the next state, given the current state -
__init__
(atom_mapper: perses.rjmc.topology_proposal.SmallMoleculeAtomMapper, system_generator: perses.rjmc.topology_proposal.SystemGenerator, residue_name: str = 'MOL', storage: perses.storage.storage.NetCDFStorageView = None)[source]¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(atom_mapper, system_generator, …)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)Given a topology, come up with a state key string. propose
(current_system, current_topology[, …])Propose the next state, given the current state 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)¶ Given a topology, come up with a state key string. For this class, the state key is an isomeric canonical SMILES.
Parameters: - topology : app.Topology object
The topology object in question.
Returns: - chemical_state_key : str
isomeric canonical SMILES
-
propose
(current_system, current_topology, current_smiles=None, proposed_mol=None, map_index=None, current_metadata=None)[source]¶ Propose the next state, given the current state
Parameters: - current_system : openmm.System object
the system of the current state
- current_topology : app.Topology object
the topology of the current state
- current_smiles : str, default None
Specify the current SMILES string to avoid perceiving it from the topology. If None, perceive from topology.
- proposed_mol : oechem.OEMol, optional
the molecule to propose. If None, choose randomly based on the current molecule
- map_index : int, default None
The index of the atom map to use. If None, choose randomly. Otherwise, use map idx of map_index mod n_maps
- current_metadata : dict
dict containing current smiles as a key
Returns: - proposal : TopologyProposal object
topology proposal object