Closed SSchott closed 6 months ago
Can you please provide more information, including links to references, about PDB files using hexademical numbering? I'm unfamiliar with this. Thank you!
VMD's solution will produce many "hex" numbers which are digit-only, and thus will not be parsed back correctly and will produce non-unique atom IDs. So I wonder how useful this really is, and if it is any better than to just write zeros or 99999 for overflowing numbers.
>>> int("%05x" % 100096)
18700
Hi, Thanks for the comments. @sobolevnrm I'll see what I can do regarding a test. In any case, any standard PDB should never trigger the except section, as ATOM IDs should always be int, but we know how the PDB-space looks like.... @speleo3 I don't follow what you mean. The try and except should ensure only hex numbers are transformed into a decimal number. It should ensure traceability in the long term.
Finally got around this. I made a draft in #383 . Let me know if it goes in line with what you were looking for.
Was facing issues parsing too big PDBs. I adapted the parsing for the serial entry for ATOM to allow hexadecimal notation, as when PDBs are rewritten by VMD. I don't know how much it would be necessary to include this for other atom id dependent entries. If so, making a function for it might be necessary. Anything that goes against such a move?