Commit Graph

8 Commits

Author SHA1 Message Date
PatrickPenner
08bf105e5d Allow inclusion of molecule names in ScaffoldNetwork (#7956)
* Add molecules names into ScaffoldNetwork

- added parameter to ScaffoldNetwork Params to include molecule names in the
  ScaffoldNetwork nodes corresponding to input molecules

* Document _Name assumption

- fixed a binary and instead of a boolean and

* Forgot has prop check before access

* Misunderstood semantics of CHECK vs. REQUIRE
2024-10-30 06:11:30 +01:00
dehaenw
b58b8f1397 MakeScaffoldGeneric isotope removal (#6855)
* makescaffoldgeneric isotopes

reset the isotope to 0

* add tests

add tests, change hash functions cpp

* correct typo

* fix python test

* correct tests and add anonymous graphs

* Delete rdkit/Chem/Draw/github4763.svg

deleted stray image
2023-11-10 20:26:03 +01:00
Greg Landrum
69b143edd0 Swap from RDUNUSED_PARAM to unnamed parameters (#4433)
* cleanup

* more cleanup
2021-08-24 17:19:46 -04:00
Greg Landrum
2e3f31990d Allow batch editing of molecules: removal only (#3875)
* backup

* simple first pass, passes all tests

* cleanup a bunch of existing uses

* ensure that we can safely add atoms/bonds while in edit mode

* add context manager on python side

* handle exceptions properly in those

* changes in response to review
2021-03-11 05:10:43 +01:00
Greg Landrum
e1fdca2b05 ScaffoldNetwork: add feature to count the number of molecules a scaffold originates from (#3275)
* add feature to count the number of molecules a scaffold originates from

* make this work with SWIG

* update the type of the version constant
2020-07-15 06:59:51 +02:00
Greg Landrum
870219a436 Fixes #3177 (#3191)
* Fixes #3177

* add python test too
2020-05-28 09:08:41 +02:00
Greg Landrum
fe745cfc04 ScaffoldNetwork rearrangements (#2985)
* backup

* rearrange the network to make it cleaner

- GenericBond scaffolds are now directly connected to the corresponding Generic scaffold
- Attachment points are no longer removed from Generic (or GenericBond) scaffolds

* remove dead code
2020-03-06 13:51:38 +01:00
Greg Landrum
f3587ea4d0 Add a scaffold network implementation (#2911)
* backup

* backup

* backup

* getting close to v0.1

* switch to using node indices

* add pruning and flattening

* support multiple mols

* example notebook

* backup

* initial commit
Just includes the basic API and flatten

* add the pruning step

* add removeAttachmentPoints()

* add makeScaffoldGeneric()

* improve compilation speed by adding catch_main.cpp

* add getMolFragments()

* doc cleanup

* actually add the network building code

* first pass at python wrapper

* allow edges to be nicely converted to strings

* get node counts working

* backup python notebook

* switch example notebook to use wrapped C++ code

* add BRICS fragmentation option

* fix a bug with removing attachment points to aromatic heteroatoms

* add provisional attachment point merger to notebook

* fix a bug with includeScaffoldsWithAttachments=false

* backup of efforts to get this working on windows

* backup of efforts to get this working on windows

* does not work. backup

* Fix a substructure crash on Windows

* re-enable tests

* adjust to the new BRICS form

* in-code documentation

* more doc updates

* reformat

* change the string output format for edges

* remove old python implementation

* remove obsolete test

* include a generic scaffold for the pruned structure too

* default to keepOnlyFirstFragment=false with BRICS params

* bug in removal of attachment points from generic scaffolds

* more testing

* support working from std::shared_ptr as well as boost::shared_ptr

* more testing

* disable debug printing

* use memo-ization in getMolFragments() to avoid duplicate work

* add SWIG wrapper and basic testing

* add define for RDK_USE_BOOST_SERIALIZATION

* add serialization at the C++ level

* add a string ctor for a scaffold networks

* add pickle support on the python side

* formatting

* remove old notebook

* move the fantastically useful iterable_convertor to RDBoost/Wrap.h

* expose parameter constructor with std::vector<std::string>

* add scaffoldnetwork to documentation
2020-02-11 08:21:01 -05:00