* - 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>
* add test
* fix the issue
* make imines w/ implicit H unspecified, but allow unknown
* improve test in 6527
* do not mark double bonds as EITHERDOUBLE if no neighbors
* added ROMol::hasQuery
* python bindings for Mol.HasQuery
* at least I checked that my Python tests were running...
* hasQuery use C++11 range iterators
* Add trans layout for double bonds in rings
If there is a trans double bond in a ring, it's important to
add a trans 2d depiction! This is important for visualization,
but it is also important for chemical accuracy. SDF uses the 2D
coordinates to discern bond stereochemistry, and some 3D embedding
techniques may start from 2D.
Without this commit, trans double bonds in rings invert on
roundtrip through SDF.
Here's a very simple assertion that fails before this commit
and passes after:
smi = "C1=C/CCCCCCCCCCCC/1"
assert smi == Chem.MolToSmiles(Chem.MolFromMolBlock(Chem.MolToMolBlock(Chem.MolFromSmiles(smi))))
* Fix "or" keyword to "||".
* Make sure that `embedRing()` signature is unchanged.
* Make reaction drawings deal with padding properly.
* Move large lambdas into anonymous namespace.
Correct totWidth after scaling plusWidth.
* Update some hashcodes.
* Take out debugging setting. Bugger.
* Padding on height as well.
* Hash codes.
* Delay padding use in flexiCanvas.
* More centring.
* Light grey background in side_by_side table.
* Tweak agents layout for testReactionCoords.
* Fully ignore missing reagents and products.
* Hash codes.
* Const references.
---------
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
* export Mrv{File,Block}IsReaction to python
* get the MRV writing functions working in python
add basic tests for MRV reading/writing from python
* addition to PR6701
---------
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
* store more bond properties (if present) when pickling
* store the attachpts stuff more efficiently in pickles
* better error reporting in the cartridge
* updated cartridge use cases