* DistViolationContribs optimization.
* Update preFactor calculation to avoid numerical instability: use square of distance instead of squared distance directly, to prevent accumulated errors leading to CI test failures on Mac when d2 > c.ub2.
* Optimize distance calculations by moving sqrt under condition branches to avoid unnecessary computations when squared distance bounds are not met.
* fixes
* do not leak MolCatalogParams
* do not leak points on align failures
* give python ownership of pointers returned in getFingerprintsHelper
* clean up ScaffoldNetwork ptr if createNetworkHelper fails
* manage FF ptrs during construction
* wire in ownsBondInvGenerator in getMorganGenerator
* manage weights in rdMolAlign CalcRMS
* fix ownership of matches list/tuple in generateRmsdTransMatchPyTuple
* manage stream in createForwardSupplier during construction
* drop redundant Point3D allocations in GetUSRDistributionsFromPoints
* fix signed comparison mismatch
* make sure 13 bounds constraints are added to angles that are part of an impropper torsion
* make sure angles are constrained with higher force constant to prevent rings from folding
* adapt tests to new behavior
* move comment to correct place
* add min bounds test
* make sure we are not terribly outside of the bounds matrix
* add angles and distances
* add Inversions
* add torsiona angle contribs
* use new contribs in test
* use new inversion and torsion contribs in dg
* use new distance contribs in dg
* use new angle constraints in dg
* use new constraints in FF tests
* update docstrings
* remove unused import
* include new contribs
* cleanup includes
* make changes requested by @greglandrum
* use std::move instead of release
* refactor skeleton
* fix contribs
* adapt documentation
* clarify function names
* make variable names more readable and update documentation
* switch boost dynamic bitset with std::vector<bool>
* clearer const name
* fix typo and go back to dynamic bitset
* go back to old function signature
* add inline overload with fewer arguments
* remove unecessary doc lines and add tol to distance directly in function call
* use constexpr for known distance force constant
* update documentation
* enhance documentation
* english
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* make changes requested by @greglandrum
* make all constexprs
---------
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* First try at using DistViolationContribs
only the most basic of testing has been done
also add ForceField::distance2 to allow some optimizations
* allow testing using old approach
* optimization
At this point testUFFForceFieldHelpers fails since the check for std::max_element
in the e_contribs vector at Embedder.cpp:513 is now doing something totally different
(instead of a bunch of small distance violation contribs, we have one big one).
We'll need to come up with something for this.
With the benchmarking set that I'm using - 500 DG conformers for ~465 COD molecules
using 10 threads - this runs in almost 10% less time than master.
* backup;
builds, tests do not pass
* all tests pass except the old failure
* more constification
* backup/debugging
* add fourthdim contribs the same way
* tests now pass
* deprecations
* remove unused vars and code
* changes in response to review
* first try
* do over with @greglandrum: fix atomPairs, lower SP angle force constant.
* change test file for 'update parameters from JSON':'ETKDGv2'
* adapt length to fix
* remove overwritten random seed
* adapt test files to changes
* adapt amide test, check with Greg
* fix python tests and remove unused imports
* proposal for new test molecule
* remove double comparison, increase threshold. Check with greg
* remove TODO comments
* remove debugging statements
* same code for both since they are doing the same
* format docstring to make more readable
* remove todo comments
* add indentation to angle param
* adapt doctest to newly generated conformers
* fix test to pass with fewer failures and move mol to mol file for less cluttered test.
* a bit of modernization
* remove cerrs and format correcly
* reverted test to old behavior
* use insert and make force field contribs exception safe
---------
Co-authored-by: greg landrum <greg.landrum@gmail.com>
* Fixes#7181
adds a new constrainedAtoms member to the etkdgdetails structure which is used to propagate info about the coordMap into the ETK minimizations
* Update Code/DistGeom/DistGeomUtils.cpp
Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
* Update Code/DistGeom/DistGeomUtils.cpp
Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
---------
Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
* remove some more deprecated numpy stuff
* workaround for changes to random.shuffle in python 3.11
* fix pickling of rdkit mols in python 3.11
* add py311 build to CI
* update py311 CI
* remove qt for py311 for the moment
* only use the new code with pyversion >=3.11
* use the new logic for all pickle_suites
* need to work with older py too
* add custom parameter to tune the relative weights of distance bounds to all the other force terms during ETKDG conformer generation
* fixes as per reviewer comments
* collection of doxygen fixes
* more files with fixed doxygen comments
* more doxygen fixes
* more doxygen fixes
* last set of doxygen comment fixes
Co-authored-by: Jason Biggs <jasonb@wolfram.com>
* 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>
* change minimal cmake version to a consistent 3.5
* progress towards a cleanup
* get the basic python deps working
* two more libs
* another round of changes
all tests pass at this point
* next round of changes
all tests pass at this point
* close to done
all tests pass
* very close
* almost done
* shift the RDBoost dependencies around a bit
* remove an extraneous python linkage
this is trying to get the mac builds working again
* Only link to python if it was built shared (#3091)
* change in response to review
Co-Authored-By: Ric <ricrogz@users.noreply.github.com>
* move that suppression of the maybe-uninitialized warning to BoostStartInclude.h
Co-authored-by: Brian Kelley <fustigator@gmail.com>
Co-authored-by: Ric <ricrogz@users.noreply.github.com>
* improvements for smal anr large ring conformer generation
* add documentation and reorder parameters in EmbedParam
* resolve merge conflict due to coordMap null pointer
* minor changes to address merge comments
* reorder variables in EmbedParameters
* add regression test for small ring and macrocycle torsion preferences
* not apply small ring torsions to bridged ring systems
* fix and test for bridged small rings torsion pattern exclusion
* add ETKDGv3 and srETKDGv3 option to keep compatiblity for original ETKDG
* EKTDG version 3 related minor fix
* add reference to doc string
* Java wrapper for ETKDGv3
* fix doc
* change CPCI to shared_ptr, but it seems to be much slower
* minor modifications to small bridged ring systems, and share_ptr from previous commit is fine
* rollback from shared_ptr(map) to just map
* run clang-format
Co-authored-by: Shuzhe Wang <shuwang@eu-login-10.euler.ethz.ch>
Co-authored-by: Shuzhe Wang <shuwang@eu-login-14.euler.ethz.ch>
Co-authored-by: Shuzhe Wang <shuwang@eu-login-17.euler.ethz.ch>
Co-authored-by: Shuzhe Wang <shuwang@eu-login-45.euler.ethz.ch>
Co-authored-by: Shuzhe Wang <shuwang@eu-login-05.euler.ethz.ch>
Co-authored-by: Shuzhe Wang <shuwang@eu-login-15.euler.ethz.ch>
Co-authored-by: greg landrum <greg.landrum@gmail.com>
* 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
* disable builds of the StructChecker code by default
* operator"" _smarts() doesn't need to catch sanitization errors
* remove unused function
* turn back on some tests that shouldn't have been disabled
* Remove unused code from SMARTS parser and simplify a bit
SmilesParseOps::AddFragToMol is now used only from the SMARTS parser, so we can simplify the API
* Removes obsolete special case code for SMARTS
This was relevant when organic atoms in SMARTS queries were stored as two-part queries.
* improve SMARTS testing
make sure we can generate SMARTS from all the examples and then parse that again.
* Fixes#2814
* Fixes#2815
* some additional smarts tests to improve coverage
* test copy ctor and getPos
* remove obsolete test_list files
* include tests for the morgan invariant generators
* more cleanups and coverage improvements
* remove files that were mistakenly added
* move _embedPoints over to use EmbedArgs structure
* move _embedWithExpTorsions over
* a few pointer cleanups
* step by step
* more
* wrap the ETKDG paramaters into a struct
* fix a typo
* additional cleanup
* more
* simplify the embedargs struct
* pass embedParams instead of having them in embedargs
* a bit more cleanup
* response to code review
* 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
* Fixes atom documentation
* Fixes#1461
This is a complicated one. Basically URANGE_CHECK when
used on unsigned integers has a problem when the size of
the range it’s checking is 0. The standard operations is
to check
URANGE(num, size-1)
Which (for unsigned integers) obviously rolls over.
This fixes all usage cases to be
URANGE(num+1, size)
And fixes the bugs found. (addBond and the mmff tests)
* Fixes#1461 - Updates URANGE_CHECK to be 0<=x<hi
* add a test (currently fails, of course)
* backup, not really working
* Fixes#1240
* a bit more parameter tweaking to get some more structures to embed
* enforce planarity
* increase the force constant for the impropers
* force constant adapted
* reduced tolerance for planarity and force constants changed for some torsions
* tolerance for planarity increased a bit again
* cerr outputs removed
* planarity tolerance increased
* boost log added in planarity check