How to create an input for polymer in gromacs from its pdb file?

GROMACS version:gromacs-2020.7
GROMACS modification: Yes/No
Hi, I am new to GROMACS and am focusing on MD simulations of polymers using GROMACS. I am currently stuck on the first step. I have modeled a polymer and saved it in .pdb format. However, I am unable to convert the .pdb file into a .gro file using pdb2gmx with the GROMOS96 53a6 force field. The error message states, ‘Atom C1 in residue MET 1 was not found in rtp entry MET with 13 atoms while sorting atoms.’

In an attempt to resolve this, I created an .rtp file containing the parameters for my current polymer, but this was unsuccessful. I also generated an .itp file using AcePype, but I am unsure how to incorporate it into the GROMOS96 53a6 folder.

Would the problem be resolved by adding the .itp file to the ff folder? Alternatively, how can I convert the pdb file of a polymer into a .gro file? Please help.

The error suggests the .pdb file you started with has a methionine residue containing a carbon atom that wasn’t listed in the forcefield. I’m not sure how you made the .pdb file, but if your polymer is expected to contain regular amino acids without any alterations, the first step would be to check whether something was mislabeled in the file or if the residues were put together incorrectly.

If your polymer contains residues that you know would be altered in this way and differ from any amino acids that would be listed by the forcefield, then to include the .itp file in the topology, you need to add the #include ___.itp into your .top file as is done in the protein-ligand tutorial. Converting the .pdb to a .gro can be done using openbabel, although I think the first tutorial mentions that pdb files can be used in the place of gro files

