Пример #1
0
def standardize_smiles(smiles: str, tautomer: bool = False):
    r"""
    Apply smile standardization procedure. This is a convenient function wrapped arrounf RDKit
    smiles standardizer and tautomeric canonicalization.

    Args:
        smiles: Smiles to standardize
        tautomer: Whether to canonicalize tautomers

    Returns:
        standard_smiles: the standardized smiles
    """

    smiles = rdMolStandardize.StandardizeSmiles(smiles)
    if tautomer:
        smiles = canonicalize_tautomer_smiles(smiles)
    return smiles
Пример #2
0
 def test2StandardizeSmiles(self):
     self.assertEqual(rdMolStandardize.StandardizeSmiles("CCC(=O)O[Na]"),
                      "CCC(=O)[O-].[Na+]")