votca 2024.2-dev
Loading...
Searching...
No Matches
traj_force.h
Go to the documentation of this file.
1/*
2 * Copyright 2009-2021 The VOTCA Development Team (http://www.votca.org)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17
18#ifndef VOTCA_CSG_TRAJ_FORCE_H
19#define VOTCA_CSG_TRAJ_FORCE_H
20
21// Third party includes
22#include <boost/numeric/ublas/vector.hpp>
23
24// VOTCA includes
28
29// Local VOTCA includes
31
32using namespace votca::csg;
33using namespace std;
34
39class TrajForce : public CsgApplication {
40 public:
41 string ProgramName() override { return "traj_force"; }
42 void HelpText(ostream &out) override {
43 out << "Adds/subtracts forces from given atomistic trajectories";
44 }
45
46 bool DoTrajectory() override { return true; }
47 bool DoMapping() override { return false; }
48
49 void Initialize(void) override;
50 bool EvaluateOptions() override;
51
53 void BeginEvaluate(Topology *top, Topology *top_atom) override;
55 void EndEvaluate() override;
57 void EvalConfiguration(Topology *conf, Topology *conf_atom) override;
58
59 protected:
61 double scale_;
63 void WriteOutFiles();
64
67 std::unique_ptr<TrajectoryReader> trjreader_force_;
68 std::unique_ptr<TrajectoryWriter> trjwriter_;
69};
70
71#endif // VOTCA_CSG_TRAJ_FORCE_H
Adds/subtracts forces from given atomistic trajectories.
Definition traj_force.h:39
void Initialize(void) override
Initialize application data.
Definition traj_force.cc:40
Topology top_force_
Definition traj_force.h:66
void OpenForcesTrajectory()
void BeginEvaluate(Topology *top, Topology *top_atom) override
called before the first frame
Definition traj_force.cc:66
void HelpText(ostream &out) override
help text of application without version information
Definition traj_force.h:42
std::unique_ptr< TrajectoryWriter > trjwriter_
Definition traj_force.h:68
void WriteOutFiles()
Write results to output files.
Definition traj_force.cc:95
bool DoTrajectory() override
overload and return true to enable trajectory command line options
Definition traj_force.h:46
bool DoMapping() override
overload and return true to enable mapping command line options
Definition traj_force.h:47
string ProgramName() override
program name
Definition traj_force.h:41
void EndEvaluate() override
called after the last frame
Definition traj_force.cc:89
void EvalConfiguration(Topology *conf, Topology *conf_atom) override
called for each frame which is mapped
Definition traj_force.cc:97
std::unique_ptr< TrajectoryReader > trjreader_force_
Definition traj_force.h:67
double scale_
Scaling of forces, +1 for addition and -1 for subtraction.
Definition traj_force.h:61
bool EvaluateOptions() override
Process command line options.
Definition traj_force.cc:57
topology of the whole system
Definition topology.h:81
STL namespace.