Problem in generating topology file of a polymer

GROMACS version:gmx, version 2022.2
GROMACS modification: Yes/No
Here post your question
The problem I am facing is regarding the topology file generation of my system. A polymer (PEO (polyethylene oxide) e.g. 1 peo= 5EO monomer) is the long chain of a single monomer. I tried to generate a gromacs readable pdb file of my sytem and added their corresponding atomtypes, bondtypes, dihedrals and forcefield parameters in oplsaa.ff directory. but still facing problem while using pdb2gmx command.
Also i want to know what is the difference between “ATOM” and HETATM. because in both case i found different erors.
waiting fir your kind response.

all screenshots of errors and pdb file is attached herewith.
Please help me in finding problem


this is my .rtp file.

There are multiple issues with your residue definition.

  • The error indicated that “OXY” is one taken name, so you need to use other names.

  • The definition of the residue lacks bonding information through neighboring residues.

For your reference, here is my example (the focus here is the bonding in the residue definition while the other is just an example, NOT for research).

[ PEO1 ]
 [ atoms ]

;CH3
C31 opls_181     0.11   1
HP1 opls_185     0.03   1
HP2 opls_185     0.03   1
HP3 opls_185     0.03   1

;O
OP1 opls_180    -0.40   1
           
;CH2            
C21 opls_182    0.14    1
HP4 opls_185    0.03    1
HP5 opls_185    0.03    1
           
;CH2            
C22 opls_182    0.14    1
HP6 opls_185    0.03    1
HP7 opls_185    0.03    1

 
 [ bonds ]
HP1 C31
HP2 C31
HP3 C31
C31 OP1
OP1 C21
C21 HP4
C21 HP5
C21 C22
C22 HP6
C22 HP7
C22 +OP1

 [ angles ]

 
[ PEO2 ]
 [ atoms ]
;O          
OP1 opls_180    -0.40   1
           
;CH2            
C21 opls_182    0.14    1
HP1 opls_185    0.03    1
HP2 opls_185    0.03    1
           
;CH2            
C22 opls_182    0.14    1
HP3 opls_185    0.03    1
HP4 opls_185    0.03    1

 
 [ bonds ]
-C22 OP1
OP1 C21
C21 HP1
C21 HP2
C21 C22
C22 HP3
C22 HP4
C22 +OP1

 [ angles ]

 
[ PEO3 ]
 [ atoms ]
;O          
OP1 opls_180    -0.40   1
           
;CH2            
C21 opls_182    0.14    1
HP1 opls_185    0.03    1
HP2 opls_185    0.03    1
           
;CH2            
C22 opls_182    0.14    1
HP3 opls_185    0.03    1
HP4 opls_185    0.03    1
           
;O          
OP2 opls_180    -0.40   1
           
;CH3            
C31 opls_181    0.11    1
HP5 opls_185    0.03    1
HP6 opls_185    0.03    1
HP7 opls_185    0.03    1

 
 [ bonds ]
-C22 OP1
OP1 C21
C21 HP1
C21 HP2
C21 C22
C22 HP3
C22 HP4
C22 OP2
OP2 C31
C31 HP5
C31 HP6
C31 HP7

 [ angles ]

Thanks dear for your kind response.
Can you share an exemplary pdb file also for which you just define the above residues. it will be more helpfully to clear the concepts behind such arrangements.
waiting for your kind response.
Regards

actually I had defined a polymer into 3 parts (Terminal1 with residue name HYD, repeating unit C2H4O with residue name ETO and Terminal 2 with residue name OXY)
the problem is how and where the bond joining terminal 1 to repeating unit and repeating unit to terminal 2 must be defined

Here it is. But you do not have to have the same name as mine. And also the definition is not unique (You can also define it whatever way you like).

