This file is indexed.

/usr/include/gromacs/trajectoryanalysis/analysissettings.h is in libgromacs-dev 5.1.2-1ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
/*
 * This file is part of the GROMACS molecular simulation package.
 *
 * Copyright (c) 2010,2011,2012,2014, 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.
 */
/*! \file
 * \brief
 * Declares gmx::TrajectoryAnalysisSettings and gmx::TopologyInformation.
 *
 * \author Teemu Murtola <teemu.murtola@gmail.com>
 * \inpublicapi
 * \ingroup module_trajectoryanalysis
 */
#ifndef GMX_TRAJECTORYANALYSIS_ANALYSISSETTINGS_H
#define GMX_TRAJECTORYANALYSIS_ANALYSISSETTINGS_H

#include "gromacs/math/vectypes.h"
#include "gromacs/options/timeunitmanager.h"
#include "gromacs/utility/classhelpers.h"

struct t_topology;

namespace gmx
{

class AnalysisDataPlotSettings;
class Options;
class TrajectoryAnalysisRunnerCommon;

/*! \brief
 * Trajectory analysis module configuration object.
 *
 * This class is used by trajectory analysis modules to inform the caller
 * about the requirements they have on the input (e.g., whether a topology is
 * required, or whether PBC removal makes sense).  It is also used to pass
 * similar information back to the analysis module after parsing user input.
 *
 * Having this functionality as a separate class makes the
 * TrajectoryAnalysisModule interface much cleaner, and also reduces the need to
 * change existing code when new options are added.
 *
 * Methods in this class do not throw, except for the constructor, which may
 * throw an std::bad_alloc.
 *
 * \todo
 * Remove plain flags from the public interface.
 *
 * \inpublicapi
 * \ingroup module_trajectoryanalysis
 */
class TrajectoryAnalysisSettings
{
    public:
        //! Recognized flags.
        enum
        {
            /*! \brief
             * Forces loading of a topology file.
             *
             * If this flag is not specified, the topology file is loaded only
             * if it is provided on the command line explicitly.
             */
            efRequireTop     = 1<<0,
            /*! \brief
             * Requests topology coordinates.
             *
             * If this flag is specified, the coordinates loaded from the
             * topology can be accessed, otherwise they are not loaded.
             *
             * \see TopologyInformation
             */
            efUseTopX        = 1<<1,
            /*! \brief
             * Disallows the user from changing PBC handling.
             *
             * If this option is not specified, the analysis module (see
             * TrajectoryAnalysisModule::analyzeFrame()) may be passed a NULL
             * PBC structure, and it should be able to handle such a situation.
             *
             * \see setPBC()
             */
            efNoUserPBC      = 1<<4,
            /*! \brief
             * Disallows the user from changing PBC removal.
             *
             * \see setRmPBC()
             */
            efNoUserRmPBC    = 1<<5,
        };

        //! Initializes default settings.
        TrajectoryAnalysisSettings();
        ~TrajectoryAnalysisSettings();

        //! Returns the time unit manager with time unit timeUnit().
        const TimeUnitManager &timeUnitManager() const;
        //! Returns the time unit the user has requested.
        TimeUnit timeUnit() { return timeUnitManager().timeUnit(); }
        //! Returns common settings for analysis data plot modules.
        const AnalysisDataPlotSettings &plotSettings() const;

        //! Returns the currently set flags.
        unsigned long flags() const;
        //! Tests whether a flag has been set.
        bool hasFlag(unsigned long flag) const;
        /*! \brief
         * Returns whether PBC should be used.
         *
         * Returns the value set with setPBC() and/or overridden by the user.
         * The user-provided value can be accessed in
         * TrajectoryAnalysisModule::optionsFinished(), and can be overridden
         * with a call to setPBC().
         */
        bool hasPBC() const;
        /*! \brief
         * Returns whether molecules should be made whole.
         *
         * See hasPBC() for information on accessing or overriding the
         * user-provided value.
         */
        bool hasRmPBC() const;
        //! Returns the currently set frame flags.
        int frflags() const;

