Open avirshup opened 8 years ago
@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?
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?
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.
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.
To reproduce:
got:
Result with moldesign 0.7.2 / nbmolviz 0.6.5: