Closed pboysen closed 2 years ago
I have to assume this is an old version of 3Dmol since the current version does not use that URL (as it is no longer valid). If for some reason you must use an out-of-date version, you can try explicitly requesting pdb instead of mmtf:
$3Dmol.download("pdb:1MO8",viewer,{multimodel:true, frames:true, format:"pdb"},function(){
viewer.setStyle({}, {cartoon:{color:"spectrum"}});
viewer.render();
});
I got this version on npm (1.7.1) a few weeks ago. It was published a month ago. I am importing it with import * as $3Dmol from '3dmol/build/3Dmol-nojquery-min' I get falling back to pdb format 3Dmol-nojquery-min.js:10:16555 XHRGEThttps://files.rcsb.org/view/1MO8.mmtf [HTTP/1.1 404 Not Found 401ms]
fetch of https://files.rcsb.org/view/1MO8.mmtf failed: Not Found 3Dmol-nojquery-min.js:10:16715
BTW, adding the format does work.
The "falling back to pdb format" message was the clue I needed. For some reason it is failing to fetch the mmtf file (I don't observe problems when I do it - perhaps something about your network configuration?). It turns out there was a bug in the fallback code where it wasn't changing the mmtf extension to the pdb extension. I've pushed a fix. 99edbc7888a7931829ae58915524edcf4b2c498d
And how many times have I said as a developer, "It works for me!". Thanks for the update. Fantastic tool BTW!
*$3Dmol.download("pdb:1MO8",viewer,{multimodel:true, frames:true},function(){ viewer.setStyle({}, {cartoon:{color:"spectrum"}}); viewer.render(); }); I attempted this code and got: fetch of https://files.rcsb.org/view/1MO8.mmtf failed: Not Found Using a CIT source and embedding html works with pdb. Looking at https://files.rcsb.org/view/ is empty.
Firefox Version 94.0 (64-bit) What’s new