Skip to content

Commit

Permalink
fix: advanced search issue fix
Browse files Browse the repository at this point in the history
  • Loading branch information
CS76 committed Dec 11, 2024
1 parent 0e89a30 commit b600bb8
Show file tree
Hide file tree
Showing 4 changed files with 337 additions and 59 deletions.
1 change: 1 addition & 0 deletions app/Console/Commands/GeneratePropertiesJson.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public function handle()

// Determine the key for the JSON output
$key = $invertedFilterMap[$column] ?? $column;
$columnData['key'] = $key;

// Add the column data using the determined key
$jsonOutput[$key] = $columnData;
Expand Down
25 changes: 15 additions & 10 deletions app/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -441,25 +441,30 @@ function getFilterMap()
return [
'mf' => 'molecular_formula',
'mw' => 'molecular_weight',
'emw' => 'exact_molecular_weight',
'hac' => 'heavy_atom_count',
'tac' => 'total_atom_count',
'arc' => 'aromatic_ring_count',
'arc' => 'aromatic_rings_count',
'rbc' => 'rotatable_bond_count',
'mrc' => 'minimal_number_of_rings',
'mrc' => 'number_of_minimal_rings',
'fc' => 'formal_charge',
'cs' => 'contains_sugar',
'crs' => 'contains_ring_sugars',
'cls' => 'contains_linear_sugars',
'npl' => 'np_likeness_score',
'np' => 'np_likeness',
'qed' => 'qed_drug_likeliness',
'alogp' => 'alogp',
'topopsa' => 'topo_psa',
'fsp3' => 'fsp3',
'hba' => 'h_bond_acceptor_count',
'hbd' => 'h_bond_donor_count',
'topopsa' => 'topological_polar_surface_area',
'fcsp3' => 'fractioncsp3',
'fragments' => 'fragments',
'fws' => 'fragments_with_sugar',
'hba' => 'hydrogen_bond_acceptors',
'hbd' => 'hydrogen_bond_donors',
'ro5v' => 'rule_of_5_violations',
'lhba' => 'lipinski_h_bond_acceptor_count',
'lhbd' => 'lipinski_h_bond_donor_count',
'lro5v' => 'lipinski_rule_of_5_violations',
'lhba' => 'hydrogen_bond_acceptors_lipinski',
'lhbd' => 'hydrogen_bond_donors_lipinski',
'lro5v' => 'lipinski_rule_of_five_violations',
'vdwv' => 'van_der_walls_volume',
'ds' => 'found_in_databases',
'class' => 'chemical_class',
'subclass' => 'chemical_sub_class',
Expand Down
Loading

0 comments on commit b600bb8

Please sign in to comment.