Learn R Programming

rcdk (version 3.4.7.1)

get.adjacency.matrix: Get adjacency matrix for a molecule.

Description

The adjacency matrix for a molecule with \(N\) non-hydrogen atoms is an \(N \times N\) matrix where the element [\(i\),\(j\)] is set to 1 if atoms \(i\) and \(j\) are connected by a bond, otherwise set to 0.

Usage

get.adjacency.matrix(mol)

Arguments

mol

A jobjRef object with Java class IAtomContainer

Value

A \(N \times N\) numeric matrix

See Also

get.connection.matrix

Examples

Run this code
# NOT RUN {
m <- parse.smiles("CC=C")[[1]]
get.adjacency.matrix(m)
# }

Run the code above in your browser using DataLab