How can I generate a toplogy from a pdb file with non-standard residues?

GROMACS version: 2023.3-conda_forge
GROMACS modification: No

Hi everyone,

I was wondering how I could generate a topology of a pdb file with non-standard residues through pdb2gmx (x2top didn’t work either). My pdb file is composed of C, H, O, N, and all the residues are UNL. Here is a snippet of my pdb file:

COMPND    [500, 0, 0, 0, 500, 0, 0, 0, 37.12354186230761] 
AUTHOR    GENERATED BY OPEN BABEL 3.1.0
HETATM    1  C   UNL     1      15.257   0.873   2.500  1.00  0.00           C  
HETATM    2  C   UNL     1      14.056   5.997   3.836  1.00  0.00           C  
HETATM    3  C   UNL     1      11.187  10.411   5.172  1.00  0.00           C  
HETATM    4  C   UNL     1       6.991  13.589   6.508  1.00  0.00           C  
HETATM    5  C   UNL     1       1.966  15.155   7.844  1.00  0.00           C  
HETATM    6  C   UNL     1      -3.292  14.923   9.180  1.00  0.00           C  
HETATM    7  C   UNL     1      -8.160  12.921  10.516  1.00  0.00           C  
HETATM    8  C   UNL     1     -12.060   9.386  11.852  1.00  0.00           C  
HETATM    9  C   UNL     1     -14.529   4.737  13.188  1.00  0.00           C  
HETATM   10  C   UNL     1     -15.275  -0.474  14.524  1.00  0.00           C  
HETATM   11  C   UNL     1     -14.208  -5.628  15.860  1.00  0.00           C  
HETATM   12  C   UNL     1     -11.456 -10.115  17.196  1.00  0.00           C  
HETATM   13  C   UNL     1      -7.344 -13.401  18.532  1.00  0.00           C  
HETATM   14  C   UNL     1      -2.362 -15.098  19.868  1.00  0.00           C  
HETATM   15  C   UNL     1       2.901 -15.004  21.204  1.00  0.00           C  
HETATM   16  C   UNL     1       7.820 -13.130  22.540  1.00  0.00           C  
HETATM   17  C   UNL     1      11.811  -9.698  23.876  1.00  0.00           C  
HETATM   18  C   UNL     1      14.400  -5.115  25.212  1.00  0.00           C  
HETATM   19  C   UNL     1      15.282   0.074  26.548  1.00  0.00           C  
HETATM   20  C   UNL     1      14.350   5.255  27.884  1.00  0.00           C  
HETATM   21  C   UNL     1      11.716   9.812  29.220  1.00  0.00           C  
HETATM   22  C   UNL     1       7.692  13.205  30.556  1.00  0.00           C  
HETATM   23  C   UNL     1       2.755  15.031  31.892  1.00  0.00           C  
HETATM   24  C   UNL     1      -2.508  15.075  33.228  1.00  0.00           C  

I have tried the AMBERGS, CHARMM27, and OPLS-AA/L force fields, but, as expected, none of them work due to the UNL residue.

Thanks in advance for your help.

pdb2gmx needs to know the residue types of the residues. If the residue type is unkown (or wrong) then the output will not work. I’m afraid you must first fix the PDB file yourself, either from the original PDB file or the primary sequence. If there are residues that are not covered by the standard biomolecular force fields you might have to generate parameters for them yourself, preferably using designated tools for that, such as https://charmm-gui.org/ or GROMACS / STaGE · GitLab - both of these are for separate “small molecules”, not for proteins, RNA, DNA etc.