Commit Graph

5633 Commits

Author SHA1 Message Date
David Cosgrove
b9b6078137 Extra explanation of getPosition() and getReagents(). (#8909) 2025-11-01 06:18:08 +01:00
Brian Kelley
c4678568a9 Use adjustQueryProperties logic when dealing with dummy atoms in cxsmiles (#8907) 2025-11-01 05:38:17 +01:00
David Cosgrove
a5347e725e Allow Multiple Core Hits in the Same Molecule in RGroupDecomposition (#8813)
* Allow the same core to match more than once in a molecule.

* Update annotation.

* Changes after review.

---------

Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
2025-10-29 21:50:19 +01:00
David Cosgrove
dad4d39803 Change docs in Python EmbedMultipleConfs. (#8900)
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
2025-10-28 02:09:14 +01:00
Greg Landrum
0ee90279b5 Partial fix to a problem with implicit Hs being written to SMARTS (#8893)
* Partially resolve a problem with implicit Hs ending up in SMARTS

* update doctest

* document in release notes
2025-10-24 07:50:06 +02:00
Greg Landrum
8844c55572 Fixes #8890 (#8891)
stop stripping string properties
updates doc string
adds a test for autoConvertStrings
2025-10-23 08:52:27 -04:00
Ricardo Rodriguez
e4c8ed7765 remove (#8872) 2025-10-23 11:21:36 +02:00
Greg Landrum
e625bdb95c make Point2D and Point3D constexpr (#8882)
* constexpr Point, Point2D, and Point3D

* constexpr Vector

* cleanup

* rollback overzealous constexpring

* dial back the constexpr to get windows builds working

the math stuff isn't constexpr with MSVC++

* add [[nodiscard]]
2025-10-23 10:57:33 +02:00
Greg Landrum
20907d3ba9 Fixes #8877 (#8886) 2025-10-22 07:59:35 -04:00
Andrew Dirksen
1ea159ce65 set up performance benchmarks (#8865) 2025-10-18 08:07:49 +02:00
Ricardo Rodriguez
d9850596aa Fixes #8726 (#8874)
* do not remove hydrides by default

* add a minimal test

* add release note about behavior change

* require Hydrides to have degree 1

* also allow hydrides with degree 0 (ionic bond)

* suggested changes

---------

Co-authored-by: greg landrum <greg.landrum@gmail.com>
2025-10-17 16:51:22 +02:00
Greg Landrum
93d0f8bb74 Fixes #8776 (#8875)
* Fixes #8776

don't call the pseudo-CIP perception code if we really don't need to

* allow calling the pseudo-CIP code from Python

* update doctests
2025-10-17 05:52:27 +02:00
Ricardo Rodriguez
af4e8cf01f propagate string_view (#8858) 2025-10-14 19:15:37 +02:00
Greg Landrum
3a4d4df17e allow default radii in the DCLV calculation (#8836) 2025-10-11 20:35:20 +02:00
Greg Landrum
9fd5595f98 use bond labels in the ranking in MolFragmentToSmiles (#8861) 2025-10-10 14:58:45 +02:00
David Cosgrove
dfdddb3fc9 Add extra info about return value. (#8860) 2025-10-10 14:58:20 +02:00
Ricardo Rodriguez
7d1e662bc7 Use std::string_view for property keys (#8844)
* string_view props API

* wip

* fix leak

* add string_view to swig

* fix comment

* add backwards incompatibilty note

* fix rebase issue

---------

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2025-10-09 16:14:48 +02:00
Greg Landrum
ad1fcb5b7b Use properties in the MolDrawOptions python wrappers to make setting/getting colours easier (#8857)
* support direct property setting/getting in MolDraw2DOptions

* same thing for contourParams

* add getAtomPalette()
2025-10-09 14:14:19 +02:00
Greg Landrum
00583fc1ab Fix a couple issues related to atom list handling in V3000 mol blocks (#8824)
Fixes #8820
Fixes #8823
2025-10-09 05:26:01 +02:00
Brian Kelley
b0ef80d68d Allow labeled atoms to have working queries (#8849)
* Allow labeled atoms to have working queries

* Remove stray keystrokes

* Fix typo

* Apply clang-format

* Move simpler checks first

---------

Co-authored-by: Brian Kelley <bkelley@glysade.com>
2025-10-09 04:46:20 +02:00
Niels Maeder
686ca3fd6e same docs for same behaviour (#8854) 2025-10-09 04:44:58 +02:00
Ricardo Rodriguez
9eaa193186 Merge simple AND queries onto atoms. (#8830)
* duplicate parser code

* regenerate smarts.tab files

* update test

* add release note

* restore pregenerated header

* Suggested changes (#23)

* add a generic flags interface to atoms and bonds

* suggested changes

---------

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2025-10-09 04:38:42 +02:00
Niels Maeder
db93262a3e Add safeSetattr to more params / options objects (#8842)
* add safeSetattr to varios params objects

* added safeSetattr to further params / options
2025-10-08 16:15:20 +02:00
Rachael Pirie
b2fe43a9ad add Reaction From Smiles python wrapper (#8843)
* add Reaction From Smiles python wrapper

* Update Code/GraphMol/ChemReactions/Wrap/rdChemReactions.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* fix Greg changes

---------

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2025-10-08 16:13:06 +02:00
Ricardo Rodriguez
7b7a8a4e17 Refactor iostreams includes (#8846)
* refactor iostreams includes

* restore ostream to MonomerInfo.cpp
2025-10-08 16:08:01 +02:00
Ricardo Rodriguez
a4b63d7df5 Minor refactor of the python wrappers (#8847)
* refactor python wrappers

* fix FilterHierarchyMatcher converted already registered warning
2025-10-05 09:42:31 +02:00
Ricardo Rodriguez
fbf4990709 Fixes a leak in ChemDraw code (#8828)
* clang format

* refactor code

* fix typos

* do not leak bonds when deleting in batch mode

* check sizes
2025-10-02 06:04:24 +02:00
Paolo Tosco
23ffd85f60 - fix #8481 (#8808)
- implement get_v2Kmolblock() in MinimalLib
- add the possibility to specify the MDL version preference as a get_molblock() forceMDLVersion JSON parameter, which is ignored by get_v3Kmolblock() and get_v2Kmolblock()
- changes in response to review

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2025-09-29 17:33:02 +02:00
tadhurst-cdd
f00a8cbb4c ScsrHbondMrvError (#8646)
* fix MRV for Hbonds

* add test file

* add test file

* enforce chirality in DistGeom catch test

* Added test for correct hbond retention

* removed debug print statement

* retrigger checks

* testing  java AromaticTests

* testing java aromaticTests

* removed testing code
2025-09-29 17:30:50 +02:00
Paolo Tosco
24b2039040 Implement returnDrawCoords JSON option in MinimalLib to return 2D drawing coordinates when SVG or canvas depictions are generated (#8815)
Co-authored-by: ptosco <paolo.tosco@novartis.com>
2025-09-29 09:36:06 +02:00
Ricardo Rodriguez
56df4de046 fix (#8829) 2025-09-29 09:25:14 +02:00
Rachael Pirie
2e1d946f6d DCLV updates (#8756)
* first pass speed up of DCLV method

* drop to 320 surface points, add polar surface area v1

* suggested changes

* add John's GridKey implementation

* revert standard dots to float array

* pass simple variables by value

* stable pass radii as param

* final DCLV updates

- update max radius
- includeHs flag for polar surface area/volume
- fix silly include ligand mistake in checkExcludeAtoms
- update tests

* add missing break statements

* missing ;

* Greg changes 1

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Greg changes 2

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Greg changes 3

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Greg changes 4

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Greg changes 5

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Greg changes 6

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Greg changes 7

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Greg changes 7

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* missing return false

* Greg changes 8

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* fix incomplete doc string

* fix pytests

---------

Co-authored-by: greg landrum <greg.landrum@gmail.com>
2025-09-26 16:40:11 +02:00
Brian Kelley
d304f9f416 Trim spaces from RDProp strings to simulate reading from SDFiles (#8760)
* Trim spaces from RDProp strings to simulate reading from SDFiles

* Update documentation

* Use the correct doc strings

---------

Co-authored-by: Brian Kelley <bkelley@glysade.com>
2025-09-26 06:14:23 +02:00
Greg Landrum
c15eb1a143 Fixes #8633 (#8794)
* Fixes #8633

* changes in response to review
2025-09-26 05:33:13 +02:00
Paolo Tosco
053a0283f7 Patch RapidJSON to make sure it builds on all platforms (#8818)
* patch RapidJSON to make sure it builds on all platforms

* remove unnecessary sed command from Docker recipe

---------

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2025-09-26 05:28:46 +02:00
Niels Maeder
4f2e61cbd3 expose exceeded timeout (#8816) 2025-09-25 14:07:43 +02:00
Joshua Black
64f7a5456f Stop External/rapidjson-1.1.0 and Code/RDGeneral going to ${CMAKE_SOURCE_DIR} (#8810)
* set export.h and test.h to go to the correct places in RDKitUtils

* use cmake_source_dir so cmake files are picked up in list

* use cmake_current_source_dir in MolInterchange

* use rdkit variables to place rapidjson and headers in correct places
2025-09-25 14:05:35 +02:00
Brian Kelley
553424d6b6 Revert "Create a function to extract some specified atoms from a ROMol as a new ROMol by creating new graph (#8742) (#8743)" (#8814)
This reverts commit 040bdb61c7.

During testing of using this as a replacement for portions of
getTheFrags in getMolFrags, several issues came up regarding
how copies should actually work in practice.  These are being
corrected in a new pr:  https://github.com/rdkit/rdkit/pull/8811

Co-authored-by: Brian Kelley <bkelley@glysade.com>
2025-09-25 10:54:36 +02:00
Hussein Faara
040bdb61c7 Create a function to extract some specified atoms from a ROMol as a new ROMol by creating new graph (#8742) (#8743)
* Create a function to extract some specified atoms from a ROMol as a new ROMol by creating new graph (#8742)

This adds a new api, `RDKit::MolOps::ExtractMolFragment`, to allow efficient
extractions of mol fragments from large mols. Compared to the approach where
we delete "unwanted" atoms/bonds from the input mol, this api is faster for
small mols (about 2x faster) and at least 3x faster for big mols
(was 10x faster for "CCC"*1000).

* clang-format

* review comments

* cleanup

* review comments

* fix build failure

---------

Co-authored-by: Your Name <you@example.com>
2025-09-24 06:39:52 +02:00
Niels Maeder
d13b002d2d update default ET version to 2 in getExperimentalTorsions (#8798)
* update et version to 2

* Add comment in the release notes.
2025-09-24 05:56:35 +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
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
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