ChemAxon a3d59b832c
14-10-2006 07:38:32
Quote: |
I am testing Jchem. I wonder if I can query one structure which conain a fragment AND do not contain another fragment? |
For example, if you would like to search for molecules which contain a hydroxyl group but not a carbonyl group, you can use this expression:
Code: |
$ evaluate -e 'match("CO") && !match("C=O")' CCCCO CCCCC O=CCCO 1 0 0 |
In the above case, I used command-line program evaluate, but Chemical Terms language can be used in different environments as well, like searching in the database with JChem Base or Cartridge, as filter or reactivity condition in Reactor, filter for the jcsearch program, used within Java programs, etc.
When using for querying in the database, it is more efficient if you use the carbonyl as the query and use "!match("C=O")" as the filter.
There are further ways you can combine multiple queries, but they do not apply for this particular case. (Recursive smarts, --and, --or options of jcsearch, alternative queries in the Cartridge, etc.) Let me know if you are interested in any of them.
Best regards,
Szabolcs