Commit Graph

254 Commits

Author SHA1 Message Date
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
Greg Landrum
5c4d06feec fix a screwup in the cartridge template file (#3073) 2020-04-07 07:50:25 +02:00
Greg Landrum
5712176605 Implement the two deprecations that were planned for the 2020.09 release cycle (#3047)
* Deprecation: planned removal of .message() and .getMessage() methods

* Deprecation: planned removal of old MolHash code

* document deprecations

* output the diffs when the psql tests fail

* remove .message() from SWIG wrappers

note that the KeyError doesn't work properly. We should clean up the the exceptions here anyway

* typo
2020-04-01 14:30:07 +02:00
David Cosgrove
ea54f66558 Commit of 2D draw annotation. (#3010)
* Commit of 2D draw annotation.

* update expected psql results

* First pass at improved radical drawing.

* Fix?

* Fixed different string draw behaviour.

* Removed vestiges of previous radical handling.

* Fixed bug with annnotation placement and added fallback postion.

* Removed unused var.

* update expected reaction svg

* Added option for always having circular highlights.

* Updated JSON to drawOptionns.

* Fixed bug in scale calculation.  Centres drawn molecule with option not to.

* Tidied up scale calculation.

* Changed atomHighlightCircles to atomHighlightsAreCircles.
Used shared_ptr for StringRect as VS barfed on unique_ptr.

* Fixed bug with reaction cruft not following now-centred molecules.

* temporary stash

* Stepped back centring of molecule by drawMolecule and fixes to drawReaction prompted by it.

* allow annotations to be disabled at the class level.
disable them for MolDraw2DCairo on win32 (where they just don't work)

* some test cleanup

Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
Co-authored-by: greg landrum <greg.landrum@gmail.com>
2020-03-20 13:54:45 +01:00
David Cosgrove
774892a9ab 2ddrawenhancements2931 (#2979)
* First pass of fixing layout of OH/NH type drawing.

* Fixed scale for N/S NH type groups.

* Fixed bond end points with new display of heteroatoms.

* Fixed case where it drew aromatic dashed bonds in wrong ring for morphine.

* Minor edit.

* Fixed non-drawing of chiral bonds.

* Removed use of boost for_each.

* Modern atom traversal.

* Put in fixed scale for drawings.
Made drawMolecule() take note of prepareMolsBeforeDrawing.
Updated more iterators to modern idiom.

* Added fixed bond length for drawing.

* Fixed drawing of CH4, NH3 etc.

* Stash of working but ugly, prior to re-work.

* Better, simpler splitting of atom symbols.

* Took clang-tidy's advice about use of override.

* Tidied up drawing of text strings.

* Tweaked what is classed as vertical bond in drawing.

* fixedBondLength now down-scales if it would overflow the draw window.

* Some tidying.

* Tests for new parameters in JSON.
Fixed some existing tests where, for example, scale on picture is now different.

* Added option to rotate 2D draw coords before drawing.

* First pass at highlighting atoms in multiple colours.  Circles only at the moment.

* Line width scales if big enough.

* Tweaked SVG text drawing.

* Added highlighting with more than 1 colour on an atom.  C++ only.

* Fixed some issues with widths of highlights in a frustrating game of whackamole.
Updated some tests accordingly.

* Added Python wrapper for new drawing code.

* Removed debugging writes.

* Added C++ test for multi-coloured highlights.

* Added python test for multi-coloured highlights.

* Attempt to show radicals.

* Tidied up radicals in drawing, including a bullet instead of full stop in SVG.

* Fixed catch_tests.cpp for MolDraw2D.

* Fixed crash in Python wrappers on OSX.

* Fixed test5_2.svg bug (trailing </tspan>).
Made wavy line width scale as other lines do.

* Improved placing of charges.

* We're already in the future.

* Fixed a number of bugs that made drawMolecules not set the scales properly.

* Fixed Cairo wavy line width.

* Fixed non-closure of collision boxes.

* Added maximum font size for text, with tests.

* Addressed all Greg's first PR change requests.

* Fixed crash in extractAtomsymbols.

* stop using coordgen and adjust tests to reflect that
there's a bit of reformatting in here too

* Fixed layout of reactions.

* Fiddled with moldraw2DTest1 tests again.

* Fiddled with catch test.

* Fixed istope postion in W atom labels.

* Minor tweak to cairo,

* update expected results

Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2020-03-10 17:33:59 +01:00
Ric
9188c70a64 Override what() in exceptions (Addresses #2920) (#2928)
* add overrides for what()

* translation fot KeyErrorException; update tests

* Switch all exceptions to `const char *` as a return type from message() (#4)

* switch return type of message() from std::string to const char *

* adjust one test to the new return type from message()
remove unnecessary verbosity from some tests

* fix cartridge build: update call to message().c_str()

* rebase agains master; fix another issue in cartridge build

* add deprecation note for message() and getMessage()

* amend Release notes

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2020-02-05 08:20:17 +01:00
Greg Landrum
abadada1a2 Parse and handle the stereoCare or STBOX flags in CTABs (#2917)
* get fileparsers catch tests building faster
should use this same approach across all of the catch2 tests

* Fixes #2916

* support parsing of STBOX for atoms and bonds in v3K mol files
add molStereoCare to common_properties

STBOX is translated to the molStereoCare property

* add stereocare support to adjustQueryProperties
make building the catch2 tests faster for the GraphMol package

* copy in AdjustQueryParameters JSON parsing from adapter.cpp
(That still needs to be ported to use the new code)

* get the cartridge using the new parsing code

* update test to reflect new parser behavior

* add a v2000 test

* changes in response to review
2020-02-03 15:55:57 -05:00
Greg Landrum
d41752d558 run clang-tidy with readability-braces-around-statements (#2899)
* run clang-tidy with readability-braces-around-statements
clang-format the results
clean up all the parts that clang-tidy-8 broke

* fix problem on windows
2020-01-25 14:19:32 +01:00
Greg Landrum
857f051fff should have been fixed as part of #2869 (#2894) 2020-01-22 07:40:55 +01:00
Greg Landrum
9664a354a2 Fixes #2790 (#2869) 2020-01-10 17:34:27 +01:00
Eliane Briand
a9066a55dc Rename RDK_OPTIMIZE_NATIVE to RDK_OPTIMIZE_POPCNT as suggested in #916 (#2865) 2020-01-09 10:07:44 +01:00
Mieszko Manijak
5e012ab8d2 Improve PostgreSQL cartridge install documentation (#2870)
* patched the Makefile

* Updated PG cartridges README

* Updated PG cartridges README, link fix

* Update README

* Update README

Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
2020-01-09 10:04:23 +01:00
Greg Landrum
4932d680a6 fixes #2700 (#2767)
uses the extra_float_digits argument to fix this
2019-11-15 16:46:10 +01:00
Greg Landrum
9bd07f29a8 update expected cartridge test results 2019-10-18 06:11:24 +02:00
Greg Landrum
76629039e6 Fixes #2668 (#2670) 2019-10-10 17:57:44 -04:00
Greg Landrum
131941fc53 support the new hashing code in the cartridge (#2671)
* update expected results due to older SVG changes

* add the new molhash to the cartridge

* cartridge version bump

* changes in response to review
2019-10-10 10:13:49 -04:00
Greg Landrum
e7eca3a8a0 first pass at switching to a normal download (#2609)
The ExternalProject thing is just more trouble than it is worth
2019-08-19 13:45:25 -04:00
Greg Landrum
dd21db1b06 Integrate Unique Ring Families from RingDecomposerLib (#2558)
* add the ring decomposer lib (temporarily?)

* simplify makefile

* very basics work

* backup

* 	basics working

* builds and basic tests pass

* get this building again

* expose the ring families

* add tests on the python side

* make the pywrapper for this optional

* remove some extra bits

* cleanup

* switch to using RDL as an external project

* make sure this still works if we do not use the URF code

* remove BUILD_ALWAYS

* fix linkage of Java wrapper and cartridge (hopefully)

* fix cmake for wrappers (hopefully)

* forgot a semicolon

* try to force URF lib to build first

* improve memory management and interface

* fix dependency specifier

* make pointer initialization explicit

This may not be necessary, but it feels safer.

* not pleasing and needs to be cleaned up
but it builds

* not pleasing and needs to be cleaned up
but it builds

* cleanup in preparation for merging

* cleanup in preparation for merging

* switch to rareylab repo

* fix updated copyright date

* Fix updated copyright date

* switch to a specific library tag

Co-Authored-By: Florian Flachsenberg <flachsenberg@zbh.uni-hamburg.de>

* change in response to review
2019-07-30 06:41:55 -04:00
Greg Landrum
e4a739d4b7 update expected SVG output from cartridge (#2520)
The change came about because of the fixes in #2487
Thanks to @rvianello for pointing it out
2019-06-28 10:09:16 -04:00
Greg Landrum
ec31bea97b clang-tidy-7 pass (#2408) 2019-04-16 12:05:47 -04:00
Greg Landrum
6ea02fc8a0 update expected svg results (connected to #2253) 2019-03-09 04:25:13 +01:00
Brian Kelley
373a89021e Change boost int types to std types (#2233) 2019-01-22 17:45:03 +01:00
Jan Holst Jensen
6c1dc44310 Fix for Issue #2174. (#2175)
* Add test case to demonstrate GitHub issue 2174.

* Fix issue 2174.

* minor cleanup from review
2019-01-15 15:51:49 +01:00
Jan Holst Jensen
dd6165c8af Fix #2176: InChI functions should return NULL on un-InChI-able input molecules. (#2177)
* Add check of returned string from InChI helper functions and convert to NULL when blank string is returned (a valid InChI string or InChI key will never be blank).

* Since MolInchi() and MolInchiKey() will never return a NULL pointer, I have removed the check for NULL.
Hopefully the intent of the code is now clearer.
2019-01-11 04:51:25 +01:00
Petr Kubat
2c95be4c2c PgSQL: fix boolean definitions for Postgresql 11 (#2129) 2018-10-24 04:48:59 +02:00
Greg Landrum
47bcff20a1 Fixes 1916 (#2093)
* backup commit

* finish adding reaction_to_svg()
Fixes #1916
2018-10-08 22:28:29 +02:00
Pavel Raiskup
d4a17f94d2 PgSQL: add support for PostgreSQL_CONFIG cmake var (#2014)
This is useful for installations where pg_config is renamed to not
collide with the system default pg_config name.

We should drop 'find_package(PostgreSQL REQUIRED)' statement in
future because that's supposed to find PostgreSQL client library
to build against, not PostgreSQL server.  It might happen that
PostgreSQL server on the system is of different version than libpq
(Debian), but in future it will be problematic also on Fedora
(rhbz#1618698).

See also: https://gitlab.kitware.com/cmake/cmake/issues/17223
2018-10-07 05:00:19 +02:00
Greg Landrum
2f6c62ee59 update expected cartridge regression results
should have been part of #1997
2018-08-16 05:22:39 +02:00
Greg Landrum
81025953fc these should have been updated as part of #1940 (#1981) 2018-07-30 11:21:51 +02:00
Greg Landrum
2738c35178 Fixes #1903 (#1971)
* Fixes #1903

* update SWIG bindings too
2018-07-25 09:14:17 +02:00
Greg Landrum
3ff4316f05 Fixes #1886 (#1890)
* mark most cartridge functions as parallel safe

* version bumps
2018-06-17 13:33:56 +01:00
Greg Landrum
77078eac66 Add an auto-populated file with cmake config options (#1874)
* this is a rough first pass, needs to be finished and is a strong argument for changing the names of some of the #defines that are currently used

* rationalize the rest of the #defines
add something to the release notes about this
2018-06-09 05:41:28 +02:00
Paolo Tosco
97d147b3f1 - fixes the dynamic/static library CMake logic (#1875) 2018-05-27 07:13:03 +02:00