Atoms {rcdk} | R Documentation |
Operations on Atoms
Description
get.symbol
returns the chemical symbol for an atom
get.point3d
returns the 3D coordinates of the atom
get.point2d
returns the 2D coordinates of the atom
get.atomic.number
returns the atomic number of the atom
get.hydrogen.count
returns the number of implicit H’s on the atom.
Depending on where the molecule was read from this may be NULL
or an integer greater than or equal to 0
get.charge
returns the partial charge on the atom. If charges
have not been set the return value is NULL
, otherwise
the appropriate charge.
get.formal.charge
returns the formal charge on the atom. By
default the formal charge will be 0
(i.e., NULL
is never returned)
is.aromatic
returns TRUE
if the atom is aromatic,
FALSE
otherwise
is.aliphatic
returns TRUE
if the atom is part of an
aliphatic chain, FALSE
otherwise
is.in.ring
returns TRUE
if the atom is in a ring,
FALSE
otherwise
get.atom.index
eturns the index of the atom in the molecule
(starting from 0
)
get.connected.atoms
returns a list of atoms that are connected to the specified atom
Usage
get.symbol(atom) get.point3d(atom) get.point2d(atom) get.atomic.number(atom) get.hydrogen.count(atom) get.charge(atom) get.formal.charge(atom) get.connected.atoms(atom, mol) get.atom.index(atom, mol) is.aromatic(atom) is.aliphatic(atom) is.in.ring(atom) set.atom.types(mol)
Arguments
atom A jobjRef representing an IAtom object mol A jobjRef representing an IAtomContainer object
Value
In the case of get.point3d
the return value is a 3-element vector
containing the X, Y and Z co-ordinates of the atom. If the atom does not
have 3D coordinates, it returns a vector of the form c(NA,NA,NA)
.
Similarly for get.point2d
, in which case the return vector is of
length 2
.
Author(s)
Rajarshi Guha (rajarshi.guha@gmail.com)