Dear:
I have sent a mail to egonw, and he suggests me to sent mail to this mailbox. I
have some questions about CDK to consult you. I'm a graduate of lanzhou 
university
in China, and we want implement a substructure query by utilizing CDK. Because 
the
CDK provide the SMARTS-org.openscience.cdk.smiles.smarts. When i run the example
as following:
public class Test {

        public static void main(String[] args) throws CDKException {
                SmilesParser sp = new SmilesParser();
                AtomContainer atomContainer = (AtomContainer) sp
                                
.parseSmiles("NC5NCNC1C5(NCN1C2OC(C(O)C2(O))C(OP(O)(=O)OP(O)(=O)OP(O)(O)=O)c3c
cc4c(O)cccc4(c3))");
                QueryAtomContainer query = SMARTSParser.parse("C1CCCCC1");//or 
these
SMILES:("c1ccc2ccccc2(c1)");//("c1ccccc1");
                boolean queryMatch = UniversalIsomorphismTester.isSubgraph(
                                atomContainer, query);
                if (queryMatch)
                        System.out.println("successful");
                else
                        System.out.println("failed");
        }

}

an exception occured:
Exception in thread "main" org.openscience.cdk.exception.CDKException: The 
string
C1CCCCC1 is not a valid SMARTS string: Encountered "1" at line 1, column 2.
Was expecting one of:
    <EOF> 
    "*" ...
    "a" ...
    "A" ...
    "[" ...
    and so on
    ...
the string of SMILES can not be the int number? but it is everywhere in SMILES.
what should i do? do you have any good ideas?

and the following is Egon's answer of my question, but i still don't know what 
to
do:
That's because a SMILES is not always a valid SMARTS... they basically are
two different languages.


thanks a lot!

best regards!



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to