Commit Graph

8229 Commits

Author SHA1 Message Date
Greg Landrum
a5bcf726e1 allow custom shape points (#8799)
* support providing custom features

* expose that to python

* switch to tuples (on get) and objects (on set) for attributes

* allow aligning mols directly with ShapeInputOptions

* changes for review

* add warning
2025-09-23 18:56:03 +02:00
Paolo Tosco
805294c27f - move MolDrawOptions JSON parsing code to a separate compilation unit (#8783)
- implement drawingExtentsInclude MolDrawOption taking as parameter DrawElement enum values
- add unit tests for drawingExtentsInclude option (C++, Python, CFFI)

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2025-09-23 09:27:13 +02:00
dpdoughe
e9a3eafc9b Set explicit COST=100 for SQL functions as suggested in #8711 (#8784)
* Set explicit COST=100 for SQL functions

* Adjust COST to 100 in current databases and up the cartridge version

* Use CREATE OR REPLACE for consistency

* Update the version number in rdkit.control
2025-09-23 06:15:34 +02:00
Paolo Tosco
e65d8cbcb4 implement #8793 (#8796)
Co-authored-by: ptosco <paolo.tosco@novartis.com>
2025-09-23 06:13:08 +02:00
Vandan Revanur
cded6cc4e0 ForceFieldHelpers: fix “No Python class registered” error (#8800)
Fixes github issue #8597.

* UFFGetMoleculeForceField was returning
PyForceField* before the class was registered via rdForceField,
which caused “No Python class registered” errors in Python when
using multiple conformers.

* This patch forces rdForceField to be
imported during rdForceFieldHelpers module init, ensuring the
class is always registered before helper functions are used.

* Add unit test
2025-09-23 06:03:57 +02:00
Greg Landrum
951be4f06e fixes #5078 (#8795)
* fixes #5078

* add some more tests
2025-09-22 11:06:42 +02:00
Niels Maeder
5b1d04d23e Fix grad scaling (#8791)
* fix grad

* adapt tests to pass with fix

---------

Co-authored-by: Niels Maeder <maedern@ethz.ch>
2025-09-21 18:19:50 +02:00
Greg Landrum
97e1a764eb fix a mistake caused by a dumb suggestion (#8792) 2025-09-19 09:33:32 +02:00
badisa
d392c755b7 Document Options in RGroupDcompose and other minor docs fixes (#8757)
* 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>
2025-09-18 16:41:16 +02:00
Greg Landrum
d12932f13e support bond property lists in SDF (#8778)
* backup
builds but no tests

* deprecate old form

* initial basic tests for bond property lists

* Tests pass

Fixes #8777

* add deprecations to release notes

* - avoid computing size of a constant at runtime
- replace multiple instances of a numeric constant with a literal constant
- avoid unnecessary copying of strings in iterations and function calls

---------

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2025-09-17 16:17:12 +02:00
PatrickPenner
50530ef7cb Changed linux build from source docs to use miniconda (#8781)
* 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
2025-09-17 16:16:11 +02:00
Paolo Tosco
5ed6c56cc8 Avoid code duplication through a templated function and improve JSON parsing of Boolean flags (#8773)
* - avoid code duplication through a templated function
- enable switching off boolean flags via JSON and not just on as before

* ran clang-format

* change in response to review

---------

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2025-09-16 16:29:04 +02:00
Greg Landrum
b693c5d4df Revert "Fixes #8644 (#8768)" (#8787)
This reverts commit a47a5d91aa.
2025-09-16 16:28:01 +02:00
Ricardo Rodriguez
a47a5d91aa Fixes #8644 (#8768)
* potential satisfactory solution

* fix typo

* update testMultithreadedMolSupplier.py

* revert first patch

* better fix

* add test
2025-09-16 05:24:45 +02:00
Paolo Tosco
10e7d50a35 - make InteractiveRenderer error reporting more robust (#8774)
- replace unnecessary lambda functions with existing setError function

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2025-09-16 04:59:09 +02:00
Chris Von Bargen
475c892215 When building RDKit on Windows Server 2022 (the windows-latest GitHub runner) (#8763)
a couple of headers needed #include <cstdint> to compile properly
2025-09-12 17:24:15 +02:00
Chris Von Bargen
8b8d6a3fe2 RDKit's InChi build tries to guess whether the C compiler provides (#8764)
isascii() (which is the standard) or __isascii(), but it guesses wrong for
Emscripten builds (which I do during sketcher compilation). This change
passes -D__isascii=isascii when building InChi,
which means that the wrong guess will still wind up with the right
function name.
2025-09-12 17:15:19 +02:00
Brian Kelley
bf35a4204e Fix non matching if(x) end(x) statement (#8769) 2025-09-12 11:08:16 -04:00
Ricardo Rodriguez
6da61ce9ac Fixes #8712 (#8736)
* fix secondary bug involving ring stereo clearing

* refactor test

* update ring stereo for last atom
2025-09-11 05:01:08 +02:00
Greg Landrum
6d8fca2fbf Fixes #8689 (#8738)
* add test

* potential fix

* whops\!

* support disabling ring stereo in rankMolAtoms

* pass atom ranks into the ring-stereo detection code

* all tests pass

* forgot a file

---------

Co-authored-by: Ric R. <ricrogz@gmail.com>
2025-09-03 12:15:09 +02:00
Brian Kelley
cf269aa813 Expose CDX support to FileParsers and ChemDraw to SWIG (#8681)
* Fist pass at CDX support

* Enable CDX support for reading (also) in the CDXMLParser API

* Add cdxml test files

* Update swig wrappers for CDXMLFormat and Parameters

* Add constructor to ChemDrawParserParams

* Add Java SWIG support for ChemDraw

* Add chemdraw define to rdconfig

* Add missing chemdraw deps

* Remove direct expat link

* Fix Java linkages for ChemDraw

* Remove bad merge code

* Remove bad merge code

* Fix csharp builds

* Add sniffer for the ChemDraw DataStream

* Include filesystem

* Fix test on windows

* Add more CDX tests

* Ensure streams are open in binary mode to support CDX on windows

* Fix text to show that a Block is the text input, not a file

* Fix CSharp test

* Disable CDX tests when not building chemdraw

* Turn back on chemdraw

* Response to review

* Turn off chemdraw support for the limited external test

---------

Co-authored-by: Brian Kelley <bkelley@glysade.com>
2025-08-29 04:39:22 +02:00
Greg Landrum
dbd972497f patch the pubchem alignment code (#8733)
Co-authored-by: = <=>
2025-08-28 09:18:03 +02:00
David Cosgrove
d54d0c5a10 CanonicalizeConformer inverts structure (#8734)
* Different test for possible coords inversion.

* Typo.

* Comment in test.

---------

Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
2025-08-27 17:12:08 +02:00
Greg Landrum
81226d84ad Fixes a bug with bad H positions in output conformer (#8731)
* Fixes a bug with bad H positions in output conformer

This would only trigger when the number of H atoms is equal
to the number of features, but it was terrible when it happened.

* spell that better

* docs

---------

Co-authored-by: = <=>
2025-08-27 13:28:50 +02:00
Ricardo Rodriguez
be2b1899ae Add the useRingTemplates option to generateDepictionMatching2DStructure (#8688)
* Add the param

* add a C++ test

* wrap it for Python

* mirror the C++ test in Python
2025-08-25 19:39:57 +02:00
Paolo Tosco
dd044522c1 - expose RDK_BUILD_MINIMAL_LIB_RGROUPDECOMP in Code/MinimalLib/CMakeLists.txt (#8729)
- explicitly wrap raw pointer into emscripten::val with allow_raw_pointers() policy

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2025-08-25 19:37:59 +02:00
Greg Landrum
b35ecc11e8 document the way the 2D/3D flag in ctabs is handled (#8722)
* document handling of the 2D/3D flag in ctabs

* Update Docs/Book/RDKit_Book.rst

Co-authored-by: Ricardo Rodriguez <ricrogz@users.noreply.github.com>

---------

Co-authored-by: = <=>
Co-authored-by: Ricardo Rodriguez <ricrogz@users.noreply.github.com>
2025-08-25 19:36:37 +02:00
Pat Riley
4cc9d6f2e6 Update documentation for rdShapeAlign.AlignMol opt_param (#8724)
* Update documentation for opt_param

* Revert default to 1.0

* revert all 0.5 default changes
2025-08-25 16:56:59 +02:00
tadhurst-cdd
3f60cb5674 Fix for Issue 8602 (#8668)
* Fix for Issue 8602

* Simlified generation of 3d from of ref for atropisomers
2025-08-20 10:10:47 +02:00
Greg Landrum
52d8bd02b1 Fixes #7215 (#8710) 2025-08-16 04:47:02 +02:00
Greg Landrum
76c813cd3c increase max time for win64 CI builds (#8709)
we keep getting failures due to this, so we might as well increase the allowed time
2025-08-15 16:18:05 +02:00
David Cosgrove
f90b4382ca Fix drawing of very short arcs in lasso. (#8706) 2025-08-15 08:25:32 +02:00
Brian Kelley
7da14fb77c Disable ChemDraw support by default (#8707)
Co-authored-by: Brian Kelley <bkelley@glysade.com>
2025-08-14 14:21:24 -04:00
David Cosgrove
b9666d93b8 Fix offsets for DrawMoleculeWithHighlights. (#8680)
* Fix offsets for DrawMoleculeWithHighlights.

* No Freetype test.

* Trigger Build

---------

Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
2025-08-14 07:17:31 +02:00
Michael Cho
db5378567b Fix build with Boost 1.89.0 (#8694) 2025-08-14 07:13:34 +02:00
Greg Landrum
4007e0c555 Fixes #7264 (#8696) 2025-08-12 16:27:18 +02:00
Hussein Faara
9b73ebf2d3 Fix parse error messages for bad characters (#8675)
* Fix parse error messages for bad characters

This updates the SMILES and SMARTS parser error messages to include the token
position for "bad" characters.

* copy generated files

* add test
2025-08-11 15:20:55 +02:00
Paolo Tosco
42008290e7 explicitly set COMPOSE_BAKE to false (#8693)
Co-authored-by: ptosco <paolo.tosco@novartis.com>
2025-08-11 14:59:01 +02:00
badisa
53a01430e0 Fix documentation errors for rdShapeAlign (#8685) 2025-08-10 07:51:09 +02:00
Greg Landrum
ccefda882d Fixes #8654 (#8657)
* Fixes #8654

* fix a logic error

* SWIG is sooooo much fun
2025-07-30 05:56:52 +02:00
Patrick Kunzmann
c20b2a906b Fix #8638 (#8639)
* Fix #8638

* add a test

---------

Co-authored-by: greg landrum <greg.landrum@gmail.com>
2025-07-25 14:33:32 +02:00
David Cosgrove
34e80ab764 Fixes Github8650 - spaces in columns in tab-separated synthon space files (#8652)
* Try tab-separated before space-separated when reading synthon lines.
Fix bug in looking up reactions by name.
amino_acid.txt had a mixture of tab-separated and space-separated lines which is no longer allowed.

* Typo

---------

Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
2025-07-25 06:35:35 +02:00
paconius
1fe07a5eb7 Add option to draw all CIP codes in DrawMol.cpp (#8609)
* enable showAllCIPCodes in DrawMol code

* Made consistent with old behavior + add test

* Added python test

* Fixed FREETYPE=OFF tests

* Fixed FREETYPE=OFF tests

* Adjusted pytest

* Enabled JSON drawer option setting + new JSON test

* update JS docs
2025-07-24 16:46:15 +02:00
David Cosgrove
e712d201a6 Fix Rascal out of memory bug. (#8648)
* Make test

* Cap number of equivalent cliques that will be produced.

* Oh FFFS!

---------

Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
2025-07-24 16:43:09 +02:00
Paolo Tosco
9c7ffb33e9 Expose reading/writing PNG metadata to CFFI and MinimalLib (#8381)
* get SynthonSpace.cpp to build also when RDK_USE_BOOST_SERIALIZATION is
not defined

* test should not fail when RDK_USE_BOOST_SERIALIZATION is not defined

* - expose reading/writing PNG metadata to CFFI and MinimalLib
- add relevant CFFI and MinimalLib unit tests
- add RDK_USE_BOOST_PROGRAM_OPTIONS CMake option
- enable using standalone zlib in the absence of boost::iostreams for parsing PNG files
- enable linking against maeparser in the absence of boost::iostreams also on Windows
- enable building RDKit in the absence of boost::program_options

* add check for boost::program_options

* change size_t into std::uint64_t in SearchResults for consistency with doTheSearch() which uses std::uint64_t

* change size_t into std::uint64_t in SearchResults for consistency with
SynthonSpaceSearcher::doTheSearch()

* set CMake policy to allow YAeHMOP to require a version which is not
actually supported

* reverted External/YAeHMOP/CMakeLists.txt to master version

* check if Windows build will work

* fix build

* configure zlib install location

* build zlib dependency

* include zlib header directory

* explicitly set PropertyFlags.AllProps so the test does not fail on
static builds

---------

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2025-07-23 17:10:38 +02:00
Paolo Tosco
3542b3ffbb Fixes #8569 (#8588) 2025-07-21 23:45:09 -04:00
Ricardo Rodriguez
397d19e676 Mem fixes (#8640)
* fix leaking mol in rdEnumerateStereoisomers.cpp

* clang-format Code/GraphMol/FileParsers/MultithreadedMolSupplier.cpp

* fix leaking mols in MultithreadedMolSupplier output queue
2025-07-21 05:57:50 +02:00
Greg Landrum
ebd7dad122 Switch a bunch of C++ tests to use catch2 (#8625) 2025-07-18 11:50:38 +02:00
Greg Landrum
bf44cdb4d9 fix a typo (#8636) 2025-07-18 01:29:17 +02:00
Brian Kelley
40f851d35f Fixes CI: Force conda-forge channel, ignore defaults/anaconda repos (#8630)
* Force conda-forge channel, ignore defaults/anaconda repos

* Response to review

* Fix windows build
2025-07-17 21:35:17 +02:00