Thank you for the reply. I have modelled the polymer using Material studio. it is i-poly methacrylic acid and contains about 362 atoms. Some coordinates are given below:
EMARK Materials Studio PDB file
REMARK Created: Sat Feb 17 04:11:01 +0530 2024
ATOM 1 C1 MET P 1 0.945 1.333 -0.616 1.00 0.00 C
ATOM 2 C2* MET P 1 1.925 2.262 -1.365 1.00 0.00 C
ATOM 3 C3 MET P 1 2.863 1.459 -2.284 1.00 0.00 C
ATOM 4 O1 MET P 1 2.503 1.259 -3.737 1.00 0.00 O
ATOM 5 C4 MET P 1 2.765 3.118 -0.396 1.00 0.00 C
ATOM 6 4H1C MET P 1 3.428 2.464 0.257 1.00 0.00 H
ATOM 7 4H2C MET P 1 2.068 3.729 0.267 1.00 0.00 H
ATOM 8 4H3C MET P 1 3.425 3.824 -1.001 1.00 0.00 H
ATOM 9 1H1C MET P 1 0.229 0.872 -1.375 1.00 0.00 H
ATOM 10 1H2C MET P 1 0.348 1.976 0.111 1.00 0.00 H
ATOM 11 O2 MET P 1 4.215 1.021 -1.777 1.00 0.00 O
ATOM 12 HH MET P 1 1.308 2.982 -1.999 1.00 0.00 H
ATOM 13 H MET P 1 1.817 2.069 -4.061 1.00 0.00 H
ATOM 14 C1 MET P 1 0.454 -0.523 0.935 1.00 0.00 C
ATOM 15 C2* MET P 1 1.596 0.165 0.156 1.00 0.00 C
ATOM 16 C3 MET P 1 2.228 -0.827 -0.836 1.00 0.00 C
ATOM 17 O1 MET P 1 1.652 -0.971 -2.224 1.00 0.00 O
ATOM 18 C4 MET P 1 2.683 0.707 1.104 1.00 0.00 C
ATOM 19 4H1C MET P 1 3.144 -0.129 1.721 1.00 0.00 H
ATOM 20 4H2C MET P 1 2.228 1.485 1.801 1.00 0.00 H
ATOM 21 4H3C MET P 1 3.507 1.181 0.478 1.00 0.00 H
ATOM 22 1H1C MET P 1 -0.398 -0.748 0.212 1.00 0.00 H
ATOM 23 1H2C MET P 1 0.084 0.220 1.716 1.00 0.00 H
ATOM 24 O2 MET P 1 3.510 -1.538 -0.474 1.00 0.00 O
ATOM 25 H MET P 1 1.137 -0.027 -2.504 1.00 0.00 H
ATOM 26 C1 MET P 1 -0.441 -2.220 2.464 1.00 0.00 C
ATOM 27 C2* MET P 1 0.811 -1.850 1.640 1.00 0.00 C
ATOM 28 C3 MET P 1 1.097 -2.942 0.594 1.00 0.00 C
ATOM 29 O1 MET P 1 0.385 -2.914 -0.737 1.00 0.00 O
ATOM 30 C4 MET P 1 2.058 -1.666 2.523 1.00 0.00 C
ATOM 31 4H1C MET P 1 2.311 -2.633 3.063 1.00 0.00 H
ATOM 32 4H2C MET P 1 1.878 -0.835 3.282 1.00 0.00 H
ATOM 33 4H3C MET P 1 2.940 -1.401 1.854 1.00 0.00 H
ATOM 34 1H1C MET P 1 -1.327 -2.260 1.748 1.00 0.00 H
ATOM 35 1H2C MET P 1 -0.617 -1.377 3.211 1.00 0.00 H
ATOM 36 O2 MET P 1 2.192 -3.951 0.842 1.00 0.00 O
ATOM 37 H MET P 1 -0.547 -3.514 -0.674 1.00 0.00 H
ATOM 38 C1 MET P 1 -1.791 -3.585 3.969 1.00 0.00 C
ATOM 39 C2* MET P 1 -0.425 -3.550 3.249 1.00 0.00 C
ATOM 40 C3 MET P 1 -0.300 -4.744 2.286 1.00 0.00 C
ATOM 41 O1 MET P 1 -1.045 -4.736 0.973 1.00 0.00 O
ATOM 42 C4 MET P 1 0.743 -3.617 4.247 1.00 0.00 C
ATOM 43 4H1C MET P 1 0.702 -4.613 4.797 1.00 0.00 H
ATOM 44 4H2C MET P 1 0.680 -2.753 4.988 1.00 0.00 H
ATOM 45 4H3C MET P 1 1.729 -3.580 3.683 1.00 0.00 H
ATOM 46 1H1C MET P 1 -2.596 -3.611 3.163 1.00 0.00 H
ATOM 47 1H2C MET P 1 -1.901 -2.617 4.561 1.00 0.00 H
ATOM 48 O2 MET P 1 0.630 -5.885 2.618 1.00 0.00 O
ATOM 49 H MET P 1 -0.318 -4.777 0.135 1.00 0.00 H
ATOM 50 C1 MET P 1 -3.522 -4.549 5.402 1.00 0.00 C
ATOM 51 C2* MET P 1 -2.057 -4.745 4.954 1.00 0.00 C
ATOM 52 C3 MET P 1 -1.889 -6.109 4.261 1.00 0.00 C
ATOM 53 O1 MET P 1 -2.472 -6.335 2.886 1.00 0.00 O
ATOM 54 C4 MET P 1 -1.110 -4.676 6.166 1.00 0.00 C
ATOM 55 4H1C MET P 1 -1.268 -3.694 6.723 1.00 0.00 H
ATOM 56 4H2C MET P 1 -0.025 -4.756 5.839 1.00 0.00 H
ATOM 57 4H3C MET P 1 -1.333 -5.555 6.853 1.00 0.00 H
ATOM 58 1H1C MET P 1 -4.180 -4.709 4.485 1.00 0.00 H
ATOM 59 1H2C MET P 1 -3.644 -3.471 5.752 1.00 0.00 H
ATOM 60 O2 MET P 1 -1.091 -7.201 4.930 1.00 0.00 O
ATOM 61 H MET P 1 -1.653 -6.557 2.171 1.00 0.00 H
ATOM 62 C1 MET P 1 -5.543 -5.110 6.668 1.00 0.00 C
ATOM 63 C2* MET P 1 -4.042 -5.447 6.545 1.00 0.00 C
ATOM 64 C3 MET P 1 -3.858 -6.938 6.209 1.00 0.00 C
ATOM 65 O1 MET P 1 -4.244 -7.460 4.846 1.00 0.00 O
ATOM 66 C4 MET P 1 -3.318 -5.136 7.869 1.00 0.00 C
ATOM 67 4H1C MET P 1 -3.498 -4.048 8.159 1.00 0.00 H
ATOM 68 4H2C MET P 1 -2.201 -5.325 7.779 1.00 0.00 H
ATOM 69 4H3C MET P 1 -3.728 -5.827 8.676 1.00 0.00 H
ATOM 70 1H1C MET P 1 -6.051 -5.476 5.715 1.00 0.00 H
ATOM 71 1H2C MET P 1 -5.652 -3.977 6.725 1.00 0.00 H
ATOM 72 O2 MET P 1 -3.242 -7.867 7.226 1.00 0.00 O
ATOM 73 H MET P 1 -3.338 -7.839 4.328 1.00 0.00 H
ATOM 74 C1 MET P 1 -7.778 -5.326 7.670 1.00 0.00 C
ATOM 75 C2* MET P 1 -6.293 -5.687 7.888 1.00 0.00 C
ATOM 76 C3 MET P 1 -6.128 -7.216 7.969 1.00 0.00 C
ATOM 77 O1 MET P 1 -6.354 -8.068 6.744 1.00 0.00 O
ATOM 78 C4 MET P 1 -5.785 -5.055 9.198 1.00 0.00 C
ATOM 79 4H1C MET P 1 -5.957 -3.929 9.173 1.00 0.00 H
ATOM 80 4H2C MET P 1 -4.680 -5.266 9.358 1.00 0.00 H
ATOM 81 4H3C MET P 1 -6.361 -5.517 10.066 1.00 0.00 H
ATOM 82 1H1C MET P 1 -8.145 -5.931 6.775 1.00 0.00 H
ATOM 83 1H2C MET P 1 -7.846 -4.218 7.413 1.00 0.00 H
ATOM 84 O2 MET P 1 -5.697 -7.858 9.265 1.00 0.00 O
ATOM 85 H MET P 1 -5.399 -8.552 6.452 1.00 0.00 H
ATOM 86 C1 MET P 1 -10.152 -5.297 8.336 1.00 0.00 C
ATOM 87 C2* MET P 1 -8.726 -5.562 8.866 1.00 0.00 C
ATOM 88 C3 MET P 1 -8.619 -7.007 9.386 1.00 0.00 C
ATOM 89 O1 MET P 1 -8.723 -8.164 8.422 1.00 0.00 O
ATOM 90 C4 MET P 1 -8.409 -4.591 10.018 1.00 0.00 C
ATOM 91 4H1C MET P 1 -8.544 -3.517 9.659 1.00 0.00 H
ATOM 92 4H2C MET P 1 -7.349 -4.732 10.400 1.00 0.00 H
ATOM 93 4H3C MET P 1 -9.127 -4.806 10.876 1.00 0.00 H
ATOM 94 1H1C MET P 1 -10.400 -6.133 7.600 1.00 0.00 H
ATOM 95 1H2C MET P 1 -10.154 -4.304 7.775 1.00 0.00 H
ATOM 96 O2 MET P 1 -8.373 -7.265 10.853 1.00 0.00 O
ATOM 97 H MET P 1 -7.753 -8.702 8.388 1.00 0.00 H
ATOM 98 C1 MET P 1 -12.598 -5.140 8.614 1.00 0.00 C
ATOM 99 C2* MET P 1 -11.270 -5.208 9.398 1.00 0.00 C
ATOM 100 C3 MET P 1 -11.262 -6.441 10.318 1.00 0.00 C
ATOM 101 O1 MET P 1 -11.290 -7.828 9.721 1.00 0.00 O
ATOM 102 C4 MET P 1 -11.106 -3.942 10.259 1.00 0.00 C
ATOM 103 4H1C MET P 1 -11.169 -3.017 9.595 1.00 0.00 H
ATOM 104 4H2C MET P 1 -10.114 -3.943 10.813 1.00 0.00 H
ATOM 105 4H3C MET P 1 -11.943 -3.922 11.032 1.00 0.00 H
ATOM 106 1H1C MET P 1 -12.750 -6.156 8.119 1.00 0.00 H
ATOM 107 1H2C MET P 1 -12.500 -4.348 7.800 1.00 0.00 H
ATOM 108 O2 MET P 1 -11.198 -6.263 11.815 1.00 0.00 O
ATOM 109 H MET P 1 -10.336 -8.346 9.951 1.00 0.00 H
ATOM 110 C1 MET P 1 -15.058 -4.966 8.484 1.00 0.00 C
ATOM 111 C2* MET P 1 -13.856 -4.779 9.435 1.00 0.00 C
ATOM 112 C3 MET P 1 -14.014 -5.704 10.656 1.00 0.00 C
ATOM 113 O1 MET P 1 -13.970 -7.202 10.478 1.00 0.00 O
ATOM 114 C4 MET P 1 -13.797 -3.317 9.917 1.00 0.00 C
ATOM 115 4H1C MET P 1 -13.741 -2.620 9.017 1.00 0.00 H
ATOM 116 4H2C MET P 1 -12.899 -3.138 10.591 1.00 0.00 H
ATOM 117 4H3C MET P 1 -14.740 -3.100 10.517 1.00 0.00 H


