* 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
* implement consistency check
* add more consistency checks
* check direction consistency accross double bond
* clean up directions for non-stereo bonds
* fix counts for second from atom dirs; add check
* handle inconconsistent bond dirs
* add more tests, pubchem cases, and update existing
* drop statics
* fix typo
* make sourceBond arg const
* fix consistency check
* switch the Query infrastructure to use std::function
* add releasenotes mention
* refactor makeAtomInRingOfSizeQuery() to use lambdas and support range queries
* add 'k' atom query to SMARTS
* changes in response to review
* 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
* Update installation instructions for macOS 15 and improve package installation commands
* Update suggestions to use Miniforge instead of Miniconda and update cmake arguments to match with Linux installation guide.
* Adds missing options docstring
* Always be cleaning
* Fix typos in RGroupDecomposition module
* Update documentation on configuring doxygen
* Was a step that I couldn't find reference to besides in the Makefile
* Undo american spelling of labelling
* British spelling appears more consistent
* Fix style of RGroupDecompositionParameters parameter
* Also fixes a typo
* Remove unintentional use of docstring
* Was assigning documentation about the parameters to the
RGroupDecomposition
* Remove empty string
* Apply suggestions from code review
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
---------
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* Changed linux build from source docs to use miniconda
- closer to the azure builds
- uses conda-forge
- consolidated all dependencies into one command
- removed two cmake flags causing warnings that were not in the azure builds
* readability
* Switch to miniforge installers
* Parsing SCSR
* add scsrol to mol
* removed bad include file
* loosen distGeom test slightly
* add wrap test for SCSRMol
* Add test for scsr in python
* tests added for scsr and strict parsing removed
* remove extra stuff
* More fully specified use of SCSRMol for PR CI build
* Added flags for SCSR expansion to not include any leaving groups
* Added MolFromScsrParams to Wrap for python
* added SCSRMol destructor
* Added two tests for RNA macromols, and fixed a bug they revealed
* Added new tests abd expected files
* changes as per PR review
* SCSR Chnages for leaving groups
* fixed testScsr.py
* hydrogen bond treatment
* in SCSR expand, allow Hbond to be autoatically detected
* changes as per code review
* Adding new test file
* chages for SCSR contructors, destructors for CI build
* fixed pyton for SCSR hydrogen bond modes, and added tests
* Added new test files
* fixed edge case for SCSR
* fix checksum for inchi
* consistent capitalization of SCSR throughout
* switch to enum class
* make things shorter
* simplify
* get rid of the ATTCHORD class
* New section for SCSR in RDKit_book
* addeed section to RDKit_Book
* SCSRMol is no longer exposed in Python
* fix leak in MolFromSCSRFile()
light refactoring
* expose MolFromSCSRFile() to python
make the MolFromSCSR functions work with default args
a bit more testing
* removed C++ access to SCSRMol
* CXMsiles now ouputs hbonds, fix to template matching, and a few other things
* Addl fix for bad aromaticity in Hbond rings
* Test files needed
* Test files needed
* try to fix a CI build errors
* CI error fix
* Added missing test file
* CMake version - for CI build
* remove full file compoarison from macromol test file
* accidental change to debug restored to release
* Code review changes
* As per PR review
---------
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* 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>
* refactor the code to determine whether or not an atom is in brackets
* move the definition of isMetal to QueryOps
* atoms bound to metals in SMILES should always be in square brackets
Implementation and some test updates
needs confirmation that all of tests run
* basic tests pass
* java tests pass
* update js tests
* doc updates
* Update Code/GraphMol/catch_graphmol.cpp
Co-authored-by: Ricardo Rodriguez <ricrogz@users.noreply.github.com>
* Update Code/GraphMol/SmilesParse/test.cpp
Co-authored-by: Ricardo Rodriguez <ricrogz@users.noreply.github.com>
* finish fixing tests
* bump yaehmop version to allow compilation to work
---------
Co-authored-by: Ricardo Rodriguez <ricrogz@users.noreply.github.com>
* Expand on Explicit Valence Error - Partial Sanitization recipe, including adding molecular structures for the unsanitized and partially-sanitized iterations
* Format `argument=value`
* Fix typo in formatting
* Update label to *Original* Source
* Correct rdqueries import, and formatting of testoutput blocks
* Print out hybridization create doctests
* test fork commit
test complete, remove file
squashed test
* add skeleton file
* outline of the Python dev section
* add if not developer
* Update GettingStartedWithContributing.md
* strcuture things a bit more
* add summary of blog post
* update dev instructions
* update for devs
* Add example on how to add unit tests
* add style section
* added github issues and discussion
* add style example image
* update for devs
* add hyperlinks
* Move CodingStandards to GettingStartedWithContributing
Also updated the supported C++ version to C++17. I put in g++ 8.0 as a
rough guess of a version expected to support this standard.
* add initial git pull steps
* add how to check for bugs
* added how to contribute code
* Add a section on how to run tests
* Update "running tests" section
Fix a MD syntax error and add a paragraph encouraging people to run the tests! :-)
* add pullreq
* add pull_req2
* Add links to new GettingStartedWithContributing.md
* add missing image files
* update what and how section
* update how to pull req
* Update GettingStartedWithContributing.md
* update running tests
* tweak formatting
* start docs contribs
* typo fixes
* add rst overview
* move image to correct location, update python and C++ sections
* add how to do Python bindings
* Add batch 1 of Greg's suggested changes
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* add Greg changes
* Revert "add Greg changes"
This reverts commit 3f7d8eed6c.
* make Greg's (actual) changes
---------
Co-authored-by: mikey <m.k.blakey@icloud.com>
Co-authored-by: martin-sicho <sicho.martin@gmail.com>
Co-authored-by: dehaenw <66372095+dehaenw@users.noreply.github.com>
Co-authored-by: Franz Waibl <waiblfranz@gmail.com>
Co-authored-by: Rasmus Mejborg Borup <borup@eduroam-hci-dock-1-081.intern.ethz.ch>
Co-authored-by: Ivan Tubert-Brohman <Ivan.Tubert-Brohman@schrodinger.com>
Co-authored-by: Ivan Tubert-Brohman <ivan.tubert@gmail.com>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* 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
* Add "Include a Bond Index" recipe and image
* Add testoutput so doctest passes
* Use addBondIndices. Follow template of recipe "Include an Atom Index".
* 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>
* 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>
* change valence model to use isolobal analogy
Remove support for five-coordinate C+ and, by analogy, five-coordinate N+2
Removes support for charge states that take atoms past the end of the periodic table
i.e. [Lv-4] is no longer supported
* update the tests for that
* remove valence state of 6 for Al
* fix representation of phosphate in the mol2 parser
this is a correction of what was done during #5973
* cleanup the exceptions for P, S, As, and Se
* drop valence states:
Si 6, P 7, As 7
* a couple of additional changes from #7397
* update java tests
* fix an inconsistency: Rb now supports valence -1
* documentation
* - replace operator[] with at() for bounds check
- extract some code into a function to avoid duplication
- use TAB as separator throughout in the periodic table data for consistency
* removing the .at() usage
We know that these vectors aren't empty, so there's no need for the bounds check.
---------
Co-authored-by: ptosco <paolo.tosco@novartis.com>
* basic code to convert dative to single if we aren't outputting dative to the SMILES
add forms of GetAtomSmiles() and GetBondSmiles() that take SmilesWriteParams
* dative/coordinate bond support when writing CXSMILES
* expose all of that to Python
* remove usage of _doIsoSmiles property
add params to smarts writers
* allow disabling dative bonds in SMARTS
* typo
* add support to the reaction writers
* support params for SMARTS
* removed string_view in favor of string for catch test
* add parsing and generation of atropisomers when coords not present
* changed string_view to string in catch test
* more docs
* reformulation of the docs
* make an error message a little bit more useful
* small optimization
clang-format
* add `BondWedgingParameters` to new function
* changes for CIP test errors
* Updated internal doc to match what it does
* changes per PR review
* removed cout statements in tests
---------
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