marrink-lab / vermouth-martinize

Describe and apply transformation on molecular structures and topologies
Apache License 2.0
89 stars 40 forks source link

Support for hexadecimal in PDB #409

Open outihaa opened 2 years ago

outihaa commented 2 years ago

In pbd format hexadecimal numbering kicks in after 99999 for atom numbering but martinize2 doesn't support that. I'm not sure if the hexadecimal system is used for residues as well :')

pckroon commented 2 years ago

Hello hello! We did consider this (at least for resid numbers), but decided against it for 2 reasons: 1) the file format specification uses base 10 numbers; and 2) if we misinterpret base-10 numbers as hexadecimal the difference between them (i.e. resid_1 - resid_2) goes wrong. The latter is a problem, since we use the difference in resid numbers for applying links (specifically the BB +BB type). There are 2 solutions: 1) stop using resid differences for links, and use graph distance instead; 2) implement a mmcif parser (which is the successor of the pdb format).

I'm not sure we use atomid's anywhere, so I'm not sure duplicate atom ids are a problem.