Closed duerrsimon closed 1 month ago
Can you provide your file and code? Frames containing different molecules are suppose to work.
Can't share the file unfortunately. I confirm that loading multiple different molecules within one PDB file is working, it is just that the connectivity seems to be assigned based on the last frame and not per frame (makes sense given that is more expensive). Due to this if atoms move a lot one has these extremely long bonds as shown on the second picture.
Other viewers like VMD also have this problem (circumvented by plugins such as sscache). Basically one would just need a flag to call the connectivity determination each time the frame is changed instead of just once. I can try to prepare a synthetic file in case that helps understand the problem.
I need more to go on here. I've constructed a multi-model pdb file (attached) with two very different structures and it animates just fine with this code:
viewer.addModelsAsFrames(data,'pdb');
viewer.setStyle({'stick':{'colorscheme':'greenCarbon'}});
viewer.zoomTo();
viewer.animate({'loop': "forward", reps: 1, interval: 1000, 'step': 1});
viewer.render();
Can you please try to construct a reproducible test case that you can share?
Closing due to lack of activity, but will reopen if a reproducible test case is provided.
Is your feature request related to a problem? Please describe. I have a PDB file that contains a trajectory of steps of optimization of a structure where amino acid identities change per frame. It looks like sphaggetti. presumeably because only the last frame is used to determine connectivity.
Describe the solution you'd like I'd like to determine connectivity per frame
Describe alternatives you've considered(Optional) Probably could load the files individually and then show/hide them but then I can't use the internal frame mechanism.
Additional context(Optional) last frame
first frame:
![image](https://github.com/3dmol/3Dmol.js/assets/16979577/00d6e6ca-e514-4876-a02b-d8169b74bfaf)
Please close your issue when you feel it has been adequately resolved