Fatal error: An input file contains a line longer than 4096 characters, while the buffer passed to f

GROMACS version: 2020.1-Ubuntu-2020.1-1
GROMACS modification: No

Hi! I need some help as I cannot seem to figure out how to correct this error:

Fatal error:
An input file contains a line longer than 4096 characters, while the buffer
passed to fgets2 has size 4096. The line starts with: ’ ’

For more information, this is what it says:

going to rename ./charmm36-jul2020.ff/._merged.r2b
Opening force field file ./charmm36-jul2020.ff/._merged.r2b
Warning: file does not end with a newline, last line:

going to rename ./charmm36-jul2020.ff/merged.r2b
Opening force field file ./charmm36-jul2020.ff/merged.r2b
Reading GSK_LIG1064.pdb…
WARNING: all CONECT records are ignored
Read ‘’, 2751 atoms
Analyzing pdb file
Splitting chemical chains based on TER records or chain id changing.
There are 1 chains and 0 blocks of water and 344 residues with 2751 atoms

chain #res #atoms
1 ‘B’ 344 2751

All occupancies are one
Opening force field file ./charmm36-jul2020.ff/._atomtypes.atp


Program: gmx pdb2gmx, version 2020.1-Ubuntu-2020.1-1
Source file: src/gromacs/utility/cstringutil.cpp (line 97)

Fatal error:
An input file contains a line longer than 4096 characters, while the buffer
passed to fgets2 has size 4096. The line starts with: ’ ’

For more information and tips for troubleshooting, please check the GROMACS
website at Common Errors — GROMACS webpage https://www.gromacs.org documentation

I would really appreciate any one who can help me with this problem. Thank you!

I would suspect a problem with your input file(s). You might, e.g., have copied them from Windows to Linux or have used a text editor that did not use proper (?) line endings.

If you search for dos2unix, you will find tools that will hopefully help you correcting the file(s).

Hi, I am facing the same issue with gromacs 2023 home-brew version and the charmm36-jul2022 forcefield. I have used the dos2unix command on my protein.pdb file and am still receiving this error. The charmm27 forcefield works without issue so I don’t think it’s my protein.pdb file. What is confusing me most is that I used the exact same protein.pdb file and charmm36-jul2022 and charmm36-jul2021 files last year and there was no issue however now trying to repeat the process it doesn’t work.