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.
Author
Rajarshi Guha rajarshi.guha@gmail.com
Examples
m <- parse.smiles("CC=C")[[1]]
get.adjacency.matrix(m)
#>      [,1] [,2] [,3]
#> [1,]    0    1    0
#> [2,]    1    0    1
#> [3,]    0    1    0
