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

PDB hybrid36 format (Packmol PDB files with hexadecimal numbers) #1897

Closed
richardjgowers opened this Issue May 12, 2018 · 10 comments

Comments

Projects
None yet
3 participants
@richardjgowers
Copy link
Member

richardjgowers commented May 12, 2018

Here's a really funny one packmol writes PDB indices in hexadecimal when they get too high. PDB really is the format that never stops giving

@kain88-de

This comment has been minimized.

Copy link
Member

kain88-de commented May 12, 2018

@kain88-de

This comment has been minimized.

Copy link
Member

kain88-de commented May 12, 2018

http://thegrantlab.org/bio3d/html/read.pdb.html yup now I'm pretty sure VMD supports hex numbers. VMD will also be an easy way to generate a test file

@richardjgowers

This comment has been minimized.

Copy link
Member Author

richardjgowers commented May 12, 2018

@kain88-de

This comment has been minimized.

Copy link
Member

kain88-de commented May 12, 2018

I'm not sure if VMD doesn't do that too.

@richardjgowers

This comment has been minimized.

Copy link
Member Author

richardjgowers commented May 12, 2018

Ah apparently VMD does the same. Which means we'd have to read more than 16 lines to check this. I think this will be fairly easy to fix, but harder to fix with no performance loss, which is preferable as huge PDB files are commonly used.

@richardjgowers

This comment has been minimized.

Copy link
Member Author

richardjgowers commented May 12, 2018

@orbeckst

This comment has been minimized.

Copy link
Member

orbeckst commented May 14, 2018

There's a version of the "PDB format" that uses hexadecimals called hybrid-36. (This was discussed in pandegroup/openmm#659 a while ago.) We can support hybrid-36 either separately with our PDBReader.

(I have to say I don't feel very good about having our reader automatically trying to recognize every custom variation of the PDB format; perhaps we could have a flag like the old "strict=True" that actually fails when the format is not the true PDB one.... or at least a warning.)

@richardjgowers

This comment has been minimized.

Copy link
Member Author

richardjgowers commented May 14, 2018

@orbeckst yeah maybe it would be better if you had to specify that this is required via keyword args. It might also make the resulting code cleaner/faster

@orbeckst

This comment has been minimized.

Copy link
Member

orbeckst commented May 15, 2018

I saw https://plumed.github.io/doc-v2.4/user-doc/html/pdbreader.html

Since PLUMED 2.4 we allow hybrid 36 format to be used to specify atom numbers. This format is not particularly widespread, but has the nice feature that it provides a one-to-one mapping between numbers up to approximately 80 millions and strings with 5 characters, plus it is backward compatible for numbers smaller than 100000. This is not true for notations like the hex notation exported by VMD.

Note the comment on VMD apparently doing its own thing vs following the hybrid-36 standard. (See also plumed/plumed2#226 )

What does packmol really do? VMD-style or hybrid-36?

I am all for supporting hybrid-36. Sample code: https://sourceforge.net/p/cctbx/code/HEAD/tree/trunk/iotbx/pdb/hybrid_36.py

@kain88-de

This comment has been minimized.

Copy link
Member

kain88-de commented Jul 2, 2018

Does it make sense to allow this format also for residue ids?

@orbeckst orbeckst changed the title Packmol PDB files with hexadecimal numbers PDB hybrid36 format (Packmol PDB files with hexadecimal numbers) Jul 4, 2018

arm61 added a commit to arm61/mdanalysis that referenced this issue Jul 9, 2018

@arm61 arm61 referenced this issue Jul 9, 2018

Merged

Allow read in of VERY large pdb files #1978

4 of 4 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment