biasmv / pv

WebGL protein viewer
https://pv.readthedocs.org
MIT License
316 stars 85 forks source link

Some molecules not loading, or spheres not loading #82

Closed rlowe55 closed 9 years ago

rlowe55 commented 9 years ago

Hi Marco, Currently working on implementing pvviewer for one of our apps on the RCSB.org site. I notice that some molecules do not load - 1J5E for example - I'm using the latest build.

Also for some molecules, it will not display spheres, for example 1AON

I'm loading the pdb files from pdb.org

otherwise the viewer works great thanks -Rob

biasmv commented 9 years ago

Thanks for the report. I will look into it!

biasmv commented 9 years ago

Hi Rob,

I've just tried to reproduce the problem on my machine with latest master. For me, 1j5e loads and displays properly for all but the spheres and balls and sticks. The latter two render modes are probably overwhelmed by the amount of geometry that needs to be generated.

1j5e

Do you get any error message when PV fails to display the structure for the other render modes? You might want to try out the js/bio-pv.dbg.js version that includes more detailed error output for diagnosing this.

I'm not really sure how to solve this one. Ideally one would be able to use spherical billboards instead of spheres to cut down on the amount of geometry to be rendered. However, this requires some features that are not available in WebGL 1.0. I'll have to check if these features are available in WebGL 2.0.

The problems for 1aon can be solved. It's related to the atom picking code. Essentially we need to generate a unique ID for each atom in the structure. Due to some WebGL constraints we are limited to 2^16 atom ids. I'll modify the code to only generate a unique ID for every residue instead of every atom in case there are many atoms in the structure. This should make it possible to render 1aon even in balls and sticks and spheres mode. There are also some things than can be improved in the unique-id recycling code that should buy a few more ids.

I'll let you know once I have a fix in place.

Best, Marco

rlowe55 commented 9 years ago

Hi Marco,

Thank you for your quick response - I'll follow up on your suggestions

I've also been working with Andreas Prlic at UCSD - we're really excited about using pvviewer - the performance is so much better than jsmol etc.

-rob

On 2/27/15 1:41 AM, Marco Biasini wrote:

Hi Rob,

I've just tried to reproduce the problem on my machine with latest master. For me, 1j5e loads and displays properly for all but the spheres and balls and sticks. The latter two render modes are probably overwhelmed by the amount of geometry that needs to be generated.

1j5e https://cloud.githubusercontent.com/assets/1254268/6408262/38199f96-be51-11e4-888c-820432dd1cca.png

Do you get any error message when PV fails to display the structure for the other render modes? You might want to try out the js/bio-pv.dbg.js version that includes more detailed error output for diagnosing this.

I'm not really sure how to solve this one. Ideally one would be able to use spherical billboards instead of spheres to cut down on the amount of geometry to be rendered. However, this requires some features that are not available in WebGL 1.0. I'll have to check if these features are available in WebGL 2.0.

The problems for 1aon can be solved. It's related to the atom picking code. Essentially we need to generate a unique ID for each atom in the structure. Due to some WebGL constraints we are limited to 2^16 atom ids. I'll modify the code to only generate a unique ID for every residue instead of every atom in case there are many atoms in the structure. This should make it possible to render 1aon even in balls and sticks and spheres mode. There are also some things than can be improved in the unique-id recycling code that should buy a few more ids.

I'll let you know once I have a fix in place.

Best, Marco

— Reply to this email directly or view it on GitHub https://github.com/biasmv/pv/issues/82#issuecomment-76346893.

biasmv commented 9 years ago

Hi Rob,

glad you like the viewer. It's exciting to know that you guys are integrating it into the RCSB website.

I've fixed the rendering of 1aon with spheres (see latest commits to master). This should help for many large structures. However, 1j5e is still too much with spheres, let alone balls and sticks. This will require some more work...

biasmv commented 9 years ago

Hi Rob,

1J5E should now work for you as well. Rendering was indeed broken in some browsers, just not the ones I've tested in.The problem was caused by the very long chain A that broke some assumptions in the cartoon rendering code. This assumption has now been removed and the proper geometry is generated.

Let me know if that fixes the problem for you as well.

Best, Marco

rlowe55 commented 9 years ago

hi Marco,

works great - really appreciate your effort and quick response -rob

On 2/28/15 2:10 AM, Marco Biasini wrote:

Hi Rob,

1J5E should now work for you as well. Rendering was indeed broken in some browsers, just not the ones I've tested in.The problem was caused by the very long chain A that broke some assumptions in the cartoon rendering code. This assumption has now been removed and the proper geometry is generated.

Let me know if that fixes the problem for you as well.

Best, Marco

— Reply to this email directly or view it on GitHub https://github.com/biasmv/pv/issues/82#issuecomment-76514822.