[gmx-users] Merging different topology files

Momin Ahmad momin.ahmad at kit.edu
Fri Sep 8 11:50:22 CEST 2017


Thank you for your help. I already did that but i get a weird error that 
i can not solve. I attached the topology files and the error message. 
Maybe the numbering of the residues has to be changed? Thanks in advance.

Cheers,

Momin


Am 07.09.2017 um 21:08 schrieb Justin Lemkul:
>
>
> On 9/7/17 10:19 AM, Momin Ahmad wrote:
>> Hello all,
>>
>> is there a simple way to merge two or more topology files into one? I 
>> am trying to use grompp to set up a simulation but my solvation 
>> contains different molecules which have different .top files. I also 
>> tried creating a main topology file which includes the other two 
>> topologies but without success. Hope anyone knows how to solve this.
>>
>
> The #include mechanism is the only way to do this.  If you have two 
> .top (system topology) files, then:
>
> 1. Remove any #include statement for a parent force field (i.e. the 
> file with [defaults] in it)
> 2. Remove any [system] or [molecules] directive
>
> (you now have proper .itp format)
>
> 3. Remove any redundant #include statements (e.g. for water, ions) to 
> avoid "moleculetype redefined" errors
> 4. Construct a new .top that #includes a parent force field, your two 
> new .itp files, and has [system] and [molecules] directives.
>
> -Justin
>

-------------- next part --------------
			:-) GROMACS - gmx grompp, 2016.3 (-:

                            GROMACS is written by:
     Emile Apol      Rossen Apostolov  Herman J.C. Berendsen    Par Bjelkmar   
 Aldert van Buuren   Rudi van Drunen     Anton Feenstra    Gerrit Groenhof  
 Christoph Junghans   Anca Hamuraru    Vincent Hindriksen Dimitrios Karkoulis
    Peter Kasson        Jiri Kraus      Carsten Kutzner      Per Larsson    
  Justin A. Lemkul   Magnus Lundborg   Pieter Meulenhoff    Erik Marklund   
   Teemu Murtola       Szilard Pall       Sander Pronk      Roland Schulz   
  Alexey Shvetsov     Michael Shirts     Alfons Sijbers     Peter Tieleman  
  Teemu Virolainen  Christian Wennberg    Maarten Wolf   
                           and the project leaders:
        Mark Abraham, Berk Hess, Erik Lindahl, and David van der Spoel

Copyright (c) 1991-2000, University of Groningen, The Netherlands.
Copyright (c) 2001-2017, The GROMACS development team at
Uppsala University, Stockholm University and
the Royal Institute of Technology, Sweden.
check out http://www.gromacs.org for more information.

GROMACS is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2.1
of the License, or (at your option) any later version.

GROMACS:      gmx grompp, version 2016.3
Executable:   /usr/local/bin/gmx
Data prefix:  /usr/local
Working dir:  /home/momin/work/click-chemistry/simulation
Command line:
  gmx grompp -f minim.mdp -c system_solv.gro -p topol.top -o system.tpr


Back Off! I just backed up mdout.mdp to ./#mdout.mdp.14#

NOTE 1 [file minim.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 61641030
Generated 2211 of the 2211 non-bonded parameter combinations
Generating 1-4 interactions: fudge = 0.5
Generated 2211 of the 2211 1-4 parameter combinations

ERROR 1 [file methane_custom.itp, line 16]:
  No default Bond types


ERROR 2 [file methane_custom.itp, line 17]:
  No default Bond types


ERROR 3 [file methane_custom.itp, line 18]:
  No default Bond types


ERROR 4 [file methane_custom.itp, line 19]:
  No default Bond types


ERROR 5 [file methane_custom.itp, line 23]:
  No default Angle types


ERROR 6 [file methane_custom.itp, line 24]:
  No default Angle types


ERROR 7 [file methane_custom.itp, line 25]:
  No default Angle types


ERROR 8 [file methane_custom.itp, line 26]:
  No default Angle types


ERROR 9 [file methane_custom.itp, line 27]:
  No default Angle types


ERROR 10 [file methane_custom.itp, line 28]:
  No default Angle types


WARNING 1 [file topol.top, line 18]:
  Too few parameters on line (source file
  /home/momin/gromacs-2016.3/src/gromacs/gmxpreprocess/toppush.cpp, line
  2377)

Excluding 3 bonded neighbours molecule type 'METHANE'

WARNING 2 [file topol.top, line 19]:
  Too few parameters on line (source file
  /home/momin/gromacs-2016.3/src/gromacs/gmxpreprocess/toppush.cpp, line
  2377)

Excluding 3 bonded neighbours molecule type 'METHANE'

-------------------------------------------------------
Program:     gmx grompp, version 2016.3
Source file: src/gromacs/gmxpreprocess/grompp.cpp (line 612)

Fatal error:
number of coordinates in coordinate file (system_solv.gro, 113)
             does not match topology (topol.top, 10)

For more information and tips for troubleshooting, please check the GROMACS
website at http://www.gromacs.org/Documentation/Errors
-------------------------------------------------------
-------------- next part --------------
; main topology file
;
; Include force-field
#include "amber99sb-ildn.ff/forcefield.itp"

;Include topologies
#include "methane_custom.itp"
#include "ammonia_custom.itp"


;Include water topology
;#include "amber99sb-ildn.ff/tip4p.itp"

[ system ]
Ammonia + Methane

[molecules]
AMMONIA
METHANE
-------------- next part --------------
[ moleculetype ]
; Name            nrexcl
METHANE               3

[ atoms ]
;   nr       type  resnr residue  atom   cgnr     charge       mass  typeB    chargeB      massB
; residue   1 CH4 rtp CH4  q  0.0
     1          C      1    CH4      C      1      -0.24      12.01   ; qtot -0.24
     2          H      1    CH4     H1      1       0.06      1.008   ; qtot -0.18
     3          H      1    CH4     H2      1       0.06      1.008   ; qtot -0.12
     4          H      1    CH4     H3      1       0.06      1.008   ; qtot -0.06
     5          H      1    CH4     H4      1       0.06      1.008   ; qtot 0

[ bonds ]
;  ai    aj funct            c0            c1            c2            c3
    1     2     1 
    1     3     1 
    1     4     1 
    1     5     1 

[ angles ]
;  ai    aj    ak funct            c0            c1            c2            c3
    2     1     3     1 
    2     1     4     1 
    2     1     5     1 
    3     1     4     1 
    3     1     5     1 
    4     1     5     1 

; Include Position restraint file
[ position_restraints ]
; atom  type      fx      fy      fz
     1     1  1000  1000  1000
-------------- next part --------------
[ moleculetype ]
; Name            nrexcl
AMMONIA               3

[ atoms ]
;   nr       type  resnr residue  atom   cgnr     charge       mass  typeB    chargeB      massB
; residue   0 NH3 rtp NH3  q -0.1
     1          N      01   NH3      N      1      -0.39      14.01   ; qtot -0.39
     2          H      01   NH3     H1      1       0.13      1.008   ; qtot -0.26
     3          H      01   NH3     H2      1       0.13      1.008   ; qtot -0.13
     4          H      01   Nh3     H3      2       0.13      1.008   ; qtot 0

[ bonds ]
;  ai    aj funct            c0            c1            c2            c3
    1     2     1 
    1     3     1 

[ angles ]
;  ai    aj    ak funct            c0            c1            c2            c3
    2     1     3     1 

; Include Position restraint file
[ position_restraints ]
; atom  type      fx      fy      fz
     1     1  1000  1000  1000


More information about the gromacs.org_gmx-users mailing list