Commit Graph

286 Commits

Author SHA1 Message Date
Riccardo Vianello
5039c88483 Add optional sortsupport methods to the PostgreSQL GiST indices (#6313)
* Add optional sortsupport methods to the bfp and mol/qmol indices

* update the postgres version to be removed

* Revert "update the postgres version to be removed"

This reverts commit 59c6eb12dd.

* install the specific version of postgresql-client

* try pinning postgresql-common too

* try something else

* try something else

* try configuring cmake with explicit paths to version 12

* try uninstalling libpq5

* check if it's possible to run the cartridge test build w/ pg14

* Revert "check if it's possible to run the cartridge test build w/ pg14"

This reverts commit f1c2f9f783.

* fix the updated cartridge version number

* do not by default enable the sort_support method for the bfp gist index
2023-05-18 06:38:08 +02:00
Riccardo Vianello
4f28dfeb69 postgres cartridge: cleanup a few obsolete build options (#6363)
* cleanup (assume PostgreSQL v9.6+)

* cleanup (assume PostgreSQL v9.6+)
2023-05-13 07:07:50 +02:00
Ric
58d135a874 Reformat C/C++ code ahead of 2023.03 release (#6295)
* format files

* format template files too
2023-04-28 04:42:35 +02:00
Greg Landrum
dee9f6cd82 fix the name of the update script (#6319) 2023-04-26 20:54:25 +02:00
Greg Landrum
8559f5d3a9 Add a new tautomer mol hash (#6289)
* backup

* does not work

* backup

* passes all tests

send more tests!

* backup

* seems to mostly work
needs cleanup still

* more tests + python wrappers

* more testing

* some cleanup

* fix problem with newer boost

* be more expansive about unsaturation

* be symmetric in choosing the starting bond
fix a test error

* passes all tests;
passes ChEMBL regression test

* docs

* update cookbook

* expose the new hash function to the cartridge too

* support v2 hash in the registration hash

* better testing

* alternate, simpler approach for that

* remove vestigial docs
2023-04-26 16:57:39 +02:00
Jonathan Bisson
af531a79ca Add support for generic matching in the PgSQL cartridge (#6269)
* Add support for generic matching in the PgSQL cartridge

Two new operators (and their inverse) `mol @>> q?mol` and `q?mol @<< mol` where q?mol getGenericGroups::setGenericQueriesFromProperties is applied to convert sgroups to query atoms and enable useGenericMatchers in the substructure matcher.

(q?mol means qmol or mol)

* Only transform the query once

* Revert "Only transform the query once"

This reverts commit 1873268cf6.
2023-04-09 06:45:02 +02:00
Paolo Tosco
7c9155fadf Updated README for cartridge installation into conda PostgreSQL (#6236)
* updated README for cartridge installation into conda PostgreSQL

* fixed typo

---------

Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
2023-03-29 04:11:53 +02:00
Paolo Tosco
b846f122d5 fix markdown typo (#6230)
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
2023-03-23 17:12:54 +01:00
Paolo Tosco
17a64380e2 Updated README to build the PostgreSQL cartridge + bug fix (#6214)
* - renamed Code/PgSQL/rdkit/README to Code/PgSQL/rdkit/README.md such that markdown can be used
- updated Code/PgSQL/rdkit/README.md with updated instructions how to build and install the PostgreSQL on all supported OSs
- fixed an issue with the PgSQL install script on Windows where the path to the update_sql directory was incorrect

* changes in response to review
2023-03-23 05:05:58 +01:00
Greg Landrum
3fdcf6d9ff Fix #6002 (#6120)
* resolves it; needs more testing and cleanup

* still flailing a bit

* update expected test results

* cleanup

* revert extraneous changes

* revert these to master, will do this in a separate PR

* revert these to master, will do this in a separate PR

* back to master
2023-03-05 05:56:01 +01:00
Greg Landrum
a8c8e9a8e1 Add canonicalization of stereo groups (enhanced stereo) (#6051)
* add function to canonicalize enhanced stereo representations

* use enhanced stereo in canonicalization

* Fixes #6045
enables the doc tests for EnumerateStereoisomers.py
Re-enables the BRICS tests

* some things work... tests need to be updated

* c++ and python tests pass

* update expected psql results

* run the canonicalization on SMILES generation;
c++ and python tests pass

* cartridge and java tests pass

* update doctests
2023-02-08 04:21:51 +01:00
David Cosgrove
42782d31cf Change IUPAC metal->non-metal single bonds to dative (#6038)
* Change atom to metal bonds from single to dative if appropriate.

* Pedantic change whilst I was in the area.

* Reinstate all tests, leave in debugging writes to see failing tests.

* Re-did it.  Failing tests now pass.

* Move any positive charge from the non-metal to the metal.
Fix expected test results.

* Write dative bond to JSON.

* Bump currentRDKitJSONVersion to 11, but allow parser to still read 10.

* Only move 1 unit of charge at a time from non-metal to metal.

* Greg's hack to not do it for O+ and N+ etc.
Explicitly exclude H, He, F, Ne from dative bonds.
Fix tests.

* Update expected PostGres json version to 11.

* suggestions for PR

* Correct comment.

---------

Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
Co-authored-by: greg landrum <greg.landrum@gmail.com>
2023-02-06 04:37:32 +01:00
Greg Landrum
44a0ba074f Fixes #5734 (#5875)
I needed to do some historical cleanup here to make this work
We really should never do patch releases... it just makes this super difficult
2023-01-19 09:49:55 +01:00
Greg Landrum
e0b7fc298a Support SubstanceGroups and StereoGroups in JSON (#5909)
* write stereogroups

* Parse stereogroups

* add parameters to python wrappers

* more tests

* write substancegroups

* parse SubstanceGroups

* Fix a crashing bug with null molecules

* more testing

* add some docs

* update expected cffi results

* oh, this is delightful syntax

* adapt minimallib and the cartridge tests
some small cleanups

* stupid padding

* update expected

* changes in response to review
2023-01-04 16:29:36 +01:00
Paolo Tosco
38cfc168b6 - allow building PgSQL RPM and DEB packages by setting the correct DESTDIR path (#5836)
at build stage and creating intermediate directories as needed
2022-12-12 06:19:58 +01:00
Michael Banck
f416456768 Compile clang bytecode with -std=c++17 (#5685) (#5708) 2022-10-31 04:33:17 +01:00
Greg Landrum
bd666957d1 Fixes #5234 (#5415)
* Fixes #5234

* update expected output in tests
2022-07-26 02:39:21 -04:00
Greg Landrum
9fa1df1cf6 Drop usage of CIP information from the canonicalization code (#5385)
* stop using CIP codes in the atomic canonicalization

this will change results in some cases, so lots of tests need to be updated.

* stop breaking string literals... ARGH

* tests now pass

* update double bond canonicalization

* update a python test

* some cleanup

* update expected results for cartridge
2022-07-13 05:40:23 +02:00
Greg Landrum
0147cd8201 Fixes #5210 (#5408)
* revert duplicate chunk in release notes

* replace deprecated ifdefs
This one gets rid of USE_BUILTIN_POPCNT and RDK_THREADSAFE_SS
use RDK_OPTIMIZE_POPCNT or RDK_BUILD_THREADSAFE_SSS instead

* get rid of BUILD_COORDGEN_SUPPORT from ROMol.i

* fix a stupid typo

* update release notes
2022-07-11 11:20:03 +02:00
Greg Landrum
51b03fcdcb Fixes #5095 (#5096)
* Fixes #5095

* add some casts to make that a bit less disruptive

* go back to the simpler form for constructing the test table

* fix release notes

* do cleanup step too

* updates in response to review
2022-03-17 16:36:30 +01:00
Eisuke Kawashima
27f711a658 Run clang-tidy (readability-braces-around-statements) (#4977)
https://github.com/rdkit/rdkit/pull/3024#discussion_r526549843
2022-03-10 08:00:10 +01:00
Maciej Wójcikowski
93282a4bcf Drop gist_qmol_ops in upgrade scripts in case it exists (#5021) 2022-02-22 06:49:54 +01:00
Greg Landrum
7e575db3c4 AssignStereochemistry should remove nonchiral atoms from StereoGroups (#4986)
* Nonchiral atoms should be removed from StereoGroups

This fixes a bug where atoms which have no chirality were left in StereoGroups

In order to make this work, ROMol::setStereoGroups() needed to be made public.
That shouldn't be a problem since it doesn't change connectivity.

* fix some broken old tests

* update cartridge tests
2022-02-08 05:17:34 +01:00
Greg Landrum
e912c8d848 correctly tag unspecified branch-begin bonds in SMARTS (#4811)
These weren't being correctly assigned the SingleOrAromatic shorthand
2021-12-28 04:29:12 +01:00
Greg Landrum
8390dfd181 Fixes #4785: aromatic bonds no longer set aromatic flags on atoms (#4806)
* preliminary

* all tests pass

* cleanup

* more testing!

* we do still want to raise errors for aromatic atoms not in rings
fix one missed change for mol blocks

* update expected results for psql test
2021-12-17 10:26:59 +01:00
Greg Landrum
6225705060 Fixes #4787 (#4788)
* fixes #4787

* additional test

* version bump

* do the same thing with SMILES

* Update Code/PgSQL/rdkit/adapter.cpp

Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>

Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
2021-12-10 16:04:28 +01:00
Riccardo Vianello
6b5784c74a generate the sql update files in the binary (build) directory (#4777) 2021-12-08 14:18:15 +01:00
Paolo Tosco
e273967cb1 Improve CMake integration of PgSQL build (#4767)
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
2021-12-08 14:16:08 +01:00
Riccardo Vianello
db673b1fee Refactor the memory management of the postgres cartridge cache module (#4755)
* refactor cleanupRDKitCache for readability

* fix the indentation

* add comments

* add some comments

* allocate/deallocate the cache holder in the associated memory context

* exit the cache holder memory context callback once done

* more consistent use of the memory context from ValueCache

* refactor the cleanupRDKitCache callback

* minor changes to comments and renaming variables
2021-12-03 06:41:53 +01:00
Paolo Tosco
9ed1fecc3a Fixes #4681 and a few Windows PgSQL build problems (#4692)
* fixes #4681

* fixes a few Windows build problems

* added comments to adapter.cpp to explain the changes

* get PostgreSQL to build on Windows with both MSVC and MinGW compilers

Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
2021-11-20 04:28:49 +01:00
Riccardo Vianello
ae9768d0bc fix TopologicalTorsion fingerpring in generateFingerprintAsBitVect (#4631) (#4669) 2021-11-08 06:26:57 +01:00
Greg Landrum
5215914bb9 Do the deprecations for the 2022.03 release (#4626)
* remove deprecated useCountSimulation argument

* remove the mol_from_smarts() function from the cartridge

* remove the balabanj

* a couple final cleanups to the countSimulation thing

* document changes
2021-11-04 04:25:05 +01:00
Riccardo Vianello
2aba8114a1 Fix some compile-time warnings in the postgres cartridge code (#4657)
* remove some unused variables

* add missing inclusion directive for cache.h

* fix a few warnings in the pgsql cartridge fmcs code
2021-11-01 04:35:10 +01:00
Riccardo Vianello
9376d33c44 fix parsing beyond the end of the input string in findMCSsmiles (#4636) 2021-10-26 05:57:11 +02:00
Greg Landrum
924333145a Rename the molLinkNode property to _molLinkNode (#4614)
* make the psql tests version insensitive

* rename the molLinkNode property
2021-10-18 16:04:27 +02:00
Greg Landrum
2c48a13a08 add mol_adjust_query_properties(qmol) (#4543)
add mol_to_svg(qmol)
2021-09-23 04:37:37 +02:00
Maciej Wójcikowski
6ab88f6f49 GiST support to qmol type (#4470)
* Add GiST support to qmol type

* add testing

Co-authored-by: greg landrum <greg.landrum@gmail.com>
2021-09-15 21:15:08 +02:00
Greg Landrum
bf74af4052 Fix/github4442 (#4448)
* Fixes #4442

* add qmol_from_json()

* allow casting from mol->qmol

* avoid repeating ourselves

* add chiral substructure functions and operators
not available with indices yet

* remove the @@> operators
since I can't figure out how to support them in the index
2021-09-13 04:41:31 +02:00
Greg Landrum
c8a3b98a09 Some cartridge additions and fixes (#4387)
* update some expected results that changed with previous fixes

* Fixes #4386

* try to actually generate an error when the cartridge tests fail

* update azure pipelines cartridge builds

* ensure psql dev env is there
temporarily disable other azure pipelines builds

* psql version

* gather info

* gather info

* gather info

* gather info

* gather info

* more descriptors

* try forcing psql12

* remove the package correctly

* remove the package correctly

* remove the package correctly

* sooo much fun

* sooooo much fun

* seems to be working now, enable the others

* support v3k output in cartridge

* tests do not pass

* docs

* update expected tests
2021-08-16 10:18:29 +02:00
Greg Landrum
f2e9e3a031 Some cartridge enhancements (#4271)
* Start providing an update script for the cartridge

* update readme

* support enhanced stereo in cartridge

* it makes more sense to bump the cartridge version to 4.0

* add MolToJSON to cartridge

* add mol_from_json

* docs update

* changes in response to review
2021-06-23 08:22:21 +02:00
Paolo Tosco
106e9f7c37 Normalize line endings in source code files (#4104)
* set all source code files to have native line endings

* normalized all source code line endings

Co-authored-by: Paolo Tosco <paolo.tosco@novartis.com>
2021-05-13 14:31:39 +02:00
Greg Landrum
a96a72219d updates to postgreSQL cartridge (#3976)
* allow access to rdkit version inside cartridge

* remove debug info

* add Phi to cartridge

* update docs
2021-04-21 10:23:18 -04:00
Greg Landrum
61d0e04b93 Fix a number of cartridge stability problems (#3720)
* fixes #3687

* Fixes #3688

* fixes #3689

* more testing

* change in response to review
2021-01-14 06:50:51 +01:00
Riccardo Vianello
233cc46299 remove the include directive for unused <access/tuptoaster.h> header (#3525) 2020-11-03 06:37:04 +01:00
Greg Landrum
a132911ea4 update expected cartridge test results (#3484)
Remove the full SVG, which really no longer makes sense. At this point this
is really just testing that the commands run and produce SVG
2020-10-12 16:09:03 +02:00
daverona
a19072fd87 Replace fill-opacity= to fill-opacity: in reaction.out (#3426)
Co-authored-by: Eagu Kim <egkim@arontier.co>
2020-09-24 05:15:43 +02:00
Greg Landrum
45b9aef28b clang-tidy modernize-use-default-member-init and modernize-use-emplace (#3190)
* run clang-tidy with modernize-use-default-member-init

* results from modernize-use-emplace

* one uniform initialization per line
otherwise SWIG is unhappy

Co-authored-by: Brian Kelley <fustigator@gmail.com>
2020-05-28 09:07:58 +02:00
Eisuke Kawashima
a9d5170239 Set RDK_BOOST_VERSION to pass minimum required version to FindBoost (#3074) 2020-05-05 04:41:25 +02:00
Manan Goel
ec20f3ffc5 Fixes #2795 (#3134)
This commit adds testing for support of CXSmiles in the cartridge by testing the mol_out function which is called in pg_dump.
2020-05-04 10:43:17 +02:00
Greg Landrum
45bf58754a Cleanup some cmake dependencies (#3077)
* change minimal cmake version to a consistent 3.5

* progress towards a cleanup

* get the basic python deps working

* two more libs

* another round of changes
all tests pass at this point

* next round of changes
all tests pass at this point

* close to done
all tests pass

* very close

* almost done

* shift the RDBoost dependencies around a bit

* remove an extraneous python linkage
this is trying to get the mac builds working again

* Only link to python if it was built shared (#3091)

* change in response to review

Co-Authored-By: Ric <ricrogz@users.noreply.github.com>

* move that suppression of the maybe-uninitialized warning to BoostStartInclude.h

Co-authored-by: Brian Kelley <fustigator@gmail.com>
Co-authored-by: Ric <ricrogz@users.noreply.github.com>
2020-04-17 14:34:23 +02:00