On 2017-09-13 09:56, TJ O'Donnell wrote:
Let the database do the work for you.  Create a canonical SMILES column
and/or InChI column and declare them to be unique.  As you insert new
rows, postgres will let  you know if there is already a row with the same
SMILES or InChI.
Here's some help on how to handle that.
https://www.postgresql.org/docs/9.5/static/sql-insert.html#SQL-ON-CONFLICT


One of the problems with this is it normally fails on the first conflict whereas users very often want a list of all conflicts to look at and see what's up. The above mentions a "special excludes table" in passing but I don't see anything about accessing it or what it actually contains.

If you don't care what molecules get dropped or why, "on conflict ignore" should work very nicely.

Dima

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to