-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On May 4, 2008, at 1:26 PM, yuandao chen wrote:
>
> > library(rJava)
> > library(fingerprint)
> > library(rcdk)
> > mol <- parse.smiles("C1=CC=CC=C1")
> > convert.implicit.to.explicit(mol)
> > atoms <- get.atoms(mol)
>
> > 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")})
Hi, it looks like you need to set the ring set before calling
findMatchingAtomType.
So after converting the implicit H's to explicit you should then
determine the ringset. The Java code would be
IRingSet rs = null;
try {
AllRingsFinder arf = new AllRingsFinder();
rs = arf.findAllRings(mol);
} catch (Exception e) {
//blah
}
Then, before calling findMatchingAtom type, you need to give the
ringset to the matcher. The Java code would be
matcher.setRingSet(rs)
After that, you will get the proper EState atom type for the carbons
- -------------------------------------------------------------------
Rajarshi Guha <[EMAIL PROTECTED]>
GPG Fingerprint: D070 5427 CC5B 7938 929C DD13 66A1 922C 51E7 9E84
- -------------------------------------------------------------------
Nothing spoils fun like finding out it builds character"
-Calvin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
iEYEARECAAYFAkgeiz4ACgkQZqGSLFHnnoSyogCfTTPWiZMOmaCNcEawfIvOXOmY
UwsAn2JRyGz1ACYo4gy4Yn2MBuJ7+3NN
=0JCo
-----END PGP SIGNATURE-----
-------------------------------------------------------------------------
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