8 Commits

Author SHA1 Message Date
Greg Landrum
e35f7db009 Cleanup/get atoms and bonds (#9243) 2026-04-18 05:22:09 +02:00
Greg Landrum
fa048eacc5 Replace GetImplicitValence() and GetExplicitValence() with GetValence() (#7926) 2025-01-28 21:09:03 +01:00
Paolo Tosco
ac19430d1f Code cleanup, minor refactoring and typos (#7742)
* - code cleanup, minor refactoring and typos

* changes in response to the review

---------

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2024-08-23 12:48:50 +02:00
Paolo Tosco
6c966b4fe5 RGD code cleanup (#7186)
* RGD code cleanup
- made an effort to give more meaningful names to variables (e.g., renamed most instances of attachment (point) to avoid ambiguity as attachment may be interpreted as either the R-group atom or its neighbor atom on the core, which are two different things)
- replaced the old school removeAtom() method with begin/commitBatchEdit()
- added std::move and std::make_move_iterator where relevant to avoid potential unintended copying
- replaced instances of container.size() == 0 and !container.size() with container.empty() for better clarity
- replaced std::map::find() with std::map::at() where the key was not needed
- replaced expensive std::find_if with more efficient alternative
- added some missing const keywords and added references to avoid copying where appropriate
- replaced for loops with modern implicit looping alternatives where convenient
- avoid calling MolToSmiles when VERBOSE is not defined as the result is anyway not used
- removed "oops, exponential is a pain" code snippet as I believe 1. it is never executed 2. it is not tested 3. I do not think it is correct
- removed check for data->matches.size() > 1 as I do not believe it is correct
- Use std::unique_ptr::reset instead of defining a new std::unique_ptr and moving it to the original one

* changes in response to review

* change in response to review

* replaced std::set with boost::dynamic_bitset to save time on std::set::insert and std::set::find

* make sure we do not go out of bounds

---------

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2024-03-03 05:34:13 +01:00
Gareth Jones
1c33f1a393 RGD: Fix doEnumeration true for cores that are not bundles (#6857)
* Fix doEnumeration true for cores that are not bundles

* Fix doEnumeration true for cores that are not bundles
2023-11-09 15:08:27 +01:00
Gareth Jones
b46fc6e28b RGD with matching on tautomers of core (#6611)
* Support tautomer queries in RGD

* Continuing RGD and tautomer development

* Python and C# tests

* Python and C# tests

* C# test

* Typo fix

* For cire tautomer query update properties instead of full sanitization

* Added query comment

* Code review change

* Support Enumeration of input cores

* Mol enumeration test

* Remove useNormalMatch from RGroupDecomp

* Added comments for handling tautomeric core

* Added comments for handling tautomeric core
2023-08-29 08:50:14 +02:00
Ric
58d135a874 Reformat C/C++ code ahead of 2023.03 release (#6295)
* format files

* format template files too
2023-04-28 04:42:35 +02:00
Gareth Jones
a383b9e1dd Refactor RGD moving function implementations from header to source files (#5958)
* Create implementations for functions defined in header files

* Fix testRGroupInternals.cpp include

* Add windows dll export to RGroupData

* Fix swig wrappers

* Remove unused RGroupData constructor

* Fix RGD CMakeLists.txt
2023-01-20 15:01:45 +01:00