TITLE PEO
ATOM      1 C31  PEO1    1      -0.034  -1.337   0.010  1.00  0.00           C
ATOM      2 HP1  PEO1    1      -0.289  -2.093  -0.761  1.00  0.00           H
ATOM      3 HP2  PEO1    1      -0.862  -0.594   0.033  1.00  0.00           H
ATOM      4 HP3  PEO1    1       0.049  -1.879   0.979  1.00  0.00           H
ATOM      5 OP1  PEO1    1       1.180  -0.718  -0.352  1.00  0.00           O
ATOM      6 C21  PEO1    1       1.640   0.090   0.713  1.00  0.00           C
ATOM      7 HP4  PEO1    1       2.217  -0.527   1.435  1.00  0.00           H
ATOM      8 HP5  PEO1    1       0.801   0.600   1.247  1.00  0.00           H
ATOM      9 C22  PEO1    1       2.528   1.200   0.162  1.00  0.00           C
ATOM     10 HP6  PEO1    1       2.841   1.839   1.018  1.00  0.00           H
ATOM     11 HP7  PEO1    1       1.906   1.791  -0.550  1.00  0.00           H
ATOM     12 OP1  PEO2    2       3.664   0.656  -0.488  1.00  0.00           O
ATOM     13 C21  PEO2    2       4.459   1.700  -1.026  1.00  0.00           C
ATOM     14 HP1  PEO2    2       4.871   1.375  -2.005  1.00  0.00           H
ATOM     15 HP2  PEO2    2       3.867   2.619  -1.257  1.00  0.00           H
ATOM     16 C22  PEO2    2       5.602   2.079  -0.077  1.00  0.00           C
ATOM     17 HP3  PEO2    2       5.186   2.338   0.918  1.00  0.00           H
ATOM     18 HP4  PEO2    2       6.083   3.021  -0.423  1.00  0.00           H
ATOM     19 OP1  PEO2    3       6.532   1.016   0.084  1.00  0.00           O
ATOM     20 C21  PEO2    3       7.532   1.049  -0.925  1.00  0.00           C
ATOM     21 HP1  PEO2    3       7.721   2.069  -1.334  1.00  0.00           H
ATOM     22 HP2  PEO2    3       7.240   0.385  -1.767  1.00  0.00           H
ATOM     23 C22  PEO2    3       8.874   0.597  -0.354  1.00  0.00           C
ATOM     24 HP3  PEO2    3       9.135   1.263   0.502  1.00  0.00           H
ATOM     25 HP4  PEO2    3       9.627   0.707  -1.169  1.00  0.00           H
ATOM     26 OP1  PEO3    4       8.803  -0.752   0.054  1.00  0.00           O
ATOM     27 C21  PEO3    4      10.046  -1.148   0.610  1.00  0.00           C
ATOM     28 HP1  PEO3    4      10.921  -0.645   0.131  1.00  0.00           H
ATOM     29 HP2  PEO3    4      10.050  -0.921   1.699  1.00  0.00           H
ATOM     30 C22  PEO3    4      10.242  -2.645   0.407  1.00  0.00           C
ATOM     31 HP3  PEO3    4       9.407  -3.187   0.904  1.00  0.00           H
ATOM     32 HP4  PEO3    4      11.213  -2.917   0.886  1.00  0.00           H
ATOM     33 OP2  PEO3    4      10.256  -2.927  -0.977  1.00  0.00           O
ATOM     34 C31  PEO3    4      10.685  -4.253  -1.183  1.00  0.00           C
ATOM     35 HP5  PEO3    4      11.764  -4.364  -0.938  1.00  0.00           H
ATOM     36 HP6  PEO3    4      10.565  -4.496  -2.259  1.00  0.00           H
ATOM     37 HP7  PEO3    4      10.062  -4.982  -0.618  1.00  0.00           H
END

Thanks for your kind reply and sharing yor PDB. The idea which i got from your pdb and .rtp file is you define the whole monomer attached to terminal as a terminal residue defining the terminals for polymer chain. Got it.
can i ask one other help?
I had changed my pdb and .rtp according to you suggested in last response. Now gromacs can read my pdb. But this time it is showing error in reading hydrogens. It says I should define hydrogens of my peo chain in aminoacids.hdb.
can you share a sample of that also.

I am attaching mine and i know it was wrong because gromacs is showing error while reading it. waiting for your kind response.

Regards,
Saiqa

I’m not sure, unfortunately. It said error reading that file, but I did not encounter the same problem before.

A good place to start:
https://manual.gromacs.org/current/reference-manual/topologies/pdb2gmx-input-files.html

Read the section “Hydrogen database”.

Thanks for sharing it. I had also tried accordingly but no result
After that thoroughly understanding your pdb file and sequence to define hydrogens has solved my problem. For that i am still thankful to you.

Best Regards,
Saiqa