schrodinger.livedesign.biologics.rdmol_hierarchy module¶
- schrodinger.livedesign.biologics.rdmol_hierarchy.add_substance_group(mol: Mol, atoms: list[rdkit.Chem.rdchem.Atom] = None, chains: set[str] = None)¶
Add a substance group to the RDMol. The RDMol is a mol consisting of atoms. The substance group groups these atoms within the mol creating relationships within the mol that denote the heirarchy.
- Parameters:
mol – RDMol object
atoms – A list of atoms to include in the substance group. If not supplied, the substance group will contain all the atoms in the mol.
chains – A set of chain IDs to include in the substance group.
- schrodinger.livedesign.biologics.rdmol_hierarchy.make_substance_group(mol: Mol, atoms: list[rdkit.Chem.rdchem.Atom])¶
Create a substance group in the RDMol with the given atoms.
- Parameters:
mol – RDMol object
atoms – List of atoms to include in the substance group
- schrodinger.livedesign.biologics.rdmol_hierarchy.extract_chain(mol: Mol, chain_name: str) Mol¶
Extract a specific chain from the RDMol.
- Parameters:
mol – RDMol object
chain_name – Chain ID to extract
- Returns:
RDMol object containing only the specified chain
- schrodinger.livedesign.biologics.rdmol_hierarchy.get_chain_atoms(mol: Mol, chain_names: list[str]) list[rdkit.Chem.rdchem.Atom]¶
Get all atoms in the RDMol that belong to a specific chain.
- Parameters:
mol – RDMol object
chain_names – Chain IDs to filter atoms by
- Returns:
List of atoms in the specified chain
- schrodinger.livedesign.biologics.rdmol_hierarchy.get_group_indices(mol: Mol) list[set[int]]¶
Get the indices of all the atoms in the substance groups of the RDMol.
- Parameters:
mol – RDMol object
- Returns:
List of sets, each set contains the indices of atoms in a substance group
- schrodinger.livedesign.biologics.rdmol_hierarchy.get_chemical_model(rdmol_binaries: list[tuple[str, int]]) Mol¶
Given a list of tuples containing rdmol_binary strings and their counts, return the corresponding chemical model.
- Parameters:
rdmol_binaries – A list of tuples containing rdmol_binary strings and their counts.
- Returns:
The corresponding chemical model.
- schrodinger.livedesign.biologics.rdmol_hierarchy.combine_chemical_models(chemical_models: list[rdkit.Chem.rdchem.Mol]) Mol¶
Given a list of chemical models, combine them into a single chemical model.
The function uses the CombineMols function from RDKit to combine the models. This function combines two molecules into one, and the function reduce from functools is used to apply this function iteratively to the list of chemical models.
- Parameters:
chemical_models – A list of chemical models.
- Returns:
The combined chemical model.
- schrodinger.livedesign.biologics.rdmol_hierarchy.is_single_smiles_monomer(monomer_mol: Mol) bool¶
Check if the given monomer mol is a single SMILES monomer.
- Parameters:
monomer_mol – Monomeric RDMol object
- Returns:
True if the mol is a single SMILES monomer, False otherwise
- schrodinger.livedesign.biologics.rdmol_hierarchy.is_single_chem_monomer(monomer_mol: Mol) bool¶
Check if the given monomer mol is a single CHEM monomer.
- Parameters:
monomer_mol – Monomeric RDMol object
- Returns:
True if the mol is a single CHEM monomer, False otherwise
- schrodinger.livedesign.biologics.rdmol_hierarchy.get_sequence_monomers(mol: Mol) list[rdkit.Chem.rdchem.Atom]¶
Get the monomers to use for sequence generation.
- Parameters:
mol – Chemical model
- Returns:
List of monomer RDMol objects
- schrodinger.livedesign.biologics.rdmol_hierarchy.get_monomer_fasta_sequence(monomers: list[rdkit.Chem.rdchem.Atom]) str¶
Convert a list of monomer RDMol objects to a monomer string.
- Parameters:
monomers – List of monomer RDMol objects
- Returns:
Monomer string
- schrodinger.livedesign.biologics.rdmol_hierarchy.get_monomer_single_letter_code(monomer: Atom) str¶
Get the residue name of a monomer RDMol object.
- Parameters:
monomer – Monomer RDMol object
- Returns:
Residue name
- schrodinger.livedesign.biologics.rdmol_hierarchy.get_mol_section_indices(monomers: list[rdkit.Chem.rdchem.Atom], start: int, end: int) list[int]¶
Get the atom indices corresponding to the given start and end indices in the monomer list.
- Parameters:
monomers – List of monomer RDMol objects
start – Start index (inclusive)
end – End index (inclusive)
- schrodinger.livedesign.biologics.rdmol_hierarchy.mutate_monomers(mol: Mol, mut_res_by_idx: dict[tuple[str, int], str])¶
Mutate monomers in the RDMol based on the provided mapping of (chain ID, residue number) to new residue names.
- Parameters:
mol – RDMol object
mut_res_by_idx – Dictionary mapping (chain ID, residue number) to new residue names
- schrodinger.livedesign.biologics.rdmol_hierarchy.remove_non_backbone_connections(mol: Mol) Mol¶
Remove all non-backbone connections from the given RDMol.
- Parameters:
mol – RDMol object
- Returns:
RDMol object with only backbone connections