In atom_to_atom_line (atomium.pdb) there is a fragment:
if a.het:
id_, residue_name = a.het.id, a.het._name
chain_id = a.chain.id if a.chain is not None else ""
residue_id = int("".join([c for c in id_ if c.isdigit()]))
insert_code = id_[-1] if id_ and id_[-1].isalpha() else ""
It handles the insert codes nicely (e.g. 10A) but removes the minus sign in negative residue ids. If we have residues -1 and 1, both will end up being 1 in the PDB file.
In
atom_to_atom_line
(atomium.pdb) there is a fragment:It handles the insert codes nicely (e.g. 10A) but removes the minus sign in negative residue ids. If we have residues -1 and 1, both will end up being 1 in the PDB file.