Pteros  2.0
Molecular modeling library for human beings!
trajectory_reader.h
1 /*
2  * This file is a part of
3  *
4  * ============================================
5  * ### Pteros molecular modeling library ###
6  * ============================================
7  *
8  * https://github.com/yesint/pteros
9  *
10  * (C) 2009-2021, Semen Yesylevskyy
11  *
12  * All works, which use Pteros, should cite the following papers:
13  *
14  * 1. Semen O. Yesylevskyy, "Pteros 2.0: Evolution of the fast parallel
15  * molecular analysis library for C++ and python",
16  * Journal of Computational Chemistry, 2015, 36(19), 1480–1488.
17  * doi: 10.1002/jcc.23943.
18  *
19  * 2. Semen O. Yesylevskyy, "Pteros: Fast and easy to use open-source C++
20  * library for molecular analysis",
21  * Journal of Computational Chemistry, 2012, 33(19), 1632–1636.
22  * doi: 10.1002/jcc.22989.
23  *
24  * This is free software distributed under Artistic License:
25  * http://www.opensource.org/licenses/artistic-license-2.0.php
26  *
27 */
28 
29 
30 #pragma once
31 
32 #include <string>
33 #include <functional>
34 #include "pteros/analysis/options.h"
35 #include "pteros/analysis/task_base.h"
36 
37 
38 namespace pteros {
39 
40 using Task_ptr = std::shared_ptr<TaskBase> ;
41 using DataChannel = MessageChannel<std::shared_ptr<pteros::DataContainer> > ;
42 using DataChannel_ptr = std::shared_ptr<DataChannel> ;
43 
51 public:
52 
56  TrajectoryReader(const Options& opt);
58  virtual ~TrajectoryReader(){}
59 
61  void set_options(const Options& opt);
62 
64  virtual void run();
65 
67  std::string help();
68 
70  void add_task(TaskBase* task);
71  void add_task(const Task_ptr& task);
72 
73 private:
74  // Options
75  Options options;
76 
77  std::vector<std::string> traj_files;
78  std::vector<Task_ptr> tasks;
79 
80  bool is_parallel;
81 };
82 
83 }
84 
85 
86 
87 
88 
89 
pteros::TrajectoryReader::run
virtual void run()
Read trajectory.
Definition: trajectory_reader.cpp:73
pteros::Options
All options obtained from command line including nested options for tasks.
Definition: options.h:82
pteros::TrajectoryReader::TrajectoryReader
TrajectoryReader()
Default constructor.
Definition: trajectory_reader.cpp:59
pteros::TrajectoryReader::add_task
void add_task(TaskBase *task)
Adds new task.
Definition: trajectory_reader.cpp:49
pteros::TrajectoryReader::help
std::string help()
Print summary of allowed options.
Definition: trajectory_reader.cpp:44
pteros::TrajectoryReader
The base class for trajectory processing It provides facilities for loading large trajectories by fra...
Definition: trajectory_reader.h:50
pteros::TrajectoryReader::set_options
void set_options(const Options &opt)
Pass options.
Definition: trajectory_reader.cpp:69
pteros::TrajectoryReader::~TrajectoryReader
virtual ~TrajectoryReader()
Destructor.
Definition: trajectory_reader.h:58