#640 EStateAtomTypeMatcher cannot match aromatic type

cdk-1.0.x
closed
Rajarshi Guha
5
2012-11-03
2008-05-05
Yuandao Chen
No

EStateAtomTypeMatcher match carbon atoms in benzene with "SdsCH", but it should be "SaaCH".

I am using cdk via Rcdk (R 2.70,rcdk 2.8.1).

R code and results are as following:

library(rJava)
library(fingerprint)
library(rcdk)
mol <- parse.smiles("C1=CC=CC=C1")
convert.implicit.to.explicit(mol)
atoms <- get.atoms(mol)

cdkConstants <- .jnew("org/openscience/cdk/CDKConstants")
isAromatic <- lapply(atoms,function(a) {.jcall(a,"Z","getFlag",.jfield(cdkConstants,"I","ISAROMATIC"))})
print(isAromatic)
[[1]]
[1] TRUE
[[2]]
[1] TRUE
[[3]]
[1] TRUE
[[4]]
[1] TRUE
[[5]]
[1] TRUE
[[6]]
[1] TRUE
[[7]]
[1] FALSE
[[8]]
[1] FALSE
[[9]]
[1] FALSE
[[10]]
[1] FALSE
[[11]]
[1] FALSE
[[12]]
[1] FALSE

EstateMatcher <- .jnew("org/openscience/cdk/atomtype/EStateAtomTypeMatcher")
findAtomType <- lapply(atoms,function(a) {.jcall(EstateMatcher,"Lorg/openscience/cdk/interfaces/IAtomType;","findMatchingAtomType",mol,a)})
EstateAtomType <- lapply(findAtomType,function(a) {.jcall(a,"Ljava/lang/String;","getAtomTypeName")})
print(EstateAtomType)
[[1]]
[1] "SdsCH"
[[2]]
[1] "SdsCH"
[[3]]
[1] "SdsCH"
[[4]]
[1] "SdsCH"
[[5]]
[1] "SdsCH"
[[6]]
[1] "SdsCH"
[[7]]
[1] "SsH"
[[8]]
[1] "SsH"
[[9]]
[1] "SsH"
[[10]]
[1] "SsH"
[[11]]
[1] "SsH"
[[12]]
[1] "SsH"

Discussion

  • Rajarshi Guha
    Rajarshi Guha
    2008-05-05

    Logged In: YES
    user_id=349408
    Originator: NO

    The code is working OK. The caller must set the ringset on the matcher object by a prior call to AllRingsFinder