How can I add the details of my polymer into the force field? or is there any other softwares to directly get the input file and corresponding topology files for my polymer using GROMOS 96 53a6 force filed? I have tried with AcPype and I got the toplogy and input files. But that contains only three force fields GAFF,GAFF2 and AMBER. Can I get the same with GROMOS 96 53a6 force filed? Please help

For GROMOS forcefields, ATB is usually the way to create the input files, you should be able to find the link in the protein-ligand tutorial I linked above.

Also, I noticed in your pdb file that all the atoms are listed under the same residue (given residue ID 1 after the P on each line) rather than being separated into multiple residues (residue ID 1, 2, 3, …), which I think should be possible since your polymer seems to be a repeat of the same 12 atom residue (with the exception of the first residue which seems to have an additional hydrogen as ATOM 12). Are you able to generate the pdb such that the residues are separated (given different residue numbers) so you only have to make the topology for each unique residue rather than the whole molecule?

Thank you sir
As you have mentioned I have obtained the G96, IFP, and ITP formats for my polymer from ATB. I converted them to the corresponding .gro input file using the editconf command. Now, I believe I can proceed with my MD simulations. However, the force field available for download from ATB is GROMOS96 54a7 instead of 53a6. Since the default force field in ATB is 54a7, can I choose 53a6 from ATB, or will using 54a7 instead of 53a6 negatively impact the results?

