* MMPA functions exposure
* Minilib exposure: mmp
* minilib: mmpa - test added
* minilib: mmpa - failing test added
* - MolList should return null when the corresponding ROMOL_SPTR is a nullptr
- changed first into cores
- changed second into sidechains
- renamed some functions and constants
* - made JSMolList::at() and JSMolList::pop() robust against attempting to dereference null ROMOL_SPTR
- added tests for the above
* Update Code/MinimalLib/minilib.h
Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
* changes after review
* Update Code/MinimalLib/minilib.cpp
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
---------
Co-authored-by: ptosco <paolo.tosco@novartis.com>
Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
- add unit test for #6952
- remove unnecessary CHECK_INVARIANT guards since MatchVect::at() already does that check
- add a check for >=0 where needed as the [] operator is used
Co-authored-by: ptosco <paolo.tosco@novartis.com>
* - 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>
Updated compiler id comparisons to do a regex comparison against "Clang"
instead of doing a direct string comparison. This allows us to match
compiler ids like "AppleClang"
* Set squiggle bonds to STEREOANY with stereo atoms
* STEREOANY from squigglebonds is set regardless of sanitization now
* Ensure we have stereo atoms
* Add comment for new behavior
* See if a newer version of cmake works
* rev cmake to a slightly new version
* rev cmake to a slightly older version
* Response to review
* Allow setting of CIS/TRANS in set from squiggle bond
* Fix missing paren
* Add test for the actual enumeration
---------
Co-authored-by: Brian Kelley <bkelley@relaytx.com>
* Diatomic tests working.
* Working with simple multi-atom tests.
* Most tests not working.
* Minor tidy.
* Almost working. Failure in lasso_highlights_6.svg.
* Intersecting circles looks ok for same radius.
* All seems to be working.
* Better tests.
* Tidy up.
* More tidying.
* Fix warnings.
* Fix warnings.
* Change REQUIRE to CHECK.
* Changes after review.
* MolEnumerator: use repeat counts for SRUs when present #6429
This fixes the reported bug by parsing the SRU label to infer the rnage
of allowed repetitions.
* fix build failure from wrong field initialization order
* fix build error from -Werror=sign-compare
* add tests for molblock
* initial addition of MT support to MolStandardize
* do the other inplace functions
* add mt ops to python wrappers
including tests
* release the GIL
* remove exploratory code added during dev
* make normalizer thread safe
* refactor some repeated code
* compiles and runs, not tested
backup commit before I break it
* complete the implementation
* add the MT implementation to the C++ library
* tests pass
* remove old code
* release the GIL
* linux builds
* remove some warnings on macos
* changes in response to review
the DocToMols procedure assumes that the "commonchem" and "rdkitjson"
fields are nested json docs, but that is not true. This change updates the
procedure to stop relying on that wrong assumption and adds a test for
validation.
* make sure that we can build without boost iostreams or seralization
adds some "private" variables on the python side to check for these compilation flags
* get out minimal cmake version correct
* get minimallib js building
installs an up-to-date cmake
also updates the version of boost being used for the minimallib
adds extra argument to allow the repo to be specified
* first pass at multithreaded getBestRMS
* add that to the python wrappers
* add getAllConformerBestRMS()
* more testing
* doc strings
* add forgotten test file
* change in response to review
fix the dumb logic error in thread count determination
* update the tests for the new catch
Made the following changes
* removed RDK_USE_BOOST_REGEX cmake option and its references
* removed usage of RDKIT_USE_BOOST_REGEX macro
* removed install instructions related to boost regex
* - added a convenience function to relabel R-groups in a chemist-friendly fashion
- exposed functionality to MinimalLib through a JSON option at molecule creation time
- added relevant unit tests
* changes in response to review
* added missing library
* fixed Python test
---------
Co-authored-by: ptosco <paolo.tosco@novartis.com>
* fixes#6816
* cover the case where `CFG=0` is specified, which was missing
* roundtripping a CTAB should not change a cis/trans double bond into a crossed bond after calling reapplyMolBlockWedging(), no matter if the molecule is sanitized or not
---------
Co-authored-by: ptosco <paolo.tosco@novartis.com>
* add RDKIT_CFFI_STATIC option
minimallib cmake cleanup
* clean up a lot of boost::iostreams nonsense
* find_package(boost cleanup
* update the swig wrappers
* updates to psql
* get the Qt demo working again
* fix? coordgen
* only use std::regex in moldraw2d test
this is consistent with the other tests
* cleanup the serialization stuff too
* ci updates
* forgotten update
* inch by inch
* remove unused variable
* try a gcc bump
* get rid of a bunch of unused-but-set errors in clang16
* be more selective
* disable a test in an obsolete module which is mysteriously failing
* Fixes for canonicalization, and stereochemistry
* chnages from code review
* test that was omitted for canon correction
* PR review changes
* changes as per PR review
* missed file checkint to make PR tests compile
* PR conflict resolution
* change to fix PR buld errors (hopefully)
* line delete to force re-running of tests
* changes as per PR review
* resolve merge conflicts with master
* some suggestions
* revert chirality modifications when sanitization isn't being done
* addl changes: no stereo percept when no sanitize
* missing test expected files added
---------
Co-authored-by: greg landrum <greg.landrum@gmail.com>
Unlike other files that use the `RDK_USE_BOOST_SERIALIZATION` flag, EvenSamplePairs.h does not wrap the `BOOST_CLASS_VERSION` boilerplate in an #ifdef.
This happens to work anyway when built against older versions of boost, where the required header is being made visible by other boost includes, but this causes a build breakage when compiled against Boost 1.82 or later and with serialization off.
* 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>
* support generalized substructure search in the SubstructLibrary
* simplify namespaces
* support the new functionality in the swig wrappers
* update mac swig version in CI
* ensure swig4
* switch mac_java ci builds to conda-forge
* change in response to review
* add copy ctor to extendedquerymol
* Back to the way it was
* Fixes#6017
* a bit of cleanup work
* remove unused variable
* change in response to review
switch to using std::max(maxMatches,maxRecursiveMatches)
* test the case where maxSubstructMatches<maxMatches
* 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
* - added StoreAll to parseMCSParametersJSON()
- added get_mcs() to MinimalLib which returns results as JSON
- added tests for get_mcs()
* added test
* changes in response to review
---------
Co-authored-by: ptosco <paolo.tosco@novartis.com>
* 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>
* Revert "Revert "Removed some code duplication between Depictor.cpp and common.h (#6368)" (#6797)"
This reverts commit 824616c5b9.
* security blanket: add back tests of the current usage pattern
* - fixed bug in get_sss_json() (#6806)
- added unit test for the above
Co-authored-by: ptosco <paolo.tosco@novartis.com>
---------
Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
Co-authored-by: ptosco <paolo.tosco@novartis.com>
* 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.
* - 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>
* 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
* 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>
* - extracted the core matching logic into a separate function
- added relevant C++ and Python tests
* Update Code/GraphMol/RGroupDecomposition/RGroupDecomp.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>