How do I insert the drug at a certain distance from the membrane by using GROMACS?

Dear all,
I want to insert the drug at a certain distance from the membrane. The membrane is prepared in Charmm-GUI.

  1. Do I have to remove water and ions from the membrane, add the drug molecule with the gmx insert_molecules command, and then add water and ions again?

Because I tried without removing water and ions and used the replace flag. In the minimization stage, the complex became Irregular.

  1. Should I make a restraint position file for the drug?

  2. And the last question, does anyone have experience using the Charmm-GUI to insert the drug? it means that instead of the peptide or protein file, import the PDB file of the drug and insert it in a certain distance.

I would be happy to know your opinions and get your advice.

I don’t understand what you mean with “the complex became irregular”. You should be able to use the -replace option of gmx insert-molecules. If water molecules get replaced I don’t think you need to do much. If ions get replace you can just run gmx genion again to make it net neutral.

If you want to restrain the drug, you will need to make a position restraints file for it. It might be good to have during equilibration.


I am thankful for your guidance.
Regarding the sentence you said is unclear, I will upload a file. I would be grateful if you could guide me to solve this problem.

That looks strange, indeed. What periodic box did you use? Have you processed the trajectory or coordinates afterwards? Have you used gmx trjconv?

After I build the membrane in CHARMM-GUI and run it for 200 ns, then I use these commands:

gmx trjconv -f md.trr -s md.tpr -o md.xtc
gmx trjconv -f md.xtc -s md.tpr -o md_noPBC.xtc -pbc mol -ur compact
gmx trjconv -f md.xtc -s md.tpr -o md_noPBC.gro -pbc mol -ur compact

then I do these steps:

  • Add box: gmx editconf -f md_noPBC.gro -o md_box.gro -c -d 1.0 -bt cubic
  • Edit topology file
  • Insert Drug: gmx insert-molecules -f md_box.gro -nmol 1 -ci drug.pdb -o complex. gro -ip positions.dat -replace (select TIP3)
  • Minimization: In this step, I have an error (Don’t Match atom in gro and forcefield.) To solve it, I changed the number of water molecules in the forcefield file.

Up to this step, the structure is normal.
when I do other steps, the structure looks strange.

How can I process the trajectory or coordinates afterward? Could this problem be related to the mdp file? I used the Tutorial 2: KALP15 files in DPPC to prepare the mdp file and made some changes.

I would avoid doing any trjconv steps before adding a box with editconf. Try just skipping those first three steps (do them when your simulations are finished, if if helps you visualising them).

Thank you for your time and consideration. I will try it.