12#include <boost/python/class.hpp>
13#include <boost/python/enum.hpp>
14#include <boost/python/list.hpp>
15#include <boost/python/operators.hpp>
16#include <boost/python/register_ptr_to_python.hpp>
17#include <boost/python/scope.hpp>
18#include <boost/python/self.hpp>
31bool isEquivalent(
const PointGroup &self,
const object &hkl1,
const object &hkl2) {
35boost::python::list getEquivalents(
const PointGroup &self,
const object &hkl) {
38 boost::python::list pythonEquivalents;
39 for (
const auto &equivalent : equivalents) {
40 pythonEquivalents.append(equivalent);
43 return pythonEquivalents;
50std::string __repr__implementation(
const PointGroup &self) {
52 ss <<
"PointGroupFactory.createPointGroup(\"";
60 register_ptr_to_python<std::shared_ptr<PointGroup>>();
62 scope pointGroupScope = class_<PointGroup, boost::noncopyable>(
"PointGroup", no_init);
64 enum_<PointGroup::CrystalSystem>(
"CrystalSystem")
73 enum_<PointGroup::LatticeSystem>(
"LatticeSystem")
82 class_<PointGroup, boost::noncopyable, bases<Group>>(
"PointGroup", no_init)
87 .def(
"isEquivalent", &isEquivalent, (arg(
"self"), arg(
"hkl1"), arg(
"hkl2")),
88 "Check whether the two HKLs are symmetrically equivalent.")
89 .def(
"getEquivalents", &getEquivalents, (arg(
"self"), arg(
"hkl")),
90 "Returns an array with all symmetry equivalents of the supplied "
92 .def(
"getReflectionFamily", &getReflectionFamily, (arg(
"self"), arg(
"hkl")),
93 "Returns the same HKL for all symmetry equivalents.")
95 .def(
"__repr__", &__repr__implementation);
#define GET_POINTER_SPECIALIZATION(TYPE)
The class Group represents a set of symmetry operations (or symmetry group).
A class containing the Point Groups for a crystal.
bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const
Return true if the hkls are in same group.
std::string getSymbol() const
Hermann-Mauguin symbol.
std::string getName() const
Name of the point group.
LatticeSystem latticeSystem() const
std::vector< Kernel::V3D > getEquivalents(const Kernel::V3D &hkl) const
Returns a vector with all equivalent hkls.
CrystalSystem crystalSystem() const
Kernel::V3D getReflectionFamily(const Kernel::V3D &hkl) const
Returns the same hkl for all equivalent hkls.
Takes a Python object and if it supports indexing and is of length 3 then it will attempt to convert ...