null_qry

Stops NULL queries.

Syntax

null_qry()

Description

null_qry() searches all display fields (field_d) in a window list for NULLs. If all field_d values are null and G.query_buf is null, true is returned and the query is not executed. If one or more fields have values, false is returned and the query is executed.

Example

This function is useful in large databases where a null query would take a long time to execute. It can be placed in the query mode section of the main window trigger of an application.

 {
 ...
     if (G.key in (key_f1,key_quit,key_f8)){
       if (G.key == key_f1){
         if (null_qry())                  /* stop null query         */
           ;
         else{
           window(current,query);         /* fire off the query trigger*/
 ...

sim_search

Searches a Merlin pool for similar structures.

Syntax

list    sim_srch(SMILES)
string  SMILES

Description

SMILES

hexadecimal ...

SMILES string is submitted to the Merlin search engine via the DayCGI. Forty similar SMILES with associated data are returned in an HTML document which is read into a memory list. The HTML tags are stripped and the list is formatted as follows:

similarity index, SMILES, structure number, CAS number

Notes

Use sim_srch() to search for similar structures via the DayCGI. The final list of structures can be merged with biological data for use in structure/activity analyses. An alternative approach is to run the merlin_search utility in Daylight RPC.

This RPC utility creates the same list of structures without the need to reformat an HTML document. In addition, the user can instruct Merlin on the pool to search, the field to search, the number of hits to return, and the minimum level of similarity.

Example

The following code might be run from an action button that reads a SMILES from the display.

 {
 list ll;
 ll=sim_srch(smi2hex("c1ccccc1"));
 list_view(ll,0);
 }


Updated 19 May 1999. Copyright DataAspects Corp. 1998-1999