schrodinger.livedesign.convert module

schrodinger.livedesign.convert.convert(data: str, input_format: schrodinger.rdkit_extensions.Format, output_format: schrodinger.rdkit_extensions.Format, additional_properties: Optional[Dict] = None) str

Main entrypoint for converting one serialization to another. A few convenience functions are provided below for common LD conversions.

Parameters
  • data – input text string

  • input_format – expected format for input string

  • output_format – desired format for output string

Returns

converted text string

schrodinger.livedesign.convert.set_properties(mol: rdkit.Chem.rdchem.Mol, new_props: dict)
Parameters
  • mol – molecule to set given properties on

  • new_props – map of properties to add onto the molecule

schrodinger.livedesign.convert.rdkit_to_sdf(mol: rdkit.Chem.rdchem.Mol) str
Parameters

input – given RDKit mol

Returns

corresponding sdf molblock

schrodinger.livedesign.convert.get_sd_reader(molblocks: str) Iterator[Union[rdkit.Chem.rdchem.Mol, ValueError]]
Parameters

molblocks – string of sdf molblocks

Returns

generator that provides mols from sdf molblocks or ValueError if the SDF cannot be read

schrodinger.livedesign.convert.add_hs_to_aromatic_nitrogen(mol)

Intended to be used with molecules which have kekulization failures due to aromatic system(s) containing Ns where the user hasn’t provided the location of the implicit Hs in the system.

This picks an arbitrary (but canonical) aromatic N to add an H to in each aromatic system.

Returns the original mol if it can’t fix it.