#include "Python.h"
Go to the source code of this file.
◆ SymList_computeDistance()
PyObject* SymList_computeDistance |
( |
PyObject * |
obj, |
|
|
PyObject * |
args, |
|
|
PyObject * |
kwargs |
|
) |
| |
Definition at line 140 of file python_symmetry.cpp.
143 PyObject *pyMd =
nullptr;
144 auto *pyProjdirMode = Py_False;
145 auto *pyCheckMirrors = Py_False;
146 auto *pyObjectRotation = Py_False;
148 if (PyArg_ParseTuple(args,
"O|OOO", &pyMd,
154 PyErr_SetString(PyExc_TypeError,
155 "Expected MetaData as first argument");
158 bool projdir_mode =
false;
159 bool check_mirrors =
false;
160 bool object_rotation =
false;
161 if (PyBool_Check(pyProjdirMode))
162 projdir_mode = (pyProjdirMode == Py_True);
163 if (PyBool_Check(pyCheckMirrors))
164 check_mirrors = (pyCheckMirrors == Py_True);
165 if (PyBool_Check(pyObjectRotation))
166 object_rotation = (pyObjectRotation == Py_True);
◆ SymList_dealloc()
◆ SymList_getSymmetryMatrices()
PyObject* SymList_getSymmetryMatrices |
( |
PyObject * |
obj, |
|
|
PyObject * |
args, |
|
|
PyObject * |
kwargs |
|
) |
| |
Definition at line 87 of file python_symmetry.cpp.
91 PyObject * symMatrices;
96 if (PyArg_ParseTuple(args,
"s", &str))
103 self->symlist->readSymmetryFile(str);
104 symMatrices = PyList_New(self->symlist->symsNo()+1);
105 symMatrix = PyList_New(3);
108 row = Py_BuildValue(
"[fff]", 1., 0., 0.);
109 PyList_SetItem(symMatrix,0,row);
110 row = Py_BuildValue(
"[fff]", 0., 1., 0.);
111 PyList_SetItem(symMatrix,1,row);
112 row = Py_BuildValue(
"[fff]", 0., 0., 1.);
113 PyList_SetItem(symMatrix,2,row);
114 PyList_SetItem(symMatrices,0,symMatrix);
117 for (
int i=0;
i <
self->symlist->true_symNo; ++
i)
119 symMatrix = PyList_New(3);
120 self->symlist->getMatrices(
i, L, R);
121 for (
int j=0;
j < 3; ++
j)
123 row = Py_BuildValue(
"[fff]", R(
j,0), R(
j,1), R(
j,2));
124 PyList_SetItem(symMatrix,
j,row);
126 PyList_SetItem(symMatrices,
i+1,symMatrix);
◆ SymList_new()
PyObject* SymList_new |
( |
PyTypeObject * |
type, |
|
|
PyObject * |
args, |
|
|
PyObject * |
kwargs |
|
) |
| |
◆ SymList_readSymmetryFile()
PyObject* SymList_readSymmetryFile |
( |
PyObject * |
obj, |
|
|
PyObject * |
args, |
|
|
PyObject * |
kwargs |
|
) |
| |
Definition at line 57 of file python_symmetry.cpp.
61 if (PyArg_ParseTuple(args,
"s", &str))
66 self->symlist->readSymmetryFile(str);
◆ PyXmippError
◆ SymList_methods
PyMethodDef SymList_methods[] |
◆ SymListType