Hi,

I would like to generate Murcko framework for my library (a big Zinc
subset). But for now, I'm just trying to do it for a few smiles :)
After a bit of googling and java initiation (not so easy for me :) -
thanks to Rajarshi, Egon, Christian and other who let some pieces of
code there and there!), CDK seems to do what I want.

But, in the case I tried, the Murcko framework is not the same for an
aromatic phenyl (c1ccccc1 - gives saturated cycle) and for a "double
bond" phenyl (C1=CC=CC=C1 - stays unsaturated).

I tested these two smiles:
CCCNCC1=CC(CC2CC2)=CC=C1 which gives C=1C=CC=C(C=1)CC2CC2 (seems OK to me)
and
CCCNCc1cccc(CC2CC2)c1 which gives C1CCCC(C1)CC2CC2 (saturated cyclohexyl).

Is it what is expected?

Below is the code I used.

Many thanks if you can have a look at it,
Regards,
Pascal


import org.openscience.cdk.interfaces.*; // I had so much errors when
I tried snippets of code that I lost patience and put * everywhere
import org.openscience.cdk.*;
import org.openscience.cdk.exception.*;
import org.openscience.cdk.graph.*;
import org.openscience.cdk.ringsearch.*;
import org.openscience.cdk.smiles.*;
import org.openscience.cdk.atomtype.*;
import org.openscience.cdk.tools.*;
import org.openscience.cdk.tools.manipulator.*;

public class ex {
        public static void main(String args[]) throws Exception {
                
                GenerateFragments gf=new GenerateFragments(); // Should this 
line be
reproduced for each molecule? (eg gf1, gf2...)
                boolean bol = true; // A boolean for the generateMurckoFragments
function - is it right?

                IMolecule mol = null;
                SmilesParser sp1 = new 
SmilesParser(DefaultChemObjectBuilder.getInstance());
                mol = sp1.parseSmiles("CCCNCC1=CC(CC2CC2)=CC=C1"); // I'm sure 
it
could be possible to read file.smi and go through it - if anybody has
an example code...? Thanks :)
                System.out.println("CCCNCC1=CC(CC2CC2)=CC=C1");
                gf.generateMurckoFragments(mol,bol,bol,3);
                String[] smiles1=gf.getMurckoFrameworksAsSmileArray();
                for (int i = 0; i < smiles1.length; i++) { // But there is only 
one
MurckoFramework for a molecule, isn't it?
                        System.out.println(smiles1[i]);
                }
                
                mol = null;
                SmilesParser sp2 = new 
SmilesParser(DefaultChemObjectBuilder.getInstance());
                mol = sp2.parseSmiles("CCCNCc1cccc(CC2CC2)c1");
                System.out.println("CCCNCc1cccc(CC2CC2)c1");
                gf.generateMurckoFragments(mol,bol,bol,3);
                String[] smiles2=gf.getMurckoFrameworksAsSmileArray();
                System.out.println(smiles2[0]);
        }
}



Compiled and executed with
javac -classpath /opt/CDK/CDK_1.2.7/cdk-1.2.7.jar ex.java
java -classpath .:/opt/CDK/CDK_1.2.7/cdk-1.2.7.jar ex

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to