Commit Graph

11 Commits

Author SHA1 Message Date
David Cosgrove
e712d201a6 Fix Rascal out of memory bug. (#8648)
* Make test

* Cap number of equivalent cliques that will be produced.

* Oh FFFS!

---------

Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
2025-07-24 16:43:09 +02:00
David Cosgrove
d7e1ce7cf4 Rascal Fix 8360 (#8376)
* Use distances on all valid paths rather than just shortest distance.

* Optimise BondPaths.

* Optimise BondPaths.

* Hash coded for the bond paths.

* Faster find all paths.

* Build in gcc working.

* Comment.

* Remove debugging code.

* Update GettingStartedInPython.rst.

* Now need to split the clique and keep the largest fragment.
Lots of warnings about how slow this is.
Split out long tests.

* Back out a lot of changes.  Remove the distance check with singleLargestFrag when building modular product.

* Tidy code.
Update docstrings.
Add explanation to GettingStartedInPython.rst.

* Fix single fragment test.

* Response to review.

---------

Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
2025-04-08 10:12:58 +02:00
Rachel Walker
7d02ac82fd Add RascalMCES option to require complete RingInfo rings (#8305)
* Attempt at completeRingsOnly in mces

* changed option name and added a test

* code review

* check aromaticity and bond type matches before checking ring equivalencies

* update if statement

* typo
2025-03-21 13:54:10 +01:00
David Cosgrove
343b0698ca Rascal: Add option to specify minimum clique size directly. (#8248)
* Add option to specify minimum clique size directly.

* Make the minCliqueSize uint and default to 0.

* Brain-fade.

* Send timeout and 'too many bonds' message to BOOST_LOG rather than std::cout, std::cerr respectively.

---------

Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
2025-02-13 17:05:23 +01:00
David Cosgrove
d44758ee5e Rascal match exact atom type (#7673)
* New option - exactAtomTypeMatch.

* Python wrapper.

* REQUIRE(res.size()) not CHECK.  If it fails, you get seg fault on subsequent tests otherwise.

* Change option name.
2024-09-16 04:45:18 +02:00
David Cosgrove
80381c61fd Rascal atom and bond equivalences (#7612)
* C++ implementation of equivalent atoms via SMARTS.

* Python wrapper.

* Tidy.

* Check for too many classes.

* Better handling of spaces in split.

* Pass string by reference.  Doh.

* Add ignoreBondOrders option.
2024-07-23 06:02:33 +02:00
David Cosgrove
29a166dff6 Add option for RASCAL to restrict atom matching to atoms of same degree (#7344)
* Add exactConnectionsMatch option.

* Better python test.

* Better C++ test.

---------

Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
2024-04-11 16:20:38 +02:00
David Cosgrove
3d1771f040 Extra rascal option (#7073)
* Expose maxBondMatchPairs to Python.

* Better test.

* Suggestions from clang-tidy.

---------

Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
2024-01-23 06:05:58 +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
David Cosgrove
904da61476 Expose RascalMCES singleLargestFrag option to Python. (#6674)
* Expose singleLargestFrag option to Python.

* Better documentation.
A couple more things exposed.

* Expose RascalClusterOptions.

---------

Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
2023-08-31 06:54:24 +02:00
David Cosgrove
2dd9c5f3cd RASCAL MCES (#6568) 2023-08-27 13:51:49 +02:00