Emdee
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
filemanager.h
Go to the documentation of this file.
1 #ifndef FILEMANAGER_H
2 #define FILEMANAGER_H
3 
4 // Forward
5 class MoleculeSystem;
6 
7 // Local
8 
9 // System
10 #include <string>
11 #include <armadillo>
12 using namespace std;
13 using namespace arma;
14 
16 {
17 public:
18  FileManager(MoleculeSystem *system);
19 
20  enum FileFormat {
22  HDF5Format
23  };
24 
25  bool load(string fileName);
26  bool loadBinary(string fileName);
27  bool save(int step);
28  bool saveXyz(int step);
29 // bool saveHDF5(int step);
30  bool saveBinary(int step);
31 
32  void setOutFileName(string fileName);
33 
34  // Units
35  void setUnitLength(double unitLength);
36  void setUnitTime(double unitTime);
37  void setUnitMass(double unitMass);
38 
39  void setUnitTemperature(double unitTemperature);
40  void setConfigurationName(string configurationName);
41  string parseFileName(string fileName);
42  bool setLatestSymlink(int step);
43  string headerFileNameFromStep(int step);
44  string processorName();
45  string lammpsFileNameFromStep(int step);
46 protected:
47  string m_outFileName;
48 
50 
52 
53 
54  // Units
55  double m_unitLength;
56  double m_unitTime;
57  double m_unitEnergy;
58  double m_unitMass;
60 
62 private:
63  int collectNAtoms();
64 };
65 
66 inline void FileManager::setConfigurationName(string configurationName) {
67  m_configurationName = configurationName;
68 }
69 
70 #endif // FILEMANAGER_H