Chem.rdmolfiles

Package Chem :: Module rdmolfiles |
[hide private]
[frames] | no frames]

# Module rdmolfiles

    Module containing RDKit functionality for working with molecular file formats.

Classes | [hide private]
| SDMolSupplier A class which supplies molecules from an SD file.
| SDWriter A class for writing molecules to SD files.
| SmilesMolSupplier A class which supplies molecules from a text file.
| SmilesWriter A class for writing molecules to text files.
| TDTMolSupplier A class which supplies molecules from a TDT file.
| TDTWriter A class for writing molecules to TDT files.

Functions | [hide private]
MolFromMolBlock(...) MolFromMolBlock( (str)molBlock [, (bool)sanitize=True [, (bool)removeHs=True]]) -> Mol : Construct a molecule from a Mol block. | source code
MolFromMolFile(...) MolFromMolFile( (str)molFileName [, (bool)sanitize=True [, (bool)removeHs=True]]) -> Mol : Construct a molecule from a Mol file. | source code
MolFromSmarts(...) MolFromSmarts( (str)SMARTS [, (bool)mergeHs=False]) -> Mol : Construct a molecule from a SMARTS string. | source code
MolFromSmiles(...) MolFromSmiles( (str)SMILES [, (bool)sanitize=True]) -> Mol : Construct a molecule from a SMILES string. | source code
MolFromTPLBlock(...) MolFromTPLBlock( (str)tplBlock [, (bool)sanitize=True [, (bool)skipFirstConf=False]]) -> Mol : Construct a molecule from a TPL block. | source code
MolFromTPLFile(...) MolFromTPLFile( (str)fileName [, (bool)sanitize=True [, (bool)skipFirstConf=False]]) -> Mol : Construct a molecule from a TPL file. | source code
MolToMolBlock(...) MolToMolBlock( (Mol)mol [, (bool)includeStereo=False [, (int)confId=-1]]) -> str :... | source code
MolToSmarts(...) MolToSmarts( (Mol)mol [, (bool)isomericSmiles=False]) -> str : Returns a SMARTS string for a molecule ARGUMENTS: - mol: the molecule - isomericSmarts: (optional) include information about stereochemistry in the SMARTS. | source code
MolToSmiles(...) MolToSmiles( (Mol)mol [, (bool)isomericSmiles=False [, (bool)kekuleSmiles=False [, (int)rootedAtAtom=-1]]]) -> str : Returns the canonical SMILES string for a molecule ARGUMENTS: - mol: the molecule - isomericSmiles: (optional) include information about stereochemistry in the SMILES. | source code
MolToTPLBlock(...) MolToTPLBlock( (Mol)mol [, (str)partialChargeProp='_GasteigerCharge' [, (bool)writeFirstConfTwice=False]]) -> str : Returns the Tpl block for a molecule. | source code
MolToTPLFile(...) MolToTPLFile( (Mol)mol, (str)fileName [, (str)partialChargeProp='_GasteigerCharge' [, (bool)writeFirstConfTwice=False]]) -> None : Writes a molecule to a TPL file. | source code
SmilesMolSupplierFromText(...) SmilesMolSupplierFromText( (str)text [, (str)delimiter=' ' [, (int)smilesColumn=0 [, (int)nameColumn=1 [, (bool)titleLine=True [, (bool)sanitize=True]]]]]) -> SmilesMolSupplier :... | source code

Function Details | [hide private]

### MolFromMolBlock(...) | source code
    MolFromMolBlock( (str)molBlock [, (bool)sanitize=True [, (bool)removeHs=True]]) -> Mol :
        Construct a molecule from a Mol block.

          ARGUMENTS:

            - molBlock: string containing the Mol block

            - sanitize: (optional) toggles sanitization of the molecule.
              Defaults to 1.

            - removeHs: (optional) toggles removing hydrogens from the molecule.
              This only make sense when sanitization is done.
              Defaults to true.

          RETURNS:

            a Mol object, None on failure.

        C++ signature :
            RDKit::ROMol* MolFromMolBlock(std::string [,bool=True [,bool=True]])

### MolFromMolFile(...) | source code
    MolFromMolFile( (str)molFileName [, (bool)sanitize=True [, (bool)removeHs=True]]) -> Mol :
        Construct a molecule from a Mol file.

          ARGUMENTS:

            - fileName: name of the file to read

            - sanitize: (optional) toggles sanitization of the molecule.
              Defaults to true.

            - removeHs: (optional) toggles removing hydrogens from the molecule.
              This only make sense when sanitization is done.
              Defaults to true.

          RETURNS:

            a Mol object, None on failure.

        C++ signature :
            RDKit::ROMol* MolFromMolFile(char const* [,bool=True [,bool=True]])

### MolFromSmarts(...) | source code
    MolFromSmarts( (str)SMARTS [, (bool)mergeHs=False]) -> Mol :
        Construct a molecule from a SMARTS string.

          ARGUMENTS:

            - SMARTS: the smarts string

            - mergeHs: (optional) toggles the merging of explicit Hs in the query into the attached
              atoms.  So, for example, 'C[H]' becomes '[C;!H0]'.
              Defaults to 0.

          RETURNS:

            a Mol object, None on failure.

        C++ signature :
            RDKit::ROMol* MolFromSmarts(char const* [,bool=False])

