This is the PDB HETATM loading error whereby the last HETATM record is sometimes not read from the
PDB file. The problem was two-fold. Firstly the internal structural object _parse_mols_pdb()
method for separating a PDB file into distinct molecules was terminating too early when a new
molecule is found, so that the last PDB record is not appended to the records list for the molecule.
Secondly the write_pdb() method was not handling the PDB sequential serial number correctly.