I think that there are different SMART definitions used for substructure searching in the jsp-example and for searching with the isMatching("") method in the MDGEnerator class.
I have a small database and a "substructure search" with the .jsp example returns two molecules containing "CC(N)(O)c1ccccc1" (search string displayed in the tomcat command prompt).
On the other hand, I set a bit in a custom fingerprint if a call of
returns true. So this Bit should be set to "1" for two molecules in the database, but it is to 0 for every molecule. Can you tell me why? Until now everything seemed to work fine with the custom fingerprint, the other bits for the molecules seem to be set correctly (perhaps there the interpretation of the SMART-Strings is the same?).
Szabolcs
Joined: 03 Jun 2004
Posts: 956
ChemAxon personnel
Most probably the problem is that your query "CC(N)(O)c1ccccc1" is both valid in smiles and in smarts. The main difference here is the handling of uppercase symbols: when interpreted as smarts, these get an extra aliphatic query flag, and will only match aliphatic atoms. (See figure attached.)
I presume that you pasted this string into the canvas of the marvin applet in the jsp example. This interprets it as smiles because no smarts features are present. If you want to import your string as smarts, you have to follow these steps:
1. select Edit/Source
2. select Format/SMARTS in the pop-up window
3. paste your smarts string into the text area of the window
4. select File/Import SMARTS.
isMatching() uses SMARTS in the sample code, but actually it is not isMatching() that sets SMARTS mode. Instead, the query structure is read in as SMARTS. You find the corresponding code in the constructor (in the original example):
Code:
public MaccsGenerator() {
search = new MolSearch();
smartsReader = new MolHandler();
smartsReader.setQueryMode( true ); // this makes the trick!!!
elemAnal = new ElementalAnalyser();
arom = new Aromata();
}
The query structure in the JSP example is interpreted as SMILES, because it does not contain any specific query property that could only bbe represented in SMARTS.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum