-
-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected behaviour in SSSR routine - wrong sub rings #2641
Comments
I have been looking at this and I agree that it is a bug. The problem is that when pruning redundant rings (in Line 356 in bcb7900
In this case, that results in the central ring (marked in red: ) getting pruned. I could make a try to fix this, but I'm not too familiar with all the inner workings of the OBRing to be certain to fix it in the best way possible. I suppose the easiest way would be to add the attribute _bondset to the class, parallell to the _pathset and use that for pruning instead. Do you think there might be a performance issue here? I think maybe @timvdm was the last one to touch the code? Another option would be to add code in OBRingSearch::RemoveRedundant such as in OBRing::visitRing :
|
Hi @fredrikw ! Yes agreed definitely the wrong approach here, atom candidacy is not enough to decide which rings to be removed. I have seen the exclusive OR option for MCB on the bond set as you've suggested, not sure how fast this will be. but yes if this is the best way forward definitely agree a bond bit vector would be a clean solution. I am currently looking at CDKs approach to attempt a fix on this, whats missing is the gaussian elimination step needed for MCB, will have a go this weekend and come back to this post. Any help from @timvdm would be very much appreciated. |
I put together a quick fix for this in #2648 but there are a bunch of questions that needs answers before it is done... |
Open Babel version: current
Operating system and version: linux or macos (tested both)
Looking at the following smiles: O1C23C4=C(C=C12)C1=COC(=C4OC3)C1
I would expect to see a SSSR containing 5 subcycles, which is what is seen, however the subcycles generated for each OBRing* shows some weird behaviour.
running the following code on the Mol object :
gives the following output:
Looking at ring (3), we see atom indexes that are not shared with any other subcycle in the list? which would be impossible if the subcycles are generated as i would expect? To confirm, the method in RDKit does not show this behaviour:
yields
Where overlap is seen for all the atoms across the ring set.
Happy to attempt a fix on this but some direction would be appreciated (if in fact this is a true bug, and not my misunderstanding). I believe its due to the 3 cycle, as for the majority of cases i see the correct overlaps.
The text was updated successfully, but these errors were encountered: