test_isomorph: Finds mol2 in mol1

Description Usage Arguments Examples

Description

Finds mol2 in mol1

Usage

1

Arguments

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
test_isomorph <- function() {
  # 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)
}

conmolfields documentation built on May 2, 2019, 4:18 p.m.