ERROR moleculetype- redefined

GROMACS version: version 2020 ((2020-impi-mkl-PS2018-GOLD))))

Dear all,
ERROR 1 [file mef.itp, line 18]: moleculetype mef is redefined
I have this error and I have no idea. I’m really new user. (only 5 day it will be finished)

I checked the nrexcl but it is not so clear for me. what I need to do?

[ moleculetype ]
;name nrexcl
mef 3

The error means you have introduced the same [moleculetype] more than once. Without access to your files, there’s no way to say where that is coming from.

https://drive.google.com/drive/folders/11fjCKphSId6UULxaY7jhBpsLUUuTnJRk?usp=sharing

Can you reach my google drive? I used to amber forcefield and for ligand gaff2 via ambertool. I hope my convert files are true?

and I am trying to apply http://www.mdtutorials.com/gmx/complex/02_topology.html
this tutorial but a bit of complicated for me.

I didn’t understand exactly what I need to add

; Include Position restraint file
#ifdef POSRES
#include "posre.itp"
#endif

<b>; Include ligand topology
#include "jz4.itp"</b>

; Include water topology
#include "./charmm36-mar2019.ff/tip3p.itp"

I passed it this error. I got it but know it says to me
"“Fatal error:
Your solvent group size (27762) is not a multiple of 28"”

what I need to do ? or which page I need to follow.

please help me…

This means there is something wrong with what you have selected as the solvent group for replacing ions. Please provide your complete command and all screen output, pasted from the terminal.

Dear Jalemkul,

I am sending you all my files with google driver and I got screenshot of all my terminals and I added to my commands as well (into the terminal.rft file)

I am adding to my google driver link.

Last error:

Fatal error:
No line with moleculetype ‘System’ found the [ molecules ] section of file
‘topol.top’

https://drive.google.com/drive/folders/1jZv2dOSSkx2nB-xEdTAnIJmTNufO5Cgu?usp=sharing

I got it! I added manually "System 195865 “” at the end of top file after that program added to ions.

like that

Selected 0: ‘System’
Number of (28-atomic) solvent molecules: 6996

Processing topology
Replacing 23 solute molecules in topology file (topol.top) by 23 NA and 0 CL ions.

Back Off! I just backed up topol.top to ./#topol.top.4#
Using random seed -415048050.
Replacing solvent molecule 957 (atom 26796) with NA
Replacing solvent molecule 4902 (atom 137256) with NA
Replacing solvent molecule 2796 (atom 78288) with NA
Replacing solvent molecule 5557 (atom 155596) with NA
Replacing solvent molecule 2017 (atom 56476) with NA
Replacing solvent molecule 1628 (atom 45584) with NA
Replacing solvent molecule 4258 (atom 119224) with NA
Replacing solvent molecule 1382 (atom 38696) with NA
Replacing solvent molecule 1177 (atom 32956) with NA
Replacing solvent molecule 1114 (atom 31192) with NA
Replacing solvent molecule 2558 (atom 71624) with NA
Replacing solvent molecule 5301 (atom 148428) with NA
Replacing solvent molecule 3647 (atom 102116) with NA
Replacing solvent molecule 4286 (atom 120008) with NA
Replacing solvent molecule 200 (atom 5600) with NA
Replacing solvent molecule 6281 (atom 175868) with NA
Replacing solvent molecule 6069 (atom 169932) with NA
Replacing solvent molecule 6789 (atom 190092) with NA
Replacing solvent molecule 6310 (atom 176680) with NA
Replacing solvent molecule 3552 (atom 99456) with NA
Replacing solvent molecule 2095 (atom 58660) with NA
Replacing solvent molecule 4729 (atom 132412) with NA
Replacing solvent molecule 2371 (atom 66388) with NA

and also I checked to my last .top file (ıt was there)
[ molecules ]
; Compound #mols
DNA_chain_A 1
mef 1
SOL 65032
System 195865
NA 23

So thank you I will try to start MD. and sorry because I am really new user only one week so that is my bad

I have not had a chance to review your files but adding “System” is certainly only a hack and not a true solution. You’re doing very complicated things and I would encourage caution. I can comment better later but as it is the weekend I am not quick with looking at these things.

I am looking forward your answer.

The topology (before you added System in [molecules]) is fine. The problem is that you selected “System” as the group with which to replace molecules with ions. This is wrong. You should only ever select a contiguous group of solvent for replacing with ions, e.g. SOL. You may want to consult some simple tutorial material if this concept is not clear, e.g. Lysozyme in Water

The files solv.gro and topol.top are correct and match in terms of their contents. Do not manually alter them, only allow GROMACS utilities (e.g. genion at this point) to change the contents of the topology.

I got it. thank u so much!

Hello,

I am very new to GROMACS and in general this field, and was hoping you may help me. I have a similar error, but am still a bit confused on how I should correct it.

GROMACS: gmx grompp, version 2020.1-Ubuntu-2020.1-1
Executable: /usr/bin/gmx
Data prefix: /usr
Working dir:
Command line:
gmx grompp -f em.mdp -p topol.top -c solvate.gro -o em.tpr

Ignoring obsolete mdp entry ‘ns_type’

NOTE 1 [file em.mdp]:
With Verlet lists the optimal nstlist is >= 10, with GPUs >= 20. Note
that with the Verlet scheme, nstlist has no effect on the accuracy of
your simulation.

Setting the LD random seed to -1437330375
Generated 165 of the 1596 non-bonded parameter combinations

ERROR 1 [file topol_Protein_chain_a.itp, line 22]:
moleculetype Protein_chain_a is redefined

There was 1 note


Program: gmx grompp, version 2020.1-Ubuntu-2020.1-1
Source file: src/gromacs/gmxpreprocess/toppush.cpp (line 1474)

Fatal error:
There was 1 error in input file(s)

ERROR 1 [file lig.itp, line 5]:
moleculetype lig is redefined
how did you solved this error?

This may not be a solution to every case of this error, but I came across this same issue and the root problem was that I was running the grompp command on a mac file system, which is inherently case insensitive. I was trying to simulate a protein system that had 60 protein chains and thus had chains labeled ‘A’ and ‘a’. Those files were overwriting each other and leading to the same molecule being defined twice.

If this is the same issue you are having, I would suggest either configuring your file system to be case sensitive or moving the simulation to a remote machine that may use a case-sensitive file system.