* Configurable legend position (Top/Left/Right/Bottom) and vertical text (GitHub #9023)
- Add LegendPosition enum and legendPosition, legendVerticalText to MolDrawOptions
- Support legend at Top, Left, Right, Bottom; vertical text for Left/Right
- Python: MolDrawOptions.legendPosition, .legendVerticalText; LegendPosition enum
- Python: MolToSVG() wrapper with legend/drawOptions; doc updates for MolToImage
- JSON: legendPosition (string), legendVerticalText (bool) in draw options
- C++ and Python tests; release note and Cartridge.md docs
* MolDraw2D: legend gutter for horizontal side legends; vertical side height fit
- Reserve horizontal gap between molecule and left/right horizontal legends
(scale mol to molWidth-gutter, align toward legend strip).
- Position horizontal side legend by measured text width from partition edge.
- Vertical side legends: iterative scale so n*max_h+(n-1)*gap fits panel.
- Catch: long vertical side legend section.
* Update legend-position tests and review-driven cleanup
Use enum/default wording for legendPosition docs, move the lightweight Python test to Wrap, add regex-based placement checks (including horizontal side and vertical stacking), and refactor extractLegend helpers per style guidance.
* Fix MolDraw2D legend edge cases
* MolDraw2D: review follow-up (legend tests, bounds, DRY Top/Bottom)
* Update no-FT legend test coords
* Address PR review: document constants, remove release-note text, and simplify extra-padding logic
Adds a new function MolDraw2D_detail::getSGroupDataLabels() that returns
the text and molecule-coordinate positions of DAT SGroup labels, using
the same placement logic as the drawing code. This allows external
renderers to display SGroup labels consistently with RDKit's placement.
Refactors DrawMol::extractSGroupData() to call getSGroupDataLabels()
internally, eliminating the duplicate FIELDDISP parsing and position
computation logic.
Closes#7829
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* Fix Qt 6.5.8 link failure on macOS due to removed AGL framework
Qt 6.5.8 injects the AGL (Apple Graphics Layer) framework into the
WrapOpenGL::WrapOpenGL imported target's INTERFACE_LINK_LIBRARIES. AGL
was removed from macOS 14+ SDKs, causing a link error when building
MolDraw2DQt on modern macOS:
ld: framework not found AGL
This workaround filters AGL out of WrapOpenGL::WrapOpenGL's link
libraries after find_package(Qt6) populates them. The guard conditions
(APPLE and TARGET WrapOpenGL::WrapOpenGL) make it a no-op on other
platforms and Qt versions that do not create that target.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Broaden AGL workaround comment to not pin Qt 6.5.8 specifically
The issue may affect other Qt versions, not just 6.5.8.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* - avoid a large number of warnings when building MinimalLib with emscripten, which does not support SHARED
- fix indentation in CoordGen CMakeLists.txt
* disable RDK_USE_BOOST_STACKTRACE on emscripten platform
* revert change done by mistake
---------
Co-authored-by: ptosco <paolo.tosco@novartis.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: = <=>
* Option to use standard atom colours under highlights.
* Update hash codes for catch_tests.cpp.
* Update hash codes for test1.cpp and rxn_test1.cpp.
---------
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
* Option to put padding round elements of reaction.
* Rename the option to componentPadding.
* Missed one.
* Correct filename.
---------
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
* Fix bond smoothing - apply atom index offset to products.
Update Hash codes.
Tweak side_by_side_images.py.
* Added hash code for new file. Doh!
* Option to remove brackets from atom lists.
* Python wrapper.
* Change option name after review.
---------
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* Fix bond smoothing - apply atom index offset to products.
Update Hash codes.
Tweak side_by_side_images.py.
* Added hash code for new file. Doh!
---------
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
* Move atom labels round if they clash.
* Tidy.
* Re-work orientation logic.
Remove virtual fns from AtomSymbol.
---------
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
* atropisomer handling added
* fixed non-used variables, linking directives
* BOOST LIB start/stop fixes, linking fix
* Fixes for RDKIT CI errors
* minimalLib fix
* changed vector<enum> for java builds
* check for extra chars in CIP labeling
* removed wrong deprecated message
* fix ostrstream output error?
* restored _ChiralAtomRank to lowercase first letter
* changes for merged master
* Fixed catch label for new Catch package
* update expected psql results
* get swig wrappers building
* restore MolFileStereochem to FileParsers
* fix java wrapper for reapplyMolBlockWedging
* test changes
* some suggestions
* move a couple functions out of Bond
* Merge branch 'master' into pr/atropisomers2
* merged master
* Renamed setStereoanyFromSquiggleBond
* atropisomers in cdxml, rationalize atrop wedging, stereoGroups in drawMol
* Merge branch 'master' into pr/specialQueries
* changes from previous PR
* Iclude false chiral
* rigorous enhnced stereo canoncalization
* Added more tests and clenup
* removed commented out code
* corrected init of SmilesWriteParams
* added MolFileStereoChem.h to the header files
* Renamed Rxn parser to MrvBlockToChemicalReaction
* To make catch2 work, and match the checksum
* Fixed Structchecker errors
* fix CI for DetermineBonds catch test
* error in catch_test for CI
* Allow custom smileWriteParams in GetMolLayers
* misnamed entry point
* ReactionFromMrvString change name
* remove adding writeParams to GetMolLayers
* make rigorous enhanced stereo the default, and fix tests
* only one abs group no longer needs Rigorous Enhanced treatment
* changed string_view to string in catch test
* Canonicalize Enhnaced Stereo only resturne unique smiles
* Now allows or and and groups together
* internal routines inside detail scope
* fix test error
* changed string back to string_view and fixed a CHECK
* Fixes for PR review tests
* Fix RDKit_Book.rst failure on build test
* fix xqm sql test
* updated expected files for cxsmiles_test
* Fixed removal of atom attrs
* Fixed tests after merge of master
* More efficient version of Stereo Groups Canonicalization
* Fixes for ctests
* removed debug code
* readded cipLabel test
* fix generalizedSubstruct/catch_tests.cpp error
* hueristics to improve speed
* Rationaized control of abs groups
* removed unused routine
* added rigorous stereo group treatment to test
* some suggested changes
* Changes per PR review and removed some changes to smiles
* Fixed CI errors
* changes per PR review
* more PR review vhanges and cleanup
* Fixed PSql PKL change
* changes as per PR review
* Restored error type for bad mols for canonicalizeStereoGroups and added a test
* Merge master and fix test in MolDraw2D
* Fix for randomize test error and other PR review comments
* Removed unsued variable to fix mac CI
* do not force aromatization in canonicalizeStereoGroups
* changes as per PR review
---------
Co-authored-by: greg landrum <greg.landrum@gmail.com>
* fix aliasing bug in MultithreadedSDMolSupplier
* update GeneralFileReader to v2 API
* add backwards incompatibility note
* v1 of this
* The helper function needs to be inline
* forgot the tests
* allow non-threadsafe builds
* MultithreadedMolSuppliers can now be destroyed without being used.
This was previously not possible
* add callbacks to the multithreaded readers
* document the new functions
* switch to storing the queues in unique_ptrs
* does not work
* only do those tests when in MT mode
* more generalfilereader cleanup
* tests pass
* passes tests
* extremely basic python wrapper
* better wrapper
* does not work
* tests pass
* test data
* fix failing test on ARM macs
we need to followup on why the wedging is different here
* move some stuff to the cpp file
the idea is to have the windows DLL builds not break
* fix(?) win64 linkage problems
* remove a warning in non-multi-threaded builds
* fix non-multi-threaded work
* well, at least local windows builds work
* remove duplicated code
* refactoring
simplification?
* simplify mutext handling
* review suggestions
* Make atom symbols black if atom is highlighted.
* Only do it for circle and continuous highlights.
* A lot of hash codes changed.
* Check hash code for new file.
* Change the highlighted atom to the same as carbon to accommodate dark mode, for example.
* Change the highlighted atom to the same as carbon to accommodate dark mode, for example. But get the logic right this time.
* Safer map lookup.
* Stackoverflow says this is better for >= C++17 as only one lookup.
* Don't do the fancy merging of solid wedges and bond lines for triple bonds.
* Changes after review.
---------
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>