On Nov 13, 2007, at 2:49 PM, Javi Muriel Zafra wrote:

>
> Hi all!
> I need to know how I can obtain the no common structure between two  
> molecules.
> I use the method UniversalIsomorphismTester.getOverlaps to get the  
> MCSS. Then I need to know, furthermore MCSS between this molecules,  
> the no common structure in each molecule.

Note that if you want the substructure of X that is not part of the  
MCSS between X & Y, you may have more than one substructure. As an  
example consider

CSC1CC1NC and C1CC1CCC

The MCSS is C1CC1. But the uncommon parts for the first one will be  
CS and NC and the uncommon part of the second one will be just CCC

If this is what you want, then see http:// 
cheminfo.informatics.indiana.edu/~rguha/code/java/NoMCSS.java

>  I do the following:
>
> // This method return the no common structure between m and mcs,  
> where mcs is the mcss between m and another molecule
> // So, if I remove from m the bonds which appear in mcs, I have the  
> no common structure, but don't work exactly.
>  public static Molecule getneedle(Molecule m, Molecule mcs) {
>      Molecule needle = new Molecule(m);
>      Vector idlist = new Vector();
>
>      List l = null;
>      try{
>       l = UniversalIsomorphismTester.getSubgraphMaps(m, mcs);

It is easier if you use getSubgraphAtomsMaps, since we can then  
remove atoms and associated bonds in one go

Once you have deleted atoms and bonds, you will in general end up  
with a molecule that has disconnected components. Using the  
ConnectivityChecker it is easy to create a IMoleculeSet from such a  
molecule. The contents of the IMoleculeSet are the 'uncommon' parts  
of a molecule (i.e., the molecule minus the MCSS)

-------------------------------------------------------------------
Rajarshi Guha  <[EMAIL PROTECTED]>
GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04  06F7 1BB9 E634 9B87 56EE
-------------------------------------------------------------------

If you believe in telekinesis, raise my hand.



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to