Dear all
 
  I am using cdk via R software. 
 
  EStateAtomTypeMatcher match carbon atoms in benzene with "SdsCH", but it 
should be "SaaCH".
 
  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"
 
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to