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

Description Usage Arguments Value Author(s) See Also Examples

View source: R/matrix.R

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

1

Arguments

mol

A jobjRef object with Java class IAtomContainer

Value

A N \times N numeric matrix

Author(s)

Rajarshi Guha rajarshi.guha@gmail.com

See Also

get.connection.matrix

Examples

1
2
m <- parse.smiles("CC=C")[[1]]
get.adjacency.matrix(m)

Example output

Loading required package: rcdklibs
Loading required package: rJava
     [,1] [,2] [,3]
[1,]    0    1    0
[2,]    1    0    1
[3,]    0    1    0

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