Learn R Programming

rcdk (version 3.1.8.1)

set.property: Set A Property On A Molecule

Description

This function allows one to add a keyed property to a molecule. The key must be a string, but the value can be string, numeric or even an arbitrary Java object (of class jobjRef)

Usage

set.property(molecule, key, value)

Arguments

molecule
A Java object of class IAtomContainer
key
A string naming the property
value
The value of the property. This can be character, integer, double or of class jobjRef

Value

  • None

See Also

get.property, get.properties, remove.property

Examples

Run this code
smiles <- 'c1ccccc1'
mol <- parse.smiles(smiles)[[1]]
set.property(mol, 'prop1', 23.45)
set.property(mol, 'prop2', 'inactive')
get.properties(mol)

Run the code above in your browser using DataLab