10 Commits

Author SHA1 Message Date
Ricardo Rodriguez
ccfb1fa688 ... and more mem errors fixed (#7924)
* fixleak in CIP labels catch test

* fix leak in Murtagh clustering

* do not leak writers in streambuf

* fix leaks in fingerprintgeneratorwrapper

* remove 'minor leak' comments
2024-10-25 07:01:34 +02: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
1e1ff0b084 Start a Maestro file (.mae) writer. (#6069)
* start MaeWriter class

* start Wrapping MaeWriter

* mol -> mae block conversion

* copy general properties, except stereo

* improve docstrings

* Fix property filtering

* fail if no atoms; do not write empty bond blocks

* update atom indexes in bond block

* Fixes in MaeMolSupplier: check for duplicate bond definitions, stip property prefixes.

* add some tests

* adjust access, make dp_writer unique_ptr

* make Mol Writers non copyable

* extract bond translation to mapBond

* add write overload with heavy atom color arg

* forward declare mae::Writer, reverse CMakeFile changes

* revert the property filtering "fix"

* add some Python tests

* fix the windows build

* implement getText() static method

* mark the close() method as override

* locally undefine RDK_BUILD_MAEPARSER_SUPPORT
2023-02-17 11:53:17 +01:00
Greg Landrum
46a0af898d Support context managers for mol Suppliers and Writers (#3704)
* Add context managers for writers
Allow calling close() on already closed Writers
Fixes #2217

* add a close method to MolSuppliers

* modernize the way we handle presence/absence of MAEPARSER support

* add context managers to suppliers

* changes in response to review

* some cleanup

* more cleanup
2021-01-11 05:52:57 +01:00
Greg Landrum
8388ab7d7c raise ValueErrors when constructing streambuffs with the incorrect type. (#2592)
* First pass at enforcing streambuf types on object creation

* make this work on windows
2019-08-19 11:27:47 -04: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
676025c539 add PDBWriter to python wrapper 2013-09-30 04:44:09 +02:00