Commit Graph

31 Commits

Author SHA1 Message Date
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
Ricardo Rodriguez
db0df54347 Fix some minor issues reported by ubsan and the compiler (#8015)
* initialize chiralityPossible

* fix build warning

* Fix integer overflow

* fix downcasting MarvinMolBase to MarvinMol

* Fix buildwarning

* increase PairList container to 64 bit

* fix testDict

* Update Code/RDGeneral/testDict.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/GraphMol/CIPLabeler/rules/Pairlist.h

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/GraphMol/CIPLabeler/rules/Pairlist.h

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Fix catch_tests.cpp

---------

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2024-11-20 09:09:22 +01: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
Greg Landrum
79e8295586 Support Python 3.11 (#5994)
* remove some more deprecated numpy stuff

* workaround for changes to random.shuffle in python 3.11

* fix pickling of rdkit mols in python 3.11

* add py311 build to CI

* update py311 CI

* remove qt for py311 for the moment

* only use the new code with pyversion >=3.11

* use the new logic for all pickle_suites

* need to work with older py too
2023-01-24 18:16:26 +01:00
Eisuke Kawashima
11532089de Run clang-format against cpp (#4358) 2021-10-20 04:25:27 +02:00
Brian Kelley
549f318f29 Add ToList method to Sparse/ExplicitBitVector (#4467)
* Add ToList method to Sparse/ExplicitBitVector

* Pushed a change to an older version of the file, reverting

* Fix function name

* Merge with the change that actually compiles

* Add SparseIntVect ToList, Update tests

* Fix test

* Update Code/DataStructs/Wrap/SparseIntVect.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/DataStructs/Wrap/wrap_SparseBV.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2021-09-09 06:26:15 +02:00
Greg Landrum
edd922c99c Cleanup warnings from clang-10 (#3238)
* stop returning local memory in exceptions

* remove a couple unnecessary copies in loops

* fix a bug in the way the default MMFF aromatic parameters are constructed

* remove a bunch of loop-variable warnings

* remove a bunch of clang warnings

* disable clang warnings in python wrappers

* remove some warnings when building the python wrappers
2020-06-19 17:16:22 -04:00
Brian Kelley
373a89021e Change boost int types to std types (#2233) 2019-01-22 17:45:03 +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
Greg Landrum
e08e0d16d8 first pass, using google style 2015-11-14 14:58:11 +01:00
Greg Landrum
e37296d7c7 post review 2015-11-14 08:08:14 +01:00
Brian Kelley
403a3d6b7c Suppresses Boost warnings 2015-10-18 13:41:03 -04:00
Greg Landrum
47931754da fix DbCLI tests; includes fixing the pickling of SparseIntVects 2014-06-24 07:17:12 +02:00
Greg Landrum
50332b599e get some of the pickle problems resolved; this probably only works with python3 and is not yet 100% functional 2014-06-19 06:05:42 +02:00
Greg Landrum
879efa3be3 add support for integer arithmatic ops on SparseIntVects. operator+ et al. do not yet work from python 2013-08-26 06:51:13 +02:00
Greg Landrum
29312e73e1 minor updates 2012-01-03 07:50:53 +00:00
Greg Landrum
f3fbef45c5 update copyright statements 2010-09-26 17:04:37 +00:00
Greg Landrum
1480eccb87 expose tanimoto similarity on SparseIntVects 2009-06-19 04:19:45 +00:00
Greg Landrum
423433a3e4 support Tversky similarity for SparseIntVects 2009-06-18 14:37:03 +00:00
Greg Landrum
b50e69b171 bad argument removed 2009-01-05 05:02:21 +00:00
Greg Landrum
299689095a operator== and operator!= should be const; support unsigned SparseIntVects as well 2008-07-28 03:40:30 +00:00
Greg Landrum
029e08d6b4 merge in the changes from the 64 bit port branch r703:717 2008-06-11 05:01:17 +00:00
Greg Landrum
a6c1a64d1a remove some compiler warnings
rearrange the argument ordering for the Dice similarity stuff so 
that it can be invoked the same as the other similarity metrics.
2008-04-24 19:03:34 +00:00
Greg Landrum
213c2323bd add returnDistances support to the SparseIntVects too 2008-04-24 12:06:29 +00:00
Greg Landrum
9bb88cb2cf - speed up Dice similarity between SparseIntVects (a lot)
- add bulk Dice similarity for SIVs to wrapper
- speed up bulk Dice similarity for bit vects
- test a bit more
2008-04-15 05:18:52 +00:00
Greg Landrum
93834a90bd remove support for the useAbs function;
add bounds support on the dice metric
2007-10-05 15:35:11 +00:00
Greg Landrum
0ab0653c18 move DiceSimilarity code into c++ 2007-10-04 03:34:06 +00:00
Greg Landrum
67f7dab587 fix a problem with __len__ in python (can't do it if we return a Long);
wrap GetLength() instead;
add getNonzeroElements()
2007-09-28 03:45:03 +00:00
Greg Landrum
7726cb9d8a getting close to right here; still needs windows testing 2007-09-23 06:54:37 +00:00
Greg Landrum
1fa8cd321b add SparseIntVect in both c++ and Python
This still needs windows testing.
2007-09-22 18:49:37 +00:00