13 Commits

Author SHA1 Message Date
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
7a50df222f [WIP] get deprecation CI working (#7004)
* Compile time and runtime deprecation warnings

* Used [[deprecated]] attribute to mark deprecation on cpp side
* Used RDLog to escalate deprecation warnings to python
* deprecated non fingerprint generator fingerprint generation functions

* Address build errors

* suppress deprecation warnings in cpps and tests
* experiment with new SWIG versions in the mac azure pipeline

* More deprecation suppression

* revert mac java experiment

* Fix SWIG syntax errors

* Attempt to fix windows unit test

* Remove test because of logging behavior

* Change linux java build to SWIG 4.1

- removes the need for preprocessor interaction

* Change mac java build to SWIG 4.1

* try updating the CI buid

* lock cmake version

needed to find JNI correctly

* update compiler versions

needed for the boost

* Fix typo and unavailable version

* Fix version conflict

* update mac build

* get linux build working?

---------

Co-authored-by: Patrick Penner <patrick@ppenner.com>
2023-12-21 15:01:05 +01:00
Paolo Tosco
9e2bfca876 fix #6958 (#6959)
* fix #6958

* Update Code/GraphMol/Fingerprints/testFingerprintGenerators.cpp

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

* Update Code/GraphMol/Fingerprints/testFingerprintGenerators.cpp

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

---------

Co-authored-by: ptosco <paolo.tosco@novartis.com>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2023-12-04 04:55:30 +01: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
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
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
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
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
Greg Landrum
55a0f4faba a bunch of changes to the new fingerprinter code (#2679) 2019-10-10 10:14:47 -04:00
Ric
a6b26253ff Fix (most of) mem problems (#2123)
* do not use new on loggers

* del pointers in testDistGeom

* Update Dict hasNonPOD status on bulk update

* delete new Dicts in memtest1.cpp

* fixes in MolSuppliers and testFMCS

* PeriodicTable singleton as unique_ptr

* fix EEM_arrays leak

* fix leaks in testPBF

* fix ParamCollection leak in test UFF

* fix leaks in MMFF

* clear prop dict before read in in pickler

* fix leaks in testFreeSASA

* fix leaks in test3D

* modernize Dict.h & SmilesParse.cpp

* fix leaks in testQuery

* fix leaks in testCrystalFF

* fix leaks in cxsmilesTest

* fix leaks in Catalog & mol cat test

* fix leaks in ShapeUtils & tests

* fix leaks in testSubgraphs1

* fix leaks testFingerprintGenerators

* fix leaks in Catalog/FilterCatalog

* fix leaks in graphmolqueryTest

* these changes reduce bison parse leaks

* fixed leaks in testChirality.cpp

* fix leaks + 2 tests in testMolWriter

* fix 4m leaks in substructLibraryTest

* small improvements to molTautomerTest; still leaks

* fix leaks in testRGroupDecomp

* fix leaks in test; parser still leaks

* fix leaks in itertest

* fix 4m leaks in testDepictor

* fixes in smatest; still leaking due to parser

* fixes in testSLNParse; still leaking due to parser

* flex/bison: always add atoms with ownership; smarts error cleanup

* fix leaks in testReaction

* fix leaks in testSubstructMatch

* fix leaks in resMolSupplierTest

* fix leaks in testChemTransforms + bug in ChemTransforms

* fix leaks in testPickler

* fix leaks in testMolTransform

* fix leaks in testFragCatalog

* fix leak in testSLNParse. Still leaks due to Smiles

* fixed most leaks in testMolSupplier

* pre bison fix

* fix some atom & bond parse problems; others still fail

* bison smiles & smarts, atoms & bonds more or less fixed

* fix leaks in molopstest.cpp

* fix leaks in testFingerprints, MACCS.cpp & AtomPairs.cpp

* fix leaks in moldraw2Dtest1

* fix leaks in testDescriptors

* fix leaks in testInchi

* fix leaks in testUFFForceFieldHelpers

* fix leaks in hanoiTest & new_canon.h

* fix leaks in testMMFFForceField

* fix leaks in graphmolTest1

* fix leaks in testMMFFForceFieldHelpers

* fix leaks in testDistGeomHelpers

* fix leaks in testMolAlign

* initialize occupancy & temp facto with default values

* fix leak in TautomerTransform

* updated suppressions

* fix testStructChecker

* fix logging & py tests

* fix TautomerTransform class/struct issue

* remove misplaced delete in testSLNParse

* deinit in testAvalonLib1

* fix Avalon-triggered(?) bug in StructChecker/Pattern.cpp

* fix random testMolWriter/Supplier fails

- diversify output file names to avoid clashing.
- unify Writers close/destruct behavior.
- flushing/closing in tests.

* use reset in FFs Params.cpp

* comments on testMMFFForceField

* unrequired 'if's added to mol suppliers

* correct cast in FilterCatalog.h

* use unique_ptr in MACCS Patterns

* remove unrequred if in new_canon

* update & move suppressions
2018-10-29 14:33:26 +00:00
Greg Landrum
34b206afc6 Changes to the convenience functions for the new fingerprinter (#2119)
* Changes to Python bulk FP convenience functions
- Change the default fingerprint to Morgan
- Change the method of specifying fingerprints to use an enum instead of a string
- Pluralized the name of the bulk functions to make it obvious that they return more than one FP

* Use Morgan radius=2 for the bulk convenience functions
2018-10-18 20:20:35 +02:00
Greg Landrum
9edd65593d Part of #2074 2018-10-12 04:47:28 -04: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