I have a list of parent molecules in SMILES form, and I was running the 
SQT against a list of SMARTS queries, to make sure that all my queries 
were valid.  It works great until it hits Petrichloral.  The SMILES and 
SMARTS strings parse fine, but there is no more output when the SQT runs 
into this query (currently 264/326), so I believe there might be a 
possible recursivity problem.  There was no CDKException thrown even after 
an hour, even though the first 263 queries ran in 15 seconds. Petrichloral 
is very symmetric, and daylight's depict.cgi runs the query fine with 
31104 matches:  apparently (4*3*2)(3*2)^4.  I was purposely running a dot 
product iteration here so thet's why there is no inner loop.  I tried 
formatting the SMARTS with and without brackets. 

SMILES ------>
ClC(Cl)(Cl)C(O)OCC(COC(O)C(Cl)(Cl)Cl)(COC(O)C(Cl)(Cl)Cl)COC(O)C(Cl)(Cl)Cl
SMARTS ------> 
ClC(Cl)(Cl)[CH]([O-,OH,OC])O[CH2]C([CH2]O[CH]([O-,OH,OC])C(Cl)(Cl)Cl)([CH2]O[CH]([O-,OH,OC])C(Cl)(Cl)Cl)[CH2]O[CH]([O-,OH,OC])C(Cl)(Cl)Cl
 
 

public static void main(String[] args) throws CDKException, 
FileNotFoundException, IOException {

        SmilesParser sp=new 
SmilesParser(DefaultChemObjectBuilder.getInstance());
        ArrayList<String> smarts=new ArrayList();
        ArrayList<String> mols=new ArrayList();
        String smart=new String();
        String mol=new String();
        AtomContainerSet acs=new AtomContainerSet();
 
       BufferedReader br1=new BufferedReader(new 
FileReader("smarts.txt"));
        while ((smart=br1.readLine()) != null){
            smarts.add(smart);
        }
        br1.close();
 
       BufferedReader br2=new BufferedReader(new 
FileReader("subStructures.txt"));
       while ((mol=br2.readLine()) != null){
            mols.add(mol);
            acs.addAtomContainer(sp.parseSmiles(mol));
         }
        br2.close();
 
        BufferedWriter stream= new BufferedWriter(new 
FileWriter("deaOut.txt", true));
        SMARTSQueryTool sqt=new SMARTSQueryTool("c1ccccc1");    //dummy 
string for initialization
        for (int ac=0; ac != acs.getAtomContainerCount(); ac++){
            sqt.setSmarts(smarts.get(ac));
            System.out.println(""+ac);     //for debugging purposes
            try {
                if (sqt.matches(acs.getAtomContainer(ac))){
                stream.write(mols.get(ac) + " | " + smarts.get(ac));
                stream.newLine();
                }
            }
            catch (CDKException ex){throw new 
CDKException(ex.toString());}
        }
        stream.close();
    }
}

This message and any files transmitted with it are the property of
Sigma-Aldrich Corporation, are confidential, and are intended
solely for the use of the person or entity to whom this e-mail is
addressed.  If you are not one of the named recipient(s) or
otherwise have reason to believe that you have received this
message in error, please contact the sender and delete this message
immediately from your computer.  Any other use, retention,
dissemination, forwarding, printing, or copying of this e-mail is
strictly prohibited.
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to