changeset 0:5521a057ed6a draft default tip

"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/tree/master/tools/buildtools/topologyeditors commit ae026d4ea6fe2ebaa53611b86f9047941c7b899b"
author chemteam
date Thu, 27 Jan 2022 18:16:37 +0000
parents
children
files add_top.xml gmxtras_add_newmolparam.py gmxtras_add_restraints.py gmxtras_extract_top.py macros.xml test-data/cid1_GMX.gro test-data/cid1_GMX.top test-data/posres_cid1.itp test-data/water_bondedparams.itp test-data/water_nonbondedparams.itp
diffstat 10 files changed, 959 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/add_top.xml	Thu Jan 27 18:16:37 2022 +0000
@@ -0,0 +1,149 @@
+<tool id="gromacs_modify_topology" name="Adding New Topology Information" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.09">
+    <description>to a GROMACS topology file</description>
+    <macros>
+        <import>macros.xml</import>
+        <token name="@GALAXY_VERSION@">0</token>
+    </macros>
+    <expand macro="requirements"/>
+    <command detect_errors="exit_code"><![CDATA[
+        #if $str($functionality.what2add) == "mol":
+            python3 '$__tool_directory__/gmxtras_add_newmolparam.py'
+                --top_file '$functionality.inputtopology'
+                --atom_file '$functionality.nonbondparam'
+                --mol_file '$functionality.bondparam'
+                --out '$newtop'
+        #end if
+
+        #if $str($functionality.what2add) == "restraints":
+            python3 '$__tool_directory__/gmxtras_add_restraints.py'
+                --top_file '$functionality.inputtopology'
+                --res_file '$functionality.posres'
+                --molecule '$functionality.targetmolecule'
+                --out '$newtop'
+        #end if
+
+        #if $str($functionality.what2add) == "both":
+            python3 '$__tool_directory__/gmxtras_add_restraints.py'
+                --top_file '$functionality.inputtopology'
+                --res_file '$functionality.posres'
+                --molecule '$functionality.targetmolecule'
+                --out 'odoylerules'
+            &&
+            python3 '$__tool_directory__/gmxtras_add_newmolparam.py'
+                --top_file 'odoylerules'
+                --atom_file '$functionality.nonbondparam'
+                --mol_file '$functionality.bondparam'
+                --out '$newtop'
+        #end if
+
+    ]]></command>
+    <inputs>
+        
+        <conditional name="functionality">
+             <param name="what2add" type="select" label="What new information are you adding to your topology file?">
+                 <option value="mol">A molecule's parameters</option>
+                 <option value="restraints">Position restraint information</option>
+                 <option value="both">Both a molecule's topology information and position restrain information</option>
+             </param>
+             <when value="mol">
+                 <param name="inputtopology" type="data" format="top" label="GROMACS Topology file to be modified" help="Topology file with missing information"/>
+                 <param name="nonbondparam" type="data" format="txt" label="Atom Types with Nonbonded Parameters" help="Atom types information from grep"/>
+                 <param name="bondparam" type="data" format="txt,itp" label="Molecule type information with bonded parameters" help="molecule type information"/>
+             </when>
+             <when value="restraints">
+                 <param name="inputtopology" type="data" format="top" label="GROMACS Topology file to be modified" help="Topology file with missing information"/>
+                 <param name="posres" type="data" format="itp" label="Position restraint file" help="Position restraint file created previously"/>
+		 <param name="targetmolecule" type="text" label="Target molecule type" help="The molecule type name to which the restraints were applied"/>
+             </when>
+             <when value="both">
+                 <param name="inputtopology" type="data" format="top" label="GROMACS Topology file to be modified" help="Topology file with missing information"/>
+                 <param name="nonbondparam" type="data" format="txt" label="Atom Types with Nonbonded Parameters" help="Atom types information from grep"/>
+                 <param name="bondparam" type="data" format="txt,itp" label="Molecule type information with bonded parameters" help="molecule type information"/>
+                 <param name="posres" type="data" format="itp" label="Position restraint file" help="Position restraint file created previously"/>
+                 <param name="targetmolecule" type="text" label="Target molecule type" help="The molecule type name to which the restraints were applied"/>
+             </when>
+
+        </conditional>  
+    </inputs>
+    <outputs>
+        <data name="newtop" format="top" label="Modified file with new topology information ${on_string}"/>
+    </outputs>
+    <tests>
+        <test>
+            <conditional name="functionality">
+                <param name="what2add" value="mol" />
+                <param name="inputtopology" value="cid1_GMX.top" />
+                <param name="nonbondparam" value="water_nonbondedparams.itp" />
+                <param name="bondparam" value="water_bondedparams.itp" />
+            </conditional>
+            <output name="newtop">
+                <assert_contents>
+                    <has_text text="HW_tip4pew   1       1.008   0.0000  A   0.00000e+00  0.00000e+00"/>
+                    <has_text text="  2   HW_tip4pew  1       SOL       HW1      1       0.52422   1.00800"/>
+                </assert_contents>
+            </output>
+        </test>
+        <test>
+	    <conditional name="functionality">
+            	<param name="what2add" value="restraints" />
+            	<param name="inputtopology" value="cid1_GMX.top" />
+            	<param name="targetmolecule" value="cid1" />
+            	<param name="posres" value="posres_cid1.itp" />
+            </conditional>
+		<output name="newtop">
+                <assert_contents>
+                    <has_text text=";  i funct       fcx        fcy        fcz"/>
+                    <has_text text="  42    1       1000       1000       1000"/>
+                </assert_contents>
+            </output>
+        </test>
+        <test>
+ 	    <conditional name="functionality">
+            	<param name="what2add" value="both" />
+            	<param name="inputtopology" value="cid1_GMX.top" />
+            	<param name="nonbondparam" value="water_nonbondedparams.itp" />
+            	<param name="bondparam" value="water_bondedparams.itp" />
+            	<param name="targetmolecule" value="cid1" />
+            	<param name="posres" value="posres_cid1.itp" />
+            </conditional>
+		<output name="newtop">
+                <assert_contents>
+                    <has_text text="HW_tip4pew   1       1.008   0.0000  A   0.00000e+00  0.00000e+00"/>
+                    <has_text text="  2   HW_tip4pew  1       SOL       HW1      1       0.52422   1.00800"/>
+                    <has_text text=";  i funct       fcx        fcy        fcz"/>
+                    <has_text text="  42    1       1000       1000       1000"/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+
+Tool to modify and add new information to GROMACS topology files. This is particularly useful when working with systems
+that were created outside of GROMACS (for example, files created in AMBER or CHARMM and then converted over via acpype).
+This tool can also be used to complement the "gmx insert-molecules" tool, which currently only modifies the GROMACS
+structure files (gro) and requires further modification of the topology file for the newly populated system to be simulation ready.   
+
+.. class:: infomark
+
+**Input**
+
+1) The system topology file you are modifying, 
+
+2) a position restraint file (posres.itp) and specifying the name of the target molecule type you are restraining, 
+
+3) a molecule's atom types/nonbonded parameters to be inserted under the system's global [ atomtypes ], as well as
+
+4) the corresponding bonded parameters of that particular molecule found under [ moleculetype ].
+
+.. class:: infomark
+
+**Outputs**
+
+The new modified GROMACS topology file.
+
+
+    ]]></help>
+    <expand macro="citations">
+        <citation type="doi">doi:10.1186/1756-0500-5-367</citation>
+    </expand>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gmxtras_add_newmolparam.py	Thu Jan 27 18:16:37 2022 +0000
@@ -0,0 +1,45 @@
+#!/usr/bin/env python3
+import argparse
+
+
+def __main__():
+    parser = argparse.ArgumentParser(
+        description='Adds New topologies to gromacs topology file')
+    parser.add_argument(
+                        '--top_file', default=None,
+                        help="Topology file input")
+    parser.add_argument(
+                        '--mol_file', default=None,
+                        help='molecule type and bonded parameters input')
+    parser.add_argument(
+                        '--atom_file', default=None,
+                        help='atomtype and nonbonded parameters input')
+    parser.add_argument(
+                        '--out', default=None,
+                        help='Path to output')
+    args = parser.parse_args()
+    with open(args.out, 'w') as fh_out:
+        with open(args.top_file, 'r') as fh:
+            # these two short loop takes care of
+            # adding the atom types and molecule types.
+            for line in fh:
+                fh_out.write(line)
+                if ';name   bond_type' in line:
+                    for contents in open(args.atom_file):
+                        fh_out.write(contents)
+                    break
+            for line in fh:
+                if '[ system ]' in line:
+                    fh_out.write("\n; Begin NewTopologyInfo\n")
+                    for contents in open(args.mol_file):
+                        fh_out.write(contents)
+                    fh_out.write("; end NewTopologyInfo\n\n")
+                    fh_out.write(line)
+                    break
+                fh_out.write(line)
+            for line in fh:
+                fh_out.write(line)
+
+
+if __name__ == "__main__":
+    __main__()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gmxtras_add_restraints.py	Thu Jan 27 18:16:37 2022 +0000
@@ -0,0 +1,71 @@
+#!/usr/bin/env python3
+import argparse
+END_OF_MOL = ('[ moleculetype ]', '[ system ]')
+
+
+def __main__():
+    parser = argparse.ArgumentParser(
+        description='Add restriction to gromacs topology file')
+    parser.add_argument(
+                        '--top_file', default=None,
+                        help="Topology file input")
+    parser.add_argument(
+                        '--res_file', default=None,
+                        help='Restraint input')
+    parser.add_argument(
+                        '--molecule', default=None,
+                        help='Target Molecule Name you restrained')
+    parser.add_argument(
+                        '--out', default=None,
+                        help='Path to output')
+    args = parser.parse_args()
+    with open(args.out, 'w') as fh_out:
+        with open(args.top_file, 'r') as fh:
+            # for now, we will avoid using 'for line in fh:',
+            # since we have multiple places where we might want
+            # to read the next line
+            while True:
+                line = fh.readline()
+                if not line:
+                    # eof
+                    break
+                # always write out the line
+                fh_out.write(line)
+                # check if line matches molecule, then check if
+                # molecule name matches args.molecule
+                if line.strip().startswith('[ moleculetype ]'):
+                    not_found_molecule = True
+                    while not_found_molecule:
+                        line = fh.readline()
+                        if not line:
+                            # eof
+                            break
+                        # always write this line
+                        fh_out.write(line)
+                        if not line.strip().startswith(';') or (line.strip()
+                           and not line.strip().startswith(';')):
+                            # this line should be the name line,
+                            fields = line.strip().split()
+                            if fields[0] == args.molecule:
+                                # found our molecule!
+                                while True:
+                                    line = fh.readline()
+                                    if not line:
+                                        # eof
+                                        break
+                                    if line.strip().startswith(END_OF_MOL):
+                                        fh_out.write("\n#ifdef POSRES\n")
+                                        with open(args.res_file, 'r') as fh_re:
+                                            for line2 in fh_re:
+                                                fh_out.write(line2)
+                                        fh_out.write("#endif\n\n")
+                                        fh_out.write(line)
+                                        not_found_molecule = False
+                                        break
+                                    fh_out.write(line)
+                            else:
+                                break
+
+
+if __name__ == "__main__":
+    __main__()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gmxtras_extract_top.py	Thu Jan 27 18:16:37 2022 +0000
@@ -0,0 +1,49 @@
+#!/usr/bin/env python3
+import argparse
+
+
+def __main__():
+    parser = argparse.ArgumentParser(
+        description='Adds New topologies to gromacs topology file')
+    parser.add_argument(
+                        '--top_file', default=None,
+                        help="Topologies input")
+    parser.add_argument(
+                        '--out_bondparam', default=None,
+                        help='moleculetype section')
+    parser.add_argument(
+                        '--out_nonbondparam', default=None,
+                        help='atomtypes section')
+
+    args = parser.parse_args()
+    # extracts the atom types with nonbonded terms from
+    # the new molecules and puts them in a new file
+    with open(args.top_file) as inFile:
+        with open(args.out_nonbondparam, "w") as outFile:
+            buffer = []
+            for line in inFile:
+                if line.startswith(";name   bond_type"):
+                    buffer = ['']
+                elif line.startswith("[ moleculetype ]"):
+                    outFile.write("".join(buffer))
+                    buffer = []
+                elif buffer:
+                    buffer.append(line)
+
+    # extracts the molecule types (rest of the force field parameters)
+    # with bonded terms and puts them in a new file
+    with open(args.top_file) as inFile:
+        with open(args.out_bondparam, "w") as outFile:
+            buffer = []
+            for line in inFile:
+                if line.startswith("[ moleculetype ]"):
+                    buffer = ["\n[ moleculetype ]\n"]
+                elif line.startswith("[ system ]"):
+                    outFile.write("".join(buffer))
+                    buffer = []
+                elif buffer:
+                    buffer.append(line)
+
+
+if __name__ == "__main__":
+    __main__()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Thu Jan 27 18:16:37 2022 +0000
@@ -0,0 +1,15 @@
+<macros>
+    <token name="@TOOL_VERSION@">0</token>
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="3.9">python</requirement>
+            <yield />
+        </requirements>
+    </xml>
+    <xml name="citations">
+        <citations>
+            <citation type="doi">10.1016/j.softx.2015.06.001</citation>
+            <yield />
+        </citations>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/cid1_GMX.gro	Thu Jan 27 18:16:37 2022 +0000
@@ -0,0 +1,45 @@
+UNL_GMX.gro created by acpype (v: 2021-02-05T22:15:50CET) on Wed Dec 15 14:23:59 2021
+ 42
+    1  UNL   C1    1  41.372  -2.389   7.399
+    1  UNL   C2    2  41.301  -2.314   7.306
+    1  UNL   C3    3  41.041  -2.283   7.776
+    1  UNL   C4    4  41.308  -2.500   7.454
+    1  UNL   C5    5  41.117  -2.462   7.333
+    1  UNL   C6    6  41.214  -2.146   7.824
+    1  UNL   C7    7  41.171  -2.350   7.272
+    1  UNL   C8    8  41.136  -2.247   7.876
+    1  UNL   C9    9  41.064  -2.202   7.667
+    1  UNL  C10   10  40.992  -2.201   7.537
+    1  UNL  C11   11  41.036  -2.061   7.071
+    1  UNL  C12   12  41.128  -2.130   6.971
+    1  UNL  C13   13  41.092  -2.270   7.171
+    1  UNL  C14   14  41.077  -2.120   7.205
+    1  UNL  C15   15  41.109  -2.380   6.943
+    1  UNL  C16   16  40.975  -2.093   7.314
+    1  UNL  N17   17  41.182  -2.538   7.424
+    1  UNL  N18   18  41.169  -2.119   7.697
+    1  UNL  N19   19  41.036  -2.108   7.442
+    1  UNL  N20   20  41.154  -2.267   7.031
+    1  UNL  O21   21  40.897  -2.277   7.520
+    1  UNL CL22   22  41.149  -2.318   8.029
+    1  UNL  H23   23  41.473  -2.363   7.427
+    1  UNL  H24   24  41.348  -2.227   7.261
+    1  UNL  H25   25  40.965  -2.359   7.784
+    1  UNL  H26   26  41.359  -2.562   7.527
+    1  UNL  H27   27  41.016  -2.495   7.310
+    1  UNL  H28   28  41.296  -2.090   7.865
+    1  UNL  H29   29  41.046  -1.952   7.068
+    1  UNL  H30   30  40.931  -2.085   7.048
+    1  UNL  H31   31  41.084  -2.140   6.872
+    1  UNL  H32   32  41.225  -2.080   6.965
+    1  UNL  H33   33  40.992  -2.317   7.160
+    1  UNL  H34   34  41.174  -2.078   7.235
+    1  UNL  H35   35  41.000  -2.372   6.932
+    1  UNL  H36   36  41.159  -2.370   6.847
+    1  UNL  H37   37  41.136  -2.474   6.993
+    1  UNL  H38   38  40.893  -2.164   7.305
+    1  UNL  H39   39  40.938  -1.991   7.304
+    1  UNL  H40   40  41.208  -2.049   7.635
+    1  UNL  H41   41  41.111  -2.044   7.468
+    1  UNL  H42   42  41.256  -2.276   7.041
+   11.59200    12.19000    23.64000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/cid1_GMX.top	Thu Jan 27 18:16:37 2022 +0000
@@ -0,0 +1,476 @@
+; cid1_GMX.top created by acpype (v: 2021-02-05T22:15:50CET) on Wed Dec 15 14:23:59 2021
+
+[ defaults ]
+; nbfunc        comb-rule       gen-pairs       fudgeLJ fudgeQQ
+1               2               yes             0.5     0.8333
+
+[ atomtypes ]
+;name   bond_type     mass     charge   ptype   sigma         epsilon       Amb
+ ca       ca          0.00000  0.00000   A     3.39967e-01   3.59824e-01 ; 1.91  0.0860
+ cc       cc          0.00000  0.00000   A     3.39967e-01   3.59824e-01 ; 1.91  0.0860
+ cd       cd          0.00000  0.00000   A     3.39967e-01   3.59824e-01 ; 1.91  0.0860
+ c        c           0.00000  0.00000   A     3.39967e-01   3.59824e-01 ; 1.91  0.0860
+ c3       c3          0.00000  0.00000   A     3.39967e-01   4.57730e-01 ; 1.91  0.1094
+ nb       nb          0.00000  0.00000   A     3.25000e-01   7.11280e-01 ; 1.82  0.1700
+ na       na          0.00000  0.00000   A     3.25000e-01   7.11280e-01 ; 1.82  0.1700
+ n        n           0.00000  0.00000   A     3.25000e-01   7.11280e-01 ; 1.82  0.1700
+ n4       n4          0.00000  0.00000   A     3.25000e-01   7.11280e-01 ; 1.82  0.1700
+ o        o           0.00000  0.00000   A     2.95992e-01   8.78640e-01 ; 1.66  0.2100
+ cl       cl          0.00000  0.00000   A     3.47094e-01   1.10876e+00 ; 1.95  0.2650
+ ha       ha          0.00000  0.00000   A     2.59964e-01   6.27600e-02 ; 1.46  0.0150
+ h4       h4          0.00000  0.00000   A     2.51055e-01   6.27600e-02 ; 1.41  0.0150
+ hc       hc          0.00000  0.00000   A     2.64953e-01   6.56888e-02 ; 1.49  0.0157
+ hx       hx          0.00000  0.00000   A     1.95998e-01   6.56888e-02 ; 1.10  0.0157
+ h1       h1          0.00000  0.00000   A     2.47135e-01   6.56888e-02 ; 1.39  0.0157
+ hn       hn          0.00000  0.00000   A     1.06908e-01   6.56888e-02 ; 0.60  0.0157
+
+[ moleculetype ]
+;name            nrexcl
+ cid1              3
+
+[ atoms ]
+;   nr  type  resi  res  atom  cgnr     charge      mass       ; qtot   bond_type
+     1   ca     1   cid1    C1    1    -0.236300     12.01000 ; qtot -0.236
+     2   ca     1   cid1    C2    2    -0.079000     12.01000 ; qtot -0.315
+     3   cc     1   cid1    C3    3    -0.068000     12.01000 ; qtot -0.383
+     4   ca     1   cid1    C4    4     0.441200     12.01000 ; qtot 0.058
+     5   ca     1   cid1    C5    5     0.436200     12.01000 ; qtot 0.494
+     6   cd     1   cid1    C6    6    -0.088300     12.01000 ; qtot 0.406
+     7   ca     1   cid1    C7    7    -0.300600     12.01000 ; qtot 0.105
+     8   cc     1   cid1    C8    8    -0.083600     12.01000 ; qtot 0.022
+     9   cd     1   cid1    C9    9    -0.229900     12.01000 ; qtot -0.208
+    10    c     1   cid1   C10   10     0.721699     12.01000 ; qtot 0.513
+    11   c3     1   cid1   C11   11    -0.099400     12.01000 ; qtot 0.414
+    12   c3     1   cid1   C12   12     0.108800     12.01000 ; qtot 0.523
+    13   c3     1   cid1   C13   13     0.196800     12.01000 ; qtot 0.720
+    14   c3     1   cid1   C14   14    -0.100700     12.01000 ; qtot 0.619
+    15   c3     1   cid1   C15   15     0.080100     12.01000 ; qtot 0.699
+    16   c3     1   cid1   C16   16     0.099000     12.01000 ; qtot 0.798
+    17   nb     1   cid1   N17   17    -0.641000     14.01000 ; qtot 0.157
+    18   na     1   cid1   N18   18    -0.155100     14.01000 ; qtot 0.002
+    19    n     1   cid1   N19   19    -0.586900     14.01000 ; qtot -0.585
+    20   n4     1   cid1   N20   20    -0.687400     14.01000 ; qtot -1.272
+    21    o     1   cid1   O21   21    -0.656100     16.00000 ; qtot -1.929
+    22   cl     1   cid1  CL22   22    -0.020400     35.45000 ; qtot -1.949
+    23   ha     1   cid1   H23   23     0.169000      1.00800 ; qtot -1.780
+    24   ha     1   cid1   H24   24     0.138000      1.00800 ; qtot -1.642
+    25   ha     1   cid1   H25   25     0.181000      1.00800 ; qtot -1.461
+    26   h4     1   cid1   H26   26     0.052100      1.00800 ; qtot -1.409
+    27   h4     1   cid1   H27   27     0.039100      1.00800 ; qtot -1.370
+    28   h4     1   cid1   H28   28     0.195000      1.00800 ; qtot -1.175
+    29   hc     1   cid1   H29   29     0.088700      1.00800 ; qtot -1.086
+    30   hc     1   cid1   H30   30     0.088700      1.00800 ; qtot -0.997
+    31   hx     1   cid1   H31   31     0.103700      1.00800 ; qtot -0.894
+    32   hx     1   cid1   H32   32     0.103700      1.00800 ; qtot -0.790
+    33   hx     1   cid1   H33   33     0.143700      1.00800 ; qtot -0.646
+    34   hc     1   cid1   H34   34     0.103700      1.00800 ; qtot -0.543
+    35   hx     1   cid1   H35   35     0.110367      1.00800 ; qtot -0.432
+    36   hx     1   cid1   H36   36     0.110367      1.00800 ; qtot -0.322
+    37   hx     1   cid1   H37   37     0.110367      1.00800 ; qtot -0.211
+    38   h1     1   cid1   H38   38     0.069700      1.00800 ; qtot -0.142
+    39   h1     1   cid1   H39   39     0.069700      1.00800 ; qtot -0.072
+    40   hn     1   cid1   H40   40     0.302700      1.00800 ; qtot 0.231
+    41   hn     1   cid1   H41   41     0.322500      1.00800 ; qtot 0.553
+    42   hn     1   cid1   H42   42     0.446800      1.00800 ; qtot 1.000
+
+[ bonds ]
+;   ai     aj funct   r             k
+     1      2   1    1.3984e-01    3.8585e+05 ;     C1 - C2    
+     1      4   1    1.3984e-01    3.8585e+05 ;     C1 - C4    
+     1     23   1    1.0860e-01    2.8937e+05 ;     C1 - H23   
+     2      7   1    1.3984e-01    3.8585e+05 ;     C2 - C7    
+     2     24   1    1.0860e-01    2.8937e+05 ;     C2 - H24   
+     3      8   1    1.4278e-01    3.5129e+05 ;     C3 - C8    
+     3      9   1    1.3729e-01    4.1915e+05 ;     C3 - C9    
+     3     25   1    1.0837e-01    2.9213e+05 ;     C3 - H25   
+     4     17   1    1.3390e-01    4.0836e+05 ;     C4 - N17   
+     4     26   1    1.0890e-01    2.8577e+05 ;     C4 - H26   
+     5      7   1    1.3984e-01    3.8585e+05 ;     C5 - C7    
+     5     17   1    1.3390e-01    4.0836e+05 ;     C5 - N17   
+     5     27   1    1.0890e-01    2.8577e+05 ;     C5 - H27   
+     6      8   1    1.3729e-01    4.1915e+05 ;     C6 - C8    
+     6     18   1    1.3802e-01    3.5631e+05 ;     C6 - N18   
+     6     28   1    1.0817e-01    2.9455e+05 ;     C6 - H28   
+     7     13   1    1.5156e-01    2.6861e+05 ;     C7 - C13   
+     8     22   1    1.7354e-01    2.6568e+05 ;     C8 - CL22  
+     9     10   1    1.4676e-01    3.1045e+05 ;     C9 - C10   
+     9     18   1    1.3802e-01    3.5631e+05 ;     C9 - N18   
+    10     19   1    1.3789e-01    3.5782e+05 ;    C10 - N19   
+    10     21   1    1.2183e-01    5.3363e+05 ;    C10 - O21   
+    11     12   1    1.5375e-01    2.5179e+05 ;    C11 - C12   
+    11     14   1    1.5375e-01    2.5179e+05 ;    C11 - C14   
+    11     29   1    1.0969e-01    2.7665e+05 ;    C11 - H29   
+    11     30   1    1.0969e-01    2.7665e+05 ;    C11 - H30   
+    12     20   1    1.5110e-01    2.3707e+05 ;    C12 - N20   
+    12     31   1    1.0910e-01    2.8342e+05 ;    C12 - H31   
+    12     32   1    1.0910e-01    2.8342e+05 ;    C12 - H32   
+    13     14   1    1.5375e-01    2.5179e+05 ;    C13 - C14   
+    13     20   1    1.5110e-01    2.3707e+05 ;    C13 - N20   
+    13     33   1    1.0910e-01    2.8342e+05 ;    C13 - H33   
+    14     16   1    1.5375e-01    2.5179e+05 ;    C14 - C16   
+    14     34   1    1.0969e-01    2.7665e+05 ;    C14 - H34   
+    15     20   1    1.5110e-01    2.3707e+05 ;    C15 - N20   
+    15     35   1    1.0910e-01    2.8342e+05 ;    C15 - H35   
+    15     36   1    1.0910e-01    2.8342e+05 ;    C15 - H36   
+    15     37   1    1.0910e-01    2.8342e+05 ;    C15 - H37   
+    16     19   1    1.4619e-01    2.7506e+05 ;    C16 - N19   
+    16     38   1    1.0969e-01    2.7665e+05 ;    C16 - H38   
+    16     39   1    1.0969e-01    2.7665e+05 ;    C16 - H39   
+    18     40   1    1.0100e-01    3.4175e+05 ;    N18 - H40   
+    19     41   1    1.0129e-01    3.3740e+05 ;    N19 - H41   
+    20     42   1    1.0304e-01    3.1229e+05 ;    N20 - H42   
+
+[ pairs ]
+;   ai     aj    funct
+     1      5      1 ;     C1 - C5    
+     1     13      1 ;     C1 - C13   
+     2     14      1 ;     C2 - C14   
+     2     17      1 ;     C2 - N17   
+     2     20      1 ;     C2 - N20   
+     2     26      1 ;     C2 - H26   
+     2     27      1 ;     C2 - H27   
+     2     33      1 ;     C2 - H33   
+     3     19      1 ;     C3 - N19   
+     3     21      1 ;     C3 - O21   
+     3     28      1 ;     C3 - H28   
+     3     40      1 ;     C3 - H40   
+     4      7      1 ;     C4 - C7    
+     4     24      1 ;     C4 - H24   
+     4     27      1 ;     C4 - H27   
+     5     14      1 ;     C5 - C14   
+     5     20      1 ;     C5 - N20   
+     5     24      1 ;     C5 - H24   
+     5     26      1 ;     C5 - H26   
+     5     33      1 ;     C5 - H33   
+     6     10      1 ;     C6 - C10   
+     6     25      1 ;     C6 - H25   
+     7     11      1 ;     C7 - C11   
+     7     12      1 ;     C7 - C12   
+     7     15      1 ;     C7 - C15   
+     7     16      1 ;     C7 - C16   
+     7     34      1 ;     C7 - H34   
+     7     42      1 ;     C7 - H42   
+     8     10      1 ;     C8 - C10   
+     8     40      1 ;     C8 - H40   
+     9     16      1 ;     C9 - C16   
+     9     22      1 ;     C9 - CL22  
+     9     28      1 ;     C9 - H28   
+     9     41      1 ;     C9 - H41   
+    10     14      1 ;    C10 - C14   
+    10     25      1 ;    C10 - H25   
+    10     38      1 ;    C10 - H38   
+    10     39      1 ;    C10 - H39   
+    10     40      1 ;    C10 - H40   
+    11     15      1 ;    C11 - C15   
+    11     19      1 ;    C11 - N19   
+    11     33      1 ;    C11 - H33   
+    11     38      1 ;    C11 - H38   
+    11     39      1 ;    C11 - H39   
+    11     42      1 ;    C11 - H42   
+    12     16      1 ;    C12 - C16   
+    12     33      1 ;    C12 - H33   
+    12     34      1 ;    C12 - H34   
+    12     35      1 ;    C12 - H35   
+    12     36      1 ;    C12 - H36   
+    12     37      1 ;    C12 - H37   
+    13     17      1 ;    C13 - N17   
+    13     19      1 ;    C13 - N19   
+    13     24      1 ;    C13 - H24   
+    13     27      1 ;    C13 - H27   
+    13     29      1 ;    C13 - H29   
+    13     30      1 ;    C13 - H30   
+    13     31      1 ;    C13 - H31   
+    13     32      1 ;    C13 - H32   
+    13     35      1 ;    C13 - H35   
+    13     36      1 ;    C13 - H36   
+    13     37      1 ;    C13 - H37   
+    13     38      1 ;    C13 - H38   
+    13     39      1 ;    C13 - H39   
+    14     15      1 ;    C14 - C15   
+    14     31      1 ;    C14 - H31   
+    14     32      1 ;    C14 - H32   
+    14     41      1 ;    C14 - H41   
+    14     42      1 ;    C14 - H42   
+    15     31      1 ;    C15 - H31   
+    15     32      1 ;    C15 - H32   
+    15     33      1 ;    C15 - H33   
+    16     20      1 ;    C16 - N20   
+    16     21      1 ;    C16 - O21   
+    16     29      1 ;    C16 - H29   
+    16     30      1 ;    C16 - H30   
+    16     33      1 ;    C16 - H33   
+    18     19      1 ;    N18 - N19   
+    18     21      1 ;    N18 - O21   
+    18     22      1 ;    N18 - CL22  
+    18     25      1 ;    N18 - H25   
+    19     34      1 ;    N19 - H34   
+    20     29      1 ;    N20 - H29   
+    20     30      1 ;    N20 - H30   
+    20     34      1 ;    N20 - H34   
+    21     41      1 ;    O21 - H41   
+    22     25      1 ;   CL22 - H25   
+    22     28      1 ;   CL22 - H28   
+    23      7      1 ;    H23 - C7    
+    23     17      1 ;    H23 - N17   
+    23     24      1 ;    H23 - H24   
+    23     26      1 ;    H23 - H26   
+    28     40      1 ;    H28 - H40   
+    29     31      1 ;    H29 - H31   
+    29     32      1 ;    H29 - H32   
+    29     34      1 ;    H29 - H34   
+    30     31      1 ;    H30 - H31   
+    30     32      1 ;    H30 - H32   
+    30     34      1 ;    H30 - H34   
+    31     42      1 ;    H31 - H42   
+    32     42      1 ;    H32 - H42   
+    33     34      1 ;    H33 - H34   
+    33     42      1 ;    H33 - H42   
+    34     38      1 ;    H34 - H38   
+    34     39      1 ;    H34 - H39   
+    35     42      1 ;    H35 - H42   
+    36     42      1 ;    H36 - H42   
+    37     42      1 ;    H37 - H42   
+    38     41      1 ;    H38 - H41   
+    39     41      1 ;    H39 - H41   
+
+[ angles ]
+;   ai     aj     ak    funct   theta         cth
+     1      2      7      1    1.2002e+02    5.5731e+02 ;     C1 - C2     - C7    
+     1      2     24      1    1.1988e+02    4.0334e+02 ;     C1 - C2     - H24   
+     1      4     17      1    1.2294e+02    5.7572e+02 ;     C1 - C4     - N17   
+     1      4     26      1    1.2034e+02    4.0250e+02 ;     C1 - C4     - H26   
+     2      1      4      1    1.2002e+02    5.5731e+02 ;     C2 - C1     - C4    
+     2      1     23      1    1.1988e+02    4.0334e+02 ;     C2 - C1     - H23   
+     2      7      5      1    1.2002e+02    5.5731e+02 ;     C2 - C7     - C5    
+     2      7     13      1    1.2077e+02    5.3137e+02 ;     C2 - C7     - C13   
+     3      8      6      1    1.1419e+02    5.7070e+02 ;     C3 - C8     - C6    
+     3      8     22      1    1.1999e+02    4.8367e+02 ;     C3 - C8     - CL22  
+     3      9     10      1    1.2135e+02    5.4476e+02 ;     C3 - C9     - C10   
+     3      9     18      1    1.0699e+02    6.1421e+02 ;     C3 - C9     - N18   
+     4      1     23      1    1.1988e+02    4.0334e+02 ;     C4 - C1     - H23   
+     4     17      5      1    1.1722e+02    5.7153e+02 ;     C4 - N17    - C5    
+     5      7     13      1    1.2077e+02    5.3137e+02 ;     C5 - C7     - C13   
+     6      8     22      1    1.2341e+02    4.8116e+02 ;     C6 - C8     - CL22  
+     6     18      9      1    1.0990e+02    5.7321e+02 ;     C6 - N18    - C9    
+     6     18     40      1    1.2550e+02    3.9162e+02 ;     C6 - N18    - H40   
+     7      2     24      1    1.1988e+02    4.0334e+02 ;     C7 - C2     - H24   
+     7      5     17      1    1.2294e+02    5.7572e+02 ;     C7 - C5     - N17   
+     7      5     27      1    1.2034e+02    4.0250e+02 ;     C7 - C5     - H27   
+     7     13     14      1    1.1207e+02    5.2802e+02 ;     C7 - C13    - C14   
+     7     13     20      1    1.1380e+02    5.4225e+02 ;     C7 - C13    - N20   
+     7     13     33      1    1.1145e+02    3.8995e+02 ;     C7 - C13    - H33   
+     8      3      9      1    1.1419e+02    5.7070e+02 ;     C8 - C3     - C9    
+     8      3     25      1    1.2107e+02    3.9413e+02 ;     C8 - C3     - H25   
+     8      6     18      1    1.0699e+02    6.1421e+02 ;     C8 - C6     - N18   
+     8      6     28      1    1.2848e+02    3.9581e+02 ;     C8 - C6     - H28   
+     9      3     25      1    1.2176e+02    4.0585e+02 ;     C9 - C3     - H25   
+     9     10     19      1    1.1270e+02    5.7823e+02 ;     C9 - C10    - N19   
+     9     10     21      1    1.2393e+02    5.7823e+02 ;     C9 - C10    - O21   
+     9     18     40      1    1.2550e+02    3.9162e+02 ;     C9 - N18    - H40   
+    10      9     18      1    1.1384e+02    5.7484e+02 ;    C10 - C9     - N18   
+    10     19     16      1    1.2069e+02    5.3053e+02 ;    C10 - N19    - C16   
+    10     19     41      1    1.1755e+02    4.0417e+02 ;    C10 - N19    - H41   
+    11     12     20      1    1.1421e+02    5.3723e+02 ;    C11 - C12    - N20   
+    11     12     31      1    1.1056e+02    3.8660e+02 ;    C11 - C12    - H31   
+    11     12     32      1    1.1056e+02    3.8660e+02 ;    C11 - C12    - H32   
+    11     14     13      1    1.1151e+02    5.2635e+02 ;    C11 - C14    - C13   
+    11     14     16      1    1.1151e+02    5.2635e+02 ;    C11 - C14    - C16   
+    11     14     34      1    1.0980e+02    3.8744e+02 ;    C11 - C14    - H34   
+    12     11     14      1    1.1151e+02    5.2635e+02 ;    C12 - C11    - C14   
+    12     11     29      1    1.0980e+02    3.8744e+02 ;    C12 - C11    - H29   
+    12     11     30      1    1.0980e+02    3.8744e+02 ;    C12 - C11    - H30   
+    12     20     13      1    1.0966e+02    5.2384e+02 ;    C12 - N20    - C13   
+    12     20     15      1    1.0966e+02    5.2384e+02 ;    C12 - N20    - C15   
+    12     20     42      1    1.1011e+02    3.8409e+02 ;    C12 - N20    - H42   
+    13     14     16      1    1.1151e+02    5.2635e+02 ;    C13 - C14    - C16   
+    13     14     34      1    1.0980e+02    3.8744e+02 ;    C13 - C14    - H34   
+    13     20     15      1    1.0966e+02    5.2384e+02 ;    C13 - N20    - C15   
+    13     20     42      1    1.1011e+02    3.8409e+02 ;    C13 - N20    - H42   
+    14     11     29      1    1.0980e+02    3.8744e+02 ;    C14 - C11    - H29   
+    14     11     30      1    1.0980e+02    3.8744e+02 ;    C14 - C11    - H30   
+    14     13     20      1    1.1421e+02    5.3723e+02 ;    C14 - C13    - N20   
+    14     13     33      1    1.1056e+02    3.8660e+02 ;    C14 - C13    - H33   
+    14     16     19      1    1.1161e+02    5.5145e+02 ;    C14 - C16    - N19   
+    14     16     38      1    1.0956e+02    3.8828e+02 ;    C14 - C16    - H38   
+    14     16     39      1    1.0956e+02    3.8828e+02 ;    C14 - C16    - H39   
+    15     20     42      1    1.1011e+02    3.8409e+02 ;    C15 - N20    - H42   
+    16     14     34      1    1.0980e+02    3.8744e+02 ;    C16 - C14    - H34   
+    16     19     41      1    1.1768e+02    3.8325e+02 ;    C16 - N19    - H41   
+    17      4     26      1    1.1603e+02    4.3430e+02 ;    N17 - C4     - H26   
+    17      5     27      1    1.1603e+02    4.3430e+02 ;    N17 - C5     - H27   
+    18      6     28      1    1.2053e+02    4.1673e+02 ;    N18 - C6     - H28   
+    19     10     21      1    1.2305e+02    6.2091e+02 ;    N19 - C10    - O21   
+    19     16     38      1    1.0888e+02    4.1673e+02 ;    N19 - C16    - H38   
+    19     16     39      1    1.0888e+02    4.1673e+02 ;    N19 - C16    - H39   
+    20     12     31      1    1.0801e+02    4.0668e+02 ;    N20 - C12    - H31   
+    20     12     32      1    1.0801e+02    4.0668e+02 ;    N20 - C12    - H32   
+    20     13     33      1    1.0801e+02    4.0668e+02 ;    N20 - C13    - H33   
+    20     15     35      1    1.0801e+02    4.0668e+02 ;    N20 - C15    - H35   
+    20     15     36      1    1.0801e+02    4.0668e+02 ;    N20 - C15    - H36   
+    20     15     37      1    1.0801e+02    4.0668e+02 ;    N20 - C15    - H37   
+    29     11     30      1    1.0758e+02    3.2970e+02 ;    H29 - C11    - H30   
+    31     12     32      1    1.0975e+02    3.2803e+02 ;    H31 - C12    - H32   
+    35     15     36      1    1.0975e+02    3.2803e+02 ;    H35 - C15    - H36   
+    35     15     37      1    1.0975e+02    3.2803e+02 ;    H35 - C15    - H37   
+    36     15     37      1    1.0975e+02    3.2803e+02 ;    H36 - C15    - H37   
+    38     16     39      1    1.0846e+02    3.2803e+02 ;    H38 - C16    - H39   
+
+[ dihedrals ] ; propers
+; for gromacs 4.5 or higher, using funct 9
+;    i      j      k      l   func   phase     kd      pn
+     1      2      7      5      9   180.00  15.16700   2 ;     C1-    C2-    C7-    C5
+     1      2      7     13      9   180.00  15.16700   2 ;     C1-    C2-    C7-   C13
+     1      4     17      5      9   180.00  20.08320   2 ;     C1-    C4-   N17-    C5
+     2      1      4     17      9   180.00  15.16700   2 ;     C2-    C1-    C4-   N17
+     2      1      4     26      9   180.00  15.16700   2 ;     C2-    C1-    C4-   H26
+     2      7      5     17      9   180.00  15.16700   2 ;     C2-    C7-    C5-   N17
+     2      7      5     27      9   180.00  15.16700   2 ;     C2-    C7-    C5-   H27
+     2      7     13     14      9     0.00   0.00000   0 ;     C2-    C7-   C13-   C14
+     2      7     13     20      9     0.00   0.00000   0 ;     C2-    C7-   C13-   N20
+     2      7     13     33      9     0.00   0.00000   0 ;     C2-    C7-   C13-   H33
+     3      8      6     18      9   180.00  16.73600   2 ;     C3-    C8-    C6-   N18
+     3      8      6     28      9   180.00  16.73600   2 ;     C3-    C8-    C6-   H28
+     3      9     10     19      9   180.00  12.02900   2 ;     C3-    C9-   C10-   N19
+     3      9     10     21      9   180.00  12.02900   2 ;     C3-    C9-   C10-   O21
+     3      9     18      6      9   180.00   7.11280   2 ;     C3-    C9-   N18-    C6
+     3      9     18     40      9   180.00   7.11280   2 ;     C3-    C9-   N18-   H40
+     4      1      2      7      9   180.00  15.16700   2 ;     C4-    C1-    C2-    C7
+     4      1      2     24      9   180.00  15.16700   2 ;     C4-    C1-    C2-   H24
+     4     17      5      7      9   180.00  20.08320   2 ;     C4-   N17-    C5-    C7
+     4     17      5     27      9   180.00  20.08320   2 ;     C4-   N17-    C5-   H27
+     5      7      2     24      9   180.00  15.16700   2 ;     C5-    C7-    C2-   H24
+     5      7     13     14      9     0.00   0.00000   0 ;     C5-    C7-   C13-   C14
+     5      7     13     20      9     0.00   0.00000   0 ;     C5-    C7-   C13-   N20
+     5      7     13     33      9     0.00   0.00000   0 ;     C5-    C7-   C13-   H33
+     5     17      4     26      9   180.00  20.08320   2 ;     C5-   N17-    C4-   H26
+     6      8      3      9      9   180.00  16.73600   2 ;     C6-    C8-    C3-    C9
+     6      8      3     25      9   180.00  16.73600   2 ;     C6-    C8-    C3-   H25
+     6     18      9     10      9   180.00   7.11280   2 ;     C6-   N18-    C9-   C10
+     7     13     14     11      9     0.00   0.65084   3 ;     C7-   C13-   C14-   C11
+     7     13     14     16      9     0.00   0.65084   3 ;     C7-   C13-   C14-   C16
+     7     13     14     34      9     0.00   0.65084   3 ;     C7-   C13-   C14-   H34
+     7     13     20     12      9     0.00   0.65084   3 ;     C7-   C13-   N20-   C12
+     7     13     20     12      9     0.00   2.92880   2 ;     C7-   C13-   N20-   C12
+     7     13     20     15      9     0.00   0.65084   3 ;     C7-   C13-   N20-   C15
+     7     13     20     15      9     0.00   2.92880   2 ;     C7-   C13-   N20-   C15
+     7     13     20     42      9     0.00   0.65084   3 ;     C7-   C13-   N20-   H42
+     8      3      9     10      9   180.00  16.73600   2 ;     C8-    C3-    C9-   C10
+     8      3      9     18      9   180.00  16.73600   2 ;     C8-    C3-    C9-   N18
+     8      6     18      9      9   180.00   7.11280   2 ;     C8-    C6-   N18-    C9
+     8      6     18     40      9   180.00   7.11280   2 ;     C8-    C6-   N18-   H40
+     9      3      8     22      9   180.00  16.73600   2 ;     C9-    C3-    C8-  CL22
+     9     10     19     16      9   180.00  10.46000   2 ;     C9-   C10-   N19-   C16
+     9     10     19     41      9   180.00  10.46000   2 ;     C9-   C10-   N19-   H41
+     9     18      6     28      9   180.00   7.11280   2 ;     C9-   N18-    C6-   H28
+    10      9      3     25      9   180.00  16.73600   2 ;    C10-    C9-    C3-   H25
+    10      9     18     40      9   180.00   7.11280   2 ;    C10-    C9-   N18-   H40
+    10     19     16     14      9     0.00   0.00000   0 ;    C10-   N19-   C16-   C14
+    10     19     16     14      9     0.00   2.21752   1 ;    C10-   N19-   C16-   C14
+    10     19     16     14      9   180.00   0.62760   3 ;    C10-   N19-   C16-   C14
+    10     19     16     14      9   180.00   2.09200   4 ;    C10-   N19-   C16-   C14
+    10     19     16     38      9     0.00   0.00000   0 ;    C10-   N19-   C16-   H38
+    10     19     16     39      9     0.00   0.00000   0 ;    C10-   N19-   C16-   H39
+    11     12     20     13      9     0.00   0.65084   3 ;    C11-   C12-   N20-   C13
+    11     12     20     15      9     0.00   0.65084   3 ;    C11-   C12-   N20-   C15
+    11     12     20     42      9     0.00   0.65084   3 ;    C11-   C12-   N20-   H42
+    11     14     13     20      9     0.00   0.65084   3 ;    C11-   C14-   C13-   N20
+    11     14     13     33      9     0.00   0.65084   3 ;    C11-   C14-   C13-   H33
+    11     14     16     19      9     0.00   0.65084   3 ;    C11-   C14-   C16-   N19
+    11     14     16     38      9     0.00   0.65084   3 ;    C11-   C14-   C16-   H38
+    11     14     16     39      9     0.00   0.65084   3 ;    C11-   C14-   C16-   H39
+    12     11     14     13      9     0.00   0.75312   3 ;    C12-   C11-   C14-   C13
+    12     11     14     13      9   180.00   0.83680   1 ;    C12-   C11-   C14-   C13
+    12     11     14     13      9   180.00   1.04600   2 ;    C12-   C11-   C14-   C13
+    12     11     14     16      9     0.00   0.75312   3 ;    C12-   C11-   C14-   C16
+    12     11     14     16      9   180.00   0.83680   1 ;    C12-   C11-   C14-   C16
+    12     11     14     16      9   180.00   1.04600   2 ;    C12-   C11-   C14-   C16
+    12     11     14     34      9     0.00   0.66944   3 ;    C12-   C11-   C14-   H34
+    12     20     13     14      9     0.00   0.65084   3 ;    C12-   N20-   C13-   C14
+    12     20     13     33      9     0.00   0.65084   3 ;    C12-   N20-   C13-   H33
+    12     20     15     35      9     0.00   0.65084   3 ;    C12-   N20-   C15-   H35
+    12     20     15     36      9     0.00   0.65084   3 ;    C12-   N20-   C15-   H36
+    12     20     15     37      9     0.00   0.65084   3 ;    C12-   N20-   C15-   H37
+    13      7      2     24      9   180.00  15.16700   2 ;    C13-    C7-    C2-   H24
+    13      7      5     17      9   180.00  15.16700   2 ;    C13-    C7-    C5-   N17
+    13      7      5     27      9   180.00  15.16700   2 ;    C13-    C7-    C5-   H27
+    13     14     11     29      9     0.00   0.66944   3 ;    C13-   C14-   C11-   H29
+    13     14     11     30      9     0.00   0.66944   3 ;    C13-   C14-   C11-   H30
+    13     14     16     19      9     0.00   0.65084   3 ;    C13-   C14-   C16-   N19
+    13     14     16     38      9     0.00   0.65084   3 ;    C13-   C14-   C16-   H38
+    13     14     16     39      9     0.00   0.65084   3 ;    C13-   C14-   C16-   H39
+    13     20     12     31      9     0.00   0.65084   3 ;    C13-   N20-   C12-   H31
+    13     20     12     32      9     0.00   0.65084   3 ;    C13-   N20-   C12-   H32
+    13     20     15     35      9     0.00   0.65084   3 ;    C13-   N20-   C15-   H35
+    13     20     15     36      9     0.00   0.65084   3 ;    C13-   N20-   C15-   H36
+    13     20     15     37      9     0.00   0.65084   3 ;    C13-   N20-   C15-   H37
+    14     11     12     20      9     0.00   0.65084   3 ;    C14-   C11-   C12-   N20
+    14     11     12     31      9     0.00   0.65084   3 ;    C14-   C11-   C12-   H31
+    14     11     12     32      9     0.00   0.65084   3 ;    C14-   C11-   C12-   H32
+    14     13     20     15      9     0.00   0.65084   3 ;    C14-   C13-   N20-   C15
+    14     13     20     42      9     0.00   0.65084   3 ;    C14-   C13-   N20-   H42
+    14     16     19     41      9     0.00   0.00000   0 ;    C14-   C16-   N19-   H41
+    15     20     12     31      9     0.00   0.65084   3 ;    C15-   N20-   C12-   H31
+    15     20     12     32      9     0.00   0.65084   3 ;    C15-   N20-   C12-   H32
+    15     20     13     33      9     0.00   0.65084   3 ;    C15-   N20-   C13-   H33
+    16     14     11     29      9     0.00   0.66944   3 ;    C16-   C14-   C11-   H29
+    16     14     11     30      9     0.00   0.66944   3 ;    C16-   C14-   C11-   H30
+    16     14     13     20      9     0.00   0.65084   3 ;    C16-   C14-   C13-   N20
+    16     14     13     33      9     0.00   0.65084   3 ;    C16-   C14-   C13-   H33
+    16     19     10     21      9   180.00  10.46000   2 ;    C16-   N19-   C10-   O21
+    18      6      8     22      9   180.00  16.73600   2 ;    N18-    C6-    C8-  CL22
+    18      9      3     25      9   180.00  16.73600   2 ;    N18-    C9-    C3-   H25
+    18      9     10     19      9   180.00  12.02900   2 ;    N18-    C9-   C10-   N19
+    18      9     10     21      9   180.00  12.02900   2 ;    N18-    C9-   C10-   O21
+    19     16     14     34      9     0.00   0.65084   3 ;    N19-   C16-   C14-   H34
+    20     12     11     29      9     0.00   0.65084   3 ;    N20-   C12-   C11-   H29
+    20     12     11     30      9     0.00   0.65084   3 ;    N20-   C12-   C11-   H30
+    20     13     14     34      9     0.00   0.65084   3 ;    N20-   C13-   C14-   H34
+    21     10     19     41      9     0.00   8.36800   1 ;    O21-   C10-   N19-   H41
+    21     10     19     41      9   180.00  10.46000   2 ;    O21-   C10-   N19-   H41
+    22      8      3     25      9   180.00  16.73600   2 ;   CL22-    C8-    C3-   H25
+    22      8      6     28      9   180.00  16.73600   2 ;   CL22-    C8-    C6-   H28
+    23      1      2      7      9   180.00  15.16700   2 ;    H23-    C1-    C2-    C7
+    23      1      2     24      9   180.00  15.16700   2 ;    H23-    C1-    C2-   H24
+    23      1      4     17      9   180.00  15.16700   2 ;    H23-    C1-    C4-   N17
+    23      1      4     26      9   180.00  15.16700   2 ;    H23-    C1-    C4-   H26
+    28      6     18     40      9   180.00   7.11280   2 ;    H28-    C6-   N18-   H40
+    29     11     12     31      9     0.00   0.65084   3 ;    H29-   C11-   C12-   H31
+    29     11     12     32      9     0.00   0.65084   3 ;    H29-   C11-   C12-   H32
+    29     11     14     34      9     0.00   0.62760   3 ;    H29-   C11-   C14-   H34
+    30     11     12     31      9     0.00   0.65084   3 ;    H30-   C11-   C12-   H31
+    30     11     12     32      9     0.00   0.65084   3 ;    H30-   C11-   C12-   H32
+    30     11     14     34      9     0.00   0.62760   3 ;    H30-   C11-   C14-   H34
+    31     12     20     42      9     0.00   0.65084   3 ;    H31-   C12-   N20-   H42
+    32     12     20     42      9     0.00   0.65084   3 ;    H32-   C12-   N20-   H42
+    33     13     14     34      9     0.00   0.65084   3 ;    H33-   C13-   C14-   H34
+    33     13     20     42      9     0.00   0.65084   3 ;    H33-   C13-   N20-   H42
+    34     14     16     38      9     0.00   0.65084   3 ;    H34-   C14-   C16-   H38
+    34     14     16     39      9     0.00   0.65084   3 ;    H34-   C14-   C16-   H39
+    35     15     20     42      9     0.00   0.65084   3 ;    H35-   C15-   N20-   H42
+    36     15     20     42      9     0.00   0.65084   3 ;    H36-   C15-   N20-   H42
+    37     15     20     42      9     0.00   0.65084   3 ;    H37-   C15-   N20-   H42
+    38     16     19     41      9     0.00   0.00000   0 ;    H38-   C16-   N19-   H41
+    39     16     19     41      9     0.00   0.00000   0 ;    H39-   C16-   N19-   H41
+
+[ dihedrals ] ; impropers
+; treated as propers in GROMACS to use correct AMBER analytical function
+;    i      j      k      l   func   phase     kd      pn
+     1      7      2     24      4   180.00   4.60240   2 ;     C1-    C7-    C2-   H24
+     1     26      4     17      4   180.00   4.60240   2 ;     C1-   H26-    C4-   N17
+     2      5      7     13      4   180.00   4.60240   2 ;     C2-    C5-    C7-   C13
+     3      6      8     22      4   180.00   4.60240   2 ;     C3-    C6-    C8-  CL22
+     6      9     18     40      4   180.00   4.60240   2 ;     C6-    C9-   N18-   H40
+     7     27      5     17      4   180.00   4.60240   2 ;     C7-   H27-    C5-   N17
+     8      9      3     25      4   180.00   4.60240   2 ;     C8-    C9-    C3-   H25
+     8     28      6     18      4   180.00   4.60240   2 ;     C8-   H28-    C6-   N18
+     9     19     10     21      4   180.00  43.93200   2 ;     C9-   N19-   C10-   O21
+    10      3      9     18      4   180.00   4.60240   2 ;    C10-    C3-    C9-   N18
+    10     16     19     41      4   180.00   4.60240   2 ;    C10-   C16-   N19-   H41
+    23      1      4      2      4   180.00   4.60240   2 ;    H23-    C1-    C4-    C2
+
+[ system ]
+ cid1
+
+[ molecules ]
+; Compound        nmols
+ cid1              1     
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/posres_cid1.itp	Thu Jan 27 18:16:37 2022 +0000
@@ -0,0 +1,45 @@
+
+[ position_restraints ]
+;  i funct       fcx        fcy        fcz
+   1    1       1000       1000       1000
+   2    1       1000       1000       1000
+   3    1       1000       1000       1000
+   4    1       1000       1000       1000
+   5    1       1000       1000       1000
+   6    1       1000       1000       1000
+   7    1       1000       1000       1000
+   8    1       1000       1000       1000
+   9    1       1000       1000       1000
+  10    1       1000       1000       1000
+  11    1       1000       1000       1000
+  12    1       1000       1000       1000
+  13    1       1000       1000       1000
+  14    1       1000       1000       1000
+  15    1       1000       1000       1000
+  16    1       1000       1000       1000
+  17    1       1000       1000       1000
+  18    1       1000       1000       1000
+  19    1       1000       1000       1000
+  20    1       1000       1000       1000
+  21    1       1000       1000       1000
+  22    1       1000       1000       1000
+  23    1       1000       1000       1000
+  24    1       1000       1000       1000
+  25    1       1000       1000       1000
+  26    1       1000       1000       1000
+  27    1       1000       1000       1000
+  28    1       1000       1000       1000
+  29    1       1000       1000       1000
+  30    1       1000       1000       1000
+  31    1       1000       1000       1000
+  32    1       1000       1000       1000
+  33    1       1000       1000       1000
+  34    1       1000       1000       1000
+  35    1       1000       1000       1000
+  36    1       1000       1000       1000
+  37    1       1000       1000       1000
+  38    1       1000       1000       1000
+  39    1       1000       1000       1000
+  40    1       1000       1000       1000
+  41    1       1000       1000       1000
+  42    1       1000       1000       1000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/water_bondedparams.itp	Thu Jan 27 18:16:37 2022 +0000
@@ -0,0 +1,61 @@
+;
+; Horn et al. (2004). J. Chem. Phys.120, 9665-9678
+;
+
+
+[ moleculetype ]
+; molname	nrexcl
+SOL		2
+
+[ atoms ]
+; id  at type     res nr  res name  at name  cg nr  charge    mass
+  1   OW_tip4pew  1       SOL       OW       1       0        16.00000
+  2   HW_tip4pew  1       SOL       HW1      1       0.52422   1.00800
+  3   HW_tip4pew  1       SOL       HW2      1       0.52422   1.00800
+  4   MW          1       SOL       MW       1      -1.04844   0.00000
+
+#ifndef FLEXIBLE
+
+[ settles ]
+; i	funct	doh	dhh
+1	1	0.09572	0.15139
+
+#else
+[ bonds ]
+; i     j       funct   length  force.c.
+1       2       1       0.09572 502416.0 0.09572        502416.0 
+1       3       1       0.09572 502416.0 0.09572        502416.0 
+        
+[ angles ]
+; i     j       k       funct   angle   force.c.
+2       1       3       1       104.52  628.02  104.52  628.02  
+
+#endif
+
+
+[ virtual_sites3 ]
+; Vsite from                    funct   a               b
+4       1       2       3       1       0.106676721     0.106676721
+
+
+[ exclusions ]
+1	2	3	4
+2	1	3	4
+3	1	2	4
+4	1	2	3
+
+
+; The position of the virtual site is computed as follows:
+;
+;		O
+;  	      
+;	    	V
+;	  
+;	H		H
+;
+; Ewald tip4p:
+; const = distance (OV) / [ cos (angle(VOH)) 	* distance (OH) ]
+;	  0.0125 nm	/ [ cos (52.26 deg)	* 0.09572 nm	]
+;	then a = b = 0.5 * const = 0.106676721
+;
+; Vsite pos x4 = x1 + a*(x2-x1) + b*(x3-x1)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/water_nonbondedparams.itp	Thu Jan 27 18:16:37 2022 +0000
@@ -0,0 +1,3 @@
+HW_tip4pew   1       1.008   0.0000  A   0.00000e+00  0.00000e+00
+OW_tip4pew   8      16.00    0.0000  A   3.16435e-01  6.80946e-01
+MW           0       0.0000  0.0000  D   0.00000e+00  0.00000e+00