Commit Graph

13 Commits

Author SHA1 Message Date
Ricardo Rodriguez
434714e7d4 Fixes #9270 (#9272)
* fix handling double bond stereo extraction

* add tests

* Update Code/GraphMol/Subset.cpp

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

---------

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2026-05-16 07:01:25 +02:00
Ricardo Rodriguez
f3dd424d28 make ringdecomposerlib a mandatory dependency (#9209) 2026-03-27 18:17:27 +01:00
Ricardo Rodriguez
474df5a9a8 Exclude Zero order bonds from FindRingFamilies() and add arguments for includeDativeBonds, includeHydrogenBonds (#9118) 2026-02-20 19:54:13 +01:00
Brian Kelley
36f061efb1 Don't silently ignore missing or extra atoms/bonds in copyMolSubset (#9089)
* Don't silent ignore missing atoms (and replace them with atom #0) in copymolsubet

* Fail if explicitly set atoms/bonds are not present

* Add tests

* Simplify optimization (copy whole molecule) add test for no bonds
2026-02-06 06:48:05 +01:00
Brian Kelley
70540c2eed Add extract mol fragment api (#8811)
* 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

* Consolidate copying subsets of molecules

* Readd missing tests

* Update comment to restart build

* Remove missing test

* Remove debugging comment, fix warnings

* Fix warnings on gcc11

* Add docs

* Make vector<bool> dynamic_bitset<>

* Update copyright

* Add swig wrappers

* Use new designated constructor API

* Fix windows builds

* Change enum values from unsigned int to integer

* Fix unsigned int variable

* Update Code/GraphMol/Wrap/test_subset.py

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

* Update Code/GraphMol/Subset.cpp

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

* Update Code/JavaWrappers/gmwrapper/src-test/org/RDKit/ChemTransformsTests.java

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

* Reponse to review

* Fix documentation

* Remove comments

* Remove unnecessary comments

* Fix one liners

* Change assertion to be clearer (and not one-liners)

* Run clang-format

---------

Co-authored-by: Your Name <you@example.com>
Co-authored-by: Hussein Faara <hussein.faara@schrodinger.com>
Co-authored-by: Brian Kelley <bkelley@glysade.com>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2025-12-09 15:06:29 +01:00
Greg Landrum
f71b8e2148 Fixes #8945 (#8946) 2025-11-13 15:18:03 +01: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
1727ffd538 Fix the way carbon is handed in cleanupOrganometallics() (#8301)
* allow cleanupOrganometallics to work with carbon

* do not use cleanupOrganometallics with mol2

* fix handling of C atoms in cleanupOrganometallics

* add test for #8312

* Update Code/GraphMol/MolOps.cpp

Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>

---------

Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
2025-03-03 17:30:41 +01:00
Nic Zonta
196dde4b04 fix problems with template matching (#7975)
* fix compilation error

* wip

* undo change to CMakeLists

* add test

---------

Co-authored-by: greg landrum <greg.landrum@gmail.com>
2025-01-17 06:42:28 +01:00
Ricardo Rodriguez
c01ca64ac1 Fixes #8065 (#8066)
* add test + fix

* simplification

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

---------

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2024-12-12 06:11:23 +01:00
Ricardo Rodriguez
39d4662ae7 Throw when attempting to normalize a Zero RDGeom::Point (#8008)
* throw if close to zero

* fix moldraw2DTestCatch

* Fix testRGroupDecomp

* fix one test in distGeomHelpersCatch

* fix tests in distGeomHelpersCatch

* retry finding a dir vector when adding Hs

* push UFF fixes to calculateCosY

* fix the setTerminalAtomCoords deg 4 patch

* add a test

* reduce zero tolerance
2024-11-19 04:33:22 +01:00
Greg Landrum
b1663052b8 Remove Descriptors as a dependency of many other RDKit libraries (#7700)
* move mol weight and formula calculators to MolOps and refactor them a bit.
The descriptors are still there and should remain.

* remove other unnecessary dependencies on Descriptors

* Update adapter.cpp

Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>

---------

Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
2024-08-13 13:22:43 +02:00
Greg Landrum
a26ea07d21 Fixes #7556 (#7646)
* backup, does not work

* fix a copy-pasta typo

remove debugging messages

all tests pass here

* last bit of modernization
2024-07-22 16:34:08 +02:00