Integration of CDK ExhaustiveFragmenter#133
Conversation
|
@ToLeWeiss , I fear performance will be a big issue here. I just started a fragmentation with 1000 natural products and it is still running. We need to discuss this, test it more, and maybe document it somewhere. Final result of my run: And afterwards, it aborted with an out of memory error... |
JonasSchaub
left a comment
There was a problem hiding this comment.
Looks good overall, just some minor things in the comments.
|
When the new fragmenter is added, we also need to describe it in the tutorial: https://docs.google.com/document/d/1dbpSZfdmOYaQqdYTDZj0NfKuy9TMp6T4SF6lCBB7bFo/edit?usp=sharing |
|
@ToLeWeiss ready for re-review? |
|
Now it is ready for a review. |
JonasSchaub
left a comment
There was a problem hiding this comment.
Minor comments
| * from the CDK, available for MORTAR. | ||
| * from the CDK available for MORTAR. It has a performance of O(n!) where n is the number of splittable bonds. Splittable | ||
| * bonds are defined as non-ring, single bonds that are connected to at least one other atom, that is <b>not</b> an | ||
| * implicit hydrogen. |
There was a problem hiding this comment.
Please use the term "terminal" here
|
@ToLeWeiss everything looks very good and ready to merge but based on what we just discussed, I would not merge it now, so that you can do your re-implementation of the exhaustive fragmentation here. What do you think? |
|
Do you mean a side by side implementation of the CDK Exhaustive Fragmenter and a "fast" Exhaustive Fragmenter approach here @JonasSchaub ? |
I mean that it probably won't make sense to integrate the CDK ExhaustiveFragmenter right now, in the state that it is in, but rather wait for your optimised implementation. |
|
Ah okay. |
|
@ToLeWeiss please merge the production branch into your current branch when you have time (tell me if you need help with that). |
|
I would be happy to merge production into this branch to be up to date, but which strategy (normal merge or rebase) is preferred here @JonasSchaub ? |
A normal merge would be the way to go (less dangerous than a rebase). |
|
…fragmentation utility of the CDK, as a fragmentation option rebased on the production branch to be up to date
… of the minimal fragment size of the exhaustive fragmenter
…f the exhaustive fragmentation and added the respective test class
…ue to automatic saturation
…xhaustive fragmenter class
4eb3a6a to
5af8971
Compare
…nfigurations for the SmilesGenerator
…n settings would propably be more appropriate
…or as multiple boolean values
…ented unique SMILES as a default setting
… addded a test and this statements
|
|
Hey @JonasSchaub the code would be ready for a review if you happen to find some time on your hands. (It seems i can not request a review because we probably are both authors) |
There was a problem hiding this comment.
Pull request overview
Adds a new fragmentation algorithm integration by wrapping CDK’s ExhaustiveFragmenter, exposing its settings to the MORTAR GUI/settings system, and registering it in the fragmentation service.
Changes:
- Introduces
CDKExhaustiveFragmenterimplementingIMoleculeFragmenter(settings, filtering/preprocessing, fragmentation). - Registers the new fragmenter in
FragmentationServiceand adds en-GB UI strings for its settings. - Adds JUnit tests for basic instantiation and sample fragmentations (incl. stereo preprocessing behavior).
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
src/main/java/de/unijena/cheminf/mortar/model/fragmentation/algorithm/CDKExhaustiveFragmenter.java |
New wrapper around CDK exhaustive fragmentation with GUI-exposed settings and preprocessing/filter logic. |
src/main/java/de/unijena/cheminf/mortar/model/fragmentation/FragmentationService.java |
Registers the new fragmenter instance in the service’s fragmenter list. |
src/main/resources/de/unijena/cheminf/mortar/message/Message_en_GB.properties |
Adds display names/tooltips for the new fragmenter’s settings. |
src/test/java/de/unijena/cheminf/mortar/model/fragmentation/algorithm/CDKExhaustiveFragmenterTest.java |
Adds unit tests for basic settings access, fragmentation, and stereo preprocessing. |
gradlew |
Adds the Gradle POSIX wrapper script. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
JonasSchaub
left a comment
There was a problem hiding this comment.
It already looks quite good. You have to clean up some names, some doc, and some parameter inconsistencies, though. My "biggest" point is to add another setting that dis- and enables the a priori filtering by nr. of splittable bonds.
| CDKExhaustiveFragmenter.splittableBondsThreshold.displayName = Splittable Bonds threshold setting | ||
| CDKExhaustiveFragmenter.minFragmentSize.tooltip = Defines the minimum number of atoms (inclusive) that are required for one Fragment. The number of atoms consists of all atoms, that are connected by more than one single bond or have more than one single bond. | ||
| CDKExhaustiveFragmenter.minFragmentSize.displayName = Minimum fragment size setting | ||
| CDKExhaustiveFragmenter.inclusiveMaxTreeDepth.tooltip = Defines the maximum depth of the fragment tree. This setting controls how deeply the fragmentation algorithm will explore molecular fragment combinations. A higher value allows for more extensive fragmentation but may increase computational complexity. |
There was a problem hiding this comment.
needs to be shortened a bit. And it definitely does increase comp. complexity!
|





No description provided.