buildSmiles: Build SMILES from R groups

Description Usage Arguments Value Author(s) See Also Examples

View source: R/BuildStructandSeries.R

Description

This function performs basic string manipulation on SMILES codes to generate systematic homologues, facilitaing the generation of identifiers for structures that may not exist in databases for use in MS workflows. This requires a decent understanding of SMILES as the text manipulation can have unexpected consequences. This does not perform any advanced chemical processing. Using large ranges over many R groups will result in combinatorial explosion; for these cases structure generation is recommended. SMILES are built with the RtoSMILES function.

Usage

1
buildSmiles(genSmiles, R1toN, nR1toN, ExtraAtoms_R1toN=NULL, RDB_R1toN=NULL)

Arguments

genSmiles

A "Generic" SMILES code to expand, with R groups encoded in square brackets. The first group can be "[R]" or "[R1]", subsequent groups should be numbered systematically (e.g. "[R2]", "[R3]", ...). Examples "O=S(O)(=O)OCCO[R1]C[R2]", "CCO[R]CCO"

R1toN

A vector containing 1 to n SMILES entries representing the repeating unit. One entry per R group is required, comma separated and enclosed in brackets. Examples "(C,C,C)", "(C,CCO)".

nR1toN

The range for each R group (start-end,start-end, ...,start-end). If a single range is given for n R groups, this should be split in advance with splitRrange

ExtraAtoms_R1toN

(optional, to be removed from this function and handled in advance). Extra atoms to be added to beginning or end of R group. Must be valid SMILES to generate valid structures. Use with caution.

RDB_R1toN

(optional, to be removed from this function and handled in advance). Unsaturation to be added to beginning or end of R group. Must be valid SMILES to generate valid structures. Use with caution - double-bond stereochemistry is not created.

Value

Returns a vector containing the resulting SMILES codes

Author(s)

Emma Schymanski <emma.schymanski@uni.lu>

See Also

RtoSMILES, splitRrange, adjustRgroup, To view created SMILES: renderSMILES.CDKdepict, renderSMILES.rcdk.

Examples

1
2
test_smiles <- "P(=O)(OC[C@H](COP(=O)(O)OC[C@H](OC(=O)[R2])COC(=O)[R1])O)(O)OC[C@H](OC(=O)[R4])COC(=O)[R3]"
buildSmiles(test_smiles,"(C,C,C,C)","(1-3,1-3,1-3,1-3)")

schymane/RChemMass documentation built on Jan. 25, 2021, 5:45 a.m.