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

Patch/layout07 nov15 #171

Merged
merged 32 commits into from Nov 9, 2015
Merged

Patch/layout07 nov15 #171

merged 32 commits into from Nov 9, 2015

Conversation

johnmay
Copy link
Member

@johnmay johnmay commented Nov 7, 2015

Sorry - another large patch. This layouting really is very finicky and hard to test other than running over a corpus. This mainly improves layout for Macrocycles but lots of other tweaks.

One big one is I've removed the old TemplateHandler, but if a user provides a template it is converted to the new form. I've also added a custom-templates.smi to go along with those derived from ChEBI.

Only one for now, but should give the idea:

image

Macrocycles are templated separately, I enumerated a fair few but can obviously do with expansion. I'm not completely happy with how exo-cyclic bonds are placed and added a work around for terminal atoms. I want to resolve this completely but Daniel Lowe convinced me the improvement was already so dramatic it was worth getting it applied as it is so people could use it. Some examples from the test set:

image
image

Something else easy was terminal ring peeling which now allows us to do an example Rich A posted on twitter the other month.

image

  - Require non-bonded atoms are further apart.
  - Accept a rotate if the congestion improvement is minimal but the overlap is resolved
  - Correct congestion update for distributed stretching
…all hydrogen counts. We now set the default valence temporarily to produce nicer SMILES. This method is probably quite useful when we are chopping up molecules and may be moved to the SMILES generator in future.
…displeased results if the entire ring system wasn't mapped (#165) and since in that case we can use canonicalisation (Identity Templates) they are redundant.
… originally I skipped this for secondary ring systems used relative coordinates rather than absolute. On further inspection the SDG already rotates and shifts rings when attaching them so identity templates can be used here too.
… the bond rather that the ring centre which in a crinkled macro cycle isn't ideal.
…ed ring) so use the shared atom centre to work out direction.
…ms, these are normally depicted in a de facto orientation (e.g. steroid).
egonw added a commit that referenced this pull request Nov 9, 2015
@egonw egonw merged commit 81c437a into master Nov 9, 2015
@johnmay johnmay deleted the patch/layout07Nov15 branch February 12, 2017 21:56
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

Successfully merging this pull request may close these issues.

None yet

2 participants