setproperty: Set A Property On A Molecule

Description Usage Arguments Value Author(s) See Also Examples

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

1
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 ([email protected])

See Also

get.property, get.properties, remove.property

Examples

1
2
3
4
5
smiles <- 'c1ccccc1'
mol <- parse.smiles(smiles)[[1]]
set.property(mol, 'prop1', 23.45)
set.property(mol, 'prop2', 'inactive')
get.properties(mol)

rcdk documentation built on Sept. 26, 2018, 9:05 a.m.