Change TopologyInformation implementation
authorMark Abraham <mark.j.abraham@gmail.com>
Thu, 21 Jun 2018 07:50:47 +0000 (09:50 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Sun, 9 Sep 2018 13:12:02 +0000 (15:12 +0200)
This changes TopologyInformation so that we will be able to use it
also in the legacy tools, providing a better migration path for them,
as well as making progress to removing t_topology and a lot of calls
to legacy file-reading functions.

It can now lazily build and cache atom and expanded topology data
structures, re-using the gmx_localtop_t type (intended for use by the
DD code for domain-local topologies). The atoms data structure can
also be explicitly copied out, so that tools who need to modify it can
do so without necessarily incurring a performance penalty. All these
are convenient for tools to use.

The atom coordinate arrays are now maintained as std::vector, which
might want a getter overload to make rvec * for the legacy tools.

Added tests that the reading behaviour for various kinds of inputs is
as expected. Converted lysozyme.gro to pdb, added a 'B' chain ID,
generated a .top (which needed an HG for CYS) so updated pdb and gro
accordingly. Some sasa test refdata needed fixing for that minor
change.

Provided a convenience overload of gmx_rmpbc_init that takes
TopologyInformation as input, as this will frequently be used by
tools.

Extended getTopologyConf to also return velocities, which will
be needed by some tools.

Adapted the trajectoryanalysis modules to use the new approach, which
is well covered by tests.

Refs #1862

Change-Id: I2f43e62bc2d97f5e654f15c6e474b9b71d7106ec

25 files changed:
src/gromacs/pbcutil/rmpbc.h
src/gromacs/topology/atoms.cpp
src/gromacs/topology/atoms.h
src/gromacs/topology/topology.cpp
src/gromacs/topology/topology.h
src/gromacs/trajectoryanalysis/analysissettings.h
src/gromacs/trajectoryanalysis/modules/freevolume.cpp
src/gromacs/trajectoryanalysis/modules/rdf.cpp
src/gromacs/trajectoryanalysis/modules/sasa.cpp
src/gromacs/trajectoryanalysis/modules/select.cpp
src/gromacs/trajectoryanalysis/runnercommon.cpp
src/gromacs/trajectoryanalysis/tests/CMakeLists.txt
src/gromacs/trajectoryanalysis/tests/lysozyme.gro
src/gromacs/trajectoryanalysis/tests/lysozyme.pdb [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/lysozyme.top [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/refdata/SasaModuleTest_BasicTest.xml
src/gromacs/trajectoryanalysis/tests/refdata/SasaModuleTest_HandlesDynamicCalculationGroup.xml
src/gromacs/trajectoryanalysis/tests/refdata/SasaModuleTest_HandlesDynamicOutputGroup.xml
src/gromacs/trajectoryanalysis/tests/refdata/SasaModuleTest_HandlesSelectedResidues.xml
src/gromacs/trajectoryanalysis/tests/refdata/SasaModuleTest_WritesConnollySurfaceWithSolute.xml
src/gromacs/trajectoryanalysis/tests/topologyinformation.cpp [new file with mode: 0644]
src/gromacs/trajectoryanalysis/topologyinformation.cpp
src/gromacs/trajectoryanalysis/topologyinformation.h
src/gromacs/utility/CMakeLists.txt
src/gromacs/utility/unique_cptr.h

index 31922fde683020f602e7b5a1cbc37cf1dc4f6697..256d22fdc518ca162b4eecdb7b2ef5618eb4aef8 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2016, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2016,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
 
 #include "gromacs/math/vectypes.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 struct t_atoms;
 struct t_idef;
 struct t_trxframe;
@@ -73,8 +69,4 @@ void rm_gropbc(const t_atoms *atoms, rvec x[], const matrix box);
  * similar file.
  */
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
index 61449e485968433675a958bb5ae81a48652d6257..7e92cf676b9f9015e8375742cab7fbd852f8a3c6 100644 (file)
@@ -88,6 +88,12 @@ void done_atom(t_atoms *at)
     init_atom(at);
 }
 
+void done_and_delete_atoms(t_atoms *atoms)
+{
+    done_atom(atoms);
+    delete atoms;
+}
+
 void done_atomtypes(t_atomtypes *atype)
 {
     atype->nr = 0;
index 59bd270a9fbaa277462d7f8ca26b6a945505e57e..57c43c45091cc3022d3639152ffb86d0f6ad07ed 100644 (file)
@@ -41,6 +41,7 @@
 
 #include "gromacs/utility/basedefinitions.h"
 #include "gromacs/utility/real.h"
+#include "gromacs/utility/unique_cptr.h"
 
 struct t_symtab;
 
@@ -139,6 +140,7 @@ typedef struct t_atomtypes
 void init_atom(t_atoms *at);
 void init_atomtypes(t_atomtypes *at);
 void done_atom(t_atoms *at);
+void done_and_delete_atoms(t_atoms *atoms);
 void done_atomtypes(t_atomtypes *at);
 
 void init_t_atoms(t_atoms *atoms, int natoms, gmx_bool bPdbinfo);
@@ -175,4 +177,8 @@ void cmp_atoms(FILE *fp, const t_atoms *a1, const t_atoms *a2, real ftol, real a
  */
 void atomsSetMassesBasedOnNames(t_atoms *atoms, gmx_bool printMissingMasses);
 
+//! Deleter for t_atoms, needed until it has a proper destructor.
+using AtomsDataPtr = gmx::unique_cptr<t_atoms, done_and_delete_atoms>;
+
+
 #endif
index 9570b76561c88493b26c2f4b320d672394770a96..88c2bfaaaf7a2315812f07ea0c07b1c55bbbcf38 100644 (file)
@@ -233,6 +233,32 @@ void done_top_mtop(t_topology *top, gmx_mtop_t *mtop)
     }
 }
 
+void done_localtop(gmx_localtop_t *top)
+{
+    if (top == nullptr)
+    {
+        return;
+    }
+    sfree(top->idef.cmap_grid.cmapdata);
+    sfree(top->idef.functype);
+    sfree(top->idef.iparams);
+    done_block(&top->cgs);
+    done_blocka(&top->excls);
+    for (int f = 0; f < F_NRE; f++)
+    {
+        sfree(top->idef.il[f].iatoms);
+    }
+    sfree(top->idef.iparams_posres);
+    sfree(top->idef.iparams_fbposres);
+    done_atomtypes(&top->atomtypes);
+}
+
+void done_and_sfree_localtop(gmx_localtop_t *top)
+{
+    done_localtop(top);
+    sfree(top);
+}
+
 bool gmx_mtop_has_masses(const gmx_mtop_t *mtop)
 {
     if (mtop == nullptr)
index f10d37b7daf176d7b3c41c78ab12c40ef5bbbf3c..1f9e0b5d01a6afe50f4c05bd32f370f1603c8d98 100644 (file)
@@ -46,6 +46,7 @@
 #include "gromacs/topology/block.h"
 #include "gromacs/topology/idef.h"
 #include "gromacs/topology/symtab.h"
+#include "gromacs/utility/unique_cptr.h"
 
 enum
 {
@@ -185,6 +186,8 @@ void done_top(t_topology *top);
 // Frees both t_topology and gmx_mtop_t when the former has been created from
 // the latter.
 void done_top_mtop(t_topology *top, gmx_mtop_t *mtop);
+void done_localtop(gmx_localtop_t *top);
+void done_and_sfree_localtop(gmx_localtop_t *top);
 
 bool gmx_mtop_has_masses(const gmx_mtop_t *mtop);
 bool gmx_mtop_has_charges(const gmx_mtop_t *mtop);
@@ -201,4 +204,7 @@ void cmp_top(FILE *fp, const t_topology *t1, const t_topology *t2, real ftol, re
 void cmp_groups(FILE *fp, const gmx_groups_t *g0, const gmx_groups_t *g1,
                 int natoms0, int natoms1);
 
+//! Deleter for gmx_localtop_t, needed until it has a proper destructor.
+using ExpandedTopologyPtr = gmx::unique_cptr<gmx_localtop_t, done_and_sfree_localtop>;
+
 #endif
index 9d40901fb66a92e9e87e5bdf422fe23cea559f83..9af29fc54821c7217a6f92faa27d627975a96082 100644 (file)
@@ -95,12 +95,21 @@ class TrajectoryAnalysisSettings
             /*! \brief
              * Requests topology coordinates.
              *
-             * If this flag is specified, the coordinates loaded from the
+             * If this flag is specified, the position coordinates loaded from the
              * topology can be accessed, otherwise they are not loaded.
              *
              * \see TopologyInformation
              */
             efUseTopX        = 1<<1,
+            /*! \brief
+             * Requests topology coordinates.
+             *
+             * If this flag is specified, the velocity coordinates loaded from the
+             * topology can be accessed, otherwise they are not loaded.
+             *
+             * \see TopologyInformation
+             */
+            efUseTopV        = 1<<2,
             /*! \brief
              * Disallows the user from changing PBC handling.
              *
index 0093c999a92388c0076b1fb045214f0aada0582b..2080c657ab029a469b7f38f04838f56c3e188e29 100644 (file)
@@ -61,6 +61,7 @@
 #include "gromacs/selection/selection.h"
 #include "gromacs/selection/selectionoption.h"
 #include "gromacs/topology/atomprop.h"
+#include "gromacs/topology/mtop_util.h"
 #include "gromacs/topology/topology.h"
 #include "gromacs/trajectory/trajectoryframe.h"
 #include "gromacs/trajectoryanalysis/analysissettings.h"
@@ -234,7 +235,7 @@ FreeVolume::initAnalysis(const TrajectoryAnalysisSettings &settings,
     cutoff_               = 0;
     int            nnovdw = 0;
     gmx_atomprop_t aps    = gmx_atomprop_init();
-    t_atoms       *atoms  = &(top.topology()->atoms);
+    auto           atoms  = top.copyAtoms();
 
     // Compute total mass
     mtot_ = 0;
@@ -244,7 +245,7 @@ FreeVolume::initAnalysis(const TrajectoryAnalysisSettings &settings,
     }
 
     // Extracts number of molecules
-    nmol_ = top.topology()->mols.nr;
+    nmol_ = gmx_mtop_num_molecules(*top.mtop());
 
     // Loop over atoms in the selection using an iterator
     const int           maxnovdw = 10;
index e4fb8fef6ed27a9cd40da077c36ea073b3a2fad1..df711c35b1d1836f44d689631c332c421187e7f0 100644 (file)
@@ -185,6 +185,8 @@ class Rdf : public TrajectoryAnalysisModule
         AnalysisDataAverageModulePointer          normAve_;
         //! Neighborhood search with `refSel_` as the reference positions.
         AnalysisNeighborhood                      nb_;
+        //! Topology exclusions used by neighborhood searching.
+        const gmx_localtop_t                     *localTop_;
 
         // User input options.
         double                                    binwidth_;
@@ -207,6 +209,7 @@ Rdf::Rdf()
     : surface_(SurfaceType_None),
       pairCounts_(new AnalysisDataSimpleHistogramModule()),
       normAve_(new AnalysisDataAverageModule()),
+      localTop_(nullptr),
       binwidth_(0.002), cutoff_(0.0), rmax_(0.0),
       normalization_(Normalization_Rdf), bNormalizationSet_(false), bXY_(false),
       bExclusions_(false),
@@ -375,12 +378,12 @@ Rdf::initAnalysis(const TrajectoryAnalysisSettings &settings,
                 GMX_THROW(InconsistentInputError("-excl only works with selections that consist of atoms"));
             }
         }
-        const t_topology *topology = top.topology();
-        if (topology->excls.nr == 0)
+        localTop_ = top.expandedTopology();
+        if (localTop_->excls.nr == 0)
         {
             GMX_THROW(InconsistentInputError("-excl is set, but the file provided to -s does not define exclusions"));
         }
-        nb_.setTopologyExclusions(&topology->excls);
+        nb_.setTopologyExclusions(&localTop_->excls);
     }
 }
 
index 23547c7a7575ba572a92c041a5d28542aadde0f0..a33148e5901e14f9d975e009e431c84d96535f01 100644 (file)
@@ -378,7 +378,10 @@ class Sasa : public TrajectoryAnalysisModule
         double                  dgsDefault_;
         bool                    bIncludeSolute_;
 
-        t_topology             *top_;
+        //! Global topology corresponding to the input.
+        gmx_mtop_t             *mtop_;
+        //! Per-atom data corresponding to the input.
+        AtomsDataPtr            atoms_;
         //! Combined VdW and probe radii for each atom in the calculation group.
         std::vector<real>       radii_;
         /*! \brief
@@ -395,7 +398,8 @@ class Sasa : public TrajectoryAnalysisModule
 };
 
 Sasa::Sasa()
-    : solsize_(0.14), ndots_(24), dgsDefault_(0), bIncludeSolute_(true), top_(nullptr)
+    : solsize_(0.14), ndots_(24), dgsDefault_(0), bIncludeSolute_(true),
+      mtop_(nullptr), atoms_(nullptr)
 {
     //minarea_ = 0.5;
     registerAnalysisDataset(&area_, "area");
@@ -499,8 +503,8 @@ void
 Sasa::initAnalysis(const TrajectoryAnalysisSettings &settings,
                    const TopologyInformation        &top)
 {
-    const t_atoms &atoms = top.topology()->atoms;
-    top_ = top.topology();
+    mtop_  = top.mtop();
+    atoms_ = top.copyAtoms();
 
     //bITP   = opt2bSet("-i", nfile, fnm);
     const bool bResAt =
@@ -534,7 +538,7 @@ Sasa::initAnalysis(const TrajectoryAnalysisSettings &settings,
         }
         else
         {
-            if (strcmp(*(atoms.atomtype[0]), "?") == 0)
+            if (strcmp(*(atoms_->atomtype[0]), "?") == 0)
             {
                 GMX_THROW(InconsistentInputError("Your input tpr file is too old (does not contain atom types). Cannot not compute Delta G of solvation"));
             }
@@ -567,11 +571,11 @@ Sasa::initAnalysis(const TrajectoryAnalysisSettings &settings,
     for (int i = 0; i < surfaceSel_.posCount(); i++)
     {
         const int ii     = atomIndices[i];
-        const int resind = atoms.atom[ii].resind;
+        const int resind = atoms_->atom[ii].resind;
         real      radius;
         if (!gmx_atomprop_query(aps, epropVDW,
-                                *(atoms.resinfo[resind].name),
-                                *(atoms.atomname[ii]), &radius))
+                                *(atoms_->resinfo[resind].name),
+                                *(atoms_->atomname[ii]), &radius))
         {
             ndefault++;
         }
@@ -580,8 +584,8 @@ Sasa::initAnalysis(const TrajectoryAnalysisSettings &settings,
         {
             real dgsFactor;
             if (!gmx_atomprop_query(aps, epropDGsol,
-                                    *(atoms.resinfo[resind].name),
-                                    *(atoms.atomtype[ii]), &dgsFactor))
+                                    *(atoms_->resinfo[resind].name),
+                                    *(atoms_->atomtype[ii]), &dgsFactor))
             {
                 dgsFactor = dgsDefault_;
             }
@@ -681,8 +685,8 @@ Sasa::initAnalysis(const TrajectoryAnalysisSettings &settings,
                     GMX_ASSERT(residueGroup == nextRow,
                                "Inconsistent (non-uniformly increasing) residue grouping");
                     const int atomIndex    = surfaceSel_.position(i).atomIndices()[0];
-                    const int residueIndex = atoms.atom[atomIndex].resind;
-                    avem->setXAxisValue(nextRow, atoms.resinfo[residueIndex].nr);
+                    const int residueIndex = atoms_->atom[atomIndex].resind;
+                    avem->setXAxisValue(nextRow, atoms_->resinfo[residueIndex].nr);
                     ++nextRow;
                 }
             }
@@ -954,7 +958,7 @@ Sasa::analyzeFrame(int frnr, const t_trxframe &fr, t_pbc *pbc,
 
     if (bConnolly)
     {
-        if (fr.natoms != top_->atoms.nr)
+        if (fr.natoms != mtop_->natoms)
         {
             GMX_THROW(InconsistentInputError("Connolly plot (-q) is only supported for trajectories that contain all the atoms"));
         }
@@ -963,8 +967,8 @@ Sasa::analyzeFrame(int frnr, const t_trxframe &fr, t_pbc *pbc,
         // one else uses the topology after initialization, it may just work
         // even with future parallelization.
         connolly_plot(fnConnolly_.c_str(),
-                      nsurfacedots, surfacedots, fr.x, &top_->atoms,
-                      &top_->symtab, fr.ePBC, fr.box, bIncludeSolute_);
+                      nsurfacedots, surfacedots, fr.x, atoms_.get(),
+                      &mtop_->symtab, fr.ePBC, fr.box, bIncludeSolute_);
     }
 
     ah.startFrame(frnr, fr.time);
index 4ab86a7b1135be7ab189f9408dfe950a26d72285..de253b201a0fada8f2e213a4db5267974cf95abf 100644 (file)
@@ -310,6 +310,7 @@ class Select : public TrajectoryAnalysisModule
         ResidueNumbering                    resNumberType_;
         PdbAtomsSelection                   pdbAtoms_;
 
+        //! The input topology.
         const TopologyInformation          *top_;
         std::vector<int>                    totsize_;
         AnalysisData                        sdata_;
@@ -607,7 +608,6 @@ Select::analyzeFrame(int frnr, const t_trxframe &fr, t_pbc * /* pbc */,
     AnalysisDataHandle   idh = pdata->dataHandle(idata_);
     AnalysisDataHandle   mdh = pdata->dataHandle(mdata_);
     const SelectionList &sel = pdata->parallelSelections(sel_);
-    t_topology          *top = top_->topology();
 
     sdh.startFrame(frnr, fr.time);
     for (size_t g = 0; g < sel.size(); ++g)
@@ -638,7 +638,7 @@ Select::analyzeFrame(int frnr, const t_trxframe &fr, t_pbc * /* pbc */,
             const SelectionPosition &p = sel[g].position(i);
             if (sel[g].type() == INDEX_RES && !bResInd_)
             {
-                idh.setPoint(1, top->atoms.resinfo[p.mappedId()].nr);
+                idh.setPoint(1, top_->atoms()->resinfo[p.mappedId()].nr);
             }
             else
             {
@@ -679,28 +679,15 @@ Select::writeOutput()
     {
         GMX_RELEASE_ASSERT(top_->hasTopology(),
                            "Topology should have been loaded or an error given earlier");
-        t_atoms            atoms;
-        atoms = top_->topology()->atoms;
-        // Replace the pbdbinfo so that we can change it, without
-        // changing the content of top_, and never leak memory.
-        sfree_guard pdbinfoGuard;
+        auto atoms = top_->copyAtoms();
+        if (!atoms->havePdbInfo)
         {
-            t_pdbinfo *pdbinfo;
-            snew(pdbinfo, atoms.nr);
-            pdbinfoGuard.reset(pdbinfo);
-            if (atoms.havePdbInfo)
-            {
-                std::memcpy(pdbinfo, atoms.pdbinfo, atoms.nr*sizeof(*pdbinfo));
-            }
-            else
-            {
-                atoms.havePdbInfo = TRUE;
-            }
-            atoms.pdbinfo = pdbinfo;
+            snew(atoms->pdbinfo, atoms->nr);
+            atoms->havePdbInfo = TRUE;
         }
-        for (int i = 0; i < atoms.nr; ++i)
+        for (int i = 0; i < atoms->nr; ++i)
         {
-            atoms.pdbinfo[i].occup = 0.0;
+            atoms->pdbinfo[i].occup = 0.0;
         }
         for (size_t g = 0; g < sel_.size(); ++g)
         {
@@ -711,18 +698,20 @@ Select::writeOutput()
                 ArrayRef<const int>::const_iterator ai;
                 for (ai = atomIndices.begin(); ai != atomIndices.end(); ++ai)
                 {
-                    atoms.pdbinfo[*ai].occup += occupancyModule_->average(g, i);
+                    atoms->pdbinfo[*ai].occup += occupancyModule_->average(g, i);
                 }
             }
         }
 
-        t_trxframe fr;
+        std::vector<RVec> x = copyOf(top_->x());
+        t_trxframe        fr;
         clear_trxframe(&fr, TRUE);
         fr.bAtoms = TRUE;
-        fr.atoms  = &atoms;
+        fr.atoms  = atoms.get();
         fr.bX     = TRUE;
         fr.bBox   = TRUE;
-        top_->getTopologyConf(&fr.x, fr.box);
+        fr.x      = as_rvec_array(x.data());
+        top_->getBox(fr.box);
 
         switch (pdbAtoms_)
         {
@@ -752,9 +741,9 @@ Select::writeOutput()
             case PdbAtomsSelection_Selected:
             {
                 std::vector<int> indices;
-                for (int i = 0; i < atoms.nr; ++i)
+                for (int i = 0; i < atoms->nr; ++i)
                 {
-                    if (atoms.pdbinfo[i].occup > 0.0)
+                    if (atoms->pdbinfo[i].occup > 0.0)
                     {
                         indices.push_back(i);
                     }
index e7e0f275dcc01d4c960d6f4dff5c3298b1024258..f7323a8d87bb627fe393f4fe7c6ad466f7f9bdf5 100644 (file)
@@ -184,8 +184,12 @@ TrajectoryAnalysisRunnerCommon::Impl::initTopology(bool required)
         if (hasTrajectory()
             && !settings_.hasFlag(TrajectoryAnalysisSettings::efUseTopX))
         {
-            sfree(topInfo_.xtop_);
-            topInfo_.xtop_ = nullptr;
+            topInfo_.xtop_.clear();
+        }
+        if (hasTrajectory()
+            && !settings_.hasFlag(TrajectoryAnalysisSettings::efUseTopV))
+        {
+            topInfo_.vtop_.clear();
         }
     }
 }
@@ -217,7 +221,7 @@ TrajectoryAnalysisRunnerCommon::Impl::initFirstFrame()
 
         if (topInfo_.hasTopology())
         {
-            const int topologyAtomCount = topInfo_.topology()->atoms.nr;
+            const int topologyAtomCount = topInfo_.mtop()->natoms;
             if (fr->natoms > topologyAtomCount)
             {
                 const std::string message
@@ -230,20 +234,26 @@ TrajectoryAnalysisRunnerCommon::Impl::initFirstFrame()
     else
     {
         // Prepare a frame from topology information.
-        // TODO: Initialize more of the fields.
-        if (frflags & (TRX_NEED_V))
-        {
-            GMX_THROW(NotImplementedError("Velocity reading from a topology not implemented"));
-        }
         if (frflags & (TRX_NEED_F))
         {
             GMX_THROW(InvalidInputError("Forces cannot be read from a topology"));
         }
-        fr->natoms = topInfo_.topology()->atoms.nr;
+        fr->natoms = topInfo_.mtop()->natoms;
         fr->bX     = TRUE;
         snew(fr->x, fr->natoms);
-        memcpy(fr->x, topInfo_.xtop_,
+        memcpy(fr->x, topInfo_.xtop_.data(),
                sizeof(*fr->x) * fr->natoms);
+        if (frflags & (TRX_NEED_V))
+        {
+            if (topInfo_.vtop_.empty())
+            {
+                GMX_THROW(InvalidInputError("Velocities were required, but could not be read from the topology file"));
+            }
+            fr->bV = TRUE;
+            snew(fr->v, fr->natoms);
+            memcpy(fr->v, topInfo_.vtop_.data(),
+                   sizeof(*fr->v) * fr->natoms);
+        }
         fr->bBox   = TRUE;
         copy_mat(topInfo_.boxtop_, fr->box);
     }
@@ -251,8 +261,7 @@ TrajectoryAnalysisRunnerCommon::Impl::initFirstFrame()
     set_trxframe_ePBC(fr, topInfo_.ePBC());
     if (topInfo_.hasTopology() && settings_.hasRmPBC())
     {
-        gpbc_ = gmx_rmpbc_init(&topInfo_.topology()->idef, topInfo_.ePBC(),
-                               fr->natoms);
+        gpbc_             = gmx_rmpbc_init(topInfo_);
     }
 }
 
index 9181b778c8c459b31e4f5401efec76a76ba05eb0..e5b0c5ac2eb59e93d2a9f55a46094106a5c75246 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2010,2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+# Copyright (c) 2010,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -44,6 +44,7 @@ gmx_add_unit_test(TrajectoryAnalysisUnitTests trajectoryanalysis-test
                   sasa.cpp
                   select.cpp
                   surfacearea.cpp
+                  topologyinformation.cpp
                   trajectory.cpp
                   unionfind.cpp
                   $<TARGET_OBJECTS:analysisdata-test-shared>)
index ef9e9dd37be76a6457f79f5751f19fb76824b6bd..4823528363b1670be50d08e839871c833321be99 100644 (file)
@@ -1,5 +1,5 @@
 First 10 residues from 1AKI
-  155
+  156
     1LYS      N    1   3.536   2.234  -1.198
     1LYS     H1    2   3.612   2.288  -1.236
     1LYS     H2    3   3.470   2.214  -1.270
@@ -99,60 +99,61 @@ First 10 residues from 1AKI
     6CYS    HB1   97   3.770   1.034  -0.158
     6CYS    HB2   98   3.834   1.072  -0.013
     6CYS     SG   99   3.654   0.920   0.014
-    6CYS      C  100   3.775   1.305  -0.078
-    6CYS      O  101   3.815   1.361   0.026
-    7GLU      N  102   3.786   1.348  -0.202
-    7GLU      H  103   3.740   1.300  -0.276
-    7GLU     CA  104   3.868   1.469  -0.231
-    7GLU     HA  105   3.960   1.455  -0.193
-    7GLU     CB  106   3.878   1.485  -0.382
-    7GLU    HB1  107   3.923   1.402  -0.417
-    7GLU    HB2  108   3.785   1.489  -0.417
-    7GLU     CG  109   3.954   1.605  -0.438
-    7GLU    HG1  110   3.913   1.687  -0.399
-    7GLU    HG2  111   4.049   1.598  -0.407
-    7GLU     CD  112   3.958   1.624  -0.587
-    7GLU    OE1  113   3.867   1.564  -0.649
-    7GLU    OE2  114   4.042   1.695  -0.638
-    7GLU      C  115   3.805   1.593  -0.166
-    7GLU      O  116   3.874   1.673  -0.101
-    8LEU      N  117   3.674   1.605  -0.182
-    8LEU      H  118   3.626   1.535  -0.235
-    8LEU     CA  119   3.596   1.716  -0.125
-    8LEU     HA  120   3.640   1.801  -0.156
-    8LEU     CB  121   3.453   1.717  -0.181
-    8LEU    HB1  122   3.457   1.722  -0.281
-    8LEU    HB2  123   3.406   1.633  -0.153
-    8LEU     CG  124   3.372   1.835  -0.131
-    8LEU     HG  125   3.378   1.842  -0.031
-    8LEU    CD1  126   3.430   1.966  -0.184
-    8LEU   HD11  127   3.376   2.043  -0.150
-    8LEU   HD12  128   3.524   1.975  -0.153
-    8LEU   HD13  129   3.427   1.965  -0.284
-    8LEU    CD2  130   3.225   1.814  -0.160
-    8LEU   HD21  131   3.172   1.893  -0.126
-    8LEU   HD22  132   3.211   1.805  -0.258
-    8LEU   HD23  133   3.193   1.731  -0.114
-    8LEU      C  134   3.605   1.713   0.027
-    8LEU      O  135   3.616   1.817   0.092
-    9ALA      N  136   3.575   1.598   0.083
-    9ALA      H  137   3.546   1.522   0.024
-    9ALA     CA  138   3.584   1.576   0.228
-    9ALA     HA  139   3.508   1.626   0.269
-    9ALA     CB  140   3.566   1.429   0.262
-    9ALA    HB1  141   3.572   1.416   0.361
-    9ALA    HB2  142   3.476   1.398   0.230
-    9ALA    HB3  143   3.637   1.375   0.218
-    9ALA      C  144   3.714   1.631   0.284
-    9ALA      O  145   3.715   1.698   0.390
-   10ALA      N  146   3.827   1.598   0.220
-   10ALA      H  147   3.820   1.539   0.140
-   10ALA     CA  148   3.961   1.643   0.262
-   10ALA     HA  149   3.969   1.619   0.358
-   10ALA     CB  150   4.071   1.571   0.184
-   10ALA    HB1  151   4.160   1.603   0.215
-   10ALA    HB2  152   4.064   1.472   0.201
-   10ALA    HB3  153   4.060   1.589   0.086
-   10ALA      C  154   3.974   1.794   0.246
-   10ALA      O  155   4.019   1.850   0.347
+    6CYS     HG  100   3.707   0.836   0.012
+    6CYS      C  101   3.775   1.305  -0.078
+    6CYS      O  102   3.815   1.361   0.026
+    7GLU      N  103   3.786   1.348  -0.202
+    7GLU      H  104   3.740   1.300  -0.276
+    7GLU     CA  105   3.868   1.469  -0.231
+    7GLU     HA  106   3.960   1.455  -0.193
+    7GLU     CB  107   3.878   1.485  -0.382
+    7GLU    HB1  108   3.923   1.402  -0.417
+    7GLU    HB2  109   3.785   1.489  -0.417
+    7GLU     CG  110   3.954   1.605  -0.438
+    7GLU    HG1  111   3.913   1.687  -0.399
+    7GLU    HG2  112   4.049   1.598  -0.407
+    7GLU     CD  113   3.958   1.624  -0.587
+    7GLU    OE1  114   3.867   1.564  -0.649
+    7GLU    OE2  115   4.042   1.695  -0.638
+    7GLU      C  116   3.805   1.593  -0.166
+    7GLU      O  117   3.874   1.673  -0.101
+    8LEU      N  118   3.674   1.605  -0.182
+    8LEU      H  119   3.626   1.535  -0.235
+    8LEU     CA  120   3.596   1.716  -0.125
+    8LEU     HA  121   3.640   1.801  -0.156
+    8LEU     CB  122   3.453   1.717  -0.181
+    8LEU    HB1  123   3.457   1.722  -0.281
+    8LEU    HB2  124   3.406   1.633  -0.153
+    8LEU     CG  125   3.372   1.835  -0.131
+    8LEU     HG  126   3.378   1.842  -0.031
+    8LEU    CD1  127   3.430   1.966  -0.184
+    8LEU   HD11  128   3.376   2.043  -0.150
+    8LEU   HD12  129   3.524   1.975  -0.153
+    8LEU   HD13  130   3.427   1.965  -0.284
+    8LEU    CD2  131   3.225   1.814  -0.160
+    8LEU   HD21  132   3.172   1.893  -0.126
+    8LEU   HD22  133   3.211   1.805  -0.258
+    8LEU   HD23  134   3.193   1.731  -0.114
+    8LEU      C  135   3.605   1.713   0.027
+    8LEU      O  136   3.616   1.817   0.092
+    9ALA      N  137   3.575   1.598   0.083
+    9ALA      H  138   3.546   1.522   0.024
+    9ALA     CA  139   3.584   1.576   0.228
+    9ALA     HA  140   3.508   1.626   0.269
+    9ALA     CB  141   3.566   1.429   0.262
+    9ALA    HB1  142   3.572   1.416   0.361
+    9ALA    HB2  143   3.476   1.398   0.230
+    9ALA    HB3  144   3.637   1.375   0.218
+    9ALA      C  145   3.714   1.631   0.284
+    9ALA      O  146   3.715   1.698   0.390
+   10ALA      N  147   3.827   1.598   0.220
+   10ALA      H  148   3.820   1.539   0.140
+   10ALA     CA  149   3.961   1.643   0.262
+   10ALA     HA  150   3.969   1.619   0.358
+   10ALA     CB  151   4.071   1.571   0.184
+   10ALA    HB1  152   4.160   1.603   0.215
+   10ALA    HB2  153   4.064   1.472   0.201
+   10ALA    HB3  154   4.060   1.589   0.086
+   10ALA      C  155   3.974   1.794   0.246
+   10ALA      O  156   4.019   1.850   0.347
    5.90620   6.84510   3.05170
diff --git a/src/gromacs/trajectoryanalysis/tests/lysozyme.pdb b/src/gromacs/trajectoryanalysis/tests/lysozyme.pdb
new file mode 100644 (file)
index 0000000..d82163b
--- /dev/null
@@ -0,0 +1,162 @@
+TITLE     First 10 residues from 1AKI
+REMARK    THIS IS A SIMULATION BOX
+CRYST1   59.062   68.451   30.517  90.00  90.00  90.00 P 1           1
+MODEL        1
+ATOM      1  N   LYS B   1      35.360  22.340 -11.980  1.00  0.00           N
+ATOM      2  H1  LYS B   1      36.120  22.880 -12.360  1.00  0.00           H
+ATOM      3  H2  LYS B   1      34.700  22.140 -12.700  1.00  0.00           H
+ATOM      4  H3  LYS B   1      34.920  22.860 -11.250  1.00  0.00           H
+ATOM      5  CA  LYS B   1      35.890  21.070 -11.430  1.00  0.00           C
+ATOM      6  HA  LYS B   1      36.330  20.550 -12.160  1.00  0.00           H
+ATOM      7  CB  LYS B   1      36.870  21.440 -10.310  1.00  0.00           C
+ATOM      8  HB1 LYS B   1      37.630  21.950 -10.700  1.00  0.00           H
+ATOM      9  HB2 LYS B   1      36.390  22.010  -9.640  1.00  0.00           H
+ATOM     10  CG  LYS B   1      37.450  20.250  -9.560  1.00  0.00           C
+ATOM     11  HG1 LYS B   1      36.760  19.890  -8.940  1.00  0.00           H
+ATOM     12  HG2 LYS B   1      37.700  19.540 -10.230  1.00  0.00           H
+ATOM     13  CD  LYS B   1      38.690  20.650  -8.770  1.00  0.00           C
+ATOM     14  HD1 LYS B   1      39.450  20.830  -9.400  1.00  0.00           H
+ATOM     15  HD2 LYS B   1      38.490  21.470  -8.240  1.00  0.00           H
+ATOM     16  CE  LYS B   1      39.060  19.510  -7.840  1.00  0.00           C
+ATOM     17  HE1 LYS B   1      38.410  19.460  -7.080  1.00  0.00           H
+ATOM     18  HE2 LYS B   1      39.060  18.640  -8.330  1.00  0.00           H
+ATOM     19  NZ  LYS B   1      40.420  19.770  -7.300  1.00  0.00           N
+ATOM     20  HZ1 LYS B   1      40.690  19.030  -6.680  1.00  0.00           H
+ATOM     21  HZ2 LYS B   1      41.080  19.820  -8.060  1.00  0.00           H
+ATOM     22  HZ3 LYS B   1      40.420  20.640  -6.800  1.00  0.00           H
+ATOM     23  C   LYS B   1      34.740  20.260 -10.840  1.00  0.00           C
+ATOM     24  O   LYS B   1      33.950  20.810 -10.080  1.00  0.00           O
+ATOM     25  N   VAL B   2      34.740  18.960 -11.040  1.00  0.00           N
+ATOM     26  H   VAL B   2      35.360  18.600 -11.740  1.00  0.00           H
+ATOM     27  CA  VAL B   2      33.900  18.000 -10.330  1.00  0.00           C
+ATOM     28  HA  VAL B   2      33.170  18.520  -9.900  1.00  0.00           H
+ATOM     29  CB  VAL B   2      33.140  17.030 -11.230  1.00  0.00           C
+ATOM     30  HB  VAL B   2      33.860  16.520 -11.700  1.00  0.00           H
+ATOM     31  CG1 VAL B   2      32.250  16.080 -10.430  1.00  0.00           C
+ATOM     32 1HG1 VAL B   2      31.770  15.470 -11.060  1.00  0.00           H
+ATOM     33 2HG1 VAL B   2      32.820  15.550  -9.810  1.00  0.00           H
+ATOM     34 3HG1 VAL B   2      31.580  16.610  -9.910  1.00  0.00           H
+ATOM     35  CG2 VAL B   2      32.290  17.710 -12.290  1.00  0.00           C
+ATOM     36 1HG2 VAL B   2      31.830  17.020 -12.840  1.00  0.00           H
+ATOM     37 2HG2 VAL B   2      31.620  18.300 -11.850  1.00  0.00           H
+ATOM     38 3HG2 VAL B   2      32.880  18.270 -12.880  1.00  0.00           H
+ATOM     39  C   VAL B   2      34.800  17.310  -9.290  1.00  0.00           C
+ATOM     40  O   VAL B   2      35.760  16.610  -9.660  1.00  0.00           O
+ATOM     41  N   PHE B   3      34.490  17.550  -8.040  1.00  0.00           N
+ATOM     42  H   PHE B   3      33.750  18.190  -7.840  1.00  0.00           H
+ATOM     43  CA  PHE B   3      35.190  16.900  -6.920  1.00  0.00           C
+ATOM     44  HA  PHE B   3      36.150  16.970  -7.170  1.00  0.00           H
+ATOM     45  CB  PHE B   3      34.970  17.630  -5.590  1.00  0.00           C
+ATOM     46  HB1 PHE B   3      34.050  18.020  -5.580  1.00  0.00           H
+ATOM     47  HB2 PHE B   3      35.060  16.980  -4.840  1.00  0.00           H
+ATOM     48  CG  PHE B   3      35.940  18.740  -5.380  1.00  0.00           C
+ATOM     49  CD1 PHE B   3      35.670  20.050  -5.800  1.00  0.00           C
+ATOM     50  HD1 PHE B   3      34.810  20.250  -6.270  1.00  0.00           H
+ATOM     51  CD2 PHE B   3      37.000  18.560  -4.470  1.00  0.00           C
+ATOM     52  HD2 PHE B   3      37.130  17.660  -4.050  1.00  0.00           H
+ATOM     53  CE1 PHE B   3      36.580  21.080  -5.570  1.00  0.00           C
+ATOM     54  HE1 PHE B   3      36.480  21.950  -6.040  1.00  0.00           H
+ATOM     55  CE2 PHE B   3      37.870  19.590  -4.160  1.00  0.00           C
+ATOM     56  HE2 PHE B   3      38.660  19.420  -3.570  1.00  0.00           H
+ATOM     57  CZ  PHE B   3      37.640  20.870  -4.670  1.00  0.00           C
+ATOM     58  HZ  PHE B   3      38.220  21.640  -4.390  1.00  0.00           H
+ATOM     59  C   PHE B   3      34.740  15.440  -6.770  1.00  0.00           C
+ATOM     60  O   PHE B   3      33.520  15.160  -6.860  1.00  0.00           O
+ATOM     61  N   GLY B   4      35.720  14.640  -6.330  1.00  0.00           N
+ATOM     62  H   GLY B   4      36.670  14.950  -6.320  1.00  0.00           H
+ATOM     63  CA  GLY B   4      35.370  13.280  -5.870  1.00  0.00           C
+ATOM     64  HA1 GLY B   4      34.620  12.920  -6.430  1.00  0.00           H
+ATOM     65  HA2 GLY B   4      36.160  12.680  -5.940  1.00  0.00           H
+ATOM     66  C   GLY B   4      34.920  13.420  -4.420  1.00  0.00           C
+ATOM     67  O   GLY B   4      35.300  14.400  -3.780  1.00  0.00           O
+ATOM     68  N   ARG B   5      34.050  12.540  -3.970  1.00  0.00           N
+ATOM     69  H   ARG B   5      33.710  11.840  -4.600  1.00  0.00           H
+ATOM     70  CA  ARG B   5      33.560  12.540  -2.590  1.00  0.00           C
+ATOM     71  HA  ARG B   5      32.980  13.340  -2.520  1.00  0.00           H
+ATOM     72  CB  ARG B   5      32.760  11.260  -2.330  1.00  0.00           C
+ATOM     73  HB1 ARG B   5      32.000  11.220  -2.970  1.00  0.00           H
+ATOM     74  HB2 ARG B   5      33.360  10.470  -2.470  1.00  0.00           H
+ATOM     75  CG  ARG B   5      32.210  11.200  -0.920  1.00  0.00           C
+ATOM     76  HG1 ARG B   5      32.970  11.170  -0.270  1.00  0.00           H
+ATOM     77  HG2 ARG B   5      31.650  12.010  -0.750  1.00  0.00           H
+ATOM     78  CD  ARG B   5      31.380  10.000  -0.720  1.00  0.00           C
+ATOM     79  HD1 ARG B   5      31.040   9.990   0.220  1.00  0.00           H
+ATOM     80  HD2 ARG B   5      30.600  10.050  -1.350  1.00  0.00           H
+ATOM     81  NE  ARG B   5      32.060   8.750  -0.960  1.00  0.00           N
+ATOM     82  HE  ARG B   5      32.020   8.400  -1.890  1.00  0.00           H
+ATOM     83  CZ  ARG B   5      32.730   8.010  -0.100  1.00  0.00           C
+ATOM     84  NH1 ARG B   5      32.840   8.330   1.190  1.00  0.00           N
+ATOM     85 1HH1 ARG B   5      32.390   9.160   1.530  1.00  0.00           H
+ATOM     86 2HH1 ARG B   5      33.360   7.750   1.810  1.00  0.00           H
+ATOM     87  NH2 ARG B   5      33.250   6.840  -0.530  1.00  0.00           N
+ATOM     88 1HH2 ARG B   5      33.110   6.550  -1.470  1.00  0.00           H
+ATOM     89 2HH2 ARG B   5      33.760   6.260   0.100  1.00  0.00           H
+ATOM     90  C   ARG B   5      34.670  12.730  -1.560  1.00  0.00           C
+ATOM     91  O   ARG B   5      34.670  13.650  -0.700  1.00  0.00           O
+ATOM     92  N   CYS B   6      35.670  11.850  -1.610  1.00  0.00           N
+ATOM     93  H   CYS B   6      35.670  11.160  -2.330  1.00  0.00           H
+ATOM     94  CA  CYS B   6      36.780  11.870  -0.650  1.00  0.00           C
+ATOM     95  HA  CYS B   6      36.310  12.020   0.220  1.00  0.00           H
+ATOM     96  CB  CYS B   6      37.490  10.530  -0.620  1.00  0.00           C
+ATOM     97  HB1 CYS B   6      37.700  10.340  -1.580  1.00  0.00           H
+ATOM     98  HB2 CYS B   6      38.340  10.720  -0.130  1.00  0.00           H
+ATOM     99  SG  CYS B   6      36.540   9.200   0.140  1.00  0.00           S
+ATOM    100  HG  CYS B   6      37.075   8.355   0.120  1.00  0.00           H
+ATOM    101  C   CYS B   6      37.750  13.050  -0.780  1.00  0.00           C
+ATOM    102  O   CYS B   6      38.150  13.610   0.260  1.00  0.00           O
+ATOM    103  N   GLU B   7      37.860  13.480  -2.020  1.00  0.00           N
+ATOM    104  H   GLU B   7      37.400  13.000  -2.760  1.00  0.00           H
+ATOM    105  CA  GLU B   7      38.680  14.690  -2.310  1.00  0.00           C
+ATOM    106  HA  GLU B   7      39.600  14.550  -1.930  1.00  0.00           H
+ATOM    107  CB  GLU B   7      38.780  14.850  -3.820  1.00  0.00           C
+ATOM    108  HB1 GLU B   7      39.230  14.020  -4.170  1.00  0.00           H
+ATOM    109  HB2 GLU B   7      37.850  14.890  -4.170  1.00  0.00           H
+ATOM    110  CG  GLU B   7      39.540  16.050  -4.380  1.00  0.00           C
+ATOM    111  HG1 GLU B   7      39.130  16.870  -3.990  1.00  0.00           H
+ATOM    112  HG2 GLU B   7      40.490  15.980  -4.070  1.00  0.00           H
+ATOM    113  CD  GLU B   7      39.580  16.240  -5.870  1.00  0.00           C
+ATOM    114  OE1 GLU B   7      38.670  15.640  -6.490  1.00  0.00           O
+ATOM    115  OE2 GLU B   7      40.420  16.950  -6.380  1.00  0.00           O
+ATOM    116  C   GLU B   7      38.050  15.930  -1.660  1.00  0.00           C
+ATOM    117  O   GLU B   7      38.740  16.730  -1.010  1.00  0.00           O
+ATOM    118  N   LEU B   8      36.740  16.050  -1.820  1.00  0.00           N
+ATOM    119  H   LEU B   8      36.260  15.350  -2.350  1.00  0.00           H
+ATOM    120  CA  LEU B   8      35.960  17.160  -1.250  1.00  0.00           C
+ATOM    121  HA  LEU B   8      36.400  18.010  -1.560  1.00  0.00           H
+ATOM    122  CB  LEU B   8      34.530  17.170  -1.810  1.00  0.00           C
+ATOM    123  HB1 LEU B   8      34.570  17.220  -2.810  1.00  0.00           H
+ATOM    124  HB2 LEU B   8      34.060  16.330  -1.530  1.00  0.00           H
+ATOM    125  CG  LEU B   8      33.720  18.350  -1.310  1.00  0.00           C
+ATOM    126  HG  LEU B   8      33.780  18.420  -0.310  1.00  0.00           H
+ATOM    127  CD1 LEU B   8      34.300  19.660  -1.840  1.00  0.00           C
+ATOM    128 1HD1 LEU B   8      33.760  20.430  -1.500  1.00  0.00           H
+ATOM    129 2HD1 LEU B   8      35.240  19.750  -1.530  1.00  0.00           H
+ATOM    130 3HD1 LEU B   8      34.270  19.650  -2.840  1.00  0.00           H
+ATOM    131  CD2 LEU B   8      32.250  18.140  -1.600  1.00  0.00           C
+ATOM    132 1HD2 LEU B   8      31.720  18.930  -1.260  1.00  0.00           H
+ATOM    133 2HD2 LEU B   8      32.110  18.050  -2.580  1.00  0.00           H
+ATOM    134 3HD2 LEU B   8      31.930  17.310  -1.140  1.00  0.00           H
+ATOM    135  C   LEU B   8      36.050  17.130   0.270  1.00  0.00           C
+ATOM    136  O   LEU B   8      36.160  18.170   0.920  1.00  0.00           O
+ATOM    137  N   ALA B   9      35.750  15.980   0.830  1.00  0.00           N
+ATOM    138  H   ALA B   9      35.460  15.220   0.240  1.00  0.00           H
+ATOM    139  CA  ALA B   9      35.840  15.760   2.280  1.00  0.00           C
+ATOM    140  HA  ALA B   9      35.080  16.260   2.690  1.00  0.00           H
+ATOM    141  CB  ALA B   9      35.660  14.290   2.620  1.00  0.00           C
+ATOM    142  HB1 ALA B   9      35.720  14.160   3.610  1.00  0.00           H
+ATOM    143  HB2 ALA B   9      34.760  13.980   2.300  1.00  0.00           H
+ATOM    144  HB3 ALA B   9      36.370  13.750   2.180  1.00  0.00           H
+ATOM    145  C   ALA B   9      37.140  16.310   2.840  1.00  0.00           C
+ATOM    146  O   ALA B   9      37.150  16.980   3.900  1.00  0.00           O
+ATOM    147  N   ALA B  10      38.270  15.980   2.200  1.00  0.00           N
+ATOM    148  H   ALA B  10      38.200  15.390   1.400  1.00  0.00           H
+ATOM    149  CA  ALA B  10      39.610  16.430   2.620  1.00  0.00           C
+ATOM    150  HA  ALA B  10      39.690  16.190   3.580  1.00  0.00           H
+ATOM    151  CB  ALA B  10      40.710  15.710   1.840  1.00  0.00           C
+ATOM    152  HB1 ALA B  10      41.600  16.030   2.150  1.00  0.00           H
+ATOM    153  HB2 ALA B  10      40.640  14.720   2.010  1.00  0.00           H
+ATOM    154  HB3 ALA B  10      40.600  15.890   0.860  1.00  0.00           H
+ATOM    155  C   ALA B  10      39.740  17.940   2.460  1.00  0.00           C
+ATOM    156  O   ALA B  10      40.190  18.500   3.470  1.00  0.00           O
+TER
+ENDMDL
diff --git a/src/gromacs/trajectoryanalysis/tests/lysozyme.top b/src/gromacs/trajectoryanalysis/tests/lysozyme.top
new file mode 100644 (file)
index 0000000..a80dfc9
--- /dev/null
@@ -0,0 +1,1465 @@
+; Include forcefield parameters
+#include "oplsaa.ff/forcefield.itp"
+
+[ moleculetype ]
+; Name            nrexcl
+Protein_chain_B     3
+
+[ atoms ]
+;   nr       type  resnr residue  atom   cgnr     charge       mass  typeB    chargeB      massB
+; residue   1 LYS rtp LYSH q +2.0
+     1   opls_287      1    LYS      N      1       -0.3    14.0027   ; qtot -0.3
+     2   opls_290      1    LYS     H1      1       0.33      1.008   ; qtot 0.03
+     3   opls_290      1    LYS     H2      1       0.33      1.008   ; qtot 0.36
+     4   opls_290      1    LYS     H3      1       0.33      1.008   ; qtot 0.69
+     5  opls_293B      1    LYS     CA      1       0.25     12.011   ; qtot 0.94
+     6   opls_140      1    LYS     HA      1       0.06      1.008   ; qtot 1
+     7   opls_136      1    LYS     CB      2      -0.12     12.011   ; qtot 0.88
+     8   opls_140      1    LYS    HB1      2       0.06      1.008   ; qtot 0.94
+     9   opls_140      1    LYS    HB2      2       0.06      1.008   ; qtot 1
+    10   opls_136      1    LYS     CG      3      -0.12     12.011   ; qtot 0.88
+    11   opls_140      1    LYS    HG1      3       0.06      1.008   ; qtot 0.94
+    12   opls_140      1    LYS    HG2      3       0.06      1.008   ; qtot 1
+    13   opls_136      1    LYS     CD      4      -0.12     12.011   ; qtot 0.88
+    14   opls_140      1    LYS    HD1      4       0.06      1.008   ; qtot 0.94
+    15   opls_140      1    LYS    HD2      4       0.06      1.008   ; qtot 1
+    16   opls_292      1    LYS     CE      5       0.19     12.011   ; qtot 1.19
+    17   opls_140      1    LYS    HE1      5       0.06      1.008   ; qtot 1.25
+    18   opls_140      1    LYS    HE2      5       0.06      1.008   ; qtot 1.31
+    19   opls_287      1    LYS     NZ      6       -0.3    14.0067   ; qtot 1.01
+    20   opls_290      1    LYS    HZ1      6       0.33      1.008   ; qtot 1.34
+    21   opls_290      1    LYS    HZ2      6       0.33      1.008   ; qtot 1.67
+    22   opls_290      1    LYS    HZ3      6       0.33      1.008   ; qtot 2
+    23   opls_235      1    LYS      C      7        0.5     12.011   ; qtot 2.5
+    24   opls_236      1    LYS      O      7       -0.5    15.9994   ; qtot 2
+; residue   2 VAL rtp VAL  q  0.0
+    25   opls_238      2    VAL      N      8       -0.5    14.0067   ; qtot 1.5
+    26   opls_241      2    VAL      H      8        0.3      1.008   ; qtot 1.8
+    27  opls_224B      2    VAL     CA      8       0.14     12.011   ; qtot 1.94
+    28   opls_140      2    VAL     HA      8       0.06      1.008   ; qtot 2
+    29   opls_137      2    VAL     CB      9      -0.06     12.011   ; qtot 1.94
+    30   opls_140      2    VAL     HB      9       0.06      1.008   ; qtot 2
+    31   opls_135      2    VAL    CG1     10      -0.18     12.011   ; qtot 1.82
+    32   opls_140      2    VAL   HG11     10       0.06      1.008   ; qtot 1.88
+    33   opls_140      2    VAL   HG12     10       0.06      1.008   ; qtot 1.94
+    34   opls_140      2    VAL   HG13     10       0.06      1.008   ; qtot 2
+    35   opls_135      2    VAL    CG2     11      -0.18     12.011   ; qtot 1.82
+    36   opls_140      2    VAL   HG21     11       0.06      1.008   ; qtot 1.88
+    37   opls_140      2    VAL   HG22     11       0.06      1.008   ; qtot 1.94
+    38   opls_140      2    VAL   HG23     11       0.06      1.008   ; qtot 2
+    39   opls_235      2    VAL      C     12        0.5     12.011   ; qtot 2.5
+    40   opls_236      2    VAL      O     12       -0.5    15.9994   ; qtot 2
+; residue   3 PHE rtp PHE  q  0.0
+    41   opls_238      3    PHE      N     13       -0.5    14.0067   ; qtot 1.5
+    42   opls_241      3    PHE      H     13        0.3      1.008   ; qtot 1.8
+    43  opls_224B      3    PHE     CA     13       0.14     12.011   ; qtot 1.94
+    44   opls_140      3    PHE     HA     13       0.06      1.008   ; qtot 2
+    45   opls_149      3    PHE     CB     14     -0.005     12.011   ; qtot 1.995
+    46   opls_140      3    PHE    HB1     14       0.06      1.008   ; qtot 2.055
+    47   opls_140      3    PHE    HB2     14       0.06      1.008   ; qtot 2.115
+    48   opls_145      3    PHE     CG     14     -0.115     12.011   ; qtot 2
+    49   opls_145      3    PHE    CD1     15     -0.115     12.011   ; qtot 1.885
+    50   opls_146      3    PHE    HD1     15      0.115      1.008   ; qtot 2
+    51   opls_145      3    PHE    CD2     16     -0.115     12.011   ; qtot 1.885
+    52   opls_146      3    PHE    HD2     16      0.115      1.008   ; qtot 2
+    53   opls_145      3    PHE    CE1     17     -0.115     12.011   ; qtot 1.885
+    54   opls_146      3    PHE    HE1     17      0.115      1.008   ; qtot 2
+    55   opls_145      3    PHE    CE2     18     -0.115     12.011   ; qtot 1.885
+    56   opls_146      3    PHE    HE2     18      0.115      1.008   ; qtot 2
+    57   opls_145      3    PHE     CZ     19     -0.115     12.011   ; qtot 1.885
+    58   opls_146      3    PHE     HZ     19      0.115      1.008   ; qtot 2
+    59   opls_235      3    PHE      C     20        0.5     12.011   ; qtot 2.5
+    60   opls_236      3    PHE      O     20       -0.5    15.9994   ; qtot 2
+; residue   4 GLY rtp GLY  q  0.0
+    61   opls_238      4    GLY      N     21       -0.5    14.0067   ; qtot 1.5
+    62   opls_241      4    GLY      H     21        0.3      1.008   ; qtot 1.8
+    63  opls_223B      4    GLY     CA     21       0.08     12.011   ; qtot 1.88
+    64   opls_140      4    GLY    HA1     21       0.06      1.008   ; qtot 1.94
+    65   opls_140      4    GLY    HA2     21       0.06      1.008   ; qtot 2
+    66   opls_235      4    GLY      C     22        0.5     12.011   ; qtot 2.5
+    67   opls_236      4    GLY      O     22       -0.5    15.9994   ; qtot 2
+; residue   5 ARG rtp ARG  q +1.0
+    68   opls_238      5    ARG      N     23       -0.5    14.0067   ; qtot 1.5
+    69   opls_241      5    ARG      H     23        0.3      1.008   ; qtot 1.8
+    70  opls_224B      5    ARG     CA     23       0.14     12.011   ; qtot 1.94
+    71   opls_140      5    ARG     HA     23       0.06      1.008   ; qtot 2
+    72   opls_136      5    ARG     CB     24      -0.12     12.011   ; qtot 1.88
+    73   opls_140      5    ARG    HB1     24       0.06      1.008   ; qtot 1.94
+    74   opls_140      5    ARG    HB2     24       0.06      1.008   ; qtot 2
+    75   opls_308      5    ARG     CG     25      -0.05     12.011   ; qtot 1.95
+    76   opls_140      5    ARG    HG1     25       0.06      1.008   ; qtot 2.01
+    77   opls_140      5    ARG    HG2     25       0.06      1.008   ; qtot 2.07
+    78   opls_307      5    ARG     CD     26       0.19     12.011   ; qtot 2.26
+    79   opls_140      5    ARG    HD1     26       0.06      1.008   ; qtot 2.32
+    80   opls_140      5    ARG    HD2     26       0.06      1.008   ; qtot 2.38
+    81   opls_303      5    ARG     NE     27       -0.7    14.0067   ; qtot 1.68
+    82   opls_304      5    ARG     HE     27       0.44      1.008   ; qtot 2.12
+    83   opls_302      5    ARG     CZ     27       0.64     12.011   ; qtot 2.76
+    84   opls_300      5    ARG    NH1     28       -0.8    14.0067   ; qtot 1.96
+    85   opls_301      5    ARG   HH11     28       0.46      1.008   ; qtot 2.42
+    86   opls_301      5    ARG   HH12     28       0.46      1.008   ; qtot 2.88
+    87   opls_300      5    ARG    NH2     29       -0.8    14.0067   ; qtot 2.08
+    88   opls_301      5    ARG   HH21     29       0.46      1.008   ; qtot 2.54
+    89   opls_301      5    ARG   HH22     29       0.46      1.008   ; qtot 3
+    90   opls_235      5    ARG      C     30        0.5     12.011   ; qtot 3.5
+    91   opls_236      5    ARG      O     30       -0.5    15.9994   ; qtot 3
+; residue   6 CYS rtp CYSH q  0.0
+    92   opls_238      6    CYS      N     31       -0.5    14.0067   ; qtot 2.5
+    93   opls_241      6    CYS      H     31        0.3      1.008   ; qtot 2.8
+    94  opls_224B      6    CYS     CA     31       0.14     12.011   ; qtot 2.94
+    95   opls_140      6    CYS     HA     31       0.06      1.008   ; qtot 3
+    96   opls_206      6    CYS     CB     32       0.06     12.011   ; qtot 3.06
+    97   opls_140      6    CYS    HB1     32       0.06      1.008   ; qtot 3.12
+    98   opls_140      6    CYS    HB2     32       0.06      1.008   ; qtot 3.18
+    99   opls_200      6    CYS     SG     33     -0.335      32.06   ; qtot 2.845
+   100   opls_204      6    CYS     HG     33      0.155      1.008   ; qtot 3
+   101   opls_235      6    CYS      C     34        0.5     12.011   ; qtot 3.5
+   102   opls_236      6    CYS      O     34       -0.5    15.9994   ; qtot 3
+; residue   7 GLU rtp GLU  q -1.0
+   103   opls_238      7    GLU      N     35       -0.5    14.0067   ; qtot 2.5
+   104   opls_241      7    GLU      H     35        0.3      1.008   ; qtot 2.8
+   105  opls_224B      7    GLU     CA     35       0.14     12.011   ; qtot 2.94
+   106   opls_140      7    GLU     HA     35       0.06      1.008   ; qtot 3
+   107   opls_136      7    GLU     CB     36      -0.12     12.011   ; qtot 2.88
+   108   opls_140      7    GLU    HB1     36       0.06      1.008   ; qtot 2.94
+   109   opls_140      7    GLU    HB2     36       0.06      1.008   ; qtot 3
+   110   opls_274      7    GLU     CG     37      -0.22     12.011   ; qtot 2.78
+   111   opls_140      7    GLU    HG1     37       0.06      1.008   ; qtot 2.84
+   112   opls_140      7    GLU    HG2     37       0.06      1.008   ; qtot 2.9
+   113   opls_271      7    GLU     CD     38        0.7     12.011   ; qtot 3.6
+   114   opls_272      7    GLU    OE1     38       -0.8    15.9994   ; qtot 2.8
+   115   opls_272      7    GLU    OE2     38       -0.8    15.9994   ; qtot 2
+   116   opls_235      7    GLU      C     39        0.5     12.011   ; qtot 2.5
+   117   opls_236      7    GLU      O     39       -0.5    15.9994   ; qtot 2
+; residue   8 LEU rtp LEU  q  0.0
+   118   opls_238      8    LEU      N     40       -0.5    14.0067   ; qtot 1.5
+   119   opls_241      8    LEU      H     40        0.3      1.008   ; qtot 1.8
+   120  opls_224B      8    LEU     CA     40       0.14     12.011   ; qtot 1.94
+   121   opls_140      8    LEU     HA     40       0.06      1.008   ; qtot 2
+   122   opls_136      8    LEU     CB     41      -0.12     12.011   ; qtot 1.88
+   123   opls_140      8    LEU    HB1     41       0.06      1.008   ; qtot 1.94
+   124   opls_140      8    LEU    HB2     41       0.06      1.008   ; qtot 2
+   125   opls_137      8    LEU     CG     42      -0.06     12.011   ; qtot 1.94
+   126   opls_140      8    LEU     HG     42       0.06      1.008   ; qtot 2
+   127   opls_135      8    LEU    CD1     43      -0.18     12.011   ; qtot 1.82
+   128   opls_140      8    LEU   HD11     43       0.06      1.008   ; qtot 1.88
+   129   opls_140      8    LEU   HD12     43       0.06      1.008   ; qtot 1.94
+   130   opls_140      8    LEU   HD13     43       0.06      1.008   ; qtot 2
+   131   opls_135      8    LEU    CD2     44      -0.18     12.011   ; qtot 1.82
+   132   opls_140      8    LEU   HD21     44       0.06      1.008   ; qtot 1.88
+   133   opls_140      8    LEU   HD22     44       0.06      1.008   ; qtot 1.94
+   134   opls_140      8    LEU   HD23     44       0.06      1.008   ; qtot 2
+   135   opls_235      8    LEU      C     45        0.5     12.011   ; qtot 2.5
+   136   opls_236      8    LEU      O     45       -0.5    15.9994   ; qtot 2
+; residue   9 ALA rtp ALA  q  0.0
+   137   opls_238      9    ALA      N     46       -0.5    14.0067   ; qtot 1.5
+   138   opls_241      9    ALA      H     46        0.3      1.008   ; qtot 1.8
+   139  opls_224B      9    ALA     CA     46       0.14     12.011   ; qtot 1.94
+   140   opls_140      9    ALA     HA     46       0.06      1.008   ; qtot 2
+   141   opls_135      9    ALA     CB     47      -0.18     12.011   ; qtot 1.82
+   142   opls_140      9    ALA    HB1     47       0.06      1.008   ; qtot 1.88
+   143   opls_140      9    ALA    HB2     47       0.06      1.008   ; qtot 1.94
+   144   opls_140      9    ALA    HB3     47       0.06      1.008   ; qtot 2
+   145   opls_235      9    ALA      C     48        0.5     12.011   ; qtot 2.5
+   146   opls_236      9    ALA      O     48       -0.5    15.9994   ; qtot 2
+; residue  10 ALA rtp ALA  q  0.0
+   147   opls_238     10    ALA      N     49       -0.5    14.0067   ; qtot 1.5
+   148   opls_241     10    ALA      H     49        0.3      1.008   ; qtot 1.8
+   149  opls_224B     10    ALA     CA     49       0.14     12.011   ; qtot 1.94
+   150   opls_140     10    ALA     HA     49       0.06      1.008   ; qtot 2
+   151   opls_135     10    ALA     CB     50      -0.18     12.011   ; qtot 1.82
+   152   opls_140     10    ALA    HB1     50       0.06      1.008   ; qtot 1.88
+   153   opls_140     10    ALA    HB2     50       0.06      1.008   ; qtot 1.94
+   154   opls_140     10    ALA    HB3     50       0.06      1.008   ; qtot 2
+   155   opls_235     10    ALA      C     51        0.5     12.011   ; qtot 2.5
+   156   opls_236     10    ALA      O     51       -0.5    15.9994   ; qtot 2
+
+[ bonds ]
+;  ai    aj funct            c0            c1            c2            c3
+    1     2     1
+    1     3     1
+    1     4     1
+    1     5     1
+    5     6     1
+    5     7     1
+    5    23     1
+    7     8     1
+    7     9     1
+    7    10     1
+   10    11     1
+   10    12     1
+   10    13     1
+   13    14     1
+   13    15     1
+   13    16     1
+   16    17     1
+   16    18     1
+   16    19     1
+   19    20     1
+   19    21     1
+   19    22     1
+   23    24     1
+   23    25     1
+   25    26     1
+   25    27     1
+   27    28     1
+   27    29     1
+   27    39     1
+   29    30     1
+   29    31     1
+   29    35     1
+   31    32     1
+   31    33     1
+   31    34     1
+   35    36     1
+   35    37     1
+   35    38     1
+   39    40     1
+   39    41     1
+   41    42     1
+   41    43     1
+   43    44     1
+   43    45     1
+   43    59     1
+   45    46     1
+   45    47     1
+   45    48     1
+   48    49     1
+   48    51     1
+   49    50     1
+   49    53     1
+   51    52     1
+   51    55     1
+   53    54     1
+   53    57     1
+   55    56     1
+   55    57     1
+   57    58     1
+   59    60     1
+   59    61     1
+   61    62     1
+   61    63     1
+   63    64     1
+   63    65     1
+   63    66     1
+   66    67     1
+   66    68     1
+   68    69     1
+   68    70     1
+   70    71     1
+   70    72     1
+   70    90     1
+   72    73     1
+   72    74     1
+   72    75     1
+   75    76     1
+   75    77     1
+   75    78     1
+   78    79     1
+   78    80     1
+   78    81     1
+   81    82     1
+   81    83     1
+   83    84     1
+   83    87     1
+   84    85     1
+   84    86     1
+   87    88     1
+   87    89     1
+   90    91     1
+   90    92     1
+   92    93     1
+   92    94     1
+   94    95     1
+   94    96     1
+   94   101     1
+   96    97     1
+   96    98     1
+   96    99     1
+   99   100     1
+  101   102     1
+  101   103     1
+  103   104     1
+  103   105     1
+  105   106     1
+  105   107     1
+  105   116     1
+  107   108     1
+  107   109     1
+  107   110     1
+  110   111     1
+  110   112     1
+  110   113     1
+  113   114     1
+  113   115     1
+  116   117     1
+  116   118     1
+  118   119     1
+  118   120     1
+  120   121     1
+  120   122     1
+  120   135     1
+  122   123     1
+  122   124     1
+  122   125     1
+  125   126     1
+  125   127     1
+  125   131     1
+  127   128     1
+  127   129     1
+  127   130     1
+  131   132     1
+  131   133     1
+  131   134     1
+  135   136     1
+  135   137     1
+  137   138     1
+  137   139     1
+  139   140     1
+  139   141     1
+  139   145     1
+  141   142     1
+  141   143     1
+  141   144     1
+  145   146     1
+  145   147     1
+  147   148     1
+  147   149     1
+  149   150     1
+  149   151     1
+  149   155     1
+  151   152     1
+  151   153     1
+  151   154     1
+  155   156     1
+
+[ pairs ]
+;  ai    aj funct            c0            c1            c2            c3
+    1     8     1
+    1     9     1
+    1    10     1
+    1    24     1
+    1    25     1
+    2     6     1
+    2     7     1
+    2    23     1
+    3     6     1
+    3     7     1
+    3    23     1
+    4     6     1
+    4     7     1
+    4    23     1
+    5    11     1
+    5    12     1
+    5    13     1
+    5    26     1
+    5    27     1
+    6     8     1
+    6     9     1
+    6    10     1
+    6    24     1
+    6    25     1
+    7    14     1
+    7    15     1
+    7    16     1
+    7    24     1
+    7    25     1
+    8    11     1
+    8    12     1
+    8    13     1
+    8    23     1
+    9    11     1
+    9    12     1
+    9    13     1
+    9    23     1
+   10    17     1
+   10    18     1
+   10    19     1
+   10    23     1
+   11    14     1
+   11    15     1
+   11    16     1
+   12    14     1
+   12    15     1
+   12    16     1
+   13    20     1
+   13    21     1
+   13    22     1
+   14    17     1
+   14    18     1
+   14    19     1
+   15    17     1
+   15    18     1
+   15    19     1
+   17    20     1
+   17    21     1
+   17    22     1
+   18    20     1
+   18    21     1
+   18    22     1
+   23    28     1
+   23    29     1
+   23    39     1
+   24    26     1
+   24    27     1
+   25    30     1
+   25    31     1
+   25    35     1
+   25    40     1
+   25    41     1
+   26    28     1
+   26    29     1
+   26    39     1
+   27    32     1
+   27    33     1
+   27    34     1
+   27    36     1
+   27    37     1
+   27    38     1
+   27    42     1
+   27    43     1
+   28    30     1
+   28    31     1
+   28    35     1
+   28    40     1
+   28    41     1
+   29    40     1
+   29    41     1
+   30    32     1
+   30    33     1
+   30    34     1
+   30    36     1
+   30    37     1
+   30    38     1
+   30    39     1
+   31    36     1
+   31    37     1
+   31    38     1
+   31    39     1
+   32    35     1
+   33    35     1
+   34    35     1
+   35    39     1
+   39    44     1
+   39    45     1
+   39    59     1
+   40    42     1
+   40    43     1
+   41    46     1
+   41    47     1
+   41    48     1
+   41    60     1
+   41    61     1
+   42    44     1
+   42    45     1
+   42    59     1
+   43    49     1
+   43    51     1
+   43    62     1
+   43    63     1
+   44    46     1
+   44    47     1
+   44    48     1
+   44    60     1
+   44    61     1
+   45    50     1
+   45    52     1
+   45    53     1
+   45    55     1
+   45    60     1
+   45    61     1
+   46    49     1
+   46    51     1
+   46    59     1
+   47    49     1
+   47    51     1
+   47    59     1
+   48    54     1
+   48    56     1
+   48    57     1
+   48    59     1
+   49    52     1
+   49    55     1
+   49    58     1
+   50    51     1
+   50    54     1
+   50    57     1
+   51    53     1
+   51    58     1
+   52    56     1
+   52    57     1
+   53    56     1
+   54    55     1
+   54    58     1
+   56    58     1
+   59    64     1
+   59    65     1
+   59    66     1
+   60    62     1
+   60    63     1
+   61    67     1
+   61    68     1
+   62    64     1
+   62    65     1
+   62    66     1
+   63    69     1
+   63    70     1
+   64    67     1
+   64    68     1
+   65    67     1
+   65    68     1
+   66    71     1
+   66    72     1
+   66    90     1
+   67    69     1
+   67    70     1
+   68    73     1
+   68    74     1
+   68    75     1
+   68    91     1
+   68    92     1
+   69    71     1
+   69    72     1
+   69    90     1
+   70    76     1
+   70    77     1
+   70    78     1
+   70    93     1
+   70    94     1
+   71    73     1
+   71    74     1
+   71    75     1
+   71    91     1
+   71    92     1
+   72    79     1
+   72    80     1
+   72    81     1
+   72    91     1
+   72    92     1
+   73    76     1
+   73    77     1
+   73    78     1
+   73    90     1
+   74    76     1
+   74    77     1
+   74    78     1
+   74    90     1
+   75    82     1
+   75    83     1
+   75    90     1
+   76    79     1
+   76    80     1
+   76    81     1
+   77    79     1
+   77    80     1
+   77    81     1
+   78    84     1
+   78    87     1
+   79    82     1
+   79    83     1
+   80    82     1
+   80    83     1
+   81    85     1
+   81    86     1
+   81    88     1
+   81    89     1
+   82    84     1
+   82    87     1
+   84    88     1
+   84    89     1
+   85    87     1
+   86    87     1
+   90    95     1
+   90    96     1
+   90   101     1
+   91    93     1
+   91    94     1
+   92    97     1
+   92    98     1
+   92    99     1
+   92   102     1
+   92   103     1
+   93    95     1
+   93    96     1
+   93   101     1
+   94   100     1
+   94   104     1
+   94   105     1
+   95    97     1
+   95    98     1
+   95    99     1
+   95   102     1
+   95   103     1
+   96   102     1
+   96   103     1
+   97   100     1
+   97   101     1
+   98   100     1
+   98   101     1
+   99   101     1
+  101   106     1
+  101   107     1
+  101   116     1
+  102   104     1
+  102   105     1
+  103   108     1
+  103   109     1
+  103   110     1
+  103   117     1
+  103   118     1
+  104   106     1
+  104   107     1
+  104   116     1
+  105   111     1
+  105   112     1
+  105   113     1
+  105   119     1
+  105   120     1
+  106   108     1
+  106   109     1
+  106   110     1
+  106   117     1
+  106   118     1
+  107   114     1
+  107   115     1
+  107   117     1
+  107   118     1
+  108   111     1
+  108   112     1
+  108   113     1
+  108   116     1
+  109   111     1
+  109   112     1
+  109   113     1
+  109   116     1
+  110   116     1
+  111   114     1
+  111   115     1
+  112   114     1
+  112   115     1
+  116   121     1
+  116   122     1
+  116   135     1
+  117   119     1
+  117   120     1
+  118   123     1
+  118   124     1
+  118   125     1
+  118   136     1
+  118   137     1
+  119   121     1
+  119   122     1
+  119   135     1
+  120   126     1
+  120   127     1
+  120   131     1
+  120   138     1
+  120   139     1
+  121   123     1
+  121   124     1
+  121   125     1
+  121   136     1
+  121   137     1
+  122   128     1
+  122   129     1
+  122   130     1
+  122   132     1
+  122   133     1
+  122   134     1
+  122   136     1
+  122   137     1
+  123   126     1
+  123   127     1
+  123   131     1
+  123   135     1
+  124   126     1
+  124   127     1
+  124   131     1
+  124   135     1
+  125   135     1
+  126   128     1
+  126   129     1
+  126   130     1
+  126   132     1
+  126   133     1
+  126   134     1
+  127   132     1
+  127   133     1
+  127   134     1
+  128   131     1
+  129   131     1
+  130   131     1
+  135   140     1
+  135   141     1
+  135   145     1
+  136   138     1
+  136   139     1
+  137   142     1
+  137   143     1
+  137   144     1
+  137   146     1
+  137   147     1
+  138   140     1
+  138   141     1
+  138   145     1
+  139   148     1
+  139   149     1
+  140   142     1
+  140   143     1
+  140   144     1
+  140   146     1
+  140   147     1
+  141   146     1
+  141   147     1
+  142   145     1
+  143   145     1
+  144   145     1
+  145   150     1
+  145   151     1
+  145   155     1
+  146   148     1
+  146   149     1
+  147   152     1
+  147   153     1
+  147   154     1
+  147   156     1
+  148   150     1
+  148   151     1
+  148   155     1
+  150   152     1
+  150   153     1
+  150   154     1
+  150   156     1
+  151   156     1
+  152   155     1
+  153   155     1
+  154   155     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
+    1     5     6     1
+    1     5     7     1
+    1     5    23     1
+    6     5     7     1
+    6     5    23     1
+    7     5    23     1
+    5     7     8     1
+    5     7     9     1
+    5     7    10     1
+    8     7     9     1
+    8     7    10     1
+    9     7    10     1
+    7    10    11     1
+    7    10    12     1
+    7    10    13     1
+   11    10    12     1
+   11    10    13     1
+   12    10    13     1
+   10    13    14     1
+   10    13    15     1
+   10    13    16     1
+   14    13    15     1
+   14    13    16     1
+   15    13    16     1
+   13    16    17     1
+   13    16    18     1
+   13    16    19     1
+   17    16    18     1
+   17    16    19     1
+   18    16    19     1
+   16    19    20     1
+   16    19    21     1
+   16    19    22     1
+   20    19    21     1
+   20    19    22     1
+   21    19    22     1
+    5    23    24     1
+    5    23    25     1
+   24    23    25     1
+   23    25    26     1
+   23    25    27     1
+   26    25    27     1
+   25    27    28     1
+   25    27    29     1
+   25    27    39     1
+   28    27    29     1
+   28    27    39     1
+   29    27    39     1
+   27    29    30     1
+   27    29    31     1
+   27    29    35     1
+   30    29    31     1
+   30    29    35     1
+   31    29    35     1
+   29    31    32     1
+   29    31    33     1
+   29    31    34     1
+   32    31    33     1
+   32    31    34     1
+   33    31    34     1
+   29    35    36     1
+   29    35    37     1
+   29    35    38     1
+   36    35    37     1
+   36    35    38     1
+   37    35    38     1
+   27    39    40     1
+   27    39    41     1
+   40    39    41     1
+   39    41    42     1
+   39    41    43     1
+   42    41    43     1
+   41    43    44     1
+   41    43    45     1
+   41    43    59     1
+   44    43    45     1
+   44    43    59     1
+   45    43    59     1
+   43    45    46     1
+   43    45    47     1
+   43    45    48     1
+   46    45    47     1
+   46    45    48     1
+   47    45    48     1
+   45    48    49     1
+   45    48    51     1
+   49    48    51     1
+   48    49    50     1
+   48    49    53     1
+   50    49    53     1
+   48    51    52     1
+   48    51    55     1
+   52    51    55     1
+   49    53    54     1
+   49    53    57     1
+   54    53    57     1
+   51    55    56     1
+   51    55    57     1
+   56    55    57     1
+   53    57    55     1
+   53    57    58     1
+   55    57    58     1
+   43    59    60     1
+   43    59    61     1
+   60    59    61     1
+   59    61    62     1
+   59    61    63     1
+   62    61    63     1
+   61    63    64     1
+   61    63    65     1
+   61    63    66     1
+   64    63    65     1
+   64    63    66     1
+   65    63    66     1
+   63    66    67     1
+   63    66    68     1
+   67    66    68     1
+   66    68    69     1
+   66    68    70     1
+   69    68    70     1
+   68    70    71     1
+   68    70    72     1
+   68    70    90     1
+   71    70    72     1
+   71    70    90     1
+   72    70    90     1
+   70    72    73     1
+   70    72    74     1
+   70    72    75     1
+   73    72    74     1
+   73    72    75     1
+   74    72    75     1
+   72    75    76     1
+   72    75    77     1
+   72    75    78     1
+   76    75    77     1
+   76    75    78     1
+   77    75    78     1
+   75    78    79     1
+   75    78    80     1
+   75    78    81     1
+   79    78    80     1
+   79    78    81     1
+   80    78    81     1
+   78    81    82     1
+   78    81    83     1
+   82    81    83     1
+   81    83    84     1
+   81    83    87     1
+   84    83    87     1
+   83    84    85     1
+   83    84    86     1
+   85    84    86     1
+   83    87    88     1
+   83    87    89     1
+   88    87    89     1
+   70    90    91     1
+   70    90    92     1
+   91    90    92     1
+   90    92    93     1
+   90    92    94     1
+   93    92    94     1
+   92    94    95     1
+   92    94    96     1
+   92    94   101     1
+   95    94    96     1
+   95    94   101     1
+   96    94   101     1
+   94    96    97     1
+   94    96    98     1
+   94    96    99     1
+   97    96    98     1
+   97    96    99     1
+   98    96    99     1
+   96    99   100     1
+   94   101   102     1
+   94   101   103     1
+  102   101   103     1
+  101   103   104     1
+  101   103   105     1
+  104   103   105     1
+  103   105   106     1
+  103   105   107     1
+  103   105   116     1
+  106   105   107     1
+  106   105   116     1
+  107   105   116     1
+  105   107   108     1
+  105   107   109     1
+  105   107   110     1
+  108   107   109     1
+  108   107   110     1
+  109   107   110     1
+  107   110   111     1
+  107   110   112     1
+  107   110   113     1
+  111   110   112     1
+  111   110   113     1
+  112   110   113     1
+  110   113   114     1
+  110   113   115     1
+  114   113   115     1
+  105   116   117     1
+  105   116   118     1
+  117   116   118     1
+  116   118   119     1
+  116   118   120     1
+  119   118   120     1
+  118   120   121     1
+  118   120   122     1
+  118   120   135     1
+  121   120   122     1
+  121   120   135     1
+  122   120   135     1
+  120   122   123     1
+  120   122   124     1
+  120   122   125     1
+  123   122   124     1
+  123   122   125     1
+  124   122   125     1
+  122   125   126     1
+  122   125   127     1
+  122   125   131     1
+  126   125   127     1
+  126   125   131     1
+  127   125   131     1
+  125   127   128     1
+  125   127   129     1
+  125   127   130     1
+  128   127   129     1
+  128   127   130     1
+  129   127   130     1
+  125   131   132     1
+  125   131   133     1
+  125   131   134     1
+  132   131   133     1
+  132   131   134     1
+  133   131   134     1
+  120   135   136     1
+  120   135   137     1
+  136   135   137     1
+  135   137   138     1
+  135   137   139     1
+  138   137   139     1
+  137   139   140     1
+  137   139   141     1
+  137   139   145     1
+  140   139   141     1
+  140   139   145     1
+  141   139   145     1
+  139   141   142     1
+  139   141   143     1
+  139   141   144     1
+  142   141   143     1
+  142   141   144     1
+  143   141   144     1
+  139   145   146     1
+  139   145   147     1
+  146   145   147     1
+  145   147   148     1
+  145   147   149     1
+  148   147   149     1
+  147   149   150     1
+  147   149   151     1
+  147   149   155     1
+  150   149   151     1
+  150   149   155     1
+  151   149   155     1
+  149   151   152     1
+  149   151   153     1
+  149   151   154     1
+  152   151   153     1
+  152   151   154     1
+  153   151   154     1
+  149   155   156     1
+
+[ dihedrals ]
+;  ai    aj    ak    al funct            c0            c1            c2            c3            c4            c5
+    2     1     5     6     3
+    2     1     5     7     3
+    2     1     5    23     3
+    3     1     5     6     3
+    3     1     5     7     3
+    3     1     5    23     3
+    4     1     5     6     3
+    4     1     5     7     3
+    4     1     5    23     3
+    1     5     7    10     3    dih_LYS_chi1_N_C_C_C
+   23     5     7    10     3    dih_LYS_chi1_C_C_C_CO
+    1     5     7     8     3
+    1     5     7     9     3
+    6     5     7     8     3
+    6     5     7     9     3
+    6     5     7    10     3
+   23     5     7     8     3
+   23     5     7     9     3
+    1     5    23    24     3
+    1     5    23    25     3
+    6     5    23    24     3
+    6     5    23    25     3
+    7     5    23    24     3
+    7     5    23    25     3
+    5     7    10    11     3
+    5     7    10    12     3
+    5     7    10    13     3
+    8     7    10    11     3
+    8     7    10    12     3
+    8     7    10    13     3
+    9     7    10    11     3
+    9     7    10    12     3
+    9     7    10    13     3
+    7    10    13    14     3
+    7    10    13    15     3
+    7    10    13    16     3
+   11    10    13    14     3
+   11    10    13    15     3
+   11    10    13    16     3
+   12    10    13    14     3
+   12    10    13    15     3
+   12    10    13    16     3
+   10    13    16    17     3
+   10    13    16    18     3
+   10    13    16    19     3
+   14    13    16    17     3
+   14    13    16    18     3
+   14    13    16    19     3
+   15    13    16    17     3
+   15    13    16    18     3
+   15    13    16    19     3
+   13    16    19    20     3    dih_LYS_chi5_C_C_N_H
+   13    16    19    21     3    dih_LYS_chi5_C_C_N_H
+   13    16    19    22     3    dih_LYS_chi5_C_C_N_H
+   17    16    19    20     3
+   17    16    19    21     3
+   17    16    19    22     3
+   18    16    19    20     3
+   18    16    19    21     3
+   18    16    19    22     3
+    5    23    25    26     3
+    5    23    25    27     3
+   24    23    25    26     3
+   24    23    25    27     3
+   23    25    27    28     3
+   23    25    27    29     3
+   23    25    27    39     3
+   26    25    27    28     3
+   26    25    27    29     3
+   26    25    27    39     3
+   25    27    29    31     3    dih_VAL_chi1_N_C_C_C
+   25    27    29    35     3    dih_VAL_chi1_N_C_C_C
+   39    27    29    31     3    dih_VAL_chi1_C_C_C_CO
+   39    27    29    35     3    dih_VAL_chi1_C_C_C_CO
+   25    27    29    30     3
+   28    27    29    30     3
+   28    27    29    31     3
+   28    27    29    35     3
+   39    27    29    30     3
+   25    27    39    40     3
+   25    27    39    41     3
+   28    27    39    40     3
+   28    27    39    41     3
+   29    27    39    40     3
+   29    27    39    41     3
+   27    29    31    32     3
+   27    29    31    33     3
+   27    29    31    34     3
+   30    29    31    32     3
+   30    29    31    33     3
+   30    29    31    34     3
+   35    29    31    32     3
+   35    29    31    33     3
+   35    29    31    34     3
+   27    29    35    36     3
+   27    29    35    37     3
+   27    29    35    38     3
+   30    29    35    36     3
+   30    29    35    37     3
+   30    29    35    38     3
+   31    29    35    36     3
+   31    29    35    37     3
+   31    29    35    38     3
+   27    39    41    42     3
+   27    39    41    43     3
+   40    39    41    42     3
+   40    39    41    43     3
+   39    41    43    44     3
+   39    41    43    45     3
+   39    41    43    59     3
+   42    41    43    44     3
+   42    41    43    45     3
+   42    41    43    59     3
+   41    43    45    46     3
+   41    43    45    47     3
+   41    43    45    48     3
+   44    43    45    46     3
+   44    43    45    47     3
+   44    43    45    48     3
+   59    43    45    46     3
+   59    43    45    47     3
+   59    43    45    48     3
+   41    43    59    60     3
+   41    43    59    61     3
+   44    43    59    60     3
+   44    43    59    61     3
+   45    43    59    60     3
+   45    43    59    61     3
+   43    45    48    49     3
+   43    45    48    51     3
+   46    45    48    49     3
+   46    45    48    51     3
+   47    45    48    49     3
+   47    45    48    51     3
+   45    48    49    50     3
+   45    48    49    53     3
+   51    48    49    50     3
+   51    48    49    53     3
+   45    48    51    52     3
+   45    48    51    55     3
+   49    48    51    52     3
+   49    48    51    55     3
+   48    49    53    54     3
+   48    49    53    57     3
+   50    49    53    54     3
+   50    49    53    57     3
+   48    51    55    56     3
+   48    51    55    57     3
+   52    51    55    56     3
+   52    51    55    57     3
+   49    53    57    55     3
+   49    53    57    58     3
+   54    53    57    55     3
+   54    53    57    58     3
+   51    55    57    53     3
+   51    55    57    58     3
+   56    55    57    53     3
+   56    55    57    58     3
+   43    59    61    62     3
+   43    59    61    63     3
+   60    59    61    62     3
+   60    59    61    63     3
+   59    61    63    64     3
+   59    61    63    65     3
+   59    61    63    66     3
+   62    61    63    64     3
+   62    61    63    65     3
+   62    61    63    66     3
+   61    63    66    67     3
+   61    63    66    68     3
+   64    63    66    67     3
+   64    63    66    68     3
+   65    63    66    67     3
+   65    63    66    68     3
+   63    66    68    69     3
+   63    66    68    70     3
+   67    66    68    69     3
+   67    66    68    70     3
+   66    68    70    71     3
+   66    68    70    72     3
+   66    68    70    90     3
+   69    68    70    71     3
+   69    68    70    72     3
+   69    68    70    90     3
+   68    70    72    75     3    dih_ARG_chi1_N_C_C_C
+   90    70    72    75     3    dih_ARG_chi1_C_C_C_CO
+   68    70    72    73     3
+   68    70    72    74     3
+   71    70    72    73     3
+   71    70    72    74     3
+   71    70    72    75     3
+   90    70    72    73     3
+   90    70    72    74     3
+   68    70    90    91     3
+   68    70    90    92     3
+   71    70    90    91     3
+   71    70    90    92     3
+   72    70    90    91     3
+   72    70    90    92     3
+   70    72    75    76     3
+   70    72    75    77     3
+   70    72    75    78     3
+   73    72    75    76     3
+   73    72    75    77     3
+   73    72    75    78     3
+   74    72    75    76     3
+   74    72    75    77     3
+   74    72    75    78     3
+   72    75    78    79     3
+   72    75    78    80     3
+   72    75    78    81     3
+   76    75    78    79     3
+   76    75    78    80     3
+   76    75    78    81     3
+   77    75    78    79     3
+   77    75    78    80     3
+   77    75    78    81     3
+   75    78    81    82     3
+   75    78    81    83     3
+   79    78    81    82     3
+   79    78    81    83     3
+   80    78    81    82     3
+   80    78    81    83     3
+   78    81    83    84     3
+   78    81    83    87     3
+   82    81    83    84     3
+   82    81    83    87     3
+   81    83    84    85     3
+   81    83    84    86     3
+   87    83    84    85     3
+   87    83    84    86     3
+   81    83    87    88     3
+   81    83    87    89     3
+   84    83    87    88     3
+   84    83    87    89     3
+   70    90    92    93     3
+   70    90    92    94     3
+   91    90    92    93     3
+   91    90    92    94     3
+   90    92    94    95     3
+   90    92    94    96     3
+   90    92    94   101     3
+   93    92    94    95     3
+   93    92    94    96     3
+   93    92    94   101     3
+   92    94    96    99     3    dih_CYS_chi1_N_C_C_S
+  101    94    96    99     3    dih_CYS_chi1_CO_C_C_S
+   92    94    96    97     3
+   92    94    96    98     3
+   95    94    96    97     3
+   95    94    96    98     3
+   95    94    96    99     3
+  101    94    96    97     3
+  101    94    96    98     3
+   92    94   101   102     3
+   92    94   101   103     3
+   95    94   101   102     3
+   95    94   101   103     3
+   96    94   101   102     3
+   96    94   101   103     3
+   94    96    99   100     3
+   97    96    99   100     3
+   98    96    99   100     3
+   94   101   103   104     3
+   94   101   103   105     3
+  102   101   103   104     3
+  102   101   103   105     3
+  101   103   105   106     3
+  101   103   105   107     3
+  101   103   105   116     3
+  104   103   105   106     3
+  104   103   105   107     3
+  104   103   105   116     3
+  103   105   107   110     3    dih_GLU_chi1_N_C_C_C
+  116   105   107   110     3    dih_GLU_chi1_C_C_C_CO
+  103   105   107   108     3
+  103   105   107   109     3
+  106   105   107   108     3
+  106   105   107   109     3
+  106   105   107   110     3
+  116   105   107   108     3
+  116   105   107   109     3
+  103   105   116   117     3
+  103   105   116   118     3
+  106   105   116   117     3
+  106   105   116   118     3
+  107   105   116   117     3
+  107   105   116   118     3
+  105   107   110   111     3
+  105   107   110   112     3
+  105   107   110   113     3
+  108   107   110   111     3
+  108   107   110   112     3
+  108   107   110   113     3
+  109   107   110   111     3
+  109   107   110   112     3
+  109   107   110   113     3
+  107   110   113   114     3
+  107   110   113   115     3
+  111   110   113   114     3
+  111   110   113   115     3
+  112   110   113   114     3
+  112   110   113   115     3
+  105   116   118   119     3
+  105   116   118   120     3
+  117   116   118   119     3
+  117   116   118   120     3
+  116   118   120   121     3
+  116   118   120   122     3
+  116   118   120   135     3
+  119   118   120   121     3
+  119   118   120   122     3
+  119   118   120   135     3
+  118   120   122   125     3    dih_LEU_chi1_N_C_C_C
+  135   120   122   125     3    dih_LEU_chi1_C_C_C_CO
+  118   120   122   123     3
+  118   120   122   124     3
+  121   120   122   123     3
+  121   120   122   124     3
+  121   120   122   125     3
+  135   120   122   123     3
+  135   120   122   124     3
+  118   120   135   136     3
+  118   120   135   137     3
+  121   120   135   136     3
+  121   120   135   137     3
+  122   120   135   136     3
+  122   120   135   137     3
+  120   122   125   126     3
+  120   122   125   127     3
+  120   122   125   131     3
+  123   122   125   126     3
+  123   122   125   127     3
+  123   122   125   131     3
+  124   122   125   126     3
+  124   122   125   127     3
+  124   122   125   131     3
+  122   125   127   128     3
+  122   125   127   129     3
+  122   125   127   130     3
+  126   125   127   128     3
+  126   125   127   129     3
+  126   125   127   130     3
+  131   125   127   128     3
+  131   125   127   129     3
+  131   125   127   130     3
+  122   125   131   132     3
+  122   125   131   133     3
+  122   125   131   134     3
+  126   125   131   132     3
+  126   125   131   133     3
+  126   125   131   134     3
+  127   125   131   132     3
+  127   125   131   133     3
+  127   125   131   134     3
+  120   135   137   138     3
+  120   135   137   139     3
+  136   135   137   138     3
+  136   135   137   139     3
+  135   137   139   140     3
+  135   137   139   141     3
+  135   137   139   145     3
+  138   137   139   140     3
+  138   137   139   141     3
+  138   137   139   145     3
+  137   139   141   142     3
+  137   139   141   143     3
+  137   139   141   144     3
+  140   139   141   142     3
+  140   139   141   143     3
+  140   139   141   144     3
+  145   139   141   142     3
+  145   139   141   143     3
+  145   139   141   144     3
+  137   139   145   146     3
+  137   139   145   147     3
+  140   139   145   146     3
+  140   139   145   147     3
+  141   139   145   146     3
+  141   139   145   147     3
+  139   145   147   148     3
+  139   145   147   149     3
+  146   145   147   148     3
+  146   145   147   149     3
+  145   147   149   150     3
+  145   147   149   151     3
+  145   147   149   155     3
+  148   147   149   150     3
+  148   147   149   151     3
+  148   147   149   155     3
+  147   149   151   152     3
+  147   149   151   153     3
+  147   149   151   154     3
+  150   149   151   152     3
+  150   149   151   153     3
+  150   149   151   154     3
+  155   149   151   152     3
+  155   149   151   153     3
+  155   149   151   154     3
+  147   149   155   156     3
+  150   149   155   156     3
+  151   149   155   156     3
+
+[ dihedrals ]
+;  ai    aj    ak    al funct            c0            c1            c2            c3
+    5    25    23    24     1    improper_O_C_X_Y
+   23    27    25    26     1    improper_Z_N_X_Y
+   27    41    39    40     1    improper_O_C_X_Y
+   39    43    41    42     1    improper_Z_N_X_Y
+   43    61    59    60     1    improper_O_C_X_Y
+   45    48    51    49     1    improper_Z_CA_X_Y
+   48    53    49    50     1    improper_Z_CA_X_Y
+   48    55    51    52     1    improper_Z_CA_X_Y
+   49    57    53    54     1    improper_Z_CA_X_Y
+   51    57    55    56     1    improper_Z_CA_X_Y
+   53    55    57    58     1    improper_Z_CA_X_Y
+   59    63    61    62     1    improper_Z_N_X_Y
+   63    68    66    67     1    improper_O_C_X_Y
+   66    70    68    69     1    improper_Z_N_X_Y
+   70    92    90    91     1    improper_O_C_X_Y
+   78    83    81    82     1    improper_Z_N_X_Y
+   81    84    83    87     1    improper_O_C_X_Y
+   83    85    84    86     1    improper_Z_N_X_Y
+   83    88    87    89     1    improper_Z_N_X_Y
+   90    94    92    93     1    improper_Z_N_X_Y
+   94   103   101   102     1    improper_O_C_X_Y
+  101   105   103   104     1    improper_Z_N_X_Y
+  105   118   116   117     1    improper_O_C_X_Y
+  110   114   113   115     1    improper_O_C_X_Y
+  116   120   118   119     1    improper_Z_N_X_Y
+  120   137   135   136     1    improper_O_C_X_Y
+  135   139   137   138     1    improper_Z_N_X_Y
+  139   147   145   146     1    improper_O_C_X_Y
+  145   149   147   148     1    improper_Z_N_X_Y
+
+[ system ]
+; Name
+First 10 residues from 1AKI
+
+[ molecules ]
+; Compound        #mols
+Protein_chain_B     1
index 0dd6cc3b1567efdb462a67bc494b24e703ee1537..90426b0711cb2a940f1c06fd85e8115185b5d538 100644 (file)
@@ -9,7 +9,7 @@
         <DataValues>
           <Int Name="Count">2</Int>
           <DataValue>
-            <Real Name="Value">11.879942829725929</Real>
+            <Real Name="Value">11.90491849132197</Real>
           </DataValue>
           <DataValue>
             <Real Name="Value">2.2198340537623622</Real>
@@ -21,7 +21,7 @@
       <DataFrame Name="Frame0">
         <Real Name="X">0</Real>
         <DataValues>
-          <Int Name="Count">155</Int>
+          <Int Name="Count">156</Int>
           <Int Name="DataSet">0</Int>
           <DataValue>
             <Real Name="Value">0.034174637584831476</Real>
             <Real Name="Value">0.15927874753700255</Real>
           </DataValue>
           <DataValue>
-            <Real Name="Value">0.40212385965949349</Real>
+            <Real Name="Value">0.24127431579569611</Real>
+          </DataValue>
+          <DataValue>
+            <Real Name="Value">0.1858252054598363</Real>
           </DataValue>
           <DataValue>
             <Real Name="Value">0</Real>
           </DataValue>
         </DataValues>
         <DataValues>
-          <Int Name="Count">155</Int>
+          <Int Name="Count">156</Int>
           <Int Name="DataSet">1</Int>
           <DataValue>
             <Real Name="Value">0.034174637584831476</Real>
             <Real Name="Value">0</Real>
             <Bool Name="Present">false</Bool>
           </DataValue>
+          <DataValue>
+            <Real Name="Value">0</Real>
+            <Bool Name="Present">false</Bool>
+          </DataValue>
           <DataValue>
             <Real Name="Value">0</Real>
           </DataValue>
             <Real Name="Value">1.9788063529899724</Real>
           </DataValue>
           <DataValue>
-            <Real Name="Value">0.78071090715829228</Real>
+            <Real Name="Value">0.80568656875433131</Real>
           </DataValue>
           <DataValue>
             <Real Name="Value">0.81812256327356647</Real>
         <DataValues>
           <Int Name="Count">2</Int>
           <DataValue>
-            <Real Name="Value">2.5505606048765408</Real>
+            <Real Name="Value">2.5541029121676888</Real>
           </DataValue>
           <DataValue>
-            <Real Name="Value">751.90892342131383</Real>
+            <Real Name="Value">751.52137627960565</Real>
           </DataValue>
         </DataValues>
       </DataFrame>
@@ -1223,7 +1230,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row5">
           <Int Name="Length">5</Int>
           <Real>6</Real>
-          <Real>0.781</Real>
+          <Real>0.806</Real>
           <Real>0.000</Real>
           <Real>0.060</Real>
           <Real>0.000</Real>
@@ -2061,7 +2068,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row98">
           <Int Name="Length">5</Int>
           <Real>99</Real>
-          <Real>0.402</Real>
+          <Real>0.241</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2069,7 +2076,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row99">
           <Int Name="Length">5</Int>
           <Real>100</Real>
-          <Real>0.000</Real>
+          <Real>0.186</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2077,17 +2084,17 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row100">
           <Int Name="Length">5</Int>
           <Real>101</Real>
-          <Real>0.033</Real>
           <Real>0.000</Real>
-          <Real>0.033</Real>
+          <Real>0.000</Real>
+          <Real>0.000</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row101">
           <Int Name="Length">5</Int>
           <Real>102</Real>
+          <Real>0.033</Real>
           <Real>0.000</Real>
-          <Real>0.000</Real>
-          <Real>0.000</Real>
+          <Real>0.033</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row102">
@@ -2109,7 +2116,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row104">
           <Int Name="Length">5</Int>
           <Real>105</Real>
-          <Real>0.080</Real>
+          <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2117,7 +2124,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row105">
           <Int Name="Length">5</Int>
           <Real>106</Real>
-          <Real>0.000</Real>
+          <Real>0.080</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2125,7 +2132,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row106">
           <Int Name="Length">5</Int>
           <Real>107</Real>
-          <Real>0.106</Real>
+          <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2133,7 +2140,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row107">
           <Int Name="Length">5</Int>
           <Real>108</Real>
-          <Real>0.000</Real>
+          <Real>0.106</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2157,7 +2164,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row110">
           <Int Name="Length">5</Int>
           <Real>111</Real>
-          <Real>0.159</Real>
+          <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2165,7 +2172,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row111">
           <Int Name="Length">5</Int>
           <Real>112</Real>
-          <Real>0.038</Real>
+          <Real>0.159</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2173,7 +2180,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row112">
           <Int Name="Length">5</Int>
           <Real>113</Real>
-          <Real>0.134</Real>
+          <Real>0.038</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2181,7 +2188,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row113">
           <Int Name="Length">5</Int>
           <Real>114</Real>
-          <Real>0.201</Real>
+          <Real>0.134</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2189,7 +2196,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row114">
           <Int Name="Length">5</Int>
           <Real>115</Real>
-          <Real>0.000</Real>
+          <Real>0.201</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2197,17 +2204,17 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row115">
           <Int Name="Length">5</Int>
           <Real>116</Real>
-          <Real>0.100</Real>
           <Real>0.000</Real>
-          <Real>0.100</Real>
+          <Real>0.000</Real>
+          <Real>0.000</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row116">
           <Int Name="Length">5</Int>
           <Real>117</Real>
+          <Real>0.100</Real>
           <Real>0.000</Real>
-          <Real>0.000</Real>
-          <Real>0.000</Real>
+          <Real>0.100</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row117">
@@ -2269,7 +2276,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row124">
           <Int Name="Length">5</Int>
           <Real>125</Real>
-          <Real>0.053</Real>
+          <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2277,7 +2284,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row125">
           <Int Name="Length">5</Int>
           <Real>126</Real>
-          <Real>0.038</Real>
+          <Real>0.053</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2285,7 +2292,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row126">
           <Int Name="Length">5</Int>
           <Real>127</Real>
-          <Real>0.186</Real>
+          <Real>0.038</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2293,7 +2300,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row127">
           <Int Name="Length">5</Int>
           <Real>128</Real>
-          <Real>0.053</Real>
+          <Real>0.186</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2301,7 +2308,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row128">
           <Int Name="Length">5</Int>
           <Real>129</Real>
-          <Real>0.027</Real>
+          <Real>0.053</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2309,7 +2316,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row129">
           <Int Name="Length">5</Int>
           <Real>130</Real>
-          <Real>0.151</Real>
+          <Real>0.027</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2317,7 +2324,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row130">
           <Int Name="Length">5</Int>
           <Real>131</Real>
-          <Real>0.186</Real>
+          <Real>0.151</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2325,7 +2332,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row131">
           <Int Name="Length">5</Int>
           <Real>132</Real>
-          <Real>0.133</Real>
+          <Real>0.186</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2333,7 +2340,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row132">
           <Int Name="Length">5</Int>
           <Real>133</Real>
-          <Real>0.186</Real>
+          <Real>0.133</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2341,7 +2348,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row133">
           <Int Name="Length">5</Int>
           <Real>134</Real>
-          <Real>0.000</Real>
+          <Real>0.186</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2349,17 +2356,17 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row134">
           <Int Name="Length">5</Int>
           <Real>135</Real>
-          <Real>0.201</Real>
           <Real>0.000</Real>
-          <Real>0.201</Real>
+          <Real>0.000</Real>
+          <Real>0.000</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row135">
           <Int Name="Length">5</Int>
           <Real>136</Real>
+          <Real>0.201</Real>
           <Real>0.000</Real>
-          <Real>0.000</Real>
-          <Real>0.000</Real>
+          <Real>0.201</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row136">
@@ -2381,7 +2388,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row138">
           <Int Name="Length">5</Int>
           <Real>139</Real>
-          <Real>0.159</Real>
+          <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2389,7 +2396,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row139">
           <Int Name="Length">5</Int>
           <Real>140</Real>
-          <Real>0.075</Real>
+          <Real>0.159</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2397,7 +2404,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row140">
           <Int Name="Length">5</Int>
           <Real>141</Real>
-          <Real>0.186</Real>
+          <Real>0.075</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2405,7 +2412,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row141">
           <Int Name="Length">5</Int>
           <Real>142</Real>
-          <Real>0.106</Real>
+          <Real>0.186</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2413,7 +2420,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row142">
           <Int Name="Length">5</Int>
           <Real>143</Real>
-          <Real>0.027</Real>
+          <Real>0.106</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2421,7 +2428,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row143">
           <Int Name="Length">5</Int>
           <Real>144</Real>
-          <Real>0.000</Real>
+          <Real>0.027</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2429,17 +2436,17 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row144">
           <Int Name="Length">5</Int>
           <Real>145</Real>
-          <Real>0.301</Real>
           <Real>0.000</Real>
-          <Real>0.301</Real>
+          <Real>0.000</Real>
+          <Real>0.000</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row145">
           <Int Name="Length">5</Int>
           <Real>146</Real>
+          <Real>0.301</Real>
           <Real>0.000</Real>
-          <Real>0.000</Real>
-          <Real>0.000</Real>
+          <Real>0.301</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row146">
@@ -2461,7 +2468,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row148">
           <Int Name="Length">5</Int>
           <Real>149</Real>
-          <Real>0.159</Real>
+          <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2469,7 +2476,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row149">
           <Int Name="Length">5</Int>
           <Real>150</Real>
-          <Real>0.113</Real>
+          <Real>0.159</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2477,7 +2484,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row150">
           <Int Name="Length">5</Int>
           <Real>151</Real>
-          <Real>0.186</Real>
+          <Real>0.113</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2485,7 +2492,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row151">
           <Int Name="Length">5</Int>
           <Real>152</Real>
-          <Real>0.212</Real>
+          <Real>0.186</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2493,7 +2500,7 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row152">
           <Int Name="Length">5</Int>
           <Real>153</Real>
-          <Real>0.053</Real>
+          <Real>0.212</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
@@ -2501,14 +2508,22 @@ s1 legend "Standard deviation (nm\S2\N)"
         <Sequence Name="Row153">
           <Int Name="Length">5</Int>
           <Real>154</Real>
-          <Real>0.113</Real>
+          <Real>0.053</Real>
+          <Real>0.000</Real>
           <Real>0.000</Real>
-          <Real>0.113</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row154">
           <Int Name="Length">5</Int>
           <Real>155</Real>
+          <Real>0.113</Real>
+          <Real>0.000</Real>
+          <Real>0.113</Real>
+          <Real>0.000</Real>
+        </Sequence>
+        <Sequence Name="Row155">
+          <Int Name="Length">5</Int>
+          <Real>156</Real>
           <Real>0.402</Real>
           <Real>0.000</Real>
           <Real>0.402</Real>
index 1c078b9339bd45770538e87540caa8210f9976d2..91eff34231f0595e1eb2326af0fa4156bd3b0e8a 100644 (file)
@@ -21,7 +21,7 @@
       <DataFrame Name="Frame0">
         <Real Name="X">0</Real>
         <DataValues>
-          <Int Name="Count">155</Int>
+          <Int Name="Count">156</Int>
           <Int Name="DataSet">0</Int>
           <DataValue>
             <Real Name="Value">0.034174637584831476</Real>
             <Real Name="Value">0</Real>
             <Bool Name="Present">false</Bool>
           </DataValue>
+          <DataValue>
+            <Real Name="Value">0</Real>
+            <Bool Name="Present">false</Bool>
+          </DataValue>
           <DataValue>
             <Real Name="Value">0.11321514525374221</Real>
           </DataValue>
           </DataValue>
         </DataValues>
         <DataValues>
-          <Int Name="Count">155</Int>
+          <Int Name="Count">156</Int>
           <Int Name="DataSet">1</Int>
           <DataValue>
             <Real Name="Value">0</Real>
             <Real Name="Value">0</Real>
             <Bool Name="Present">false</Bool>
           </DataValue>
+          <DataValue>
+            <Real Name="Value">0</Real>
+            <Bool Name="Present">false</Bool>
+          </DataValue>
           <DataValue>
             <Real Name="Value">0</Real>
           </DataValue>
index c9c8da82a77a7940678a62b29bd49111855420ce..2a3eadbd62e7302c82f20c00f1736dc1fe4714fe 100644 (file)
@@ -9,7 +9,7 @@
         <DataValues>
           <Int Name="Count">2</Int>
           <DataValue>
-            <Real Name="Value">11.879942829725929</Real>
+            <Real Name="Value">11.90491849132197</Real>
           </DataValue>
           <DataValue>
             <Real Name="Value">7.9341601835821569</Real>
@@ -21,7 +21,7 @@
       <DataFrame Name="Frame0">
         <Real Name="X">0</Real>
         <DataValues>
-          <Int Name="Count">155</Int>
+          <Int Name="Count">156</Int>
           <Int Name="DataSet">0</Int>
           <DataValue>
             <Real Name="Value">0.034174637584831476</Real>
             <Real Name="Value">0.15927874753700255</Real>
           </DataValue>
           <DataValue>
-            <Real Name="Value">0.40212385965949349</Real>
+            <Real Name="Value">0.24127431579569611</Real>
+          </DataValue>
+          <DataValue>
+            <Real Name="Value">0.1858252054598363</Real>
           </DataValue>
           <DataValue>
             <Real Name="Value">0</Real>
           </DataValue>
         </DataValues>
         <DataValues>
-          <Int Name="Count">155</Int>
+          <Int Name="Count">156</Int>
           <Int Name="DataSet">1</Int>
           <DataValue>
             <Real Name="Value">0.034174637584831476</Real>
             <Real Name="Value">0</Real>
             <Bool Name="Present">false</Bool>
           </DataValue>
+          <DataValue>
+            <Real Name="Value">0</Real>
+            <Bool Name="Present">false</Bool>
+          </DataValue>
           <DataValue>
             <Real Name="Value">0</Real>
           </DataValue>
             <Real Name="Value">1.9788063529899724</Real>
           </DataValue>
           <DataValue>
-            <Real Name="Value">0.78071090715829228</Real>
+            <Real Name="Value">0.80568656875433131</Real>
           </DataValue>
           <DataValue>
             <Real Name="Value">0.81812256327356647</Real>
index 0ce293be8562625b0f9058b5269a54d70f920ae0..2827707e538ad8d6eb8a792a4b61fd0e93ea35b0 100644 (file)
@@ -588,115 +588,115 @@ s1 legend "Standard deviation (nm\S2\N)"
         </Sequence>
         <Sequence Name="Row47">
           <Int Name="Length">3</Int>
-          <Real>117</Real>
+          <Real>118</Real>
           <Real>0.273</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row48">
           <Int Name="Length">3</Int>
-          <Real>118</Real>
+          <Real>119</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row49">
           <Int Name="Length">3</Int>
-          <Real>119</Real>
+          <Real>120</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row50">
           <Int Name="Length">3</Int>
-          <Real>120</Real>
+          <Real>121</Real>
           <Real>0.106</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row51">
           <Int Name="Length">3</Int>
-          <Real>121</Real>
+          <Real>122</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row52">
           <Int Name="Length">3</Int>
-          <Real>122</Real>
+          <Real>123</Real>
           <Real>0.080</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row53">
           <Int Name="Length">3</Int>
-          <Real>123</Real>
+          <Real>124</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row54">
           <Int Name="Length">3</Int>
-          <Real>124</Real>
+          <Real>125</Real>
           <Real>0.000</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row55">
           <Int Name="Length">3</Int>
-          <Real>125</Real>
+          <Real>126</Real>
           <Real>0.080</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row56">
           <Int Name="Length">3</Int>
-          <Real>126</Real>
+          <Real>127</Real>
           <Real>0.075</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row57">
           <Int Name="Length">3</Int>
-          <Real>127</Real>
+          <Real>128</Real>
           <Real>0.186</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row58">
           <Int Name="Length">3</Int>
-          <Real>128</Real>
+          <Real>129</Real>
           <Real>0.080</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row59">
           <Int Name="Length">3</Int>
-          <Real>129</Real>
+          <Real>130</Real>
           <Real>0.159</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row60">
           <Int Name="Length">3</Int>
-          <Real>130</Real>
+          <Real>131</Real>
           <Real>0.151</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row61">
           <Int Name="Length">3</Int>
-          <Real>131</Real>
+          <Real>132</Real>
           <Real>0.186</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row62">
           <Int Name="Length">3</Int>
-          <Real>132</Real>
+          <Real>133</Real>
           <Real>0.186</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row63">
           <Int Name="Length">3</Int>
-          <Real>133</Real>
+          <Real>134</Real>
           <Real>0.186</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row64">
           <Int Name="Length">3</Int>
-          <Real>134</Real>
+          <Real>135</Real>
           <Real>0.264</Real>
           <Real>0.000</Real>
         </Sequence>
         <Sequence Name="Row65">
           <Int Name="Length">3</Int>
-          <Real>135</Real>
+          <Real>136</Real>
           <Real>0.435</Real>
           <Real>0.000</Real>
         </Sequence>
index 285f740a0239577bf8dfcd6d1f129c178e2650cd..83ea1e519858579ab7dd98749ca6b3dfb715d036 100644 (file)
@@ -122,94 +122,95 @@ ATOM     96  CB  CYS     6      37.490  10.530  -0.620  1.00  0.00
 ATOM     97  HB1 CYS     6      37.700  10.340  -1.580  1.00  0.00            
 ATOM     98  HB2 CYS     6      38.340  10.720  -0.130  1.00  0.00            
 ATOM     99  SG  CYS     6      36.540   9.200   0.140  1.00  0.00            
-ATOM    100  C   CYS     6      37.750  13.050  -0.780  1.00  0.00            
-ATOM    101  O   CYS     6      38.150  13.610   0.260  1.00  0.00            
-ATOM    102  N   GLU     7      37.860  13.480  -2.020  1.00  0.00            
-ATOM    103  H   GLU     7      37.400  13.000  -2.760  1.00  0.00            
-ATOM    104  CA  GLU     7      38.680  14.690  -2.310  1.00  0.00            
-ATOM    105  HA  GLU     7      39.600  14.550  -1.930  1.00  0.00            
-ATOM    106  CB  GLU     7      38.780  14.850  -3.820  1.00  0.00            
-ATOM    107  HB1 GLU     7      39.230  14.020  -4.170  1.00  0.00            
-ATOM    108  HB2 GLU     7      37.850  14.890  -4.170  1.00  0.00            
-ATOM    109  CG  GLU     7      39.540  16.050  -4.380  1.00  0.00            
-ATOM    110  HG1 GLU     7      39.130  16.870  -3.990  1.00  0.00            
-ATOM    111  HG2 GLU     7      40.490  15.980  -4.070  1.00  0.00            
-ATOM    112  CD  GLU     7      39.580  16.240  -5.870  1.00  0.00            
-ATOM    113  OE1 GLU     7      38.670  15.640  -6.490  1.00  0.00            
-ATOM    114  OE2 GLU     7      40.420  16.950  -6.380  1.00  0.00            
-ATOM    115  C   GLU     7      38.050  15.930  -1.660  1.00  0.00            
-ATOM    116  O   GLU     7      38.740  16.730  -1.010  1.00  0.00            
-ATOM    117  N   LEU     8      36.740  16.050  -1.820  1.00  0.00            
-ATOM    118  H   LEU     8      36.260  15.350  -2.350  1.00  0.00            
-ATOM    119  CA  LEU     8      35.960  17.160  -1.250  1.00  0.00            
-ATOM    120  HA  LEU     8      36.400  18.010  -1.560  1.00  0.00            
-ATOM    121  CB  LEU     8      34.530  17.170  -1.810  1.00  0.00            
-ATOM    122  HB1 LEU     8      34.570  17.220  -2.810  1.00  0.00            
-ATOM    123  HB2 LEU     8      34.060  16.330  -1.530  1.00  0.00            
-ATOM    124  CG  LEU     8      33.720  18.350  -1.310  1.00  0.00            
-ATOM    125  HG  LEU     8      33.780  18.420  -0.310  1.00  0.00            
-ATOM    126  CD1 LEU     8      34.300  19.660  -1.840  1.00  0.00            
-ATOM    127 1HD1 LEU     8      33.760  20.430  -1.500  1.00  0.00            
-ATOM    128 2HD1 LEU     8      35.240  19.750  -1.530  1.00  0.00            
-ATOM    129 3HD1 LEU     8      34.270  19.650  -2.840  1.00  0.00            
-ATOM    130  CD2 LEU     8      32.250  18.140  -1.600  1.00  0.00            
-ATOM    131 1HD2 LEU     8      31.720  18.930  -1.260  1.00  0.00            
-ATOM    132 2HD2 LEU     8      32.110  18.050  -2.580  1.00  0.00            
-ATOM    133 3HD2 LEU     8      31.930  17.310  -1.140  1.00  0.00            
-ATOM    134  C   LEU     8      36.050  17.130   0.270  1.00  0.00            
-ATOM    135  O   LEU     8      36.160  18.170   0.920  1.00  0.00            
-ATOM    136  N   ALA     9      35.750  15.980   0.830  1.00  0.00            
-ATOM    137  H   ALA     9      35.460  15.220   0.240  1.00  0.00            
-ATOM    138  CA  ALA     9      35.840  15.760   2.280  1.00  0.00            
-ATOM    139  HA  ALA     9      35.080  16.260   2.690  1.00  0.00            
-ATOM    140  CB  ALA     9      35.660  14.290   2.620  1.00  0.00            
-ATOM    141  HB1 ALA     9      35.720  14.160   3.610  1.00  0.00            
-ATOM    142  HB2 ALA     9      34.760  13.980   2.300  1.00  0.00            
-ATOM    143  HB3 ALA     9      36.370  13.750   2.180  1.00  0.00            
-ATOM    144  C   ALA     9      37.140  16.310   2.840  1.00  0.00            
-ATOM    145  O   ALA     9      37.150  16.980   3.900  1.00  0.00            
-ATOM    146  N   ALA    10      38.270  15.980   2.200  1.00  0.00            
-ATOM    147  H   ALA    10      38.200  15.390   1.400  1.00  0.00            
-ATOM    148  CA  ALA    10      39.610  16.430   2.620  1.00  0.00            
-ATOM    149  HA  ALA    10      39.690  16.190   3.580  1.00  0.00            
-ATOM    150  CB  ALA    10      40.710  15.710   1.840  1.00  0.00            
-ATOM    151  HB1 ALA    10      41.600  16.030   2.150  1.00  0.00            
-ATOM    152  HB2 ALA    10      40.640  14.720   2.010  1.00  0.00            
-ATOM    153  HB3 ALA    10      40.600  15.890   0.860  1.00  0.00            
-ATOM    154  C   ALA    10      39.740  17.940   2.460  1.00  0.00            
-ATOM    155  O   ALA    10      40.190  18.500   3.470  1.00  0.00            
-ATOM    156  DOT DOT    11      33.016  20.637 -12.533  1.00  0.00            
-ATOM    157  DOT DOT    11      33.225  20.789 -10.661  1.00  0.00            
-ATOM    158  DOT DOT    11      32.462  22.340 -11.427  1.00  0.00            
-ATOM    159  DOT DOT    11      33.569  22.340  -9.636  1.00  0.00            
-ATOM    160  DOT DOT    11      32.721  22.340 -13.299  1.00  0.00            
-ATOM    161  DOT DOT    11      33.016  24.043 -12.533  1.00  0.00            
-ATOM    162  DOT DOT    11      33.225  23.891 -10.661  1.00  0.00            
-ATOM    163  DOT DOT    11      34.545  19.831 -13.299  1.00  0.00            
-ATOM    164  DOT DOT    11      34.465  19.584 -11.427  1.00  0.00            
-ATOM    165  DOT DOT    11      34.807  20.637  -9.636  1.00  0.00            
-ATOM    166  DOT DOT    11      33.911  21.287 -14.324  1.00  0.00            
-ATOM    167  DOT DOT    11      33.911  23.393 -14.324  1.00  0.00            
-ATOM    168  DOT DOT    11      34.545  24.849 -13.299  1.00  0.00            
-ATOM    169  DOT DOT    11      34.465  25.096 -11.427  1.00  0.00            
-ATOM    170  DOT DOT    11      34.807  24.043  -9.636  1.00  0.00            
-ATOM    171  DOT DOT    11      35.913  20.637 -14.324  1.00  0.00            
-ATOM    172  DOT DOT    11      36.255  19.584 -12.533  1.00  0.00            
-ATOM    173  DOT DOT    11      36.175  19.831 -10.661  1.00  0.00            
-ATOM    174  DOT DOT    11      36.809  21.287  -9.636  1.00  0.00            
-ATOM    175  DOT DOT    11      35.360  22.340 -14.930  1.00  0.00            
-ATOM    176  DOT DOT    11      36.809  23.393  -9.636  1.00  0.00            
-ATOM    177  DOT DOT    11      35.360  22.340  -9.030  1.00  0.00            
-ATOM    178  DOT DOT    11      35.913  24.043 -14.324  1.00  0.00            
-ATOM    179  DOT DOT    11      36.255  25.096 -12.533  1.00  0.00            
-ATOM    180  DOT DOT    11      36.175  24.849 -10.661  1.00  0.00            
-ATOM    181  DOT DOT    11      37.495  20.789 -13.299  1.00  0.00            
-ATOM    182  DOT DOT    11      37.704  20.637 -11.427  1.00  0.00            
-ATOM    183  DOT DOT    11      37.151  22.340 -14.324  1.00  0.00            
-ATOM    184  DOT DOT    11      38.258  22.340 -12.533  1.00  0.00            
-ATOM    185  DOT DOT    11      37.999  22.340 -10.661  1.00  0.00            
-ATOM    186  DOT DOT    11      37.495  23.891 -13.299  1.00  0.00            
-ATOM    187  DOT DOT    11      37.704  24.043 -11.427  1.00  0.00            
+ATOM    100  HG  CYS     6      37.070   8.360   0.120  1.00  0.00            
+ATOM    101  C   CYS     6      37.750  13.050  -0.780  1.00  0.00            
+ATOM    102  O   CYS     6      38.150  13.610   0.260  1.00  0.00            
+ATOM    103  N   GLU     7      37.860  13.480  -2.020  1.00  0.00            
+ATOM    104  H   GLU     7      37.400  13.000  -2.760  1.00  0.00            
+ATOM    105  CA  GLU     7      38.680  14.690  -2.310  1.00  0.00            
+ATOM    106  HA  GLU     7      39.600  14.550  -1.930  1.00  0.00            
+ATOM    107  CB  GLU     7      38.780  14.850  -3.820  1.00  0.00            
+ATOM    108  HB1 GLU     7      39.230  14.020  -4.170  1.00  0.00            
+ATOM    109  HB2 GLU     7      37.850  14.890  -4.170  1.00  0.00            
+ATOM    110  CG  GLU     7      39.540  16.050  -4.380  1.00  0.00            
+ATOM    111  HG1 GLU     7      39.130  16.870  -3.990  1.00  0.00            
+ATOM    112  HG2 GLU     7      40.490  15.980  -4.070  1.00  0.00            
+ATOM    113  CD  GLU     7      39.580  16.240  -5.870  1.00  0.00            
+ATOM    114  OE1 GLU     7      38.670  15.640  -6.490  1.00  0.00            
+ATOM    115  OE2 GLU     7      40.420  16.950  -6.380  1.00  0.00            
+ATOM    116  C   GLU     7      38.050  15.930  -1.660  1.00  0.00            
+ATOM    117  O   GLU     7      38.740  16.730  -1.010  1.00  0.00            
+ATOM    118  N   LEU     8      36.740  16.050  -1.820  1.00  0.00            
+ATOM    119  H   LEU     8      36.260  15.350  -2.350  1.00  0.00            
+ATOM    120  CA  LEU     8      35.960  17.160  -1.250  1.00  0.00            
+ATOM    121  HA  LEU     8      36.400  18.010  -1.560  1.00  0.00            
+ATOM    122  CB  LEU     8      34.530  17.170  -1.810  1.00  0.00            
+ATOM    123  HB1 LEU     8      34.570  17.220  -2.810  1.00  0.00            
+ATOM    124  HB2 LEU     8      34.060  16.330  -1.530  1.00  0.00            
+ATOM    125  CG  LEU     8      33.720  18.350  -1.310  1.00  0.00            
+ATOM    126  HG  LEU     8      33.780  18.420  -0.310  1.00  0.00            
+ATOM    127  CD1 LEU     8      34.300  19.660  -1.840  1.00  0.00            
+ATOM    128 1HD1 LEU     8      33.760  20.430  -1.500  1.00  0.00            
+ATOM    129 2HD1 LEU     8      35.240  19.750  -1.530  1.00  0.00            
+ATOM    130 3HD1 LEU     8      34.270  19.650  -2.840  1.00  0.00            
+ATOM    131  CD2 LEU     8      32.250  18.140  -1.600  1.00  0.00            
+ATOM    132 1HD2 LEU     8      31.720  18.930  -1.260  1.00  0.00            
+ATOM    133 2HD2 LEU     8      32.110  18.050  -2.580  1.00  0.00            
+ATOM    134 3HD2 LEU     8      31.930  17.310  -1.140  1.00  0.00            
+ATOM    135  C   LEU     8      36.050  17.130   0.270  1.00  0.00            
+ATOM    136  O   LEU     8      36.160  18.170   0.920  1.00  0.00            
+ATOM    137  N   ALA     9      35.750  15.980   0.830  1.00  0.00            
+ATOM    138  H   ALA     9      35.460  15.220   0.240  1.00  0.00            
+ATOM    139  CA  ALA     9      35.840  15.760   2.280  1.00  0.00            
+ATOM    140  HA  ALA     9      35.080  16.260   2.690  1.00  0.00            
+ATOM    141  CB  ALA     9      35.660  14.290   2.620  1.00  0.00            
+ATOM    142  HB1 ALA     9      35.720  14.160   3.610  1.00  0.00            
+ATOM    143  HB2 ALA     9      34.760  13.980   2.300  1.00  0.00            
+ATOM    144  HB3 ALA     9      36.370  13.750   2.180  1.00  0.00            
+ATOM    145  C   ALA     9      37.140  16.310   2.840  1.00  0.00            
+ATOM    146  O   ALA     9      37.150  16.980   3.900  1.00  0.00            
+ATOM    147  N   ALA    10      38.270  15.980   2.200  1.00  0.00            
+ATOM    148  H   ALA    10      38.200  15.390   1.400  1.00  0.00            
+ATOM    149  CA  ALA    10      39.610  16.430   2.620  1.00  0.00            
+ATOM    150  HA  ALA    10      39.690  16.190   3.580  1.00  0.00            
+ATOM    151  CB  ALA    10      40.710  15.710   1.840  1.00  0.00            
+ATOM    152  HB1 ALA    10      41.600  16.030   2.150  1.00  0.00            
+ATOM    153  HB2 ALA    10      40.640  14.720   2.010  1.00  0.00            
+ATOM    154  HB3 ALA    10      40.600  15.890   0.860  1.00  0.00            
+ATOM    155  C   ALA    10      39.740  17.940   2.460  1.00  0.00            
+ATOM    156  O   ALA    10      40.190  18.500   3.470  1.00  0.00            
+ATOM    157  DOT DOT    11      33.016  20.637 -12.533  1.00  0.00            
+ATOM    158  DOT DOT    11      33.225  20.789 -10.661  1.00  0.00            
+ATOM    159  DOT DOT    11      32.462  22.340 -11.427  1.00  0.00            
+ATOM    160  DOT DOT    11      33.569  22.340  -9.636  1.00  0.00            
+ATOM    161  DOT DOT    11      32.721  22.340 -13.299  1.00  0.00            
+ATOM    162  DOT DOT    11      33.016  24.043 -12.533  1.00  0.00            
+ATOM    163  DOT DOT    11      33.225  23.891 -10.661  1.00  0.00            
+ATOM    164  DOT DOT    11      34.545  19.831 -13.299  1.00  0.00            
+ATOM    165  DOT DOT    11      34.465  19.584 -11.427  1.00  0.00            
+ATOM    166  DOT DOT    11      34.807  20.637  -9.636  1.00  0.00            
+ATOM    167  DOT DOT    11      33.911  21.287 -14.324  1.00  0.00            
+ATOM    168  DOT DOT    11      33.911  23.393 -14.324  1.00  0.00            
+ATOM    169  DOT DOT    11      34.545  24.849 -13.299  1.00  0.00            
+ATOM    170  DOT DOT    11      34.465  25.096 -11.427  1.00  0.00            
+ATOM    171  DOT DOT    11      34.807  24.043  -9.636  1.00  0.00            
+ATOM    172  DOT DOT    11      35.913  20.637 -14.324  1.00  0.00            
+ATOM    173  DOT DOT    11      36.255  19.584 -12.533  1.00  0.00            
+ATOM    174  DOT DOT    11      36.175  19.831 -10.661  1.00  0.00            
+ATOM    175  DOT DOT    11      36.809  21.287  -9.636  1.00  0.00            
+ATOM    176  DOT DOT    11      35.360  22.340 -14.930  1.00  0.00            
+ATOM    177  DOT DOT    11      36.809  23.393  -9.636  1.00  0.00            
+ATOM    178  DOT DOT    11      35.360  22.340  -9.030  1.00  0.00            
+ATOM    179  DOT DOT    11      35.913  24.043 -14.324  1.00  0.00            
+ATOM    180  DOT DOT    11      36.255  25.096 -12.533  1.00  0.00            
+ATOM    181  DOT DOT    11      36.175  24.849 -10.661  1.00  0.00            
+ATOM    182  DOT DOT    11      37.495  20.789 -13.299  1.00  0.00            
+ATOM    183  DOT DOT    11      37.704  20.637 -11.427  1.00  0.00            
+ATOM    184  DOT DOT    11      37.151  22.340 -14.324  1.00  0.00            
+ATOM    185  DOT DOT    11      38.258  22.340 -12.533  1.00  0.00            
+ATOM    186  DOT DOT    11      37.999  22.340 -10.661  1.00  0.00            
+ATOM    187  DOT DOT    11      37.495  23.891 -13.299  1.00  0.00            
+ATOM    188  DOT DOT    11      37.704  24.043 -11.427  1.00  0.00            
 TER
 ENDMDL
 ]]></String>
diff --git a/src/gromacs/trajectoryanalysis/tests/topologyinformation.cpp b/src/gromacs/trajectoryanalysis/tests/topologyinformation.cpp
new file mode 100644 (file)
index 0000000..594f918
--- /dev/null
@@ -0,0 +1,255 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2018, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * 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 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*! \internal \file
+ * \brief
+ * Tests for TopologyInformation
+ *
+ * \author Mark Abraham <mark.j.abraham@gmail.com>
+ * \ingroup module_trajectoryanalysis
+ */
+#include "gmxpre.h"
+
+#include "gromacs/trajectoryanalysis/topologyinformation.h"
+
+#include <gtest/gtest.h>
+
+#include "gromacs/gmxpreprocess/grompp.h"
+#include "gromacs/math/vectypes.h"
+#include "gromacs/topology/topology.h"
+#include "gromacs/utility/arrayref.h"
+#include "gromacs/utility/exceptions.h"
+#include "gromacs/utility/textwriter.h"
+
+#include "testutils/cmdlinetest.h"
+#include "testutils/testfilemanager.h"
+
+#include "moduletest.h"
+
+namespace gmx
+{
+namespace test
+{
+namespace
+{
+
+TEST(TopologyInformation, CantWorkWithoutReadingAFile)
+{
+    TopologyInformation topInfo;
+    EXPECT_FALSE(topInfo.hasTopology());
+    EXPECT_FALSE(topInfo.hasFullTopology());
+    ASSERT_TRUE(topInfo.mtop());
+    EXPECT_EQ(0, topInfo.mtop()->natoms);
+    EXPECT_FALSE(topInfo.expandedTopology());
+    auto atoms1 = topInfo.copyAtoms();
+    EXPECT_TRUE(atoms1);
+    auto atoms2 = topInfo.copyAtoms();
+    ASSERT_TRUE(atoms2);
+    EXPECT_NE(atoms1.get(), atoms2.get());
+    EXPECT_EQ(0, atoms1->nr);
+    EXPECT_EQ(-1, topInfo.ePBC());
+    EXPECT_THROW(topInfo.x().size(), gmx::APIError);
+    EXPECT_THROW(topInfo.v().size(), gmx::APIError);
+    matrix box {{
+                    -2
+                }};
+    topInfo.getBox(box);
+    EXPECT_EQ(0, box[XX][XX]);
+    EXPECT_EQ(0, box[XX][YY]);
+    EXPECT_EQ(0, box[XX][ZZ]);
+    EXPECT_EQ(0, box[YY][XX]);
+    EXPECT_EQ(0, box[YY][YY]);
+    EXPECT_EQ(0, box[YY][ZZ]);
+    EXPECT_EQ(0, box[ZZ][XX]);
+    EXPECT_EQ(0, box[ZZ][YY]);
+    EXPECT_EQ(0, box[ZZ][ZZ]);
+    EXPECT_FALSE(topInfo.name());
+}
+
+//! Common test code to reduce duplication
+void runCommonTests(const TopologyInformation &topInfo, const int numAtoms)
+{
+    EXPECT_TRUE(topInfo.hasTopology());
+    ASSERT_TRUE(topInfo.mtop());
+    EXPECT_EQ(numAtoms, topInfo.mtop()->natoms);
+    // TODO Dump mtop to refdata when that is possible
+    ASSERT_TRUE(topInfo.expandedTopology());
+    auto atoms1 = topInfo.copyAtoms();
+    EXPECT_TRUE(atoms1);
+    auto atoms2 = topInfo.copyAtoms();
+    EXPECT_TRUE(atoms2);
+    // Must be different pointer to a deep copy.
+    EXPECT_NE(atoms1.get(), atoms2.get());
+    auto atoms = topInfo.atoms();
+    // Must be a pointer to a different instance.
+    EXPECT_NE(atoms1.get(), atoms);
+    EXPECT_NE(atoms2.get(), atoms);
+    EXPECT_EQ(numAtoms, topInfo.x().size());
+    EXPECT_EQ(numAtoms, topInfo.v().size());
+    matrix box {{
+                    -2
+                }};
+    topInfo.getBox(box);
+    EXPECT_FLOAT_EQ(5.9062, box[XX][XX]);
+    EXPECT_FLOAT_EQ(0,      box[XX][YY]);
+    EXPECT_FLOAT_EQ(0,      box[XX][ZZ]);
+    EXPECT_FLOAT_EQ(0,      box[YY][XX]);
+    EXPECT_FLOAT_EQ(6.8451, box[YY][YY]);
+    EXPECT_FLOAT_EQ(0,      box[YY][ZZ]);
+    EXPECT_FLOAT_EQ(0,      box[ZZ][XX]);
+    EXPECT_FLOAT_EQ(0,      box[ZZ][YY]);
+    EXPECT_FLOAT_EQ(3.0517, box[ZZ][ZZ]);
+    EXPECT_STREQ("First 10 residues from 1AKI", topInfo.name());
+}
+
+TEST(TopologyInformation, WorksWithGroFile)
+{
+    const int           numAtoms = 156;
+    TopologyInformation topInfo;
+    topInfo.fillFromInputFile(TestFileManager::getInputFilePath("lysozyme.gro"));
+    EXPECT_FALSE(topInfo.hasFullTopology());
+    runCommonTests(topInfo, numAtoms);
+    EXPECT_EQ(-1, topInfo.ePBC());
+
+    // Check the per-atom data
+    auto atoms = topInfo.copyAtoms();
+    ASSERT_EQ(numAtoms, atoms->nr);
+    EXPECT_TRUE(atoms->haveMass);
+    // TODO atommass.dat assumes united atom CA, which is probably not expected behaviour
+    EXPECT_FLOAT_EQ(13.019, atoms->atom[26].m);
+    EXPECT_FALSE(atoms->haveCharge);
+    EXPECT_FALSE(atoms->haveType);
+    EXPECT_EQ(0, atoms->atom[26].type);
+    EXPECT_EQ(0, atoms->atom[26].atomnumber);
+    EXPECT_EQ(1, atoms->atom[26].resind);
+    // gro files don't have the information that pdb files might
+    EXPECT_FALSE(atoms->havePdbInfo);
+    EXPECT_FALSE(atoms->pdbinfo);
+    EXPECT_EQ(10, atoms->nres);
+    ASSERT_TRUE(atoms->resinfo);
+    ASSERT_TRUE(atoms->resinfo[4].name);
+    EXPECT_STREQ("ARG", *atoms->resinfo[4].name);
+    EXPECT_EQ(5, atoms->resinfo[4].nr);
+    EXPECT_EQ(0, atoms->resinfo[4].chainnum);
+    EXPECT_EQ(' ', atoms->resinfo[4].chainid);
+}
+
+TEST(TopologyInformation, WorksWithPdbFile)
+{
+    const int           numAtoms = 156;
+    TopologyInformation topInfo;
+    topInfo.fillFromInputFile(TestFileManager::getInputFilePath("lysozyme.pdb"));
+    EXPECT_FALSE(topInfo.hasFullTopology());
+    runCommonTests(topInfo, numAtoms);
+    // TODO why does this differ from .gro?
+    EXPECT_EQ(0, topInfo.ePBC());
+
+    // Check the per-atom data
+    auto atoms = topInfo.copyAtoms();
+    ASSERT_EQ(numAtoms, atoms->nr);
+    EXPECT_TRUE(atoms->haveMass);
+    // TODO atommass.dat assumes united atom CA, which is probably not expected behaviour
+    EXPECT_FLOAT_EQ(13.019, atoms->atom[26].m);
+    EXPECT_FALSE(atoms->haveCharge);
+    EXPECT_FALSE(atoms->haveType);
+    EXPECT_EQ(0, atoms->atom[26].type);
+    EXPECT_EQ(0, atoms->atom[26].atomnumber);
+    EXPECT_EQ(1, atoms->atom[26].resind);
+    // pdb files can carry more information than gro
+    EXPECT_TRUE(atoms->havePdbInfo);
+    ASSERT_TRUE(atoms->pdbinfo);
+    EXPECT_EQ(10, atoms->nres);
+    ASSERT_TRUE(atoms->resinfo);
+    ASSERT_TRUE(atoms->resinfo[4].name);
+    EXPECT_STREQ("ARG", *atoms->resinfo[4].name);
+    EXPECT_EQ(5, atoms->resinfo[4].nr);
+    EXPECT_EQ(0, atoms->resinfo[4].chainnum);
+    EXPECT_EQ('B', atoms->resinfo[4].chainid);
+}
+
+TEST(TopologyInformation, WorksWithTprFromPdbFile)
+{
+    TestFileManager fileManager;
+
+    // Make the tpr file to use
+    std::string       name             = "lysozyme";
+    const std::string mdpInputFileName = fileManager.getTemporaryFilePath(name + ".mdp");
+    // Ensure the seeds have a value so that the resulting .tpr dump
+    // is reproducible.
+    TextWriter::writeFileFromString(mdpInputFileName, "");
+    std::string tprName = fileManager.getTemporaryFilePath(name + ".tpr");
+    {
+        CommandLine caller;
+        caller.append("grompp");
+        caller.addOption("-f", mdpInputFileName);
+        caller.addOption("-p", TestFileManager::getInputFilePath(name));
+        caller.addOption("-c", TestFileManager::getInputFilePath(name + ".pdb"));
+        caller.addOption("-o", tprName);
+        ASSERT_EQ(0, gmx_grompp(caller.argc(), caller.argv()));
+    }
+
+    const int           numAtoms = 156;
+    TopologyInformation topInfo;
+    topInfo.fillFromInputFile(tprName);
+    EXPECT_TRUE(topInfo.hasFullTopology());
+    runCommonTests(topInfo, numAtoms);
+    // TODO why does this differ from .gro?
+    EXPECT_EQ(0, topInfo.ePBC());
+
+    // Check the per-atom data
+    auto atoms = topInfo.copyAtoms();
+    ASSERT_EQ(numAtoms, atoms->nr);
+    EXPECT_TRUE(atoms->haveMass);
+    EXPECT_FLOAT_EQ(12.011, atoms->atom[26].m);
+    EXPECT_TRUE(atoms->haveCharge);
+    EXPECT_TRUE(atoms->haveType);
+    EXPECT_EQ(2, atoms->atom[26].type);
+    EXPECT_EQ(6, atoms->atom[26].atomnumber);
+    EXPECT_EQ(1, atoms->atom[26].resind);
+    // tpr files also don't carry pdb information
+    EXPECT_FALSE(atoms->havePdbInfo);
+    EXPECT_FALSE(atoms->pdbinfo);
+    EXPECT_EQ(10, atoms->nres);
+    ASSERT_TRUE(atoms->resinfo);
+    ASSERT_TRUE(atoms->resinfo[4].name);
+    EXPECT_STREQ("ARG", *atoms->resinfo[4].name);
+    EXPECT_EQ(5, atoms->resinfo[4].nr);
+    EXPECT_EQ(0, atoms->resinfo[4].chainnum);
+    // In particular, chain ID does not get recorded in the .tpr file
+    EXPECT_EQ(0, atoms->resinfo[4].chainid);
+}
+
+} // namespace
+} // namespace test
+} // namespace gmx
index 7331e4eefb39195196b776dfb5ffaaeac5b62587..917e7c1741aac9a889d896dbfd32cd62a18c8954 100644 (file)
 #include "gromacs/compat/make_unique.h"
 #include "gromacs/fileio/confio.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/pbcutil/rmpbc.h"
 #include "gromacs/topology/mtop_util.h"
 #include "gromacs/topology/topology.h"
 #include "gromacs/utility/arrayref.h"
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/gmxassert.h"
 #include "gromacs/utility/smalloc.h"
+#include "gromacs/utility/unique_cptr.h"
 
 namespace gmx
 {
 
 TopologyInformation::TopologyInformation()
-    : mtop_(nullptr), top_(nullptr), bTop_(false), xtop_(nullptr), boxtop_(), ePBC_(-1)
+    : mtop_(compat::make_unique<gmx_mtop_t>()),
+      hasLoadedMtop_(false),
+      expandedTopology_(nullptr),
+      atoms_ (nullptr),
+      bTop_(false), ePBC_(-1)
 {
 }
 
 
 TopologyInformation::~TopologyInformation()
 {
-    done_top_mtop(top_, mtop_.get());
-    sfree(top_);
-    sfree(xtop_);
-}
-
-
-t_topology *TopologyInformation::topology() const
-{
-    if (top_ == nullptr && mtop_ != nullptr)
-    {
-        snew(top_, 1);
-        *top_ = gmx_mtop_t_to_t_topology(mtop_.get(), false);
-    }
-    return top_;
 }
 
 void TopologyInformation::fillFromInputFile(const std::string &filename)
 {
     mtop_ = gmx::compat::make_unique<gmx_mtop_t>();
+    // TODO When filename is not a .tpr, then using readConfAndAtoms
+    // would be efficient for not doing multiple conversions for
+    // makeAtomsData. However we'd also need to be able to copy the
+    // t_atoms that we'd keep, which we currently can't do.
+    // TODO Once there are fewer callers of the file-reading
+    // functionality, make them read directly into std::vector.
+    rvec *x, *v;
     readConfAndTopology(filename.c_str(), &bTop_, mtop_.get(),
-                        &ePBC_, &xtop_, nullptr,
+                        &ePBC_, &x, &v,
                         boxtop_);
+    xtop_.assign(x, x + mtop_->natoms);
+    vtop_.assign(v, v + mtop_->natoms);
+    sfree(x);
+    sfree(v);
+    hasLoadedMtop_ = true;
     // TODO: Only load this here if the tool actually needs it; selections
     // take care of themselves.
     for (gmx_moltype_t &moltype : mtop_->moltype)
@@ -98,22 +102,99 @@ void TopologyInformation::fillFromInputFile(const std::string &filename)
     }
 }
 
-void
-TopologyInformation::getTopologyConf(rvec **x, matrix box) const
+const gmx_localtop_t *TopologyInformation::expandedTopology() const
 {
-    if (box)
+    // Do lazy initialization
+    if (expandedTopology_ == nullptr && hasTopology())
     {
-        copy_mat(const_cast<rvec *>(boxtop_), box);
+        expandedTopology_.reset(gmx_mtop_generate_local_top(mtop_.get(), false));
     }
-    if (x)
+
+    return expandedTopology_.get();
+}
+
+namespace
+{
+
+//! Helps implement lazy initialization.
+AtomsDataPtr makeAtoms(const TopologyInformation &top_)
+{
+    AtomsDataPtr atoms(new t_atoms);
+    if (top_.hasTopology())
     {
-        if (!xtop_)
-        {
-            *x = nullptr;
-            GMX_THROW(APIError("Topology coordinates requested without setting efUseTopX"));
-        }
-        *x = xtop_;
+        *atoms = gmx_mtop_global_atoms(top_.mtop());
+    }
+    else
+    {
+        init_atom(atoms.get());
+    }
+    return atoms;
+}
+
+}   // namespace
+
+const t_atoms *TopologyInformation::atoms() const
+{
+    // Do lazy initialization
+    if (atoms_ == nullptr)
+    {
+        atoms_ = makeAtoms(*this);
+    }
+
+    return atoms_.get();
+}
+
+AtomsDataPtr TopologyInformation::copyAtoms() const
+{
+    // Note that we do not return atoms_, so that regardless of
+    // whether the user has already used it, or will use it in the
+    // future, any transformation operations on the data structure
+    // returned here cannot have unintended effects.
+    return makeAtoms(*this);
+}
+
+ArrayRef<const RVec>
+TopologyInformation::x() const
+{
+    if (xtop_.empty())
+    {
+        GMX_THROW(APIError("Topology coordinates requested without setting efUseTopX"));
     }
+    return xtop_;
+}
+
+ArrayRef<const RVec>
+TopologyInformation::v() const
+{
+    if (vtop_.empty())
+    {
+        GMX_THROW(APIError("Topology coordinates requested without setting efUseTopV"));
+    }
+    return vtop_;
+}
+
+void
+TopologyInformation::getBox(matrix box) const
+{
+    GMX_RELEASE_ASSERT(box != nullptr, "Must have valid box to fill");
+    copy_mat(const_cast<rvec *>(boxtop_), box);
+}
+
+const char *
+TopologyInformation::name() const
+{
+    if (hasTopology() && mtop_->name)
+    {
+        return *mtop_->name;
+    }
+    return nullptr;
+}
+
+gmx_rmpbc_t gmx_rmpbc_init(const gmx::TopologyInformation &topInfo)
+{
+    GMX_RELEASE_ASSERT(topInfo.hasTopology(), "Cannot remove PBC without a topology");
+
+    return gmx_rmpbc_init(&topInfo.expandedTopology()->idef, topInfo.ePBC(), topInfo.mtop()->natoms);
 }
 
 } // namespace gmx
index 30510afeb0270aa9d1582da83a0605ea1b9a1067..5748029dbccccb1b88726ea9fe297b2f3f9e2b67 100644 (file)
 #ifndef GMX_TRAJECTORYANALYSIS_TOPOLOGYINFORMATION_H
 #define GMX_TRAJECTORYANALYSIS_TOPOLOGYINFORMATION_H
 
+#include <memory>
 #include <string>
+#include <vector>
 
 #include "gromacs/math/vectypes.h"
+#include "gromacs/topology/atoms.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/classhelpers.h"
 
-struct gmx_mtop_t;
-struct t_topology;
+//! Forward declaration
+typedef struct gmx_rmpbc *gmx_rmpbc_t;
 
 namespace gmx
 {
 
+template<typename T> class ArrayRef;
+
 class TopologyInformation;
 class TrajectoryAnalysisRunnerCommon;
 
 /*! \libinternal
- * \brief Topology information passed to a trajectory analysis module.
+ * \brief Topology information available to a trajectory analysis module.
  *
- * This class is used to pass topology information to trajectory analysis
- * modules and to manage memory for them.  Having a single wrapper object
- * instead of passing each item separately makes TrajectoryAnalysisModule
- * interface simpler, and also reduces the need to change existing code if
- * additional information is added.
+ * This class is used to provide topology information to trajectory
+ * analysis modules and to manage memory for them. Having a single
+ * wrapper object instead of passing each item separately makes
+ * TrajectoryAnalysisModule interface simpler, and also reduces the
+ * need to change existing code if additional information is added.
  *
  * It is intended that eventually most clients of this class will be
  * analysis tools ported to the new analysis framework, but we will
@@ -75,13 +81,25 @@ class TrajectoryAnalysisRunnerCommon;
  *
  * Methods in this class do not throw if not explicitly stated.
  *
+ * The main data content is constant once loaded, but some content is
+ * constructed only when required (e.g. atoms_ and
+ * expandedTopology_). Their data members are mutable, so that the
+ * lazy construction idiom works properly. Some clients wish to modify
+ * the t_atoms, so there is an efficient mechanism for them to get a
+ * copy they can modify without disturbing this class. (The
+ * implementation releases the cached lazily constructed atoms_, but
+ * from the point of view of the caller, that is a copy.) The getters
+ * and copy functions are const for callers, which correctly expresses
+ * that the topology information is not being changed, merely copied
+ * and presented in a different form.
+ *
  * \ingroup module_trajectoryanalysis
  */
 class TopologyInformation
 {
     public:
         //! Returns true if a topology file was loaded.
-        bool hasTopology() const { return mtop_ != nullptr; }
+        bool hasTopology() const { return hasLoadedMtop_; }
         //! Returns true if a full topology file was loaded.
         bool hasFullTopology() const { return bTop_; }
         /*! \brief Builder function to fill the contents of
@@ -90,48 +108,87 @@ class TopologyInformation
          * Different tools require, might need, would benefit from, or
          * do not need topology information. This functions implements
          * the two-phase construction that is currently needed to
-         * support that. */
+         * support that.
+         *
+         * Any coordinate or run input file format will work, but the
+         * kind of data available from the getter methods afterwards
+         * will vary. For example, the mtop() available after reading
+         * a plain structure file will have a single molecule block and
+         * molecule type, regardless of contents.
+         *
+         * After reading, this object can return many kinds of primary
+         * and derived data structures to its caller.
+         *
+         * \todo This should throw upon error but currently does
+         * not. */
         void fillFromInputFile(const std::string &filename);
-        //! Returns the loaded topology, or NULL if not loaded.
-        const gmx_mtop_t *mtop() const { return mtop_.get(); }
-        //! Returns the loaded topology, or NULL if not loaded.
-        t_topology *topology() const;
+        /*! \brief Returns the loaded topology, or nullptr if not loaded. */
+        gmx_mtop_t *mtop() const { return mtop_.get(); }
+        //! Returns the loaded topology fully expanded, or nullptr if no topology is available.
+        const gmx_localtop_t *expandedTopology() const;
+        /*! \brief Returns a read-only handle to the fully expanded
+         * atom data arrays, which might be valid but empty if no
+         * topology is available. */
+        const t_atoms *atoms() const;
+        /*! \brief Copies the fully expanded atom data arrays, which
+         * might be valid but empty if no topology is available. */
+        AtomsDataPtr copyAtoms() const;
         //! Returns the ePBC field from the topology.
         int ePBC() const { return ePBC_; }
         /*! \brief
-         * Gets the configuration from the topology.
-         *
-         * \param[out] x     Topology coordinate pointer to initialize.
-         *      (can be NULL, in which case it is not used).
-         * \param[out] box   Box size from the topology file
-         *      (can be NULL, in which case it is not used).
-         * \throws  APIError if topology coordinates are not available and
-         *      \p x is not NULL.
+         * Gets the configuration positions from the topology file.
          *
          * If TrajectoryAnalysisSettings::efUseTopX has not been specified,
-         * \p x should be NULL.
+         * this method should not be called.
          *
-         * The pointer returned in \p *x should not be freed.
+         * \throws  APIError if topology position coordinates are not available
          */
-        void getTopologyConf(rvec **x, matrix box) const;
+        ArrayRef<const RVec> x() const;
+        /*! \brief
+         * Gets the configuration velocities from the topology file.
+         *
+         * If TrajectoryAnalysisSettings::efUseTopV has not been specified,
+         * this method should not be called.
+         *
+         * \throws  APIError if topology velocity coordinates are not available
+         */
+        ArrayRef<const RVec> v() const;
+        /*! \brief
+         * Gets the configuration box from the topology file.
+         *
+         * \param[out] box   Box size from the topology file, must not be nullptr.
+         */
+        void getBox(matrix box) const;
+        /*! \brief Returns a name for the topology.
+         *
+         * If a full topology was read from a a file, returns the name
+         * it contained, otherwise the empty string. */
+        const char *name() const;
 
-    private:
         TopologyInformation();
         ~TopologyInformation();
 
+    private:
+        //! The topology structure, or nullptr if no topology loaded.
         std::unique_ptr<gmx_mtop_t> mtop_;
-        //! The topology structure, or NULL if no topology loaded.
-        // TODO: Replace fully with mtop.
-        mutable t_topology  *top_;
+        //! Whether a topology has been loaded.
+        bool hasLoadedMtop_;
+        //! The fully expanded topology structure, nullptr if not yet constructed.
+        mutable ExpandedTopologyPtr      expandedTopology_;
+        //! The fully expanded atoms data structure, nullptr if not yet constructed.
+        mutable AtomsDataPtr             atoms_;
         //! true if full tpx file was loaded, false otherwise.
-        bool                 bTop_;
-        //! Coordinates from the topology (can be NULL).
-        rvec                *xtop_;
+        bool                             bTop_;
+        //! Position coordinates from the topology (can be nullptr).
+        std::vector<RVec>                xtop_;
+        //! Velocity coordinates from the topology (can be nullptr).
+        std::vector<RVec>                vtop_;
         //! The box loaded from the topology file.
-        matrix               boxtop_;
+        matrix                           boxtop_ {};
         //! The ePBC field loaded from the topology file.
-        int                  ePBC_;
+        int                              ePBC_;
 
+        // TODO This type is probably movable if we need that.
         GMX_DISALLOW_COPY_AND_ASSIGN(TopologyInformation);
 
         /*! \brief
@@ -140,6 +197,9 @@ class TopologyInformation
         friend class TrajectoryAnalysisRunnerCommon;
 };
 
+//! Convenience overload useful for implementing legacy tools.
+gmx_rmpbc_t gmx_rmpbc_init(const gmx::TopologyInformation &topInfo);
+
 } // namespace gmx
 
 #endif
index 121461ad36f9e6973cf63784b54187ca0f812e9c..375b1e60a7a2dd55973a012ccb1f99f828d084fd 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2010,2011,2012,2013,2014,2015,2017, by the GROMACS development team, led by
+# Copyright (c) 2010,2011,2012,2013,2014,2015,2017,2018, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -60,6 +60,7 @@ gmx_install_headers(
     real.h
     smalloc.h
     stringutil.h
+    unique_cptr.h
     )
 
 if (BUILD_TESTING)
index b98d0b4e6b3ff8fcfe9982bc8f584bf33a3cf6c5..6903bb29b3e6edd2b8c5db24037c296be5820f24 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014,2015,2016,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -32,7 +32,7 @@
  * To help us fund GROMACS development, we humbly ask that you cite
  * the research papers on the package. Check out http://www.gromacs.org.
  */
-/*! \libinternal \file
+/*! \file
  * \brief
  * Declares gmx::unique_cptr and gmx::sfree_guard.
  *