46 Commits

Author SHA1 Message Date
Greg Landrum
dc84967df2 A bunch of modernization of the ShapeHelpers code (#8954)
* modernize testShapeHelpers

* a bunch of modernization of the shape helper code
2025-12-15 15:49:00 -05:00
Ricardo Rodriguez
a4b63d7df5 Minor refactor of the python wrappers (#8847)
* refactor python wrappers

* fix FilterHierarchyMatcher converted already registered warning
2025-10-05 09:42:31 +02:00
Greg Landrum
315939f7ae Fix inversion of stereo with canonicalizeConformer (#7878)
* add test for conformer canonicalization inverting stereo

* Fix problem with canonicalizeConformer inverting stereo

* response to review
cleanup
fix the other tests affected by this change
2024-10-10 09:57:39 -04:00
Paolo Tosco
2b4202867e Add Python modules to generate stubs and automatically patch docstrings (#6919)
* - added gen_rdkit_stubs Python module to generate rdkit-stubs
- added patch_rdkit_docstrings Python module to patch existing C++ sources to fix docstrings missing self parameter and add named parameters taken from C++ signatures where possible
- added rdkit-stubs/CMakeLists.txt to build rdkit-stubs as part of the RDKit build
- added an option to CMakeLists.txt to enable building rdkit-stubs as part of the RDKit build (defaults to OFF)

* fixed CMakeLists.txt, rdkit-stubs/CMakeLists.txt and a doctest

* - added missing cmp_func parameter
- fixed case with overloads with optional parameters
- do not trim params if expected_param_count == -1
- add dummy parameter names if we could not find any
- keep into account member functions when making up parameter names
- address __init__ and make_constructor __init__ functions
- fix incorrectly assigned staticmethods

* patched sources

* address residual few remarks

---------

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2023-11-30 04:54:18 +01:00
Ric
880a8e5725 Reformat Python code for 2023.03 release (#6294)
* run yapf

* run isort

---------

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2023-04-28 06:53:56 +02:00
Eisuke Kawashima
11532089de Run clang-format against cpp (#4358) 2021-10-20 04:25:27 +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
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
a75018fe38 Cleanups and additional tests to improve test coverage (#2852)
* disable builds of the StructChecker code by default

* operator"" _smarts() doesn't need to catch sanitization errors

* remove unused function

* turn back on some tests that shouldn't have been disabled

* Remove unused code from SMARTS parser and simplify a bit

SmilesParseOps::AddFragToMol is now used only from the SMARTS parser, so we can simplify the API

* Removes obsolete special case code for SMARTS

This was relevant when organic atoms in SMARTS queries were stored as two-part queries.

* improve SMARTS testing

make sure we can generate SMARTS from all the examples and then parse that again.

* Fixes #2814

* Fixes #2815

* some additional smarts tests to improve coverage

* test copy ctor and getPos

* remove obsolete test_list files

* include tests for the morgan invariant generators

* more cleanups and coverage improvements

* remove files that were mistakenly added
2020-01-09 16:07:55 -05:00
John Mayfield
76ed536c87 Branch/vf2 optimisations (#2500)
* Remove out_1 and out_2, only need for directed graphs.

* Variable renaming, no other changes.

* Fix a couple things that were forgotten during the rename

* Only one of these counts is updated now.

* Add ifdef to enable/disable VF2Pruning

* Add degree bound check, could be pushed down to the generic VertexCheck predicate.

* The stack knows at each point what was added, by passing these into the Backtrack call the clone allocation can be removed.

* Indent and rename added_node1 to node1.

* Now the clone is removed we can add a member function to handle the recursion cleanly.

* Also make for MatchAll a member function.

* Set lim=0 to mean infinity.

* VF2Plus optimisation, when candidate is in the terminal set select from a mapped neighbours adjacency list.

* Optimisation hint.

* Use a struct for the Pair removing the need for double pointer and heap alloc/delete of the iterators.

* disable pruning by default (it's a bit quicker to not do this)

* update expected test results

The updated VF2 code can return symmetric results in a different order
than we were getting previously. The results are still correct, but they
change some of the downstream things that don't do symmetrization

* update expected java results
2019-06-30 04:49:24 +02:00
Francois Berenger
7ec8ec0bb9 Vdv radii from blue obelisk (#2154)
* updated atomic radii to follow the Blue Obelisk Data Repository

Ubuntu package bodr version 10-1; radii are from file
/usr/share/bodr/elements.xml

* typo

* use 2.0 as default VDW radius instead of 1.7

for elements missing from the Blue Obelisk Data Repository

* Document the atomic_data

* update expected test results

* update java tests

* allow a bit more slop when comparing confs

For cross-platform stability
2019-05-29 09:23:27 +02:00
Greg Landrum
24f1737839 Remove a bunch of Python2-related warts (#2315)
* remove all of the "from __future__" imports

* remove the first batch of rdkit.six imports/uses

* next step of rdkit.six removal

* removing xrange, range, and some maps

* next round of removals

* next round of cleanups

* fix inchi test

* last bits of "from rdkit.six" are gone

* and the last of the six stuff is gone

* strange importlib problem
2019-03-06 20:43:49 -05:00
Susan Leung
f0cc4bffbf ShapeTverskyIndex python function (#2156)
* trying to add shape tversky

* alpha and beta no defaults, added more tverskyIndex tests to testGrid

* added python function ShapeTverskyIndex to call tverskyMolShapes

* rebasing

* add python test for ShapeTverskyIndex

* changing to aassertAlmostEqual in testShapeHelpers
2018-11-08 07:42:10 -06:00
Paolo Tosco
c08ea49bda - enable building DLLs on Windows (#1861)
* - enable building DLLs on Windows

* - export.h and test.h are now auto-generated by CMake
2018-05-16 08:42:41 +02:00
susanhleung
1743ced5a5 add Tversky index calculation for shapes (#1777)
* trying to add shape tversky

* alpha and beta no defaults, added more tverskyIndex tests to testGrid

* corrections to GridUtils.h and ShapeUtils.cpp

* corrections to GridUtils.h
2018-03-24 08:33:30 +01:00
Greg Landrum
915cf08faa run clang-format with c++-11 style over that 2017-04-22 17:19:10 +02:00
Greg Landrum
7c0bb0b743 clang-tidy output 2017-04-22 17:09:24 +02:00
gedeck
e9af48ffd7 Issue1071/yapf (#1078)
* Issue #1071: add yapf configuration file

* yapf formatting of Code directory

* yapf formatting of Contrib directory

* yapf formatting of Data directory

* yapf formatting of Docs directory

* yapf formatting of External directory

* yapf formatting of Projects directory

* yapf formatting of Regress directory

* yapf formatting of Scripts directory

* yapf formatting of Web directory

* yapf formatting of rdkit directory
2016-09-23 04:58:46 +02:00
Greg Landrum
79e1f8b1fa compiles without numpy warnings, all tests pass on ubuntu 15.04 with numpy 1.10 2015-11-28 06:49:34 +01:00
Greg Landrum
d07f2ccd05 replace oldnumeric imports 2015-11-28 02:38:58 +01:00
Greg Landrum
e08e0d16d8 first pass, using google style 2015-11-14 14:58:11 +01:00
Brian Kelley
403a3d6b7c Suppresses Boost warnings 2015-10-18 13:41:03 -04:00
Riccardo Vianello
3358ec5925 initial set of changes introducing python3 support 2014-06-17 18:26:41 +02:00
Greg Landrum
ab35e4e08f fix typos 2013-12-20 05:30:04 +01:00
Greg Landrum
b993f89afe remove the bjam-based build system 2010-09-27 03:54:07 +00:00
Greg Landrum
f3fbef45c5 update copyright statements 2010-09-26 17:04:37 +00:00
Greg Landrum
9727cffa61 make python wrappers and tests optional 2010-01-22 11:22:58 +00:00
Greg Landrum
c346a41951 get the tests working on windows. 2010-01-19 06:34:58 +00:00
Greg Landrum
7f0c2c05fc remove lapack from the jamfiles 2009-10-31 06:09:20 +00:00
Greg Landrum
53485592ca builds on windows with visual studio; need to pass back to linux now 2009-10-01 13:35:48 +00:00
Greg Landrum
76297b0fff builds and passes tests on linux 2009-09-28 11:02:18 +00:00
Greg Landrum
9cabf87374 remove vflib from Jamfiles
remove const specifiers from return values in DataStructs
add initial pass at query-query matching for Atoms and Bonds
fix and test for sf.net issu 2738320
add Mol.AddRecursiveQuery() method to Mol
2009-06-29 11:47:38 +00:00
Greg Landrum
f0b288cfed big changes again (repeat the 979, 980 disaster on the correct branch) 2009-02-04 20:13:44 +00:00
Greg Landrum
8bf7a4c187 now all tests pass here as well 2009-02-03 05:26:10 +00:00
Greg Landrum
2580fbaaa2 this is probably a ways from done, but now at least we can run bjam under mingw without it immediately erroring out 2008-11-15 17:14:13 +00:00
Greg Landrum
a3e6cb057e this is a mass of cleanup stuff; mostly line endings 2008-07-07 13:21:24 +00:00
Greg Landrum
ac5a7d72c7 these are no longer needed 2008-07-07 06:36:34 +00:00
Greg Landrum
c9eb4e91e1 merge revs 736:741 from branch http://rdkit.svn.sourceforge.net/svnroot/rdkit/branches/NumPyPort_27June2008
This removes the numeric python dependency and switches to relying on numpy.
current status of tests from branch: pass on lin32 and 64 and win32.
2008-07-05 07:42:38 +00:00
Greg Landrum
430a83bd96 merge in the jamfiles from the bjam branch;
various and sundry minor code cleanups;
this probably does not yet build on windows... that is next
2007-11-23 15:55:30 +00:00
Greg Landrum
c75aa34b4b - Expand availability of the protrude distance measure.
- Remove a few confusing and unnecessary SD file handling functions from FileParsers (better functionality is available in the SDMolSupplier)
- Support not removing Hs in the Mol file handlers (C++ and Python)
2007-08-11 16:22:42 +00:00
Greg Landrum
47d47a49d3 remove vestiges of old windows build system 2007-07-31 17:09:53 +00:00
Greg Landrum
2c603a1abf fix the build 2007-01-26 05:07:55 +00:00
Greg Landrum
cf728dbc7c primarily project file changes to make things work
with python 2.5
Also includes a slackening of the tolerance for a distgeomhelpers test.
2007-01-15 20:30:01 +00:00
Greg Landrum
8a19c38e21 - Get windows debug builds working
- Remove requirement that boost be in $RDBASE/External on windows (the BOOSTHOME environment variable is now required)
- fix dependencies

This builds on windows in debug mode now and most tests pass. There's a problem with PySVD in debug mode and for some reason the rdAlignments wrapper test fails; but these don't seem super important.

https://sourceforge.net/tracker/index.php?func=detail&aid=1485703&group_id=160139&atid=814650
2006-05-11 00:42:39 +00:00
Greg Landrum
5d03333c22 setup svn keywords (should have done this before import... grn) 2006-05-06 22:54:39 +00:00
Greg Landrum
75a79b6327 initial import 2006-05-06 22:20:08 +00:00