* expose symmetrizeTerminalAtoms() to the public API
* support symmetrizing terminal groups in RMS pruning in confgen
* add that to the python wrapper
* add backwards compatibility note
* allow JSON config of the new option
* backup
* backup
* backup
* new testing file
* reorder things in the SMILES and SMARTS parser
parameters to allow easier struct initialization
* add v2 of SmilesMolSupplier
v1 is not yet there
* add TDTMolSupplier
add some very basic tests for v1 suppliers
* more progress
* all tests passing
I think all the suppliers are now moved over
* check for maeparser before building the tests
* get SWIG builds working
* changes in response to review
* refactoring of MolStandardize validation module
* redefine MolStandardize::ValidationErrorInfo as an alias for std::string
* changes in response to review
* describe the backward incompatible changes to MolStandardize in the release notes
* Sanitize number of radical electrons in case of invalid value assigned by CXSMILES (#6370)
* static_cast<int> for integer comparison
* Add unittests for 0 explicit hydrogens
* Fix unittests of radical count in fileParsersTest1
* Fix testMolWriter
* Fix testMrvToMol
* Address Greg's comments
* fix a float comparison in a test
* make ETKDGv3 (i.e. v2 of the torsion parameters) the default.
This should have been done a long time ago.
* change default for onlyHeavyAtomsForRMS too
* release notes update
* misc adaptations/modernizations
plus a few changes to allow pytest discovery
* get the recap unittests running
* pytest config updates
* all tests pass
* integrate the pytest stuff into ctest
* integrate Projects dir
better cmake integration
* ci build env updates
* ignore more files
* remove six.py
* cleanup UnitTestPandasTools
* cleanup pytest
* remove obsolete use of rdkit.six from doctests
* update release notes
* mysterious CI fix
* add conftest to remove some tests
* remove the old python-based testing infrastructure
---------
Co-authored-by: Ric <ricrogz@gmail.com>
* switch from boost::any to std::any
* changes in response to review
* handle the slightly different error messages from different compilers
* document changed error message
* try to use g++10 for the linux builds
* remove those CXX defns
* another spelling
* stupid typo
* bump all linux builds to g++-10
* some day this will be done
* small steps
* increase mac ci builds runtime
- 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>
* Scale bonds, make the Wedge detection cleaner, add more tests
* Readd comment
* Use document bond length
* Adds roundtrip test through a molblock
* a bit of cleanup
* change expected results for a bogus structure
add a non-ambiguous version of it
* fixes#6462
* document incompatibility
---------
Co-authored-by: Brian Kelley <bkelley@relaytx.com>
* - deprecate JSMol::is_valid() and JSReaction::is_valid()
- methods returning JSMol and JSReaction objects now return nullptr upon failure rather than an invalid object
* changes in response to review
* unexposed JSReaction::is_valid given it was not exposed before this PR
---------
Co-authored-by: Tosco, Paolo <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>
* handle the cases when the flag is set
* add python wrapper
* Fixes#6241
update and finish?
* set the chiral flag to 0 in the mol file parsers
* adjust to the chiral flag always being present
* add note
* change default behavior so that dative bonds are not included in ring finding
* make sure that generating 2D coords does not lose the rings
* cleanup some leftover problems
* - expose [sg]etUseLegacyStereo()
- In MolToSmiles() doIsomericSmiles should default to true as in C++ and Python
- added missing parameters to MolToSmiles() and MolToMolBlock()
- added SmilesWriteParams MolToSmiles() overload
- added and updated Java tests
* - changes in response to review
- exposed the same functionality also in MinimalLib and CFFI and added tests
---------
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
* add function to canonicalize enhanced stereo representations
* use enhanced stereo in canonicalization
* Fixes#6045
enables the doc tests for EnumerateStereoisomers.py
Re-enables the BRICS tests
* some things work... tests need to be updated
* c++ and python tests pass
* update expected psql results
* run the canonicalization on SMILES generation;
c++ and python tests pass
* cartridge and java tests pass
* update doctests
* - Avoid that Jupyter Notebooks become painfully slow when using PandasTools with hundreds of molecules by using pandas formatters rather than patching Chem.Mol.__str__
- Make sure that static PNG images in pandas DataDrames honor PandasTools.molSize
- Make sure that PandasTools works on the whole range of pandas versions
- Improved and more robust loading of rdkit-structure-renderer
- MolsToGridImage is now also interactive
- Interactive rendering now displays highlights and query molecules correctly
* changes in response to review
* fix special character HTML escaping
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
* update AvalonTools to version 2.0.1
* Improvements to 2D depiction and alignment/RMSD calculation
- Refactored the straightenDepiction code which is now much simpler and more readable and supports a minimizeRotation parameter
- added C++, Python and JS tests for the new minimizeRotation parameter
- refactored tests to use CalcRMS rather than an internal implementation to compute RMS deviations
- Removed duplicated code in CalcRMS() and getBestRMS() and made their APIs consistent with respect to supported parameters
IMPORTANT NOTE: for backwards compatibility I set the CalcRMS() default for the new symmetrizeConjugatedTerminalGroups
to false as this parameter was not originally supported. @greg: I would be very much in favor of setting this to true instead
if you agree, even though it might change results for existing scripts, as I think it is a much more sensible default.
- Improved documentation to clarify the difference between CalcRMS() and getBestRMS()
- Added unit tests for CalcRMS() as there was none previously
- Added tests for the additional CalcRMS() and getBestRMS() parameters
- Added a new getBestAlignmentTransform() function
- The CFFI function set_2d_coords_aligned() now returns the matching atoms similarly to the C++, Python and JS counterparts
IMPORTANT NOTE: this required an API change for the additional char ** parameter used to return the match.
Existing code using set_2d_coords_aligned() will fail to compile and will require a last NULL parameter to be added to compile again
- Removed duplicated code between CFFI set_2d_coords_aligned() and JS generate_aligned_coords()
- Added has_2d_coords() to the CFFI library
- generate_aligned_coords() now supports JSON parameters and the previous versions are deprecated
- set_2d_coords_aligned() and generate_aligned_coords() both support an alignOnly parameter (which defaults to false).
If set to true, rather than re-generating a fresh 2D layout around templateMol, the existing coordinates (if any) are simply aligned
to the provided templateMol. If the molecule has no coordinates, a set of 2D coordinates is generated independently of templateMol
and then aligned to the provided templateMol
- avoid that when acceptFailure is false set_2d_coords_aligned() and generate_aligned_coords() overwrite existing coordinates
* - explicitly link testDepictor to MolAlign library
* - add MolAlign dependency to testDepictor (rather than to the catch test as in the previous commit)
- add a couple of tweaks
* suppress compiler warnings (1st pass)
* warnings: 2nd pass
* warnings: 3rd pass
* - alignOnly mode should also support allowRGroups
* - fixed C++ build
- added tests for allowRGroups+alignOnly combination
* changes in response to review
* added an entry to backward incompatible changes regarding set_2d_coords_aligned()
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
* revert duplicate chunk in release notes
* replace deprecated ifdefs
This one gets rid of USE_BUILTIN_POPCNT and RDK_THREADSAFE_SS
use RDK_OPTIMIZE_POPCNT or RDK_BUILD_THREADSAFE_SSS instead
* get rid of BUILD_COORDGEN_SUPPORT from ROMol.i
* fix a stupid typo
* update release notes
* Fixes#5095
* add some casts to make that a bit less disruptive
* go back to the simpler form for constructing the test table
* fix release notes
* do cleanup step too
* updates in response to review
* disable the info and debug logs by default
* adjust tests to the newly disabled logs
* add LogStateSetter
* namespace reorg
* add some tests
* remove vestigial code
* switch to using std::vector
* Nonchiral atoms should be removed from StereoGroups
This fixes a bug where atoms which have no chirality were left in StereoGroups
In order to make this work, ROMol::setStereoGroups() needed to be made public.
That shouldn't be a problem since it doesn't change connectivity.
* support CXSmiles extensions in the hashes
* initial tests for that
* some cleanup
* copyright header cleanup
* minor refactoring
* call out the changes in the release notes
* extension and more testing
* add python wrappers
* Support for logging via Python's logging module.
* Avoid the Python 3.9+ PyObject_CallOneArg function.
* Move logging functions to RDBase; Python logger by default; clean up tests.
* See if removing NOGIL fixes the Windows stall.
* get tests running on windows
* Reset to using C++ logging; whiespace tweaks.
* Longer timestamp grace period; try tempfile vs Windows logging stall.
* Clean up commented code; get details for log count bug.
* SubstructLibrary: Fix c++ threads calling into python
* FilterCatalog: Fix c++ threads calling into python
* Release notes; make sure Jupyter still logs to sys.stderr.
* Always use thread-local log buffers.
* de-verbosify a test
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
Co-authored-by: Brian Kelley <fustigator@gmail.com>