        /*! \brief
         * Sets flags.
         *
         * Overrides any earlier set flags.
         * By default, no flags are set.
         */
        void setFlags(unsigned long flags);
        //! Sets or clears an individual flag.
        void setFlag(unsigned long flag, bool bSet = true);
        /*! \brief
         * Sets whether PBC are used.
         *
         * \param[in]  bPBC   true if PBC should be used.
         *
         * If called in TrajectoryAnalysisModule::initOptions(), this function
         * sets the default for whether PBC are used in the analysis.
         * If \ref efNoUserPBC is not set, a command-line option is provided
         * for the user to override the default value.
         * If called later, it overrides the setting provided by the user or an
         * earlier call.
         *
         * If this function is not called, the default is to use PBC.
         *
         * If PBC are not used, the \p pbc pointer passed to
         * TrajectoryAnalysisModule::analyzeFrame() is NULL.
         * The value of the flag can also be accessed with hasPBC().
         *
         * \see efNoUserPBC
         */
        void setPBC(bool bPBC);
        /*! \brief
         * Sets whether molecules are made whole.
         *
         * \param[in]     bRmPBC true if molecules should be made whole.
         *
         * If called in TrajectoryAnalysisModule::initOptions(), this function
         * sets the default for whether molecules are made whole.
         * If \ref efNoUserRmPBC is not set, a command-line option is provided
         * for the user to override the default value.
         * If called later, it overrides the setting provided by the user or an
         * earlier call.
         *
         * If this function is not called, the default is to make molecules
         * whole.
         *
         * The main use of this function is to call it with \c false if your
         * analysis program does not require whole molecules as this can
         * increase the performance.
         * In such a case, you can also specify \ref efNoUserRmPBC to not to
         * confuse the user with an option that would only slow the program
         * down.
         *
         * \see efNoUserRmPBC
         */
        void setRmPBC(bool bRmPBC);
        /*! \brief
         * Sets flags that determine what to read from the trajectory.
         *
         * \param[in]     frflags Flags for what to read from the trajectory file.
         *
         * If this function is not called, the flags default to TRX_NEED_X.
         * If the analysis module needs some other information (velocities,
         * forces), it can call this function to load additional information
         * from the trajectory.
         */
        void setFrameFlags(int frflags);

    private:
        class Impl;

        PrivateImplPointer<Impl> impl_;

        friend class TrajectoryAnalysisRunnerCommon;
};

/*! \brief
 * Topology information passed 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.
 *
 * Methods in this class do not throw if not explicitly stated.
 *
 * \inpublicapi
 * \ingroup module_trajectoryanalysis
 */
class TopologyInformation
{
    public:
        //! Returns true if a topology file was loaded.
        bool hasTopology() const { return top_ != NULL; }
        //! Returns true if a full topology file was loaded.
        bool hasFullTopology() const { return bTop_; }
        //! Returns the loaded topology, or NULL if not loaded.
        t_topology *topology() const { return top_; }
        //! 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.
         *
         * If TrajectoryAnalysisSettings::efUseTopX has not been specified,
         * \p x should be NULL.
         *
         * The pointer returned in \p *x should not be freed.
         */
        void getTopologyConf(rvec **x, matrix box) const;

    private:
        TopologyInformation();
        ~TopologyInformation();

        //! The topology structure, or NULL if no topology loaded.
        t_topology          *top_;
        //! true if full tpx file was loaded, false otherwise.
        bool                 bTop_;
        //! Coordinates from the topology (can be NULL).
        rvec                *xtop_;
        //! The box loaded from the topology file.
        matrix               boxtop_;
        //! The ePBC field loaded from the topology file.
        int                  ePBC_;

        GMX_DISALLOW_COPY_AND_ASSIGN(TopologyInformation);

        /*! \brief
         * Needed to initialize the data.
         */
        friend class TrajectoryAnalysisRunnerCommon;
};

} // namespace gmx

#endif