1 2 /* 3 A* ------------------------------------------------------------------- 4 B* This file contains source code for the PyMOL computer program 5 C* copyright 1998-2000 by Warren Lyford Delano of DeLano Scientific. 6 D* ------------------------------------------------------------------- 7 E* It is unlawful to modify or remove this copyright notice. 8 F* ------------------------------------------------------------------- 9 G* Please see the accompanying LICENSE file for further information. 10 H* ------------------------------------------------------------------- 11 I* Additional authors of this source file include: 12 -* 13 -* 14 -* 15 Z* ------------------------------------------------------------------- 16 */ 17 #ifndef _H_Symmetry 18 #define _H_Symmetry 19 20 #include <vector> 21 #include <string> 22 23 #include"Crystal.h" 24 #include"Word.h" 25 #include"os_python.h" 26 #include"vla.h" 27 28 struct CSymmetry { 29 PyMOLGlobals *G; 30 CCrystal Crystal; 31 int PDBZValue = 0; 32 WordType SpaceGroup{}; 33 pymol::vla<float> SymMatVLA; 34 35 // get the number of symmetry matrices 36 int getNSymMat() const; 37 38 // get the i'th symmetry matrix (pointer to float[16]) getSymMatCSymmetry39 const float * getSymMat(int i) const { 40 return SymMatVLA + i * 16; 41 } CSymmetryCSymmetry42 CSymmetry(PyMOLGlobals* G) : G(G), Crystal(G){}; 43 }; 44 45 int SymmetryAttemptGeneration(CSymmetry * I, int quiet=false); 46 void SymmetryFree(CSymmetry * I); 47 void SymmetryClear(CSymmetry * I); 48 void SymmetryUpdate(CSymmetry * I); 49 void SymmetryDump(CSymmetry * I); 50 PyObject *SymmetryAsPyList(CSymmetry * I); 51 CSymmetry *SymmetryNewFromPyList(PyMOLGlobals * G, PyObject * list); 52 void SymmetrySpaceGroupRegister(PyMOLGlobals * G, const char* sg, const std::vector<std::string>& sym_op); 53 54 #endif 55