Open akokai opened 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.
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:
Mol
object corresponding to the query molecule.Chem.AdjustQueryProperties()
, where appropriate, as described here and in the official docs.Draw.MolToFile()
.