rdkit_utilities.rdmolfiles
rdkit_utilities.py RDKit utilities
- rdkit_utilities.rdmolfiles.MolFromInput(molInput, *args, inputFormat=None, orderByMapNumber=False, clearAtomMapNumbers=False, **kwargs)[source]
Construct RDKit Mol from input with optional format.
This accepts any input that RDKit can parse, and looks for the appropriate function to load the data.
- Parameters
molInput (str) – Molecule data or filename
*args – Passed to the RDKit parsing function
inputFormat – Format of molInput. If not given, it’s guessed from the extension of the filename, or all of RDKit’s content parsers are tried one-by-one.
orderByMapNumber (bool) – Whether to reorder the molecule by atom map number
clearAtomMapNumbers (bool) – Whether to remove / set all atom map numbers to 0
- Parameters
molInput (str) –
inputFormat (Optional[Literal['fasta', 'helm', 'mol', 'mol2', 'pdb', 'png', 'seq', 'sequence', 'smarts', 'smiles', 'svg', 'tpl']]) –
orderByMapNumber (bool) –
clearAtomMapNumbers (bool) –
- Return type
Optional[Mol]