get.property: Get a property value of the molecule.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/props.R

Description

This function retrieves the value of a keyed property that has previously been set on the molecule. Properties enable us to associate arbitrary pieces of data with a molecule. Such data can be text, numeric or a Java object (represented as a 'jobjRef').

Usage

1
get.property(molecule, key)

Arguments

molecule

The molecule to query. Should be a 'jobjRef' representing an 'IAtomContainer'

key

The property key as a character string

Value

The value of the property. If there is no property with the specified key, 'NA' is returned

Author(s)

Rajarshi Guha (rajarshi.guha@gmail.com)

See Also

set.property, get.properties

Examples

1
2
3
4
mol <- parse.smiles("CC1CC(C=O)CCC1")[[1]]
set.property(mol, 'prop1', 23.45)
set.property(mol, 'prop2', 'inactive')
get.property(mol, 'prop1')

rcdk documentation built on March 13, 2020, 1:30 a.m.