Learn R Programming

RxnSim (version 1.0.1)

rs.mask: Masks a Sub-structure in Input Molecule or Reaction

Description

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.

Usage

rs.mask (substructure, mask, reaction, format = 'rsmi', standardize = T, explicitH = F, recursive = F) ms.mask (substructure, mask, molecule, format = 'smiles', standardize = T, explicitH = F, recursive = F)

Arguments

substructure
SMILES or SMARTS of the structure to be searched and masked.
mask
SMILES of structure to be used as mask.
reaction
Input reaction to be processed.
molecule
Input molecule to be processed.
format
specifies format of input reaction/molecule. It can be one of following for a reaction: 'RSMI' or 'RXN'; for a molecule: 'SMILES' or 'MOL'.
standardize
suppresses all explicit hydrogen if set as TRUE (default).
explicitH
converts all implicit hydrogen to explicit if set as TRUE. It is set as FALSE by default.
recursive
if TRUE, all the occurrences of input sub-structure are replaced.

Value

Returns SMILES with mask.

Details

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.

See Also

rs.makeDB

Examples

Run this code
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