Commit Graph

4 Commits

Author SHA1 Message Date
Eisuke Kawashima
e89c9f656a style: apply readability-braces-around-statements (#8136)
Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2026-02-09 12:10:50 +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
Greg Landrum
c2e48f41d8 Stop writing so many atom properties to cxsmiles (#9002)
* fix a bug in copySelectedAtomsAndBonds()
we need to clear computed properties on the atoms here

* prune back the atom properties written to CXSMILES

* update minimallib tests
2025-12-13 04:35:57 +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