Skip to content

Commit

Permalink
fix: updated smiles search with sort order
Browse files Browse the repository at this point in the history
  • Loading branch information
CS76 committed Jun 3, 2024
1 parent 757c5e1 commit beba591
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/Livewire/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,11 @@ public function render()

if ($queryType == 'smiles' || $queryType == 'substructure') {
$statement =
"select id, COUNT(*) OVER () from mols where m@>'".
"select id, COUNT(*) OVER () from fps where mfp2%morganbv_fp('".
$this->query.
"' limit ".
"') order by morganbv_fp(mol_from_smiles('".
$this->query.
"'))<%>mfp2 limit ".
$this->size.
' offset '.
$offset;
Expand Down Expand Up @@ -176,7 +178,9 @@ public function render()
$statement =
"select id, COUNT(*) OVER () from fps where mfp2%morganbv_fp('".
$this->query.
"') limit ".
"') order by morganbv_fp(mol_from_smiles('".
$this->query.
"'))<%>mfp2 limit ".
$this->size.
' offset '.
$offset;
Expand Down

0 comments on commit beba591

Please sign in to comment.