set.property {rcdk}R Documentation

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

Author(s)

Rajarshi Guha (rguha@indiana.edu)

See Also

get.property, get.properties, remove.property

Examples

smiles <- 'c1ccccc1'
mol <- parse.smiles(smiles)
set.property(mol, 'prop1', 23.45)
set.property(mol, 'prop2', 'inactive')
get.properties(mol)

[Package rcdk version 2.9.2 Index]