Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems visualzing resnumbers greater than 9999 #993

Open
davidRFB opened this issue Sep 3, 2021 · 6 comments
Open

Problems visualzing resnumbers greater than 9999 #993

davidRFB opened this issue Sep 3, 2021 · 6 comments

Comments

@davidRFB
Copy link

davidRFB commented Sep 3, 2021

python -c 'import nglview; print(nglview.__version__)'
3.0.1
python -c 'import ipywidgets; print(ipywidgets.__version__)'
7.6.4

Hi ! I am using nglview with show_pytraj(). However I have a problem visualizing water close to a residue because, some water residue number are greater than 9999. And therefore I do not see these waters. Here is an example
image

I do not know if there is a problem with the topology with pytraj or maybe the visualizer.

Thank you for your time !
What an amazing proyect !

@hainm
Copy link
Collaborator

hainm commented Sep 6, 2021

I do not know if there is a problem with the topology with pytraj or maybe the visualizer.

hi @davidRFB:

Can you please save one frame to .pdb format and try again with

view = nv.show_file("your.pdb")
view
[...]

to see if that's an issue with pytraj or nglview? Cheers.

@davidRFB
Copy link
Author

davidRFB commented Sep 6, 2021

Hi @hainm ! Thanks for your answer.

Here is the code with nglview and the pdb.
image

The water number 1065 appears twice. I guess because also represent the water 1065X.

@hainm
Copy link
Collaborator

hainm commented Sep 7, 2021

So I guess it's the issue with pytraj of how pytraj save the pdb file. Let me investigate (although I don't promise a time frame for that). Cheers and thanks.

@davidRFB
Copy link
Author

davidRFB commented Sep 7, 2021

Thank you very much ! Please, let me know if I can help with something.

@juliasubbotina
Copy link

juliasubbotina commented Aug 10, 2022

The issue is with not pytraj. I had the same problem with mdtraj or reading PDB directly. The problem with large structures is that residue number is becoming to big, so there is not enough field characters to hold it in PDB file in proper place. As a result the x,y,z values get shifted and NGLview (VMD has the same issue actually) can not read it.
For me the trick around was to renumber residue numbers so they fit to 23-30 position @atom section and vois là, everything worked just fine. For me new numbers were not needed for further analysis. But if this information is important (e.g. for further analysis of proteins), it is probably better to split protein in shorter chains and restart resnumbers each time. And "re-map" back to original numbering when needed.

@hainm
Copy link
Collaborator

hainm commented Aug 10, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants