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

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

Closed
richardjgowers opened this issue May 12, 2018 · 10 comments
Closed
Assignees

Comments

@richardjgowers
Copy link
Member

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
Copy link
Member

@kain88-de
Copy link
Member

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
Copy link
Member Author

richardjgowers commented May 12, 2018 via email

@kain88-de
Copy link
Member

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

@richardjgowers
Copy link
Member Author

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
Copy link
Member Author

richardjgowers commented May 12, 2018 via email

@orbeckst
Copy link
Member

There's a version of the "PDB format" that uses hexadecimals called hybrid-36. (This was discussed in openmm/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
Copy link
Member Author

@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
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
Copy link
Member

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants