BALL  1.5.0
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_DATATYPE_OPTIONS_H
20 #include <BALL/DATATYPE/options.h>
21 #endif
22 
23 #ifndef BALL_COMMON_EXCEPTION_H
24 # include <BALL/COMMON/exception.h>
25 #endif
26 
27 #ifndef BALL_CONCEPT_PERSISTENCEMANAGER_H
29 #endif
30 
31 
32 #include <string>
33 
34 namespace BALL
35 {
41  : public PersistentObject
42  {
43  public:
44 
48 
52  {
55  static const string SPACE_GROUP_FILE;
56  };
57 
61  {
64  static const string SPACE_GROUP_FILE;
65  };
66 
68 
71  //
72 
75  CrystalInfo();
76 
79  CrystalInfo(String group, Vector3 dim, Angle alpha, Angle beta, Angle gamma);
80 
83  CrystalInfo(const CrystalInfo& ci);
84 
88  ~CrystalInfo();
90 
91  bool setSpaceGroup(const String& sg);
92  const String& getSpaceGroup() const;
93 
94  void setCellDimensions(const Vector3& dim);
95 
96  void setCellEdgeLengthA(const float& a);
97  const float& getCellEdgeLengthA() const;
98 
99  void setCellEdgeLengthB(const float& b);
100  const float& getCellEdgeLengthB() const;
101 
102  void setCellEdgeLengthC(const float& c);
103  const float& getCellEdgeLengthC() const;
104 
105  void setCellAngles(const Angle& alpha, const Angle& beta, const Angle& gamma);
106 
107  void setCellAngleAlpha(const Angle& alpha);
108  const Angle& getCellAngleAlpha() const;
109 
110  void setCellAngleBeta(const Angle& beta);
111  const Angle& getCellAngleBeta() const;
112 
113  void setCellAngleGamma(const Angle& gamma);
114  const Angle& getCellAngleGamma() const;
115 
116  void setZScore(const int& zscore);
117  const int& getZScore() const;
118 
119  Size getNumberOfSymOps() const ;
120  const Matrix4x4& getSymOp(Position p) const;
121 
122  Size getNumberOfNCSSymOps() const;
123 
127  const Matrix4x4& getNCS(Position p) const;
128 
132  Matrix4x4& getNCS(Position p);
133 
137  bool isgivenNCS(Position p) const;
138 
142  bool insertNCS(Position p, Matrix4x4 ncsm, bool is_given = 0);
143 
144  void pushbackNCS(Matrix4x4 ncsm, bool is_given = 0);
145 
149  bool eraseNCS(Position p);
150 
151  const Matrix4x4& getCart2Frac() const;
152  const Matrix4x4& getFrac2Cart() const;
153 
156  void setDefaultOptions();
157 
160  //@
163 
165 
169 
172  //void write(PersistenceManager& pm) const;
173  void persistentWrite(PersistenceManager& pm, const char* name) const;
174 
177  //bool read(PersistenceManager& pm);
178  void persistentRead(PersistenceManager& pm);
179 
181 
182 
183  protected:
184 
185  void calculateMatrices_();
186  bool retrieveSymOps_(const String& sg);
187 
193  //bool readOptions_();
194 
197  Angle alpha_, beta_, gamma_;
198  int z_score_;
200 
203 
204  vector<Matrix4x4> ncs_symops_;
205  vector<bool> ncs_isgiven_;
206  vector<Matrix4x4> sg_symops_;
207 
208  };
209 } // namespace BALL
210 
211 #endif // BALL_XRAY_CRYSTALINFO_H
BALL::TAngle< float >
BALL::CrystalInfo::options
Options options
options
Definition: crystalInfo.h:162
BALL::CrystalInfo::frac2cart_
Matrix4x4 frac2cart_
Definition: crystalInfo.h:202
BALL::CrystalInfo::filename_
String filename_
Definition: crystalInfo.h:199
BALL::Options
Definition: options.h:46
BALL::CrystalInfo::ncs_symops_
vector< Matrix4x4 > ncs_symops_
Definition: crystalInfo.h:204
persistentObject.h
BALL::TMatrix4x4< float >
BALL::PersistenceManager
Definition: persistenceManager.h:72
BALL::String
Definition: string.h:56
BALL::CrystalInfo::sg_symops_
vector< Matrix4x4 > sg_symops_
Definition: crystalInfo.h:206
BALL::CrystalInfo::Option
Definition: crystalInfo.h:51
BALL::CrystalInfo::cell_dimensions_
Vector3 cell_dimensions_
Definition: crystalInfo.h:196
BALL
Definition: constants.h:12
BALL::CrystalInfo::cart2frac_
Matrix4x4 cart2frac_
Definition: crystalInfo.h:201
options.h
BALL_SIZE_TYPE
BALL::TVector3< float >
BALL::Constants::c
const BALL_EXTERN_VARIABLE double c
Definition: constants.h:149
BALL::CrystalInfo::gamma_
Angle gamma_
Definition: crystalInfo.h:197
BALL::CrystalInfo::ncs_isgiven_
vector< bool > ncs_isgiven_
Definition: crystalInfo.h:205
BALL::CrystalInfo::Default::SPACE_GROUP_FILE
static const string SPACE_GROUP_FILE
Definition: crystalInfo.h:64
BALL::PersistentObject
Definition: persistentObject.h:27
string.h
BALL::CrystalInfo::Default
Definition: crystalInfo.h:60
BALL::CrystalInfo::z_score_
int z_score_
Definition: crystalInfo.h:198
BALL::CrystalInfo::Option::SPACE_GROUP_FILE
static const string SPACE_GROUP_FILE
Definition: crystalInfo.h:55
BALL::CrystalInfo
Definition: crystalInfo.h:40
BALL_CREATE
#define BALL_CREATE(name)
Definition: create.h:62
persistenceManager.h
BALL_EXPORT
#define BALL_EXPORT
Definition: COMMON/global.h:50
geometricTransformations.h
BALL::CrystalInfo::space_group_
String space_group_
Definition: crystalInfo.h:195
exception.h