Technical Support Forum Index
Technical Support Forum
Access ChemAxon scientists and developers here. For confidential or other support please email.
The time now is Sat Jul 04, 2009 11:27 pm
 <b>Register</b> (required to post and download)Register (required to post and download)
 Username:    Password:   Remember login       
 FAQFAQ   SearchSearch   DigestsDigests 
Controlling the number of substructure matches!!
To watch this topic for replies  Register (enables digests) or give email address:
Reply to topic    Home -> Forums -> Support -> Storage & search: JChem Base /Cartridge -> Controlling the number of substructure matches!!

Display posts from previous:        View previous topic :: View next topic    
Author Message
dragos
Joined: 30 Sep 2004
Posts: 46


View user's profile



Back to top
Post subject: Controlling the number of substructure matches!!
Link to postPosted: Wed Apr 23, 2008 8:52 am  Reply with quote

Hi - the enclosed java code should, when provided with the "-uniquess" flag (unique SubStructure) be so kind and return, out of the data base in question, ONLY compounds including a SINGLE occurrence of the given query (passed as "-q query-smarts-or-whatever-file"). It does not, although I extensively played around with (what I though to be) both deprecated & non-deprecated syntaxes for MatchCountOptions setting & getting. Whatever I do... I get the same hit list, in which molecules with multiple occurrences happily show up - however, only ONE of their incarnations of the matched substructure is green-colored in the substructure-sensitive .mrv output formats. Could one get them ALL colored?

You can watch this live on http://infochim.u-strasbg.fr/webserv/VSEngine.html

(login, select the query tool and then create a "ChemAxon" subquery, which will give you the option to do default or Unique substructure matching.)

I need the unique stuff, as you may well guess, for chemical filtering trying to avoid picking compound with multiple reactive groups...

By the way, none of my attempts to see "what's in its head" by trying getMatchCountOptions.toString() or .toList() did not enlighten me at all. Why can't we just keep it simple: rather than imagining more and more weird data types one does not know how to deal with, an Option String is a String is a String (and may serve on Brasilian beaches as well).

Cheers!



 Filename: sssDB.java    Filesize: 7.52 KB    Downloaded: 185 Time(s)
 Description:  It's unix text, forgot to make it Bill Gates-compliant, sorry!
ebuki
Joined: 03 Jan 2006
Posts: 160
ChemAxon personnel

View user's profile

Visit poster's website

Back to top
Post subject:
Link to postPosted: Fri Apr 25, 2008 6:31 pm  Reply with quote

Perhaps this is a bug in JChem, I'm investigating this.
Could you describe me your JChem version?

Thanks, Edvard
dragos
Joined: 30 Sep 2004
Posts: 46


View user's profile



Back to top
Post subject:
Link to postPosted: Sat Apr 26, 2008 8:09 am  Reply with quote

Good point - think it's 5.0 if my neuron remembers well!
Szilard
Joined: 21 May 2004
Posts: 935
ChemAxon personnel

View user's profile

Visit poster's website

Back to top
Post subject:
Link to postPosted: Tue Apr 29, 2008 12:52 pm  Reply with quote

Hi,

I took a quick look at your code and it had several syntax problems.
Maybe it did not compile and you were running an older class version, that's why you saw now change in behavior ?

Please find the syntactically fixed file attached.
(have not checked semantically yet)

Best regards,

Szilard



 Filename: sssDB.java    Filesize: 7.55 KB    Downloaded: 177 Time(s)
 Description:  The syntactically fixed code
Szilard
Joined: 21 May 2004
Posts: 935
ChemAxon personnel

View user's profile

Visit poster's website

Back to top
Post subject:
Link to postPosted: Tue Apr 29, 2008 1:20 pm  Reply with quote

Hi,

This was a bug in the 5.0.x series.
A parameter was not passed on, the setting (either the old or the new way) had no effect at all.
We have fixed it, it will work fine from the next release.

Some comments about the following line in your code:

Code:
searchOptions.setMatchCountOptions(" < ",2);


- Please use "<" instead, no leading a trailing spaces are accepted.
(otherwise it will throw an exception in the fixed version)

- Please be aware the ("<",2) also includes hits with 0 occurrence of the query substructure: only those structures are excluded these there are 2 or more hits.
I suggest ("=",1) to achieve the original goal.

Best regards,

Szilard
dragos
Joined: 30 Sep 2004
Posts: 46


View user's profile



Back to top
Post subject:
Link to postPosted: Mon May 05, 2008 2:28 pm  Reply with quote

Thanks a lot for solving this quickly! Actually, I have no syntax troubles when compiling with my blend of javac (maybe it's due to l'exception culturelle française, by Nico BlingBling Sarko).
As far as the "=",1 is concerned - that's what I tried in the first place, it was only due to despair that I finished up trying funny stuff such as "<",2... but I never would have guessed that "&lt" should be right (DOCUMENTATION!!!)

See you tomorrow; Cheers!
Szilard
Joined: 21 May 2004
Posts: 935
ChemAxon personnel

View user's profile

Visit poster's website

Back to top
Post subject:
Link to postPosted: Mon May 05, 2008 8:39 pm  Reply with quote

Quote:
but I never would have guessed that "&lt" should be right (DOCUMENTATION!!!)
Please note that in the notification e-mail these characters are not displayed right, just when viewing the html in the forum. It was a "less than" sign.

I'll ask what can we do about this.

Cheers,

Szilard
Display posts from previous:   
Reply to topic    Home -> Forums -> Storage & search: JChem Base /Cartridge -> Controlling the number of substructure matches!! All times are GMT + 1 Hour
Page 1 of 1
To watch this topic for replies   Register (enables digests) or give email address  
Jump to:  
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