* parse templates as smarts
* accept ring templates in SMARTS format
* undo CLAUDE mistake
* rename files
* enable templating for macrocycles
* enable macrocycle templating
* Add test for macrocycle templating
Tests that ring system templates are used only for macrocycles (rings
with size > 8). The test verifies the exact threshold by generating
coordinates with and without templates for rings of size 4-14.
Addresses review feedback on PR #9203.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fixes#8379
* check in some working tests
* test passes
* test passes
* test passes
* test passes
* test passes
* ensure that the invariants flush the streams on failure
* tests pass
* test passes
* tests pass
* tests pass
* tests pass
* tests pass
* tests pass
* tests pass
* tests pass
* tests pass
* tests pass
* tests pass
* tests pass
* tests pass
* tests pass
* tests pass
* Fixes#8391
* tests pass
* fix a test with legacy
not clear why this was not causing problems before
* make a test work
* Fixes#8396
* gcc builds work
* fingerprint tests pass
* mention backwards incompatible change
* fix a problem with FindMolChiralCenters
* more testing details
* enable the test status output
* Fixes#8432
fix a bug in double-bond stereo handling for template matching
* all depictor tests pass
* use the new-stereo chiral ranks in the depiction code
* always assign new-stereo chiral ranks
* make _ChiralAtomRank a computed property
This is analogous to _CIPRank
* tweak to the way the atom ordering is computed for 2D coordinate generation
* update two expected results
* backup
* response to review
* tests pass
* tests pass
---------
Co-authored-by: = <=>
* CRDGEN-360
allow subset of rings to match templates
* also add a template check for the whole ring system
* wip
* fix build error
* fix test errors
* code review
* wip
* fix test
* avoid unnecessary calls to substructure search
* remove dead code
* backup
* further optimization
revert the accidentally committed changes to the tests
* comment cleanup
* some more optimization
* Update Code/GraphMol/Depictor/EmbeddedFrag.cpp
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* fix an out-of-bounds write
* Update Code/GraphMol/Depictor/EmbeddedFrag.cpp
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
---------
Co-authored-by: greg landrum <greg.landrum@gmail.com>
* 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.
* un/signed comparisons in molops
* reference in loop in EmbeddedFrag.cpp
* un/signed comparison in filtercatalogtest.cpp
* un/signed comparison in Descriptors/catch_tests.cpp
* un/signed comparisons in DetermineBonds.cpp
* drop unused 'params' arg from static functions in MolInterchange/Writer.cpp
* un/signed comparisons in MolDraw2D/catch_tests.cpp
* unused var in SubgraphUtils.cpp
* 'move' preventing copy ellision in CDXMLParser.cpp
* fix infinite recursive call in SubstructLibraryWrap.cpp
* DRAFT: Use templates in RDKit coordinate generation
* added option in python
* Addressed some comments and added tests
* removed unused code
* A few updates to templating code
* Added params struct for compute2DCoords
* Added several tests for multiple templates and templates + coord maps
* Addressed a few other comments from reviews
* addressed another comment
* remove extra line
* Update Code/GraphMol/Depictor/Wrap/rdDepictor.cpp
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* Some cr suggestions
* forgot to remove original .smi file
* Update Code/GraphMol/Depictor/Wrap/testDepictor.py
Removed test
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* the coordMap pointer can be to a const object
---------
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* add ROMol::atomBonds() and ROMol::atomNeighbors() methods
* remove some warnings
* start using the new code
* add default for those template params
* some more applications
* get the SWIG builds working
* get rid of extraneous ref
* remove extraneous comments
* add test
* fix some of the horribly broken comment formatting
* a start at modernization
* more modernization
* more modernization
* more modernization
* add some actual regression testing
(such as it is)
* more modernization
* more modernization
* more modernization
* more modernization
* more modernization
* fixed, still some py failures to investigate
* fixed
* remove a bunch of debugging cruft
* changes in response to review
* Apply suggestions from code review
Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
* remove include from headers
* update implementation files
* completely remove BOOST_FOREACH (#7)
* convert those changes to use auto
* get rid of all usage of BOOST_FOREACH
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* 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
* first round of cleanups based on PVS-studio suggestions
* a couple more
* a few more cleanups
* another round of cleanups
* undo one of those cleanups
we want the integer rounding behavior here
* add a comment to make that clear
* Fix for filter catalog PRECONDITION redundancy
* Removes ATOM/BOND_SPTR in boost::graph in favor of raw pointers
* Actually delete atoms and bonds...
* RWMol::clear now calls destroy to handle atom/bond deletion
* Changes broken Atom lookup for windows/gcc
* Adds tests for running with valgrind
* Adds test designed for valgrind and molecule deletions
* Removes RNG, actually tests bond deletions
* update swig wrappers
* deal with most recent changes on the main branch
* clean up the header a bit
clang-format
* clang-format
* add test for #1286
* backup
* fixes the specific failure, but needs more looking
* add an additional test
* update the inchi code to explicitly include queue
* fix a typo identified during the review
* add cis and trans to bond stereo
* compiles, does not work
* tests all pass
* Whitespace cleanup to recent changes.
* C++ test case for Bond::setStereo using Bond::STEREOCIS and Bond::STEREOTRANS
* Adding a PRECONDITION to Bond::setStereo to make sure the stereo atoms
are already specified if CIS or TRANS is being specified.
E/Z is technically defined by the topology of the molecule so the
stereo atoms are redundant (easier to understand and use!), but
ultimately redundant with the graph. However, CIS and TRANS is _only_
defined in this usage as the orientation of the atoms in the
getStereoAtoms vector.
* Exposing Bond::setStereo to Python and adding test cases to make sure
it can be used to set CIS/TRANS stereochemistry.
* verify substructure matching works
* Adding Bond::setStereoAtoms to C++ Bond class.
This allows setting the atoms to be considered for CIS or TRANS
directly without a much more costly determination of ranking that E/Z
requires.
* Wrap Bond::SetStereoAtoms into python with a new type of test case.
* docs
* A big step towards solving #910
1) Rank atoms by inverse atomic number (ensures Hs go last)
2) Use heavy-atom degree when doing layout (ensures Hs do not change gross geometry)
* basic testing
* take degree into account with ranks too
* further improvements of relative ranking.
definitely need some cleanup of this now
* some cleanup
* add an explicit test
- added #ifdef M_PI (...) #endif in all relevant places
- made length() and sqLength() method consistent
with respect to usage of pow(x, 2) vs x*x in
Code/Geometry/point.h
- removed gzip-related boost.iostreams dependency and
replaced with portable "cmake -E tar xzf" command
in Code/ForceField/MMFF/CMakeLists.txt
This does not address the non-canonical rendering piece -- that will
be considerably more work -- but it does take care of the
epoxides being rendered inside the ring.
instead of using the property map interface.
A nice side-effect is that the wart of having to use property maps to loop over bonds or atom neighbors
is now gone.
This potentially breaks lots of client C++ code.