akokai / commongroups-archived

(archived) Molecular structure-based classification of chemicals in known hazard groups
MIT License
1 stars 0 forks source link

Database search functions #35

Open akokai opened 7 years ago

akokai commented 7 years ago

For each chemical group: We should have already formulated the logic of the query to define the group -- i.e. simply "has substructure X" or maybe there are multiple logical conditions "... and not Y". We should also have formulated as precisely as possible a SMARTS query for each search operation.

The function should read these logical components from some data interchange format, like JSON or a spreadsheet. Then, the function should:

akokai commented 7 years ago

Running into unexpected behavior from SQL queries of the form ...WHERE mol @> :patt1 ::qmol AND NOT mol @> :patt2 ::qmol... They end up returning molecules that do have a substructure match with :patt2, i.e., mol.HasSubstructMatch(MolFromSmarts(patt2)) == True. See notebook on inorganic compounds and issue #41.