8 Commits

Author SHA1 Message Date
Greg Landrum
b4164ea2f2 Support serializing/deserializing FP generators to JSON (#9000) 2025-12-24 19:09:05 +01:00
Greg Landrum
2f119c2693 Convert reaction fingerprinter to use FingerprintGenerators (#7931)
* FingerprintGenerator improvements

1. simplify construction by adding ctors taking FingerprintArguments
2. remove inexplicable boost::noncopyable from FingerprintArguments

* Switch FingerprintType to be an enum class

* Fixes #7521

* dumb mistake

* initialize everything

* get the defaults right

* Update Code/GraphMol/ChemReactions/ReactionFingerprints.cpp

Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>

---------

Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
2024-10-31 06:58:02 +01:00
Greg Landrum
da6cd73168 Run clang-format across everything (#7849)
* run clang-format-18 across Code/*.cpp and Code/*.h

* run clang-format-18 across External
2024-09-26 13:39:02 +02:00
Greg Landrum
a96f3ac4b4 FingerprintGenerator refactoring (#5748)
* add FingerprintFuncArguments() to simplify things

* getFingerprintHelper() also uses FingerprintFuncArguments

* port atompairs and tts to use new code

* not working yet

* all tests pass

* move the includeChirality flag to the global arguments
ensure stereochemistry is assigned when calculating fingerprints using chirality (#1993)

* migrate legacy morgan fp code to use generators

* refactoring the way bit info is handled

* all tests pass

* all tests pass

* expose getArguments()

* rename getArguments->getOptions

* copyright updates

* update a test

* remove template from FingerprintArguments
some other refactoring and cleanup

* hopefully fix the windows dll builds

* partial docs update

* improve docs and API

* more docs

* more docs

* a bit of modernization

* more doc tweaks

* changes in response to review
2022-12-28 17:40:13 +00:00
Eisuke Kawashima
013ba4f21d Run clang-tidy (modernize-use-override) (#4251) 2021-07-01 05:18:56 +02:00
Greg Landrum
8bd68be098 Add bit information to generalized FP generator (#3858)
* Split bonds to per-atom parts for interaction

* It would help to commit test fixes also

* Update Code/GraphMol/MolDraw2D/MolDraw2D.h

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

* Update Code/GraphMol/MolDraw2D/MolDraw2DSVG.cpp

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

* Update Code/GraphMol/MolDraw2D/MolDraw2DSVG.cpp

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

* Update Code/GraphMol/MolDraw2D/MolDraw2DSVG.cpp

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

* Update Code/GraphMol/MolDraw2D/MolDraw2D.cpp

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

* Update Code/GraphMol/MolDraw2D/MolDraw2D.cpp

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

* Update Code/GraphMol/MolDraw2D/MolDraw2D.cpp

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

* Update Code/GraphMol/MolDraw2D/MolDraw2D.cpp

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

* Update Code/GraphMol/MolDraw2D/MolDraw2D.cpp

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

* Update Code/GraphMol/MolDraw2D/MolDraw2D.cpp

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

* Update Code/GraphMol/MolDraw2D/MolDraw2D.cpp

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

* Update Code/GraphMol/MolDraw2D/MolDraw2D.cpp

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

* Update Code/GraphMol/MolDraw2D/MolDraw2D.cpp

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

* Update Code/GraphMol/MolDraw2D/MolDraw2D.cpp

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

* Refactored code

* bit info works for Morgan fps and is tested
get the stubs in place everywhere else

* add RDKitFP bit info too

* expand atom pair info

* add info for TTs

* atom pairs

* enable shared_ptrs for SparseBitVects in python

* fix core leaks in the bulk operations

* simplify the AdditionalOutput API

* first pass at a useable AtomOutput from Python
needs "a bit" more testing.

* documentation

* response to review

Co-authored-by: SPKorhonen <samuli-petrus.korhonen@iki.fi>
2021-03-06 04:25:51 +01:00
Greg Landrum
d203801350 add the appropriate exports for the new fingerprint code (#2098)
* run clang-tidy

* try to get the declspecs in

* cleanup

* last steps to get the windows build working
2018-10-08 11:10:23 +02:00
Boran Adas
139d2bdb83 GSoC 2018 - Fingerprints (#2005)
* Fingerprint generator first prototype

* Added some more details to the prototype

* Update based on comments

* Added additional outputs and return type changes

* FingerprintGenerator updated and placeholder implementation added

* Added getFingerprint implementation to FingerprintGenerator

* Added comments for FingerprintGenerator

* WIP: Atom pairs fingerprint implementation for FingerprintGenerator

* Removed templates and added comments

* Fixed AtomPairEnvGenerator creating duplicate environments

* Added a atom pair old version compatibility test

* Moved the FingerprintGenerator related tests to a new file

* Added new comments and changes from the PR comments

* using int types from std instead of boost and remove cleanUpEnvironments

* Minor refactoring for atom-pair atom code generation

* Added more tests for AtomPairGenerator

* Removed additional clean up method from FingerprinGenerator

* Added additional output for atom-pair fingerprint and a test

* Removed leftover code

* Default argument changes

* Removed leftover include

* Default invariant generation logic seperated from env generation logic for AtomPairs

* Implemented fingerprint as bit vector type and added the test for it

* Folded fingerprint implementation and a test case added

* String representation for fingerprint generator is added

* Python wrapper for fingeprint generator added with a simple test

* Removed unused linked libraries

* AtomPair related wrapper code moved to its own file

* Python wrapper methods for different fingerprint output types added

* Wrappers for invariants generators and tests are added

* Added more comments and tests

* Changed python side names for FIngerprintGenerator and removed extra wrappers used for invariant generators on python

* Fixed object lifetime problems for invariant generators in  Python

* Fixed typo

* Added a list of test molecules and made fingerprint generator related classes noncopyable

* Morgan fingerprint python wrappers

* Removed argument helper class for wrapper

* Morgan Fingerprint simple implementation

* Added more invariants generators for Morgan

* Fixed a bug in Morgan bond invariant generator

* Added invariant generator combination tests

* Added atom pair generator to the invariant generator combination test

* Fixed a problem in morgan feature invariant generator

* Overriding invariants without generators is made possible

* Added comments and documentation

* Radius changed for morgan fingerprint test

* RDKit fingerprint generator implementation with cpp tests

* 32 bit and 64 bit fingerprint support for FingerprintGenerator

* Common utilities moved to FingerprintUtil.h and code duplication reduced

* Solved undefined reference issues for FPGenerator templates

* Topological torsion fp generator added

* Fingerprint notebook added

* Python wrappers updated

* Morgan tests added

* Tests expanded and reduced excess amounts of collision in folded output

* Expanded tests

* More documentation

* Python docs for atom pair

* Updated fingerprint generator notebook

* Python wrapper documentation added

* Seperated FingerprintGenerator implementations into seperated file again

* Python wrapper names updated to reflect new naming

* getCountFingerprint now returns 32 bit output and count simulation does not affect count fingerprints

* Python 3 compatibility for fingerprint generator tests

* a bit of ABC cleanup

* some comment formatting got screwed up

* <sigh>

* fix an uninitialized memory problem

* Added copyright statement to new files

* Corrected some comments and docs according to the latest changes

* Bulk fingerprint generation and tests

* Convenience function wrappers and size limiting for getSparseFingerprint

* Copyright text fixed

* Info string added to python wrappers

* Some changes to get the swig wrappers building again
2018-10-07 05:02:12 +02:00