* get BertzCT working with numpy 2.4
* test pass with with Pandas 3.0
(on windows at least)
* update testRanker too
* update nb test
* run win32 CI tests with different pandas versions
also updates boost version
* works with pandas 2.0?
* update linux_build_py311 -> linux_build_py312
test both old and new pandas
can't go higher with the python version yet because the older pandas and numpy are not available.
* doctest fix?
---------
Co-authored-by: = <=>
* Iterated interface to substructure search
* Add a test
* Add python unit test
* Expose the toTryChunkSize parameter to python
* Respect the maxHits parameter; sort the hitset
* Treat maxHits=-1 as infinite
* Add callback versions of fp and rascal search; conform to C++ style
* Add fp and rascal C++ tests
* maxHits=-1 tripped me up again
* Add fp and rascal python wrappers.
Changed the name of the callback-based method to have "Incremental"
in the name because the overloaded versions with default arguments
can't be reliably selected by the boost python runtime. Probably
better to have a different method name anyway since the return type
is None instead of a results object.
* Delete stray printf.
* Run clang-format
* Use std::int64_t instead of ssize_t for portability
* Make docstrings on callback-based methods more descriptive
* Stop incremental search if the callback returns true.
* Add an example of incremental synthon search to the getting started docs
* trivial commit to force CI rerun
* Reformat single line if statements.
* Make SearchResultsCallback take const ref input
* Fix another one-liner
* Oops - another one-liner
* Use distances on all valid paths rather than just shortest distance.
* Optimise BondPaths.
* Optimise BondPaths.
* Hash coded for the bond paths.
* Faster find all paths.
* Build in gcc working.
* Comment.
* Remove debugging code.
* Update GettingStartedInPython.rst.
* Now need to split the clique and keep the largest fragment.
Lots of warnings about how slow this is.
Split out long tests.
* Back out a lot of changes. Remove the distance check with singleLargestFrag when building modular product.
* Tidy code.
Update docstrings.
Add explanation to GettingStartedInPython.rst.
* Fix single fragment test.
* Response to review.
---------
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
* doc updates
* add rdShapeAlign to the docs
* fix shape docs
* let's not add too much here, revert deprecation
* cleanup the python book
* more book cleanups
* bring in sphinx.napoleon so that we can use the numpy docstrings
* fix a typo
* Update rdkit.ML.rst
* 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>
* deprecations for the 2024.09 release
* update doctests
* Fixes#7402
* get tests passing when the cairo build is not there
* fix a problem in the tests
* Add Double Cubic Lattice Volume (DCLV).
Method to compute the solvent accessible surface area and volume, van der Waals volume, compactness and packing density of a protein. Implemented from: Frank Eisenhaber, Philip Lijnzaad, Patrick Argos, Chris Sander and Michael Scharf, "The Double Cubic Lattice Method: Efficient Approaches to Numerical Integration of Surface Area and Volume and to Dot Surface Contouring of Molecular Assemblies", Journal of Computational Chemistry, Vol. 16, No. 3, pp. 273-284, 1995.
* refactor
* DCLV is no longer a configuration option
* add to the docs
* standalone test has been removed
* reduce use of pointers as args
* DCLV to catch_tests
* update python wrapper
* add copyright statements
---------
Co-authored-by: greg landrum <greg.landrum@gmail.com>
* 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
* - added gen_rdkit_stubs Python module to generate rdkit-stubs
- added patch_rdkit_docstrings Python module to patch existing C++ sources to fix docstrings missing self parameter and add named parameters taken from C++ signatures where possible
- added rdkit-stubs/CMakeLists.txt to build rdkit-stubs as part of the RDKit build
- added an option to CMakeLists.txt to enable building rdkit-stubs as part of the RDKit build (defaults to OFF)
* fixed CMakeLists.txt, rdkit-stubs/CMakeLists.txt and a doctest
* - added missing cmp_func parameter
- fixed case with overloads with optional parameters
- do not trim params if expected_param_count == -1
- add dummy parameter names if we could not find any
- keep into account member functions when making up parameter names
- address __init__ and make_constructor __init__ functions
- fix incorrectly assigned staticmethods
* patched sources
* address residual few remarks
---------
Co-authored-by: ptosco <paolo.tosco@novartis.com>
* 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>
* make sure that a full build and test can work even if boost::iostreams is not being used
Hopefully nobody every actually needs this, but as long as we supply the option, the tests should actually work
* update doctests for that change
* 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>
- 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>
* 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
* remove deprecation warning
* add CalcMolDescriptors() function
* Also add all python descriptors to the C++ Properties interface
* add to docs
* rip the property stuff back out
* try cleaning up the similarity map tests a bit before disabling them
completely on windows (temporarily)
* disable tests on windows (temporarily hopefully)
* disable similarity map doctests in Getting Started
* Remove accidentally tracked files and unset x flag
* Ignore ComicNeue
* Unify test tag to `reader`
* Trivial destructors
* Bump CMAKE_CXX_STANDARD to 14 (#4165)
* include info about query rendering
* Fixes#3897
* update images
* better documentation for the conformer generator
* conformer not conformation
* switch to using context managers and make sure we add hs before generating conformers
* yay more docs
* Finishing #3917
* more documentation of backwards-incompatible changes
* - generateDepictionMatching2DStructure can be used with referencePattern smaller than reference
to only use part of a scaffold
- adds generateDepictionMatching2DStructure overload to pass a matchVect instead of doing a substructure match
- adds allowRGroups parameter to enable using a scaffold bearing R groups as reference
* changes in response to review
* added comments
* fixes failing doctest
* - reverted change committed accidentally
- fixed get_sss_json for the case where R groups are not included in the match
- added tests for the return value of generate_aligned_coords
* Documented the value returned by GenerateDepictionMatching2DStructure (Python)
* changes in response to review
* - changes in response to review
- fixed sortMatchesByDegreeOfCoreSubstitution that was not working
- added Python wrappers for sortMatchesByDegreeOfCoreSubstitution and getMostSubstitutedCoreMatch
- added C++ and Pyhon unit tests for the above
* added missing variable initialization
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
* fixed issue #2965
* added test case for issue #2965
* fixed formatting and added comment.
* update
* General Reader files
* removed dependency on boost filesystems
* removed class
* clang-format
* added-comments
* further-cleanup
* added clang-formatting
* braces-for-if-else
* changed error messages, added option for windows file path
* fixed getFileName function
* cleanup
* option for filename without path
* further-cleanup
* added tests for determineFileFormat
* cleanup, const arguments for validate function
* init
* cleanup
* cleanup
* clang-format does not work for CMake
* added RDK_TEST_MULTITHREADED option
* add-flag
* cleanup
* Delete ConcurrentQueue.h
This PR deals with the Generalized File Reader.
* Delete testConcurrentQueue.cpp
This PR deals with the Generalized File Reader.
* no change
* concurrent queue
* print values
* Single Producer Multiple Consumer works
* cleanup
* Producer Consumer Example
* update queue methods and tests
* cleanup
* test
* fixed tests
* cleanup, updated tests
* Delete ProducerConsumer.h
* Delete testProducerConsumer.cpp
* cleanup
* futher cleanup
* changes based on feedback
* make queue non copyable
* psuedocode
* possible implementation
* untested implementation
* change class to typename
* basic-setup
* need to fix segfault
* need to fix blocking
* need to fix blocking
* need to fix blocking
* fix indentation
* one possibility
* without lambda function
* possible fix with some test cases
* performance tests
* added support for record id and item text
* cleanup
* cleanup
* fixed memory leak and added methods with tests for getting last id and item text
* cleanup
* added more test cases with different smi files
* cleanup
* SD mol supplier
* modified the parsing for SDMolSupplier
* cleanup
* cleanup
* new file for testing
* added support for reading molecule properties with tests
* thread-safe logging and exception handling
* cleanup
* without thread safe logging
* cleanup
* cleanup, modified MultithreadedSmilesMolSupplier
* cleanup, made reader and writer functions private
* move O2.sdf
* basic python wrapper with tests
* cleanup, added new methods for python wrappers
* made changes suggested by Andrew
* file and compression formats are case-insensitive
* cannot open files with gzstream
* cleanup
* possible fix for opening compressed streams (SMILES)
* removed seekg() and tellg() methods from multithreadeded suppliers
* cleanup
* test cases for python wrappers
* some wrapper cleanup
* cleanup, removed unused functions
* update the MT tests so that they actually do some work
also includes some cleanup here
* cleanup
* remove iterator_next header include
* added support for multithreaded readers
* use getNumThreadsToUse for multithreaded suppliers
* fixed documentation for multithreaded python wrappers
* commented performance test
* first draft of final evaluation report
* removed inline variables
* first draft getting started in python
* fixed typos in getting started in python
* fixed typos
* fix documentation tests
* fixed documentation tests
* added links to important files and PR
* added perfomance results
* first version of wrappers with compressed streams
* getting rid of streambuf stream method
* modified General File Reader
* make this work when building in non-threads mode
* rename a test
* rename a function in the python API
* rearrange the python test a bit
* disable the stream-based constructors in Python
* mark the multithreaded classes as experimental
Co-authored-by: greg landrum <greg.landrum@gmail.com>
* support read-only access to cstates from python
* expose GetBrackets
* expose getAttachPoints too
remove vestigial SubstanceGroupCState_VECT
* backup
* backup
* basics working
* backup
* add label_mol_abbreviations
* fix a bug in the chirality handling
* add linkers, needs more testing
* add another peptide test
* sanitize results by default
* just need rings
* getting started with the C++ form of abbreviations
* a bit of error handling
* add findApplicableMatches
* actually apply the abbreviations
* make the getDefault functions more efficient
* add labeling (creating s groups)
* docs
* basic python wrappers (maybe this is enough?)
* add _displayLabel and _displayLabelW support to MolDraw2D
update the docs for that
* use displayLabel props
* add more default abbrevs
* change default linker defns
add parseLinkers convenience function
* make sure attachment point atoms aren't aromatic
* change the color of dummies to be darker gray
* remove python implementation
* support abbreviations in the java wrappers
* add abbreviations to the csharp wrappers
* add abbreviations to the js wrappers
* add molParity to the list of atom props not written to CXSMILES
* support condensing SUP substance groups
* add that to the python wrappers
* Update testAbbreviations.py
* clear ring info if we added it
* document that the molecules with abbreviations removed have not been sanitized
* reader stub. Navigates the file successfullly
* works
* works
* read out all metadata, not just ours
* first pass at reading out molecules
* support mol blocks too
* add python wrapper for parser
* add direct writer
* get rid of multiple definitions in PNParser.h
* update from code review
* robustification
* handle reading compressed metadata
* support compressing metadata too
* reorder arguments to make this more consistent
* add writers to python wrappers
* forgotten file
* add pickle support
* explicit zlib dependency
* get windows builds working
at least with conda boost+zlib
* switch to using boost::iostreams to do the compression/decompression
* switch to using a vector of string pairs to store the metadata
need this so that we can contain "duplicate" keys
* add metadata output to MolDraw2DCairo
still need python test
* add a python test
* initial work at reading/writing reactions from PNGs
refactor the ReactionParser.h header a bit
* cleanup debug messages
* reaction PNG support -> python
* ReactionPickler no longer includes all ProductTemplate props
* handle metadata at the MolDraw2D level
Currently only supported by MolDraw2DCairo, it's worth extending this to SVG too
* support reading multiple molecules from a png
* support multiple molecules from files and in python
* stop duplicating tags with multiple molecules
* update to get windll builds working
this change should be propagated to more cmakelists.txt files
* make sure the metadata ends up in the notebook
* make sure PNGs in the notebook also have metadata
efficiency improvements for some notebook bits (i.e stop going PNG->Image->PNG)
* no need to pretend that we might be using PIL anymore
* documentation
* update docs to show new functionality
* not sure why the doctests failed on linux
* still trying to diagnose those failures
* protect doctests in case python interpreters are being re-used
* switch tags
* the wrapped functions to read png data from files weren't working
* <sigh>... windows dlls
* Updated CMakeLists.txx
* Updated all examples, extended some.
* Added info about highlighting atoms.
* Added info about annotation to python getting started.
* Minor tweaks.
* Minor tweaks. Can only examine the rst in GitHub.
* Minor tweaks. Can only examine the rst in GitHub.
* get doctests working
* update an example image
* Include the GettingStartedInC++ doc in the standard docs build
* move the C++ docs after the python docs
* update backwards incompatible changes doc
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
Co-authored-by: greg landrum <greg.landrum@gmail.com>
* First pass of fixing layout of OH/NH type drawing.
* Fixed scale for N/S NH type groups.
* Fixed bond end points with new display of heteroatoms.
* Fixed case where it drew aromatic dashed bonds in wrong ring for morphine.
* Minor edit.
* Fixed non-drawing of chiral bonds.
* Removed use of boost for_each.
* Modern atom traversal.
* Put in fixed scale for drawings.
Made drawMolecule() take note of prepareMolsBeforeDrawing.
Updated more iterators to modern idiom.
* Added fixed bond length for drawing.
* Fixed drawing of CH4, NH3 etc.
* Stash of working but ugly, prior to re-work.
* Better, simpler splitting of atom symbols.
* Took clang-tidy's advice about use of override.
* Tidied up drawing of text strings.
* Tweaked what is classed as vertical bond in drawing.
* fixedBondLength now down-scales if it would overflow the draw window.
* Some tidying.
* Tests for new parameters in JSON.
Fixed some existing tests where, for example, scale on picture is now different.
* Added option to rotate 2D draw coords before drawing.
* First pass at highlighting atoms in multiple colours. Circles only at the moment.
* Line width scales if big enough.
* Tweaked SVG text drawing.
* Added highlighting with more than 1 colour on an atom. C++ only.
* Fixed some issues with widths of highlights in a frustrating game of whackamole.
Updated some tests accordingly.
* Added Python wrapper for new drawing code.
* Removed debugging writes.
* Added C++ test for multi-coloured highlights.
* Added python test for multi-coloured highlights.
* Attempt to show radicals.
* Tidied up radicals in drawing, including a bullet instead of full stop in SVG.
* Fixed catch_tests.cpp for MolDraw2D.
* Fixed crash in Python wrappers on OSX.
* Fixed test5_2.svg bug (trailing </tspan>).
Made wavy line width scale as other lines do.
* Improved placing of charges.
* We're already in the future.
* Fixed a number of bugs that made drawMolecules not set the scales properly.
* Fixed Cairo wavy line width.
* Fixed non-closure of collision boxes.
* Added maximum font size for text, with tests.
* Addressed all Greg's first PR change requests.
* Fixed crash in extractAtomsymbols.
* stop using coordgen and adjust tests to reflect that
there's a bit of reformatting in here too
* Fixed layout of reactions.
* Fiddled with moldraw2DTest1 tests again.
* Fiddled with catch test.
* Fixed istope postion in W atom labels.
* Minor tweak to cairo,
* update expected results
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>