13 Commits

Author SHA1 Message Date
Greg Landrum
28112aaef9 add ability to block atoms/bonds from participating in tautomer zones (#9297)
* add ability to block atoms/bonds from participating in tautomer zones

* be more structured with the atom flag

* response to review

---------

Co-authored-by: = <=>
2026-05-29 05:38:02 +02:00
Greg Landrum
a6f0493fdd add HetAtomProtomerv2 (#7253) 2024-03-17 10:58:47 +01:00
Greg Landrum
8559f5d3a9 Add a new tautomer mol hash (#6289)
* backup

* does not work

* backup

* passes all tests

send more tests!

* backup

* seems to mostly work
needs cleanup still

* more tests + python wrappers

* more testing

* some cleanup

* fix problem with newer boost

* be more expansive about unsaturation

* be symmetric in choosing the starting bond
fix a test error

* passes all tests;
passes ChEMBL regression test

* docs

* update cookbook

* expose the new hash function to the cartridge too

* support v2 hash in the registration hash

* better testing

* alternate, simpler approach for that

* remove vestigial docs
2023-04-26 16:57:39 +02:00
Iren Azra Azra Coskun
9c77556bf3 Support Pseudoatoms like Pol and Mod in the RegistrationHash (#6175)
* Stop using GetCanonicalSmiles

* SHARED-8633: Delete _GetCanonicalSmiles and remove unwanted cx extensions from tautomer has using rdkit functions

* Adding tests for matching and non-matching pseudoatom hashing cases

* SHARED-8633: Adding a test to ensure that passing in data field names allows data sgroups to be included in the hashing process

* SHARED 8633: small naming improvement

* Revert "SHARED-8633: Adding a test to ensure that passing in data field names allows data sgroups to be included in the hashing process"

This reverts commit 8f163ec1f7.

* Using a global variable for default cxflags

* Issue 6224: Adding a new optional parameter to the rdMolHash.MolHash function to allow customization of CXSmiles extensions. Also changed RegistrationHash.py tautomer hash calculation to use this new functionality

* Issue 6224: Extended CXSmile extension customization functionality to all the relevant functions in hashfunctions.cpp

---------

Co-authored-by: Iren Azra Coskun <coskun@Irens-MacBook-Pro-2.local>
2023-03-30 08:05:26 +02:00
Greg Landrum
4bbbc6611d Add a CXSMILES option to the MolHash (#5058)
* Nonchiral atoms should be removed from StereoGroups

This fixes a bug where atoms which have no chirality were left in StereoGroups

In order to make this work, ROMol::setStereoGroups() needed to be made public.
That shouldn't be a problem since it doesn't change connectivity.

* support CXSmiles extensions in the hashes

* initial tests for that

* some cleanup

* copyright header cleanup

* minor refactoring

* call out the changes in the release notes

* extension and more testing

* add python wrappers
2022-03-03 16:00:38 +01:00
Greg Landrum
5712176605 Implement the two deprecations that were planned for the 2020.09 release cycle (#3047)
* Deprecation: planned removal of .message() and .getMessage() methods

* Deprecation: planned removal of old MolHash code

* document deprecations

* output the diffs when the psql tests fail

* remove .message() from SWIG wrappers

note that the KeyError doesn't work properly. We should clean up the the exceptions here anyway

* typo
2020-04-01 14:30:07 +02:00
Greg Landrum
5dfd67a22a Add new mol hashing code (#2636)
* copy in, get building, add some basic tests

* complete the testing
Except for regiosiomers, which do not work

* regioisomers work now

* backup commit; things work

* remove last of NM macros from hashfunctions.cpp

* remove last of NM macros from hashfunctions.cpp

* remove dependency on the abstraction layer

* typo

* start using namespaces
clang-format

* switch to using enums for the HashFunctions and StripTypes

* Add initial python wrapper (and tests)

* move the new hashing code to the MolHash library

still may want to revise the naming of this

* Setup deprecation of the older hashing code

* better release notes text

* change in response to review
2019-09-24 07:55:21 -04:00
Greg Landrum
f35e04403a replace the usage of rdk_auto_ptr with std::unique_ptr (#1752)
That is what was being used for modern c++ anyway
2018-02-14 19:49:47 -05:00
Greg Landrum
f595f891f6 rename rdk_unique_ptr to rdk_auto_ptr
add C++11 compatibility
2016-02-13 14:58:35 +01:00
Greg Landrum
fd70687cae at this point everything builds and all tests pass 2016-02-13 08:25:25 +01:00
Greg Landrum
e08e0d16d8 first pass, using google style 2015-11-14 14:58:11 +01:00
Brian Kelley
403a3d6b7c Suppresses Boost warnings 2015-10-18 13:41:03 -04:00
Greg Landrum
f38204252a Add initial version of molecule hashing 2015-02-17 04:03:48 +01:00