BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
crystalInfo.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 
4 #ifndef BALL_XRAY_CRYSTALINFO_H
5 #define BALL_XRAY_CRYSTALINFO_H
6 
7 #ifndef BALL_CONCEPT_PERSISTENTOBJECT_H
9 #endif
10 
11 #ifndef BALL_STRUCTURE_GEOMETRICTRANSFORMATIONS_H
13 #endif
14 
15 #ifndef BALL_DATATYPE_STRING_H
16 #include <BALL/DATATYPE/string.h>
17 #endif
18 
19 #ifndef BALL_COMMON_EXCEPTION_H
20 # include <BALL/COMMON/exception.h>
21 #endif
22 
23 #ifndef BALL_CONCEPT_PERSISTENCEMANAGER_H
25 #endif
26 
27 
28 #include <string>
29 
30 namespace BALL
31 {
37  : public PersistentObject
38  {
39  public:
40 
44 
48  {
51  static const char* SPACE_GROUP_FILE;
52  };
53 
57  {
60  static const char* SPACE_GROUP_FILE;
61  };
62 
64 
67  //
68 
71  CrystalInfo();
72 
75  CrystalInfo(String group, Vector3 dim, Angle alpha, Angle beta, Angle gamma);
76 
79  CrystalInfo(const CrystalInfo& ci);
80 
84  ~CrystalInfo();
86 
87  bool setSpaceGroup(const String& sg);
88  const String& getSpaceGroup() const;
89 
90  void setCellDimensions(const Vector3& dim);
91 
92  void setCellEdgeLengthA(const float& a);
93  const float& getCellEdgeLengthA() const;
94 
95  void setCellEdgeLengthB(const float& b);
96  const float& getCellEdgeLengthB() const;
97 
98  void setCellEdgeLengthC(const float& c);
99  const float& getCellEdgeLengthC() const;
100 
101  void setCellAngles(const Angle& alpha, const Angle& beta, const Angle& gamma);
102 
103  void setCellAngleAlpha(const Angle& alpha);
104  const Angle& getCellAngleAlpha() const;
105 
106  void setCellAngleBeta(const Angle& beta);
107  const Angle& getCellAngleBeta() const;
108 
109  void setCellAngleGamma(const Angle& gamma);
110  const Angle& getCellAngleGamma() const;
111 
112  void setZScore(const int& zscore);
113  const int& getZScore() const;
114 
115  Size getNumberOfSymOps() const ;
116  const Matrix4x4& getSymOp(Position p) const;
117 
118  Size getNumberOfNCSSymOps() const;
119 
123  const Matrix4x4& getNCS(Position p) const;
124 
128  Matrix4x4& getNCS(Position p);
129 
133  bool isgivenNCS(Position p) const;
134 
138  bool insertNCS(Position p, Matrix4x4 ncsm, bool is_given = 0);
139 
140  void pushbackNCS(Matrix4x4 ncsm, bool is_given = 0);
141 
145  bool eraseNCS(Position p);
146 
147  const Matrix4x4& getCart2Frac() const;
148  const Matrix4x4& getFrac2Cart() const;
149 
153 
156  //void write(PersistenceManager& pm) const;
157  void persistentWrite(PersistenceManager& pm, const char* name) const;
158 
161  //bool read(PersistenceManager& pm);
162  void persistentRead(PersistenceManager& pm);
163 
165 
166 
167  protected:
168 
169  void calculateMatrices_();
170  bool retrieveSymOps_(const String& sg);
171 
174  Angle alpha_, beta_, gamma_;
175  int z_score_;
177 
180 
181  vector<Matrix4x4> ncs_symops_;
182  vector<bool> ncs_isgiven_;
183  vector<Matrix4x4> sg_symops_;
184 
185  };
186 } // namespace BALL
187 
188 #endif // BALL_XRAY_CRYSTALINFO_H