From: sushil r. <ron...@gm...> - 2007-03-27 12:03:46
|
Well, i think one should go this way. package org.openscience.cdk.isomorphism.matchers.smarts; import org.openscience.cdk.interfaces.IAtom; /** * This matcher checks the formal charge of the Atom. * This cannot be matched with a unpreprocessed Atom! * * @cdk.module extra */ public class RingAtom extends SMARTSAtom { private static final long serialVersionUID = -3532280322660394553L; public boolean matches(IAtom atom) { return atom.getProperty("org.openscience.cdk.Atom.RingParticipation "); } public String toString() { // see it later } } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Now the Atom class should have a boolean variable called RingParticipation.And getter and setter method for the same. so next step will be adding this field in "org\openscience\cdk\Atom" class. Now determining where the atom is in ring... new SSSRFinder().findSSSR(molecule).contains(this.atom) as atom is IAtom this works finely. we have done.but i am uable to arrange the code. in "org\openscience\cdk\isomorphism" package we have our UniversalIsomorphismTester and a method "isSubgraph" here we have the access to molecule and the atom we want to test.But before going into the match method for this atom the ringparticipation should be perceived. Here i need a help.Please tell me how should we can do this... -- ******************************** sushil ronghe Center of Pharmacoinformatics India ********************************* |