Pdb2gmx -inter Not reading from txt file

GROMACS version: 2018.4
GROMACS modification: No

Hi everyone,
I’m trying to use pdb2gmx to set up my protein while controlling what residues are protonated. I of course use the -inter flag for this. However, since manually entering each residue charge state isn’t feasible for my application, I’m using a txt file with all the protonation states that pdb2gmx can read from. The full command I use is:

gmx_mpi pdb2gmx -f protein.pdb -o protein.gro -water none -ff oplsaa -inter < Charges.txt

Charges.txt is a txt file that only contains the appropriate number on each line, like so:

This was working perfectly on a system with gromacs version 5.0.4 installed. That system is being retired though, so I’ve moved to the new cluster with the same OS (a Unix build) but with version 2018.4 installed. When I try and run this command with the version gromacs will not read the file for the inter flag. Specifically the error I get is:

Fatal error:
Answer for me res LYS 16!

Where LYS 16 is the first protonatable residue. I’ve also tried using a here file, terminating the command with:
But I still get the same error. Trying to use echo and expect terminology also doesn’t work. I’m out of ideas, I’ve tried all the combinations of the above I can think of. I find it really odd that this works just fine on one version, but not at all on a newer one. Any help or ideas you guys can provide is greatly appreciated.

Hi AJTP89,

This seems indeed weird - can you share the system somehow? Then I can check more easily what might be off here.

Do you want the protein system I’m modeling, or the computer system I’m running on? If the latter, I’m not sure exactly what that would entail. I’m happy to provide more info but I’m not certain what exactly you’re asking for.

Ah, I just meant the input protein and check if I can reproduce and fix the issue. Only if I fail with that would I need some more information about your system

OK, this is the pdb file I use. I had to use a google drive link because the forum doesn’t allow pdb uploads.

Thanks a lot for your help, let me know if you need more info.

Thanks! I’m having a look right now…

I compiled GROMACS2018.4 on my machine, but cannot reproduce the error. This makes me think - maybe it’s a linefeed issue, using a Windows-prepared Charges.txt.


printf "1\n1\n0\n" | gmx...

work for you?

That didn’t work, I got the same error. I also tried using a charges file with Unix line endings, but no luck with that either.