* fixes#6773
* removed unused captures
* update release notes and cmakelists for beta (#6788)
* Removed some code duplication between Depictor.cpp and common.h (#6368)
* - implemented alignOnly mode into RDDepict::generateDepictionMatching2DStructure()
- the allowRGroups option now also supports potentially missing R groups (i.e., R groups that do not match any atom, such as those connected to generic aromatic atoms)
- added the adjustMolBlockWedging parameter (which defaults to true) to invert/clear molblock wedging information as appropriate
- added unit tests for the above new features
- added RDDepict::generateDepictionMatching2DStructure() overloads taking RDDepict::ConstrainedDepictionParams parameter for convenience
- removed some redundant RDDepict:: namespace specifications
* Fix chirality handling when the chiral atom is the first one in a SMARTS (#6730)
* Set _SmilesStart when parsing SMARTS.
* SmartsWriter should also invert first atoms, like SMILES.
* Update test cases now these SMILES match themselves as SMARTS.
* rerun bison
* cleanup a possible repeated define
* When an atom moves from the first to second position winding should flip in SMARTS (i.e. same as SMILES).
---------
Co-authored-by: greg landrum <greg.landrum@gmail.com>
* Some small cleanups from the UGM Hackathon (#6744)
* move definition of a couple global constants from a .h to a .cpp
* careful removal of some redundant atom PRECONDITIONS
* careful remove of some redundant ROMol PRECONDITIONS
a bit of additional cleanup
* optimization masquerading as modernization
* some more tidying
* a bit more atom cleanup
* change in response to review
* Fixes#6756 (#6780)
* update release notes and cmakelists for beta (#6788)
* move problematic functions to Chirality namespace
* - implemented alignOnly mode into RDDepict::generateDepictionMatching2DStructure()
- the allowRGroups option now also supports potentially missing R groups (i.e., R groups that do not match any atom, such as those connected to generic aromatic atoms)
- added the adjustMolBlockWedging parameter (which defaults to true) to invert/clear molblock wedging information as appropriate
- added unit tests for the above new features
- added RDDepict::generateDepictionMatching2DStructure() overloads taking RDDepict::ConstrainedDepictionParams parameter for convenience
- removed some redundant RDDepict:: namespace specifications
* move problematic functions to Chirality namespace
* added missing dependency
* let's check what is going wrong
* CoordGen tests should not run if CoordGen support is not available in the build
---------
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
Co-authored-by: John Mayfield <john@nextmovesoftware.com>
Co-authored-by: greg landrum <greg.landrum@gmail.com>
* Revert "Removed some code duplication between Depictor.cpp and common.h (#6368)" (#6797)
This reverts commit ddfe708b37.
* All 3d des (#6741)
* add function to calc all 3D descriptors
* fix indentation in CalcMolDescriptors3D
* add error handling for 2D molecules
* suggested changes
* change exception type
* add unit tests
* add random seed to conf gen in unit tests
* fix function call in unit tests
* fix expected PMI1 value in tests
---------
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* _moltoimg() should honor drawOptions.prepareMolsBeforeDrawing (#6792)
* _moltoimg() should honor drawOptions.prepareMolsBeforeDrawing and not run PrepareMolForDrawing if requested not to
* _moltoimg() and _moltoSVG() should honor drawOptions.prepareMolsForDrawing and not call PrepareMolForDrawing if asked not to
---------
Co-authored-by: ptosco <paolo.tosco@novartis.com>
* Bad lasso (#6751)
* Better separation of lines.
* Only put atoms in colour list once.
* Test.
* Hash codes.
* Response to review.
* First attempt at fixing stray line.
* Tidier.
* Squared distances.
* tag release (#6801)
* fixes#6773
* removed unused captures
* - fixed comment
- fixed bug found in checkIfRingsAreClosed()
* - removed redundant NRing queries
- added ring size queries to avoid incorrect matches with MCS results originated with MatchFusedRingsStrict
* fixed doctests
---------
Co-authored-by: ptosco <paolo.tosco@novartis.com>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
Co-authored-by: John Mayfield <john@nextmovesoftware.com>
Co-authored-by: Rachael Pirie <56546141+RPirie96@users.noreply.github.com>
Co-authored-by: David Cosgrove <davidacosgroveaz@gmail.com>
* enable Werror on Mac and Linux
* do not fail on boost multiprecision pessimizing move
* fix eigen array_bounds warning
* Fix unused arg in Rascal MCS
* fix range-loop-construct warning in Rascal MCES
* fix sign mismatched comparison
* drop unused lambda capture
* allow FMCS timeout test more time under Debug (not a warning!)
* fix fwd declaration of struct RascalClusterOptions
* fix deallocator mismatch
* fix two minor leaks
* fix a real leak
* more minor leaks
* fix another real leak, plus some potential ones
* fix std::move preventing copy ellision
* allow longer run time for debug builds
* make maxBondMatchPairs and getLargestFragSize unsigned int
* make snake case camel case
* update to current master, fix new warnings
* update again and more fixes
* add #include <optional>
* fix char array deallocation
* update and fixes in Marvin writer
* unsigned int
* more copy ellision fixes
* more copy ellision fixes, and typos
* and some more
- Switched from dynamic to static allocation for an instance of `MCSParameters`
- Switched to using `auto` where possible
- Added a few `CHECK_INVARIANT` where appropriate before dereferencing pointers
- Moved some inline comments to the previous line to improve readability
- Added a early check for `CompleteRingsOnly` in `checkBondRingMatch()` to improve computational efficiency
- Removed `RingMatchTableSet` entirely as 1) it is unnecessary since its functionality is already provided by `RingInfo` 2) it abused the `userData` pointer. This allows cleaning up and simplifying the code, particularly the Python wrappers which had a significant amount of added complexity to support it
- Removed all the code that was deprecated several releases ago
- Reimplemented ringFusionCheck() from scratch to address several bug reports; also switched from std::set to boost::dynamic_bitset for better efficiency
- Replaced boost::tie with boost::make_iterator_range
- Modernized `for` loops where possible
- Removed entirely the QueryRings structure as its functionality is already available in RingInfo
- Removed entirely the _DFS() function since the same algorithm can be implemented in a simpler and more efficient way using RingInfo (from 2m28.441s to 2m9.859s for the same task)
- Replaced std::vector<bool> with boost::dynamic_bitset
- Replaced C-style casts with C++ casts
- Replaced some size_t with unsigned int
- Refactored checkIfRingsAreClosed() such that checkNoLoneRingAtoms() is not needed anymore
- Added a test for slow runtimes with CompleteRingsOnly
- Setting Timeout to 0 means no timeout, as it should be
- Removed unused `steps` variable from `MaximumCommonSubgraph::growSeeds`
- Storing both Atom and Bond pointers and their indices on Seed and MCS data structures is time-consuming and a potential source of incons
istencies; storing pointers is sufficient
- Promoted `MaximumCommonSubgraph::match` from `private` to `public`
- `NewBonds` was declared `mutable`, but `Seed::fillNewBonds()` was incorrectly declared as `non-const`, which caused the need for an ugly
(and unnecessary) `const_cast`.
I have now removed the `const_cast` and correctly declared functions that alter `NewBonds` as `const`, since `NewBonds` is explicitly `mut
able`
- Removed some useless random scoping that was peppering the MCS code
- Removed a significant amount of duplicate code from the Python wrappers by inheriting from a base `PyMCSWrapper` class
- Fixed#6082
- Fixed#5510
- Fixed#5457
- Fixed#5440
- Fixed#5411
- Fixed#3965
- Fixed#6578
Co-authored-by: ptosco <paolo.tosco@novartis.com>
* reverted all changes that did not really belong to this PR
* I had forgotten ChemReactions_static
* changes in response to review
---------
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
- make sure that supplier istream is opened in binary mode or istream::tellg() will
report wrong offsets on MinGW builds (MSVC will make no difference)
- avoid that in MSVC conda DLL builds the libboost_*.lib static
libraries are picked by cmake instead of the boost_*.lib import libraries
by defining BOOST_ALL_DYN_LINK
* MolFragmenter: fix a leak when exceptions are thrown
* DistGeomHelpers: fix leaks when exceptions are thrown
* SubstructLibrary: fix usage of invalid memory
* clear up leaks found during ASAN testing
* Include Winsock2.h instead of Windows.h in DebugTrace.h
Including `Winsock2.h` has a number of advantages:
* It is much smaller than `Windows.h`, improving build time.
* It allows rdkit to be used in environments where `WIN32_LEAN_AND_MEAN` is set.
* It is [the recommended way to get `timeval`](https://docs.microsoft.com/en-us/windows/win32/api/winsock/ns-winsock-timeval) (rdkit doesn't actually use `timeGetTime`).
* Fix build break in test code
* Fix test failures
* 3D MCS
* Move test data to dedicated directory
* 3D MCS: changes based on code review
* Replace conformer generation code in MCS 3D test with mol blocks
* 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>
* 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
* - MatchFusedRings does not imply CompleteRingsOnly anymore
* - use a more specific query molecule rather than an ambiguous SMARTS string in MCSResult
* - changes in response to review
* - fixes#2663 (The C++ MCS code generates ambiguous SMARTS strings)
* - fixes#2662 (C++ MCS code returns a null MCS between
methylcyclopentane and methylcyclohexane)
Fixes#2420
Tests updated to reflect changes.
The existing CompleteRingsOnly code wasn't actually guaranteeing CompleteRingsOnly at all, it was just causing #2420.
The updated code actually makes sure that bonds that were ring bonds in one of the queries are ring bonds in the final MCS.
This is done via a relatively simple DFS.
* very basics of charge checking in
* add the new parameters to the python wrapper. more testing please
* Additional testing.
* update which unittest methods are used