Replaces a sub-structure, provided as SMILES or SMARTS, with the given mask.
rs.mask masks input sub-structure in reaction.
ms.mask masks input sub-structure in molecule.
rs.mask (substructure, mask, reaction, format = 'rsmi', standardize = TRUE,
explicitH = FALSE, recursive = FALSE)
ms.mask (substructure, mask, molecule, format = 'smiles', standardize = TRUE,
explicitH = FALSE, recursive = FALSE)Returns SMILES with mask.
SMILES or SMARTS of the structure to be searched and masked.
SMILES of structure to be used as mask.
Input reaction to be processed.
Input molecule to be processed.
specifies format of input reaction/molecule. It can be one of following for a reaction: 'RSMI' or 'RXN'; for a molecule: 'SMILES' or 'MOL'.
suppresses all explicit hydrogen if set as TRUE (default).
converts all implicit hydrogen to explicit if set as TRUE. It is set as FALSE by default.
if TRUE, all the occurrences of input sub-structure are replaced.
Varun Giri varungiri@gmail.com
The sub-structure is searched in input reaction/molecule and replaced with the mask. All the bonds between identified sub-structure and the remaining atoms are mapped to the mask. If mask contains more than one atom, all the bonds are connected to the last atom in mask. By default, the first identified sub-structure is replaced. To replace all occurrences, recursive should be set to TRUE. Valence is not checked for the mask atom and the final structure.
rs.makeDB
ms.mask('OP(=O)O', '[Cs]', 'O=P(O)(O)OP(=O)(O)OP(=O)(O)OCC3OC(n2cnc1c(ncnc12)N)C(O)C3O')
Run the code above in your browser using DataLab