Ring Systems
- class RingSystemFinder[source]
A class to identify ring systems
Initialize susbstructure search objects to identify key functionality
- tag_bonds_to_preserve(mol)[source]
Assign the property “protected” to all ring carbonyls, etc. :type mol: :param mol: input molecule :return: None
- static cleave_linker_bonds(mol)[source]
Cleave bonds that are not in rings and not protected :type mol: :param mol: input molecule :return: None
- cleanup_fragments(mol, keep_dummy=False)[source]
Split a molecule containing multiple ring systems into individual ring systems :type keep_dummy: :param keep_dummy: retain dummy atoms :type mol: :param mol: input molecule :return: a list of SMILES corresponding to individual ring systems
- static fix_bond_stereo(mol)[source]
Loop over double bonds and change stereo specification for double bonds that don’t have stereo :type mol: :param mol: input RDKit molecule :return: output RDKit molecule
- find_ring_systems(mol, keep_dummy=False, as_mols=False)[source]
Find the ring systems for an RDKit molecule :type as_mols: :param as_mols: return results a molecules (otherwise return SMILES) :type keep_dummy: :param keep_dummy: retain dummy atoms :type mol: :param mol: input molecule :return: a list of SMILES corresponding to individual ring systems
- create_ring_dictionary(input_chemreps, output_csv)[source]
Read the ChEMBL chemreps.txt file, extract ring systems, write out ring systems and frequency :type input_chemreps: :param input_chemreps: ChEMBL chemreps file :type output_csv: :param output_csv: output csv file :return: None
- build_ring_systems_dataframe(res)[source]
Build a DataFrame with ring system information and minimum frequency.
- Parameters:
res (
list) – List of ring system results for each molecule.- Return type:
DataFrame- Returns:
DataFrame with columns for ring systems, min ring, and min frequency.
- class RingSystemLookup(ring_file=None, ignore_stereo=False)[source]
Lookup ring systems from a dictionary of rings and frequencies
- process_mol(mol_in)[source]
find ring systems in an RDKit molecule :type mol_in: :param mol_in: input molecule :return: list of SMILES for ring systems
- process_smiles(smi)[source]
find ring systems from a SMILES :type smi: :param smi: input SMILES :return: list of SMILES for ring systems
- test_ring_system_lookup(input_filename, output_filename)[source]
Test for RingSystemLookup :type input_filename: :param input_filename: input smiles file :type output_filename: :param output_filename: output csv file :return: None
- get_min_ring_frequency(ring_list)[source]
Get minimum frequency from RingSystemLookup.process_smiles
- Parameters:
ring_list – output from RingSystemLookup.process_smiles
- Returns:
[ring_with minimum frequency, minimum frequency], acyclic molecules return [“”,-1]
- get_spiro_atoms(mol)[source]
Get atoms that are part of a spiro fusion
- Parameters:
mol – input RDKit molecule
- Returns:
a list of atom numbers for atoms that are the centers of spiro fusions