[gmx-users] Merging different topology files

Justin Lemkul jalemkul at vt.edu
Thu Sep 7 21:09:04 CEST 2017



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

-- 

==================================================

Justin A. Lemkul, Ph.D.
Assistant Professor
Virginia Tech Department of Biochemistry

303 Engel Hall
340 West Campus Dr.
Blacksburg, VA 24061

jalemkul at vt.edu | (540) 231-3129
http://www.biochem.vt.edu/people/faculty/JustinLemkul.html

==================================================



More information about the gromacs.org_gmx-users mailing list