pyCRS.Input

This submodule provides functions used to initialize a pyCRS.Molecule.

pyCRS.Input.read_sdf(filename: str)pyCRS_internal.Molecule
Parameters

filename (string) – the .sdf file containing the input molecule

Example

import pyCRS
mol = pyCRS.Input.read_sdf("molecule.sdf")
pyCRS.Input.read_smiles(smiles: str)pyCRS_internal.Molecule
Parameters

smiles (string) – the SMILES string to be used

Example

import pyCRS
mol = pyCRS.Input.read_smiles("c1ccccc1(OCC)")
mol = pyCRS.Input.read_smiles("c1cccccdfg1(OCC)")
print ("Check if the molecule is valid:", mol.is_valid)