get.adjacency.matrix {rcdk}R Documentation

Get adjacency matrix for a molecule.

Description

The adjacency matrix for a molecule with NN non-hydrogen atoms is an N×NN \times N matrix where the element [ii,jj] is set to 1 if atoms ii and jj 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×NN \times N numeric matrix

Author(s)

Rajarshi Guha rajarshi.guha@gmail.com

See Also

get.connection.matrix

Examples

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

[Package rcdk version 3.8.1 Index]