schrodinger.rdkit_extensions module

schrodinger::rdkit_extensions C++ wrappers

class schrodinger.rdkit_extensions.ChainType

Bases: Enum

PEPTIDE = 0
RNA = 1
DNA = 2
CHEM = 3
class schrodinger.rdkit_extensions.CompressionType

Bases: Enum

UNKNOWN = 0
GZIP = 1
ZSTD = 2
class schrodinger.rdkit_extensions.Format

Bases: Enum

AUTO_DETECT = 0
RDMOL_BINARY_BASE64 = 1
SMILES = 2
EXTENDED_SMILES = 3
SMARTS = 4
EXTENDED_SMARTS = 5
MDL_MOLV2000 = 6
MDL_MOLV3000 = 7
MAESTRO = 8
INCHI = 9
INCHI_KEY = 10
PDB = 11
MOL2 = 12
XYZ = 13
MRV = 14
CDXML = 15
HELM = 16
FASTA_PEPTIDE = 17
FASTA_DNA = 18
FASTA_RNA = 19
FASTA = 20
PSE = 'PSE'
FMP = 'FMP'
CUSTOM_ENTITY = 'CUSTOM_ENTITY'
class schrodinger.rdkit_extensions.Sanitization

Bases: Enum

FULL = 0
PARTIAL = 1
class schrodinger.rdkit_extensions.MonomerInfo(symbol: str, polymer_type: str | None = None, natural_analog: str | None = None, smiles: str | None = None, core_smiles: str | None = None, name: str | None = None, monomer_type: str | None = None, author: str | None = None, pdbcode: str | None = None)

Bases: object

symbol: str
polymer_type: str | None = None
natural_analog: str | None = None
smiles: str | None = None
core_smiles: str | None = None
name: str | None = None
monomer_type: str | None = None
author: str | None = None
pdbcode: str | None = None
__init__(symbol: str, polymer_type: str | None = None, natural_analog: str | None = None, smiles: str | None = None, core_smiles: str | None = None, name: str | None = None, monomer_type: str | None = None, author: str | None = None, pdbcode: str | None = None) None
schrodinger.rdkit_extensions.UseModernStereoPerception()
schrodinger.rdkit_extensions.get_mol_layers(original_molecule: Mol, data_field_names: Optional[Iterable] = None) {<HashLayer.ESCAPE: 2>, <HashLayer.SGROUP_DATA: 6>, <HashLayer.TAUTOMER_HASH: 7>, <HashLayer.NO_STEREO_TAUTOMER_HASH: 5>, <HashLayer.CANONICAL_SMILES: 1>, <HashLayer.FORMULA: 3>, <HashLayer.NO_STEREO_SMILES: 4>}

Wrapper function for RDKit’s RegistrationHash.GetMolLayers that enables the v2 tautomer hash.

We prefer this function over calling RDKit directly because this allows us to centralize the calls and make sure we always use the v2 hash, which has several improvement’s over v1, which is the default in RDKit. (e.g. deduplication of keto/enol tautomers; see SHARED-9769)

schrodinger.rdkit_extensions.get_file_format(filename)

LD often passes in just the extension as the filename (ie .json), and pathlib.Path.suffix will return an empty string in that case. We need to handle that explicitly here to match the behavior of boost::filesystem::path used in the C++ implementation.