### MolFromSmiles(...) | source code
    MolFromSmiles( (str)SMILES [, (bool)sanitize=True]) -> Mol :
        Construct a molecule from a SMILES string.

          ARGUMENTS:

            - SMILES: the smiles string

            - sanitize: (optional) toggles sanitization of the molecule.
              Defaults to 1.

          RETURNS:

            a Mol object, None on failure.

        C++ signature :
            RDKit::ROMol* MolFromSmiles(std::string [,bool=True])

### MolFromTPLBlock(...) | source code
    MolFromTPLBlock( (str)tplBlock [, (bool)sanitize=True [, (bool)skipFirstConf=False]]) -> Mol :
        Construct a molecule from a TPL block.

          ARGUMENTS:

            - fileName: name of the file to read

            - sanitize: (optional) toggles sanitization of the molecule.
              Defaults to True.

            - skipFirstConf: (optional) skips reading the first conformer.
              Defaults to False.
              This should be set to True when reading TPLs written by
              the CombiCode.

          RETURNS:

            a Mol object, None on failure.

        C++ signature :
            RDKit::ROMol* MolFromTPLBlock(std::string [,bool=True [,bool=False]])

### MolFromTPLFile(...) | source code
    MolFromTPLFile( (str)fileName [, (bool)sanitize=True [, (bool)skipFirstConf=False]]) -> Mol :
        Construct a molecule from a TPL file.

          ARGUMENTS:

            - fileName: name of the file to read

            - sanitize: (optional) toggles sanitization of the molecule.
              Defaults to True.

            - skipFirstConf: (optional) skips reading the first conformer.
              Defaults to False.
              This should be set to True when reading TPLs written by
              the CombiCode.

          RETURNS:

            a Mol object, None on failure.

        C++ signature :
            RDKit::ROMol* MolFromTPLFile(char const* [,bool=True [,bool=False]])

### MolToMolBlock(...) | source code
    MolToMolBlock( (Mol)mol [, (bool)includeStereo=False [, (int)confId=-1]]) -> str :
        Returns the a Mol block for a molecule
          ARGUMENTS:

            - mol: the molecule
            - includeStereo: (optional) toggles inclusion of stereochemical
                             information in the output
            - confId: (optional) selects which conformation to output (-1 = default)

          RETURNS:

            a string

        C++ signature :
            std::string MolToMolBlock(RDKit::ROMol [,bool=False [,int=-1]])

### MolToSmarts(...) | source code
    MolToSmarts( (Mol)mol [, (bool)isomericSmiles=False]) -> str :
        Returns a SMARTS string for a molecule
          ARGUMENTS:

            - mol: the molecule
            - isomericSmarts: (optional) include information about stereochemistry in
              the SMARTS.  Defaults to false.

          RETURNS:

            a string

        C++ signature :
            std::string MolToSmarts(RDKit::ROMol {lvalue} [,bool=False])

### MolToSmiles(...) | source code
    MolToSmiles( (Mol)mol [, (bool)isomericSmiles=False [, (bool)kekuleSmiles=False [, (int)rootedAtAtom=-1]]]) -> str :
        Returns the canonical SMILES string for a molecule
          ARGUMENTS:

            - mol: the molecule
            - isomericSmiles: (optional) include information about stereochemistry in
              the SMILES.  Defaults to false.
            - kekuleSmiles: (optional) use the Kekule form (no aromatic bonds) in
              the SMILES.  Defaults to false.
            - rootedAtAtom: (optional) if non-negative, this forces the SMILES
              to start at a particular atom. Defaults to -1.

          RETURNS:

            a string

        C++ signature :
            std::string MolToSmiles(RDKit::ROMol {lvalue} [,bool=False [,bool=False [,int=-1]]])

### MolToTPLBlock(...) | source code
    MolToTPLBlock( (Mol)mol [, (str)partialChargeProp='_GasteigerCharge' [, (bool)writeFirstConfTwice=False]]) -> str :
        Returns the Tpl block for a molecule.

          ARGUMENTS:

            - mol: the molecule
            - partialChargeProp: name of the property to use for partial charges
              Defaults to '_GasteigerCharge'.
            - writeFirstConfTwice: Defaults to False.
              This should be set to True when writing TPLs to be read by
              the CombiCode.

          RETURNS:

            a string

        C++ signature :
            std::string MolToTPLBlock(RDKit::ROMol [,std::string='_GasteigerCharge' [,bool=False]])

### MolToTPLFile(...) | source code
    MolToTPLFile( (Mol)mol, (str)fileName [, (str)partialChargeProp='_GasteigerCharge' [, (bool)writeFirstConfTwice=False]]) -> None :
        Writes a molecule to a TPL file.

          ARGUMENTS:

            - mol: the molecule
            - fileName: name of the file to write
            - partialChargeProp: name of the property to use for partial charges
              Defaults to '_GasteigerCharge'.
            - writeFirstConfTwice: Defaults to False.
              This should be set to True when writing TPLs to be read by
              the CombiCode.

        C++ signature :
            void MolToTPLFile(RDKit::ROMol,std::string [,std::string='_GasteigerCharge' [,bool=False]])

### SmilesMolSupplierFromText(...) | source code
    SmilesMolSupplierFromText( (str)text [, (str)delimiter=' ' [, (int)smilesColumn=0 [, (int)nameColumn=1 [, (bool)titleLine=True [, (bool)sanitize=True]]]]]) -> SmilesMolSupplier :

        C++ signature :
            RDKit::SmilesMolSupplier* SmilesMolSupplierFromText(std::string [,std::string=' ' [,int=0 [,int=1 [,bool=True [,bool=True]]]]])