1 /*  -*- c++ -*-  */
2 #ifndef XYZ_H
3 #define XYZ_H
4 
5 #include "Vector3DBlock.h"
6 #include <string>
7 
8 namespace ProtoMol {
9   //_________________________________________________________________XYZ
10   /**
11    * Container holding coordinates/Vector3D and names
12    */
13   struct XYZ{
14     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15     // Constructors, destructors, assignment
16     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
XYZXYZ17     XYZ(){};
XYZXYZ18     XYZ(size_t n):coords(n,Vector3D(0.0,0.0,0.0)),names(n,std::string("")){}
19     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20     // New methods of class XYZ
21     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22     void clear();
sizeXYZ23     size_t size() const {return coords.size();}
resizeXYZ24     void resize(size_t n){coords.resize(n),names.resize(n);}
25     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26     // My data members
27     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28     // XYZ container
29     Vector3DBlock coords;
30     std::vector<std::string> names;
31   };
32 
33   //____________________________________________________________________________INLINES
34 
35 }
36 #endif /* XYZ_H */
37