Beispiel #1
0
     }
     if ($ostype == 2) {
         $matchresult = filterthroughcmd2("{$qstruct} ", "{$mmcmd}");
     }
 }
 $br = explode("\n", $matchresult);
 for ($i = 0; $i < $bi; $i++) {
     if (strpos($br[$i], ":T") !== FALSE) {
         $hits++;
         // output of the hits, if they are not too many...
         if ($hits > $maxhits) {
             echo "</table>\n<hr>\n";
             echo "<br>Too many hits (>{$maxhits})! Aborting....<br>\n</body></html>\n";
             exit;
         }
         showHit($b[$i], "");
         if ($enable_download == "y" && $hits_s <= $download_limit) {
             $hits_s++;
             if (strlen($hitlist_s) > 0) {
                 $hitlist_s .= ",";
             }
             $hitlist_s .= $db_id . ":" . $b[$i];
         }
     }
     // else echo "<br>miss: $b[$i]<br>\n";
 }
 if ($use_cmmmsrv == "y") {
     $qstruct = '';
 } else {
     $qstruct = $safemol;
 }
Beispiel #2
0
 $nhits = mysql_num_rows($result);
 if ($nhits > 0) {
     echo "<table width=\"100%\">\n";
     while ($line = mysql_fetch_array($result)) {
         $item_id = $line[$idname];
         $hits++;
         // output of the hits, if they are not too many...
         if ($hits > $maxhits) {
             echo "</table>\n";
             echo "<p>Too many hits (>{$maxhits})! Aborting....</p>\n";
             echo "</body>\n";
             echo "</html>\n";
             exit;
         }
         if ($dbtype == 1) {
             showHit($item_id, "");
             if ($enable_download == "y" && $hits_s <= $download_limit) {
                 $hits_s++;
                 if (strlen($hitlist_s) > 0) {
                     $hitlist_s .= ",";
                 }
                 $hitlist_s .= $db_id . ":" . $item_id;
             }
         }
         if ($dbtype == 2) {
             showHitRxn($item_id, "");
             if ($enable_download == "y" && $hits_r <= $download_limit) {
                 $hits_r++;
                 if (strlen($hitlist_r) > 0) {
                     $hitlist_r .= ",";
                 }
Beispiel #3
0
 $result = mysql_query($qstr) or die("Query failed (#1b1)!");
 $hits = 0;
 $nhits = mysql_num_rows($result);
 $nhitstotal = $nhitstotal + $nhits;
 while ($line = mysql_fetch_array($result)) {
     $mol_id = $line['mol_id'];
     $hits++;
     // output of the hits, if they are not too many...
     if ($hits > $maxhits) {
         echo "</table>\n<hr>\n";
         echo "<p>Too many hits (>{$maxhits})! Aborting....</p>\n";
         echo "</body>\n";
         echo "</html>\n";
         exit;
     }
     showHit($mol_id, "");
     if ($enable_download == "y" && $hits_s <= $download_limit) {
         $hits_s++;
         if (strlen($hitlist_s) > 0) {
             $hitlist_s .= ",";
         }
         $hitlist_s .= $db_id . ":" . $mol_id;
     }
 }
 // end while($line)...
 mysql_free_result($result);
 // get total number of structures in the database
 $n_qstr = "SELECT COUNT(mol_id) AS count FROM {$molfgbtable};";
 $n_result = mysql_query($n_qstr) or die("Could not get number of entries!");
 while ($n_line = mysql_fetch_array($n_result, MYSQL_ASSOC)) {
     $n_structures = $n_line["count"];
Beispiel #4
0
 if ($hits > 1) {
     echo ", sorted by similarity";
 }
 echo " (Tanimoto index in parentheses, relative weight of functional similarity = {$fsim100}%)</small><p />\n";
 if ($hits > 0) {
     $hitlist = "";
     for ($h = 0; $h < $hits; $h++) {
         $hit_id = $hit[$h][0];
         $hit_s = $hit[$h][1];
         $hit_s_formatted = "(" . sprintf("%1.4f", $hit_s) . ")";
         $db_id = $hit[$h][2];
         $dbprefix = $prefix . "db" . $db_id . "_";
         $molstructable = $dbprefix . $molstrucsuffix;
         $moldatatable = $dbprefix . $moldatasuffix;
         $pic2dtable = $dbprefix . $pic2dsuffix;
         showHit($hit_id, $hit_s_formatted);
         if ($h < $download_limit) {
             if (strlen($hitlist) > 0) {
                 $hitlist .= ",";
             }
             $hitlist .= $db_id . ":" . $hit_id;
         }
         //echo "hit $h: $hit_id ($hit_s)<br>\n";
     }
 }
 echo "</table>\n<hr>\n";
 if ($nsel == 0) {
     echo "no structure data collection selected!<br>\n<hr>\n";
 }
 echo "{$nastr}";
 $time_end = getmicrotime();