From what I could find regarding the forcefields, the GROMOS96 54a7 forcefield was basically made using 53a6, where they just added improvements directly to parameters of 53a6 to get 54a7 (the specific changes from 53a6 to 54a7 you can find here), so the forcefields should be similar enough that you won’t encounter significant issues if you use the 53a6 forcefield. I think they also mentioned that the parameters given in ATB won’t exactly match those of 54a7 anyways since they’re parametrized independently. I’m not familiar with what you’re studying though, so it’s best if you check for yourself whether the differences listed in the paper attached should warrant any change in your study design.

I suggest you use charmm-gui (CHARMM-GUI) to generate the input file, it’s easier

Thank you, sir, for your valuable information. It helped me a lot. I will check

1 Like

Thank you for your reply. I will try this

Hi, I have tried to convert the PDB file for a polymer into a GROMACS input file using ATB. It was successful for the polymer containing 362 atoms. However, when attempting to convert the PDB file for a biphasic system containing water and CCl4 with the polymer at the interface, it appears that the conversion is limited to 1000 atoms only and the conversion is failed. Is there another method to convert the PDB containing large number of atoms into a GROMACS input? I have also attempted CHARMM-GUI without success.

can we use open mm software for the conversion of pdb to gro and topology file?

You shouldn’t need to create a topology for the entire system, you just need a topology for the individual components to run the simulation. Unless your forcefield is missing CCl4 and water, just include the new topology and run the simulation (you can use the protein-ligand tutorial linked above for guidance on this).

