Packmol execution stops with large molecules
When using a large pdb file, the execution of packmol stops when it reaches CONECT 9999. This issue does not exist in previous versions (tested on version 20.15.3). Here is the output on the screen:
ERROR: Error reading CONECT line: CONECT 9999 99981000010004 STOP 171
Switching to .xyz files (of the correct format) solves the problem. I believe this is an issue related to atom number limitations, which however had been resolved in the past and now it's coming back somehow.
The issue is that PDBs do not really support these numbers, and assuming that 5-digit numbers are concatenated implied that 6-digit numbers could never be supported.
Now they are all supported but the numbers are assumed to be separated by spaces. Can that be fixed in the input files you use?
All these are workarounds on top of the PDB format.
The file is huge and contains thousands of molecules (it contains a faceted nanocrystal). It is impossible to edit it manually. However I found out that saving the file in pdb format using other software (Mercury in particular) solves the problem. The reason is that the resulting pdb lacks the CONECT part. Previous versions of packmol -at least up to 20.15.3- were able to handle the very same large pdb file though, that's why I reported the issue.
Yes, that changed in 20.15.4 because of other issues related to the PDB standard.
Deleting all the CONECT information is fine (most simulations do not use that, and packmol does not either, it just tries to reproduce the molecule-level connectivity system-wide).
As for now, I have to think if there is a reasonable way to both supporting larger numbers and try to follow the standard of fixed-width fields in a way that is not just annoying to users.
I'll leave this open for if a good solution appears.