Simpatico  v1.10
HoomdConfigReader.h
1 #ifndef TOOLS_HOOMD_CONFIG_READER_H
2 #define TOOLS_HOOMD_CONFIG_READER_H
3 
4 /*
5 * Simpatico - Simulation Package for Polymeric and Molecular Liquids
6 *
7 * Copyright 2010 - 2017, The Regents of the University of Minnesota
8 * Distributed under the terms of the GNU General Public License.
9 */
10 
11 #include <tools/config/ConfigReader.h> // base class
12 #include <tools/config/TypeMap.h> // member
13 
14 #include <iostream>
15 
16 namespace Util {
17  class XmlStartTag;
18 }
19 
20 namespace Tools
21 {
22 
23  class Configuration;
24  template <int N> class GroupStorage;
25 
26  using namespace Util;
27 
50  {
51 
52  public:
53 
58 
64  HoomdConfigReader(Configuration& configuration);
65 
71  virtual void readConfig(std::ifstream& file);
72 
78  virtual void readAuxiliaryFile(std::ifstream& file);
79 
80  private:
81 
82  TypeMap atomTypeMap_;
83  TypeMap bondTypeMap_;
84  TypeMap angleTypeMap_;
85  TypeMap dihedralTypeMap_;
86  TypeMap improperTypeMap_;
87  bool hasTypeMaps_;
88 
95  void readBox(Util::XmlStartTag& start, std::istream& file);
96 
103  int readNumberAttribute(Util::XmlStartTag& start, int nAtom);
104 
111  void endTag(std::istream& file, const std::string& name);
112 
119  void readPosition(Util::XmlStartTag& start, std::istream& file);
120 
127  void readVelocity(Util::XmlStartTag& start, std::istream& file);
128 
135  void readType(Util::XmlStartTag& start, std::istream& file);
136 
143  void readAtomIgnore(Util::XmlStartTag& start, std::istream& file);
144 
151  void readBond(Util::XmlStartTag& start, std::istream& file);
152 
159  template <int N>
160  void readGroups(Util::XmlStartTag& start, std::istream& file,
161  GroupStorage<N>& storage, const TypeMap& map);
162 
163  };
164 
165 }
166 #endif
A container for Group<N> objects.
Parser for an XML start tag.
Definition: XmlStartTag.h:36
Map between type names and type ids.
Definition: TypeMap.h:26
Abstract reader/writer for configuration files.
Definition: ConfigReader.h:27
An instantaneous molecular dynamics configuration.
Definition: Configuration.h:40
Utility classes for scientific computation.
Definition: accumulators.mod:1
Single-processor classes for pre- and post-processing MD trajectories.
Reader for Hoomd-blue XML configuration files.