Commit Graph

270 Commits

Author SHA1 Message Date
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
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