RDKit: RDKit::MolFragmenter Namespace Reference

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
Classes | Functions
RDKit::MolFragmenter Namespace Reference

## Classes
struct | FragmenterBondType

## Functions
RDKIT_CHEMTRANSFORMS_EXPORT ROMol * | fragmentOnBonds (const ROMol &mol, const std::vector< unsigned int > &bondIndices, bool addDummies=true, const std::vector< std::pair< unsigned int, unsigned int > > *dummyLabels=nullptr, const std::vector< Bond::BondType > *bondTypes=nullptr, std::vector< unsigned int > *nCutsPerAtom=nullptr)
| Fragments a molecule by breaking a set of bonds.
RDKIT_CHEMTRANSFORMS_EXPORT ROMol * | fragmentOnBonds (const ROMol &mol, const std::vector< FragmenterBondType > &bondPatterns, const std::map< unsigned int, ROMOL_SPTR > *atomEnvirons=nullptr, std::vector< unsigned int > *nCutsPerAtom=nullptr)
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
RDKIT_CHEMTRANSFORMS_EXPORT void | fragmentOnSomeBonds (const ROMol &mol, const std::vector< unsigned int > &bondIndices, std::vector< ROMOL_SPTR > &resMols, unsigned int maxToCut=1, bool addDummies=true, const std::vector< std::pair< unsigned int, unsigned int > > *dummyLabels=nullptr, const std::vector< Bond::BondType > *bondTypes=nullptr, std::vector< std::vector< unsigned int > > *nCutsPerAtom=nullptr)
RDKIT_CHEMTRANSFORMS_EXPORT ROMol * | fragmentOnBRICSBonds (const ROMol &mol)
| Fragments a molecule by breaking all BRICS bonds.
RDKIT_CHEMTRANSFORMS_EXPORT void | constructFragmenterAtomTypes (std::istream *inStream, std::map< unsigned int, std::string > &defs, const std::string &comment="//", bool validate=true, std::map< unsigned int, ROMOL_SPTR > *environs=nullptr)
RDKIT_CHEMTRANSFORMS_EXPORT void | constructFragmenterAtomTypes (const std::string &str, std::map< unsigned int, std::string > &defs, const std::string &comment="//", bool validate=true, std::map< unsigned int, ROMOL_SPTR > *environs=nullptr)
RDKIT_CHEMTRANSFORMS_EXPORT void | constructBRICSAtomTypes (std::map< unsigned int, std::string > &defs, std::map< unsigned int, ROMOL_SPTR > *environs=nullptr)
RDKIT_CHEMTRANSFORMS_EXPORT void | constructFragmenterBondTypes (std::istream *inStream, const std::map< unsigned int, std::string > &atomTypes, std::vector< FragmenterBondType > &defs, const std::string &comment="//", bool validate=true, bool labelByConnector=true)
RDKIT_CHEMTRANSFORMS_EXPORT void | constructFragmenterBondTypes (const std::string &str, const std::map< unsigned int, std::string > &atomTypes, std::vector< FragmenterBondType > &defs, const std::string &comment="//", bool validate=true, bool labelByConnector=true)
RDKIT_CHEMTRANSFORMS_EXPORT void | constructBRICSBondTypes (std::vector< FragmenterBondType > &defs)

## Function Documentation

## ◆ constructBRICSAtomTypes()

RDKIT_CHEMTRANSFORMS_EXPORT void RDKit::MolFragmenter::constructBRICSAtomTypes | ( | std::map< unsigned int, std::string > & | defs,
|  | std::map< unsigned int, ROMOL_SPTR > * | environs = nullptr )

References RDKIT_CHEMTRANSFORMS_EXPORT.

## ◆ constructBRICSBondTypes()

RDKIT_CHEMTRANSFORMS_EXPORT void RDKit::MolFragmenter::constructBRICSBondTypes | ( | std::vector< FragmenterBondType > & | defs | ) |

References RDKIT_CHEMTRANSFORMS_EXPORT.

## ◆ constructFragmenterAtomTypes() [1/2]

RDKIT_CHEMTRANSFORMS_EXPORT void RDKit::MolFragmenter::constructFragmenterAtomTypes | ( | const std::string & | str,
|  | std::map< unsigned int, std::string > & | defs,
|  | const std::string & | comment = "//",
|  | bool | validate = true,
|  | std::map< unsigned int, ROMOL_SPTR > * | environs = nullptr )

References RDKIT_CHEMTRANSFORMS_EXPORT.

## ◆ constructFragmenterAtomTypes() [2/2]

