votca 2025.1-dev
Loading...
Searching...
No Matches
TrajForce Class Reference

Adds/subtracts forces from given atomistic trajectories. More...

#include <traj_force.h>

Inheritance diagram for TrajForce:
Collaboration diagram for TrajForce:

Public Member Functions

string ProgramName () override
 program name
void HelpText (ostream &out) override
 help text of application without version information
bool DoTrajectory () override
 overload and return true to enable trajectory command line options
bool DoMapping () override
 overload and return true to enable mapping command line options
void Initialize (void) override
 Initialize application data.
bool EvaluateOptions () override
 Process command line options.
void BeginEvaluate (Topology *top, Topology *top_atom) override
 called before the first frame
void EndEvaluate () override
 called after the last frame
void EvalConfiguration (Topology *conf, Topology *conf_atom) override
 called for each frame which is mapped
Public Member Functions inherited from votca::csg::CsgApplication
 CsgApplication ()=default
 ~CsgApplication () override=default
void Run (void) override
 Main body of application.
void ShowHelpText (std::ostream &out) override
virtual bool DoMappingDefault (void)
 if DoMapping is true, will by default require mapping or not
virtual bool DoThreaded (void)
virtual bool SynchronizeThreads (void)
virtual bool NeedsTopology (void)
 if topology is always needed
virtual bool EvaluateTopology (Topology *, Topology *=nullptr)
 called after topology was loaded
void AddObserver (CGObserver *observer)
bool ProcessData (Worker *worker)
 Gets frames from TrajectoryReader in an ordered way and, if successful, calls Worker::EvalConfiguration for that frame.
virtual std::unique_ptr< WorkerForkWorker (void)
virtual void MergeWorker (Worker *worker)
Public Member Functions inherited from votca::tools::Application
 Application ()
virtual ~Application ()
int Exec (int argc, char **argv)
 executes the program
virtual std::string VersionString ()
 version string of application
void CheckRequired (const std::string &option_name, const std::string &error_msg="")
 Check weather required option is set.
boost::program_options::options_description_easy_init AddProgramOptions (const std::string &group="")
 add option for command line
boost::program_options::variables_map & OptionsMap ()
 get available program options & descriptions
boost::program_options::options_description & OptionsDesc ()
boost::program_options::options_description & VisibleOptions ()
 filters out the Hidden group from the options descriptions
void StopExecution ()
 call StopExecution after EvaluateOptions

Protected Member Functions

void WriteOutFiles ()
 Write results to output files.
void OpenForcesTrajectory ()

Protected Attributes

double scale_
 Scaling of forces, +1 for addition and -1 for subtraction.
Topology top_force_
std::unique_ptr< TrajectoryReadertrjreader_force_
std::unique_ptr< TrajectoryWritertrjwriter_
Protected Attributes inherited from votca::csg::CsgApplication
std::list< CGObserver * > observers_
bool do_mapping_
std::vector< std::unique_ptr< Worker > > myWorkers_
Index nframes_
bool is_first_frame_
Index nthreads_
tools::Mutex nframesMutex_
tools::Mutex traj_readerMutex_
std::vector< std::unique_ptr< tools::Mutex > > threadsMutexesIn_
 stores Mutexes used to impose order for input
std::vector< std::unique_ptr< tools::Mutex > > threadsMutexesOut_
 stores Mutexes used to impose order for output
std::unique_ptr< TrajectoryReadertraj_reader_
Protected Attributes inherited from votca::tools::Application
std::map< std::string, boost::program_options::options_description > op_groups_
bool continue_execution_ = true

Detailed Description

Adds/subtracts forces from given atomistic trajectories.

Definition at line 39 of file traj_force.h.

Member Function Documentation

◆ BeginEvaluate()

void TrajForce::BeginEvaluate ( Topology * top,
Topology * top_atom )
overridevirtual

called before the first frame

Reimplemented from votca::csg::CsgApplication.

Definition at line 66 of file traj_force.cc.

◆ DoMapping()

bool TrajForce::DoMapping ( void )
inlineoverridevirtual

overload and return true to enable mapping command line options

Reimplemented from votca::csg::CsgApplication.

Definition at line 47 of file traj_force.h.

◆ DoTrajectory()

bool TrajForce::DoTrajectory ( void )
inlineoverridevirtual

overload and return true to enable trajectory command line options

Reimplemented from votca::csg::CsgApplication.

Definition at line 46 of file traj_force.h.

◆ EndEvaluate()

void TrajForce::EndEvaluate ( )
overridevirtual

called after the last frame

Reimplemented from votca::csg::CsgApplication.

Definition at line 89 of file traj_force.cc.

◆ EvalConfiguration()

void TrajForce::EvalConfiguration ( Topology * conf,
Topology * conf_atom )
overridevirtual

called for each frame which is mapped

Reimplemented from votca::csg::CsgApplication.

Definition at line 97 of file traj_force.cc.

◆ EvaluateOptions()

bool TrajForce::EvaluateOptions ( )
overridevirtual

Process command line options.

Returns
true to continue, false to stop

EvaluateOptions is called by Run after parsing the command line. return true if everything is ok, false to stop and show help text.

Reimplemented from votca::csg::CsgApplication.

Definition at line 57 of file traj_force.cc.

◆ HelpText()

void TrajForce::HelpText ( ostream & out)
inlineoverridevirtual

help text of application without version information

Parameters
outostream for output

Implements votca::tools::Application.

Definition at line 42 of file traj_force.h.

◆ Initialize()

void TrajForce::Initialize ( void )
overridevirtual

Initialize application data.

Initialize is called by run before parsing the command line. All necessary command line arguments can be added here

Reimplemented from votca::csg::CsgApplication.

Definition at line 40 of file traj_force.cc.

◆ OpenForcesTrajectory()

void TrajForce::OpenForcesTrajectory ( )
protected

◆ ProgramName()

string TrajForce::ProgramName ( )
inlineoverridevirtual

program name

Returns
string with program name

overload this function to set the program name

Implements votca::tools::Application.

Definition at line 41 of file traj_force.h.

◆ WriteOutFiles()

void TrajForce::WriteOutFiles ( )
protected

Write results to output files.

Definition at line 95 of file traj_force.cc.

Member Data Documentation

◆ scale_

double TrajForce::scale_
protected

Scaling of forces, +1 for addition and -1 for subtraction.

Definition at line 61 of file traj_force.h.

◆ top_force_

Topology TrajForce::top_force_
protected

Definition at line 66 of file traj_force.h.

◆ trjreader_force_

std::unique_ptr<TrajectoryReader> TrajForce::trjreader_force_
protected

Definition at line 67 of file traj_force.h.

◆ trjwriter_

std::unique_ptr<TrajectoryWriter> TrajForce::trjwriter_
protected

Definition at line 68 of file traj_force.h.


The documentation for this class was generated from the following files: