biasmv/pv

shouldIntroduceChainBreaks ignores connections, sometimes breaking cartoon representation

John-Jumper opened this issue · 3 comments

For some coarse-grained protein models I work with, my C-N bond distances sometimes exceeds the 1.8 A cutoff in shouldIntroduceChainBreak. Whenever that happens, cartoon and other representations have spurious chain breaks. It would be nice if the cutoff was controlled by a global variable.

Even better would be to just check for the presence of a bond object when building cartoon, and trust the user that there should not be a chain break whenever a bond is specified between the atoms. I manually build the chain using addResidue, addAtom, and structure.connect, so I have specified the bonds that I want.

Otherwise, thank you for the project. I am currently playing with using PV in IPython notebooks.

Thanks for the report. I've just added a check to shouldIntroduceTraceBreak that checks for the presence of a bond between the residues, and in case there is one, it does not introduce a trace break. Let me know if that works for you.

I'd be curious to know how your iPython notebook experiments are going. That's something I've always wanted to try out, but never got around to...

Best,
Marco

The fix worked for me.

Integration with IPython has gone relatively smoothly. It took me a while to figure out that I had to use requirejs to load bio-pv, since IPython had already loaded requirejs on the page. I have a running notebook that will display structures inline. Just being able to cluster structures then show a representative member of each cluster in IPython is a big step forward for me. I will probably later try fancier stuff like a trajectory slider or synchronizing the orientations of multiple structures.

I haven't built a custom widget for PV yet, but I imagine that would be pretty easy. I have just been using the IPython.display.Javascript class to display the structure.

Thanks for the information, that's good to know.

Best,
Marco