Skip to content
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

Norbornane not rendering with a template #44

Open
greglandrum opened this issue Jan 13, 2020 · 10 comments
Open

Norbornane not rendering with a template #44

greglandrum opened this issue Jan 13, 2020 · 10 comments

Comments

@greglandrum
Copy link
Collaborator

It looks like templates either aren't being used with the version of coordgen that the RDKit is using (v1.3.2) or norbornane isn't in the template file (which seems unlikely):
image

Are we doing something wrong here or is there a coordgenlibs problem?

@lorton
Copy link
Member

lorton commented Jan 13, 2020

@ZontaNicola or @ricrogz - probably need your help on this one. I'm guessing Greg is right about templates just not being picked up for some reason.

@greglandrum
Copy link
Collaborator Author

I just did a bit of debugging on this one and discovered that the templates are being found and loaded. It may be that there's just not a template available for norbornane?

@ZontaNicola
Copy link
Collaborator

yes, oddly enough there's no template for norbornane
sorry, I had checked straight away but forgot to reply, my bad.

@ZontaNicola
Copy link
Collaborator

I opened a ticket to track the addition of the template

@ricrogz
Copy link
Collaborator

ricrogz commented Jan 15, 2020

Sorry for not commenting earlier. I also had a look at this, and I think it is more complicated than just adding a template: apparently, we only use templates for finding coordinates for "central" rings in fused ring systems, and only when there is more than one central ring. For norbornane there's only one central ring, so templates are not even loaded.

@ZontaNicola
Copy link
Collaborator

I haven't double checked what I am about to say, but it seems to me that norbornane qualifies as two "central" rings, SSSR wise it's two 5 membered rings and they share more than 2 atoms, which is the the requirement for flagging them as a "core" of fused rings

@ricrogz
Copy link
Collaborator

ricrogz commented Jan 15, 2020

Sorry, I meant that for norbornane coordgen is only finding one central ring, although it being 2 makes sense.

@ricrogz ricrogz mentioned this issue Jan 15, 2020
@ricrogz
Copy link
Collaborator

ricrogz commented Jan 15, 2020

Ok, there was a bug in the detection of side rings: it allowed up to 3 common atoms to be shared with central rings. I changed it to two and added a template for norbornane, and it solves the issue. Not sure if it will cause other problems, though.

@ZontaNicola
Copy link
Collaborator

ZontaNicola commented Jan 15, 2020 via email

@ricrogz
Copy link
Collaborator

ricrogz commented Jan 16, 2020

I had then extended the cutoff to 3 because we still do a pretty decent job in most cases and this avoids a lot of complicated templates. I'd still rather get norbornane "wrong", which means without the canonical and pretty hexagon-like depiction as long as all the atoms visible and reasonable bond lengths than risk a cascade of cores that can no longer simplified and that we have no templates for.

This makes sense. Since we have checked that templates are working as expected, and norbornane is just ugly, I'd also prefer to get it wrong than to run into more potential problems by changing the cutoff.

this being said I think we can should run the template matching BEFORE stripping rings that share more than 3 atoms and get the best of both worlds.

That's also a possibility. I have heard comments about making changes to address the bad performance (#39), so maybe we could remember about this when we make these changes. But for now I'd stay with the ugly norbornane.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants