find_substr_isomorph: Find all substructure isomorphisms

Description Usage Arguments Value Examples

Description

Finds all substructure isomorphisms.

Usage

1
find_substr_isomorph(substr_lab, substr_ct, str_lab, str_ct)

Arguments

substr_lab

labels for substructure

substr_ct

connection table for substructure

str_lab

labels for structure

str_ct

connection table for structure

Value

list of isomorphisms

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# Finds mol2 in mol1

# mol1
mol1_lab <- c("C", "C", "C", "C", "C", "N", "O")
mol1_ct <- matrix(0, nrow=7, ncol=7)
mol1_ct[1,2] <- mol1_ct[2,1] <- 1
mol1_ct[2,3] <- mol1_ct[3,2] <- 1
mol1_ct[3,4] <- mol1_ct[4,3] <- 1
mol1_ct[4,5] <- mol1_ct[5,4] <- 1
mol1_ct[5,6] <- mol1_ct[6,5] <- 2
mol1_ct[1,6] <- mol1_ct[6,1] <- 1
mol1_ct[4,7] <- mol1_ct[7,4] <- 2

# mol2
mol2_lab <- c("O", "C", "C", "N")
mol2_ct <- matrix(0, nrow=4, ncol=4)
mol2_ct[1,2] <- mol2_ct[2,1] <- 2
mol2_ct[2,3] <- mol2_ct[3,2] <- 1
mol2_ct[3,4] <- mol2_ct[4,3] <- 2

isomorph <- find_substr_isomorph(mol2_lab, mol2_ct, mol1_lab, mol1_ct)

cinf documentation built on May 2, 2019, 5 p.m.