thank you @Karis. It helped me alot

1 Like

Hello sir, I am interested in simulating drug-polymer interactions without covalent bonding using GROMACS. I aim to investigate the effect of the drug-to-polymer ratio in the system. How can i replicate the polymer molecule within the system to vary this ratio effectively?

Thank you

It should be possible to specify the number of a certain molecule to add to a system using gmx insert-molecules (you can find an example of it being used in this tutorial though you may need to change some of the options such as specifying -f to specify which file to add the polymers to).

If you’re new to gromacs, I would recommend going through the first tutorial in the list before all else.

Thank you very much for your response. It helps a lot.

Hi, Could you help me with this issue?
I am attempting to replicate a study involving the construction of a cyclohexane-water interface using Packmol and GROMACS. The paper describes the insertion of 1784 cyclohexane molecules into a cubic simulation box measuring 6.86×6.86×6.86 nm³. I obtained the cyclohexane structure files (.pdb and .itp) from ATB and used Packmol to create a simulation box containing 1784 cyclohexane molecules with dimensions matching those specified in the paper. However, during the energy minimization step in GROMACS, I encountered an error indicating that
" The cut-off length is longer than half the shortest box vector or
longer than the smallest box diagonal element. Increase the box size or
decrease rlist."
How should I proceed to resolve this issue?

I am giving my minim.mdp file:

; minim.mdp - used as input into grompp to generate em.tpr
; Parameters describing what to do, when to stop and what to save
integrator = steep ; Algorithm (steep = steepest descent minimization)
emtol = 1000.0 ; Stop minimization when the maximum force < 1000.0 kJ/mol/nm
emstep = 0.01 ; Minimization step size
nsteps = 500 ; Maximum number of (minimization) steps to perform

; Parameters describing how to find the neighbors of each atom and how to calculate the interactions
nstlist = 1 ; Frequency to update the neighbor list and long range forces
cutoff-scheme = Verlet ; Buffered neighbor searching
ns_type = grid ; Method to determine neighbor list (simple, grid)
coulombtype = cutoff ; Treatment of long range electrostatic interactions
rcoulomb = 1.2 ; Short-range electrostatic cut-off
rvdw = 1.2 ; Short-range Van der Waals cut-off
pbc = xyz ; Periodic Boundary Conditions in all 3 dimensions
rlist = 1.2

I have mentioned vdw cut off as 1.2 and short range electrostatic cut off as 1.2. I have tried to decrease the cut off values. still showing the same error

This is my packmol input:
Since 1nm= 10 A0, I have given box size = 68.6 x 68.6 x 68.6. This is my packmol input:

cyclohexane

tolerance 2.0
filetype pdb
output 8VH4_box.pdb

structure 8VH4.pdb
number 1784
inside box 0. 0. 0. 68.6 68.6 68.6
end structure

Here,8VH4.pdb is the cyclohexane file which is downloaded from ATB.
Could you please help me to solve the issue