Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef __MMDB_SymOp__
00043 #define __MMDB_SymOp__
00044
00045 #include "mmdb_io_stream.h"
00046 #include "mmdb_defs.h"
00047
00048 namespace mmdb {
00049
00050
00051
00052 DefineClass(SymOp);
00053 DefineStreamFunctions(SymOp);
00054
00055 class SymOp : public io::Stream {
00056
00057 public :
00058
00059 SymOp ();
00060 SymOp ( io::RPStream Object );
00061 ~SymOp();
00062
00063 int SetSymOp ( cpstr XYZOperation );
00064 pstr GetSymOp ();
00065
00066 void Transform ( realtype & x, realtype & y, realtype & z );
00067
00068 void GetTMatrix ( mat44 & TMatrix );
00069 void SetTMatrix ( mat44 & TMatrix );
00070
00071 bool CompileOpTitle ( pstr S );
00072 bool CompileOpTitle ( pstr S, mat44 symMat, bool compare );
00073 void Print ();
00074
00075 void Copy ( PSymOp symOp );
00076
00077 void write ( io::RFile f );
00078 void read ( io::RFile f );
00079
00080 protected :
00081 pstr XYZOp;
00082 mat44 T;
00083
00084 void InitSymOp ();
00085 void FreeMemory ();
00086 int GetOperation ( int n );
00087
00088 };
00089
00090
00091
00092
00093 enum SYMOP_RC {
00094 SYMOP_Ok = 0,
00095 SYMOP_NoLibFile = -1,
00096 SYMOP_UnknownSpaceGroup = -2,
00097 SYMOP_NoSymOps = -3,
00098 SYMOP_WrongSyntax = -4,
00099 SYMOP_NotAnOperation = -5,
00100 SYMOP_ZeroDenominator = -6
00101 };
00102
00103 DefineClass(SymOps);
00104 DefineStreamFunctions(SymOps);
00105
00106 class SymOps : public io::Stream {
00107
00108 public :
00109
00110 SymOps ();
00111 SymOps ( io::RPStream Object );
00112 ~SymOps();
00113
00114 virtual void FreeMemory();
00115
00116 int SetGroupSymopLib ( cpstr SpaceGroup,
00117 cpstr symop_lib=NULL );
00118
00119
00120
00121 int SetGroup ( cpstr SpaceGroup,
00122 cpstr syminfo_lib=NULL );
00123
00124
00125
00126 void Reset ();
00127 virtual int AddSymOp ( cpstr XYZOperation );
00128
00129 void PutGroupName ( cpstr SpGroupName );
00130
00131
00132 int GetNofSymOps ();
00133 pstr GetSymOp ( int Nop );
00134
00135
00136
00137
00138 int Transform ( realtype & x, realtype & y, realtype & z,
00139 int Nop );
00140
00141
00142
00143
00144 int GetTMatrix ( mat44 & TMatrix, int Nop );
00145
00146 void Print ();
00147
00148 virtual void Copy ( PSymOps symOps );
00149
00150 void write ( io::RFile f );
00151 void read ( io::RFile f );
00152
00153 protected :
00154
00155 pstr SpGroup;
00156 int Nops;
00157 PPSymOp symOp;
00158
00159 void InitSymOps();
00160
00161 };
00162
00163 }
00164
00165
00166
00167 #endif
00168