46 Commits

Author SHA1 Message Date
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
Greg Landrum
e322928028 swap boost::tuple to std::tuple (#5851) 2022-12-16 16:01:19 +01:00
Greg Landrum
69b143edd0 Swap from RDUNUSED_PARAM to unnamed parameters (#4433)
* cleanup

* more cleanup
2021-08-24 17:19:46 -04:00
Greg Landrum
0e89b2dbea cleanup a bunch of compiler warnings (#3849)
* cleanup a bunch of g++ warnings

* make it work with clang

* remove some additional warnings based on CI builds

* fix that version number

* stop being verbose when building
2021-02-26 05:10:02 +01:00
Ric
703fe5a225 Remove boost::foreach from public headers (#3820)
* remove include from headers

* update implementation files

* completely remove BOOST_FOREACH (#7)

* convert those changes to use auto

* get rid of all usage of BOOST_FOREACH

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2021-02-17 14:15:48 +01:00
Maximilian Greil
0aaa703dec Fixes issue 1761 (#3679)
* Issue 1761

* Additional changes

* Latest changes
2021-01-15 05:11:51 +01:00
Greg Landrum
45b9aef28b clang-tidy modernize-use-default-member-init and modernize-use-emplace (#3190)
* run clang-tidy with modernize-use-default-member-init

* results from modernize-use-emplace

* one uniform initialization per line
otherwise SWIG is unhappy

Co-authored-by: Brian Kelley <fustigator@gmail.com>
2020-05-28 09:07:58 +02:00
Greg Landrum
e5b387fa41 Merge branch 'master' into MorseAtomFingerprint 2020-03-04 11:53:45 +01:00
guillaume godin
74bb9d7aa1 Update MorganFingerprints.cpp
fix the redundantEnv
2020-03-04 09:34:21 +01:00
guillaume godin
f9b15a40d8 Update MorganFingerprints.cpp
fix line split
2020-03-04 06:05:55 +01:00
Greg Landrum
d41752d558 run clang-tidy with readability-braces-around-statements (#2899)
* run clang-tidy with readability-braces-around-statements
clang-format the results
clean up all the parts that clang-tidy-8 broke

* fix problem on windows
2020-01-25 14:19:32 +01:00
Brian Kelley
373a89021e Change boost int types to std types (#2233) 2019-01-22 17:45:03 +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
Greg Landrum
6782634bf8 Part of a fix for #1993 (#1994)
* add an additional equality test to testDatastructs
(can never have too many tests!)

* automatically run assignStereochemistry() for chiral fingerprints
This currently runs for the three FP types that support chirality: MFP, AP, and TT
2018-08-12 17:04:01 -04:00
thegodone
4f770d8dd7 fix permissions 2018-03-12 13:45:18 +01:00
thegodone
79e9828146 adding Hosecode in Morgan 2018-03-06 08:49:35 +01:00
Greg Landrum
ba12d98ad0 Removes ATOM/BOND_SPTR in boost::graph in favor of raw pointers (#1713)
* Removes ATOM/BOND_SPTR in boost::graph in favor of raw pointers

* Actually delete atoms and bonds...

* RWMol::clear now calls destroy to handle atom/bond deletion

* Changes broken Atom lookup for windows/gcc

* Adds tests for running with valgrind

* Adds test designed for valgrind and molecule deletions

* Removes RNG, actually tests bond deletions

* update swig wrappers

* deal with most recent changes on the main branch
2018-01-07 14:19:47 -05:00
Greg Landrum
915cf08faa run clang-format with c++-11 style over that 2017-04-22 17:19:10 +02:00
Greg Landrum
7c0bb0b743 clang-tidy output 2017-04-22 17:09:24 +02:00
Greg Landrum
ec50bf6a9d Fix for github874 (#877)
* Fixes #874

* minor cleanup

* test for 874
2016-04-23 11:53:13 -04:00
Greg Landrum
cfee051e86 "document" the magic constants 2015-12-18 15:08:22 +01:00
Greg Landrum
fe7f6b29df Fixes #695 2015-12-18 12:45:17 +01:00
Greg Landrum
e08e0d16d8 first pass, using google style 2015-11-14 14:58:11 +01:00
Brian Kelley
5f59333a56 Silences unused parameters 2015-10-18 14:02:29 -04:00
Brian Kelley
403a3d6b7c Suppresses Boost warnings 2015-10-18 13:41:03 -04:00
Brian Kelley
95a92282d1 Dictionary access is saniztized and optimized.
o rdkit gains a RDKit::common_properties namespace that contains common string value properties

 o Dict.h and below gain getPropIfPresent that attempts to retrieve a property and returns
  true/false on success or failure.  This is used to optimize access.

 o rdkit learns how to pass property keys by reference, not value.

A new namespace has been added to RDKit, common_properties
that contains the std::string values for commonly used
properties.  This helps to avoid typos in string values
but also avoids a creation of std::strings from character
values.  All accessors (has/get/clear and getPropIfPresent) now pass
the key by reference.

Additionally, getPropIfPresent removes the double lookup
of hasProp/getProp which can be a significant speedup
in the smiles and smarts parsers (10-20%)
2015-01-15 12:23:29 -05:00
Greg Landrum
7fdac1f3a4 Fixes #295 2014-08-11 15:34:02 +02:00
Sereina Riniker
a0aece7204 option useCounts for Morgan fingerprints updated 2014-03-28 08:58:21 +01:00
Sereina Riniker
cc75d0d20d new option useCounts for Morgan fingerprints 2014-03-27 17:36:39 +01:00
Greg Landrum
11c42cf1b2 fix an oversight: add getHashedMorganFingerprint 2012-07-02 07:03:55 +00:00
Greg Landrum
f88d49bd31 cleanup and documentation 2012-02-26 06:07:21 +00:00
Greg Landrum
6dcbdb246b at this point I think all descriptors and fingerprints work 2012-02-25 07:14:29 +00:00
Greg Landrum
561b41522a fix issue 3415636 2011-09-30 05:53:00 +00:00
Greg Landrum
28747ea745 checkin some fragment and fingerprint changes. these are not yet well tested 2011-01-14 06:24:03 +00:00
Greg Landrum
aa7029bbc0 add onlyNonzeroInvariants experimental option 2010-12-15 05:20:17 +00:00
Greg Landrum
6e31713dd9 correct handling of chirality and make it optional (now by default disabled);
allow bond order to be ignored
2010-09-04 05:54:27 +00:00
Greg Landrum
bc78908f1f update feature defns and make them more readable 2010-09-03 11:12:32 +00:00
Greg Landrum
a25f17a45c add fcfp-like invariants for the morgan fingerprinter 2010-09-02 06:00:17 +00:00
Greg Landrum
04dc23247e add additional forms of the morgan, atom-pair, and topological torsion fps 2010-07-02 04:17:21 +00:00
Greg Landrum
3951d47b5f add option to get fingerprint as bit vector 2010-06-20 05:12:33 +00:00
Greg Landrum
b29ba0ac8e missed size_t->boost::uint32_t 2009-10-10 06:13:15 +00:00
Greg Landrum
655ec54b16 fix and test issue 2875658 2009-10-10 06:05:24 +00:00
Greg Landrum
c0759d094c fix a fromAtoms problem with the morgan fps 2009-03-06 09:17:12 +00:00
Greg Landrum
7f190d58b6 support doing Morgan fingerprints only from particular atoms 2009-03-05 12:52:34 +00:00
Greg Landrum
f7127675d9 add morgan fingerprints 2009-03-05 08:01:26 +00:00