Modifying a forcefield to include custom residues

GROMACS version: 2022
GROMACS modification: Yes

Hello, I currently want to simulate interactions between hexagonal boron nitride and different amino-acids, and I tried to modify the CHARMM27 forcefield as described in the following article’s supplementary materials (https://pubs.acs.org/doi/suppl/10.1021/acs.langmuir.9b03121/suppl_file/la9b03121_si_001.pdf) by adding residues and values to “atomtypes.atp”, “ffnonbonded.itp”, and added a “bn.itp” file that I included in the “forcefield.itp” file (everything in the charmm27.ff folder). However, when I run the gromacs command “gmx pdb2gmx -f myfile.pdb”, I get the following error: “Residue ‘BN’ not found in residue topology database”.
Did I do anything wrong to build this topology or miss any step?

Best,
Louis

First check the common errors: https://manual.gromacs.org/2018.1/user-guide/run-time-errors.html#residue-xxx-not-found-in-residue-topology-database

Also consider:

  • After running pdb2gmx, check the topol.top file to ensure that the ‘BN’ residue is correctly listed and referenced. The [ moleculetype ] and [ atoms ] sections should include the necessary information.

  • Ensure that GROMACS is using the modified forcefield files