RDKIT_CHEMTRANSFORMS_EXPORT void RDKit::MolFragmenter::constructFragmenterAtomTypes | ( | std::istream * | inStream,
|  | std::map< unsigned int, std::string > & | defs,
|  | const std::string & | comment = "//",
|  | bool | validate = true,
|  | std::map< unsigned int, ROMOL_SPTR > * | environs = nullptr )

References RDKIT_CHEMTRANSFORMS_EXPORT.

## ◆ constructFragmenterBondTypes() [1/2]

RDKIT_CHEMTRANSFORMS_EXPORT void RDKit::MolFragmenter::constructFragmenterBondTypes | ( | const std::string & | str,
|  | const std::map< unsigned int, std::string > & | atomTypes,
|  | std::vector< FragmenterBondType > & | defs,
|  | const std::string & | comment = "//",
|  | bool | validate = true,
|  | bool | labelByConnector = true )

References RDKIT_CHEMTRANSFORMS_EXPORT.

## ◆ constructFragmenterBondTypes() [2/2]

RDKIT_CHEMTRANSFORMS_EXPORT void RDKit::MolFragmenter::constructFragmenterBondTypes | ( | std::istream * | inStream,
|  | const std::map< unsigned int, std::string > & | atomTypes,
|  | std::vector< FragmenterBondType > & | defs,
|  | const std::string & | comment = "//",
|  | bool | validate = true,
|  | bool | labelByConnector = true )

References RDKIT_CHEMTRANSFORMS_EXPORT.

## ◆ fragmentOnBonds() [1/2]

RDKIT_CHEMTRANSFORMS_EXPORT ROMol * RDKit::MolFragmenter::fragmentOnBonds | ( | const ROMol & | mol,
|  | const std::vector< FragmenterBondType > & | bondPatterns,
|  | const std::map< unsigned int, ROMOL_SPTR > * | atomEnvirons = nullptr,
|  | std::vector< unsigned int > * | nCutsPerAtom = nullptr )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

References RDKIT_CHEMTRANSFORMS_EXPORT.

## ◆ fragmentOnBonds() [2/2]

RDKIT_CHEMTRANSFORMS_EXPORT ROMol * RDKit::MolFragmenter::fragmentOnBonds | ( | const ROMol & | mol,
|  | const std::vector< unsigned int > & | bondIndices,
|  | bool | addDummies = true,
|  | const std::vector< std::pair< unsigned int, unsigned int > > * | dummyLabels = nullptr,
|  | const std::vector< Bond::BondType > * | bondTypes = nullptr,
|  | std::vector< unsigned int > * | nCutsPerAtom = nullptr )

Fragments a molecule by breaking a set of bonds.

Parameters

  mol | - the molecule to be modified
  bondIndices | - indices of the bonds to be broken

optional:

Parameters

  addDummies | - toggles addition of dummy atoms to indicate where bonds were broken
  dummyLabels | - used to provide the labels to be used for the dummies. the first element in each pair is the label for the dummy that replaces the bond's beginAtom, the second is for the dummy that replaces the bond's endAtom. If not provided, the dummies are labeled with atom indices.
  bondTypes | - used to provide the bond type to use between the fragments and the dummy atoms. If not provided, defaults to single.
  nCutsPerAtom | - used to return the number of bonds that were cut at each atom. Should be nAtoms long.

Returns
  a new ROMol with the modifications The client is responsible for deleting this molecule. Unless bondTypes is provided, the bonds to the new dummy atoms will be of the same type as the bond that is broken, and any queries on the broken bonds transferred to the new bonds.

References RDKIT_CHEMTRANSFORMS_EXPORT.

## ◆ fragmentOnBRICSBonds()

RDKIT_CHEMTRANSFORMS_EXPORT ROMol * RDKit::MolFragmenter::fragmentOnBRICSBonds | ( | const ROMol & | mol | ) |

Fragments a molecule by breaking all BRICS bonds.

Returns
  a new ROMol with the modifications The client is responsible for deleting this molecule.

References RDKIT_CHEMTRANSFORMS_EXPORT.

## ◆ fragmentOnSomeBonds()

RDKIT_CHEMTRANSFORMS_EXPORT void RDKit::MolFragmenter::fragmentOnSomeBonds | ( | const ROMol & | mol,
|  | const std::vector< unsigned int > & | bondIndices,
|  | std::vector< ROMOL_SPTR > & | resMols,
|  | unsigned int | maxToCut = 1,
|  | bool | addDummies = true,
|  | const std::vector< std::pair< unsigned int, unsigned int > > * | dummyLabels = nullptr,
|  | const std::vector< Bond::BondType > * | bondTypes = nullptr,
|  | std::vector< std::vector< unsigned int > > * | nCutsPerAtom = nullptr )

References RDKIT_CHEMTRANSFORMS_EXPORT.