BALL
1.4.1
|
00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 00004 #ifndef BALL_XRAY_CRYSTALGENERATOR_H 00005 #define BALL_XRAY_CRYSTALGENERATOR_H 00006 00007 #ifndef BALL_KERNEL_ATOMCONTAINER_H 00008 #include <BALL/KERNEL/atomContainer.h> 00009 #endif 00010 00011 #ifndef BALL_KERNEL_SYSTEM_H 00012 #include <BALL/KERNEL/system.h> 00013 #endif 00014 00015 #ifndef BALL_DATATYPE_REGULARDATA3D_H 00016 #include <BALL/DATATYPE/regularData3D.h> 00017 #endif 00018 00019 #ifndef BALL_XRAY_CRYSTALINFO_H 00020 #include <BALL/XRAY/crystalInfo.h> 00021 #endif 00022 00023 #ifndef BALL_STRUCTURE_GEOMETRICTRANSFORMATIONS_H 00024 #include <BALL/STRUCTURE/geometricTransformations.h> 00025 #endif 00026 00027 #ifndef BALL_STRUCTURE_GEOMETRICPROPERTIES_H 00028 # include <BALL/STRUCTURE/geometricProperties.h> 00029 #endif 00030 00031 #ifndef BALL_MATHS_BOX3_H 00032 # include <BALL/MATHS/box3.h> 00033 #endif 00034 00035 #include <list> 00036 00037 namespace BALL 00038 { 00042 class BALL_EXPORT CrystalGenerator 00043 { 00044 public: 00045 00046 00050 00053 enum CellType 00054 { 00055 NCS_ASU = 0, 00056 ASU = 1, 00057 UNITCELL = 2 00058 }; 00059 00060 00068 CrystalGenerator(); 00069 00075 CrystalGenerator(const CrystalGenerator& cg); 00076 00081 CrystalGenerator(System* system); 00082 00085 ~CrystalGenerator(); 00087 00088 00089 void setCrystalInfo(boost::shared_ptr<CrystalInfo> ci_ptr); 00090 void setSystem(System* system_ptr); 00091 00092 std::list<System*> generatePacking(Index a_loweridx, Index a_upperidx, Index b_loweridx, Index b_upperid, Index c_loweridx, Index c_upperid); 00093 00094 System* generateUnitCell(Index a, Index b, Index c); 00095 System* generateUnitCell(); 00096 System* generateAsymmetricUnit(); 00097 std::list<System*> generateSymMoleculesWithinDistance(float angstrom); 00098 00099 Box3 getUnitCellBox(Index a, Index b, Index c); 00100 00101 protected: 00102 00103 bool buildUnitCell_(); 00104 bool buildASU_(); 00105 bool correctASUPositions_(System* raw_cell); 00106 00107 GeometricCenterProcessor center_processor_; 00108 TransformationProcessor transformer_; 00109 00110 System* system_; 00111 00112 System* asu_; 00113 System* unitcell_; 00114 boost::shared_ptr<CrystalInfo> ci_ptr_; 00115 }; 00116 } // namespace BALL 00117 00118 #endif // BALL_XRAY_CRYSTALINFO_H