7 Commits

Author SHA1 Message Date
Greg Landrum
a9477d2694 Modernization of some substructure code (#8450)
* use std::span for substruct match callbacks

This removes a copy from every evaluation of potential matches

* some cleanup/modernization

* some modernization

* deprecate chiralAtomCompat

* small optimization

* remove naked pointers

* improve new_timings.py script

* changes suggested in review

* response to review

* response to review
2025-05-12 06:33:25 +02:00
tadhurst-cdd
73b4da2a44 New tests for specical query atoms and atropisomers (#7010)
* New tests for speical query atoms and atropisomers

* fixed error, and used unique_ptrs

* Removed test that makes GraphMol depend on GenericGroups

* More to remove GraphMol dependency on GenericGroups
2024-01-11 05:54:14 +01:00
Greg Landrum
2957ab4576 switch to catch2 v3 (#6898)
* switch to catch2 v3
Fixes #6894

* fix a couple of problems noticed in the CI builds

* more warning cleanup

* changes in response to review
2023-11-15 06:45:42 +01:00
Jonathan Bisson
eec44e4171 Support additional generic groups (#6570)
* Add search groups (#32)

Tracker story: 184574393 - Support additional query features [1]

All the special groups and atom from the Ketcher extended table are now supported in RDKit. The newley added ones include:
ABH, ACH, AEH, AHH, ALH, AOH, ARH, AYH, CAH, CBH, CEH, CHH, CXH, CTH, G, G*, GH, GH*, R, and the atom query types D, T, H+., and Pol

* Fix tests

Remove Marvin specific code

* Fix windows build

* Fix windows build

* Remove atom matches

* Remove test

* Fix doc

* Update Code/GraphMol/GenericGroups/GenericGroups.h

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

* Update Code/GraphMol/GenericGroups/GenericGroups.h

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

* Update Code/GraphMol/GenericGroups/GenericGroups.h

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

* Update Code/GraphMol/GenericGroups/GenericGroups.h

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

* Update Code/GraphMol/GenericGroups/GenericGroups.h

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

* Update Code/GraphMol/GenericGroups/GenericGroups.h

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

* Update Code/GraphMol/GenericGroups/GenericGroups.h

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

* Update Code/GraphMol/GenericGroups/generic_tests.cpp

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

* Update Code/GraphMol/GenericGroups/generic_tests.cpp

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

* Update Code/GraphMol/GenericGroups/GenericGroups.h

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

* Added test for groups added manually to a query
as per PR review suggestion

* stop reading generic groups as atomnull queries

---------

Co-authored-by: tadhurst-cdd <112502803+tadhurst-cdd@users.noreply.github.com>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
Co-authored-by: Tad Hurst <tad.hurst@collaborativedrug.com>
2023-08-10 06:36:38 +02:00
Jonathan Bisson
8a2d034f8f Add a new parameter to mol_adjust_query_properties for generic query parameters (#6332)
* Add a new parameter to mol_adjust_query_properties for generic query parameters (#46)

Adds a new parameter to mol_adjust_query_properties:"setGenericQueryFromProperties"
that defaults to false (so no change of behavior until used).

This PR also removes the previous way of doing it that involved reprocessing the query molecule for every comparison.

On datasets of 200k molecules the speed-up is between 2 (large complex substructure searches with repeating units) to 5 times (tiny substructures search).

Add support for generic query in PG cartridge

* Add generic groups to the lib

* Move the querying with generic groups out of MolOps to not bloat the library.

* Fix Python calls

* Update doc

* Proof that last 3 commits are mine.

* Fix missing headers

* Fix typo

* Fix call

* Fix calls

* suggested changes

* Update Code/GraphMol/GenericGroups/GenericGroups.h

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

* Add adjustquery test with default parameters.

---------

Co-authored-by: greg landrum <greg.landrum@gmail.com>
2023-08-03 15:41:43 +02:00
Greg Landrum
25df3914b7 Fixes crashing bug with finalSubstructChecks (#4782) 2021-12-10 08:22:59 +01:00
Greg Landrum
52f73e4be0 Add support for Beilstein generics when doing substructure queries (#4673)
* backup commit
This is mabye heading in the right direction and at least passes the basic tests which are there.

* some progress

* more tests and refactoring

* additional aliases
add carboaryl

* add CYC and ACY

* add ABC

* add AHC

* CBC and AOX

* add CHC and HAR

* add CXX

* cleanup: remove a bunch of nullptrs

* initial tagging support

* remove atom labels/sgroups after using them

* docs

* start handing writing

NOTE: this does not currently work: the generic code needs to move out of SubstructSearch

* move the generic groups to their own library

Signed-off-by: greg landrum <greg.landrum@gmail.com>

* make sure the generic groups end up in ctabs

* add forgotten CMakeLists.txt

* fix includes

* expose this stuff to Python

* CYC needs to initialize rings

* renaming

* add docs

* change in response to review
2021-12-01 06:01:53 +01:00