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

Ribbons representation not displaying for DNA #29

Open
avirshup opened this issue Oct 29, 2016 · 4 comments
Open

Ribbons representation not displaying for DNA #29

avirshup opened this issue Oct 29, 2016 · 4 comments
Assignees
Labels

Comments

@avirshup
Copy link
Contributor

avirshup commented Oct 29, 2016

To reproduce:

mol = mdt.build_dna_helix('ACTGCGTA')
viewer = mol.draw(display=True)
viewer.ribbon()

got:

image

Result with moldesign 0.7.2 / nbmolviz 0.6.5:

image

@justinmc
Copy link
Contributor

justinmc commented Nov 4, 2016

@avirshup I might need to sit down with you for a minute tomorrow to look into this. I'm not able to draw this directly in 3dmol. Using the data from that molecule, then trying to set the style for the whole molecule to "cartoon" just results in a blank page (like you saw).

Do you remember if that's how you were originally drawing these? With "cartoon"? Anything else that might have gotten removed from the code?

@avirshup
Copy link
Contributor Author

avirshup commented Nov 4, 2016

Yeah - "cartoon" sounds right. Happy to sit down with this; it might be helpful to try comparing the 3DMol JSON data between the working and non-working versions.

I remember having this same problem a very long time ago when I first started working on the project, but I have no idea how it got fixed the first time. My guess would be that this has something to do with 3DMol not recognizing the molecular data specifically as DNA - maybe a naming issue or something?

@avirshup
Copy link
Contributor Author

avirshup commented Nov 4, 2016

Actually, I remember how I fixed this the first time - it was by passing my molecules to 3DMol as PDB files. I think 3DMol's PDB parser must be inserting some piece of metadata into its JSON representation that allows it to recognize a chain as a piece of DNA.

@justinmc
Copy link
Contributor

justinmc commented Nov 4, 2016

That was it! I was able to render the cartoon dna via pdb. It's a hard problem to get it to work with the rest of MDT though... I'm going to try digging into the 3dmol source and see exactly why it doesn't work with json. Ideally I can submit a PR to them to fix this, or as a fallback I can probably hack in the extra metadata in our code.

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

No branches or pull requests

2 participants