Mantid
Loading...
Searching...
No Matches
UnitCell.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
12
13#include <boost/python/class.hpp>
14#include <boost/python/enum.hpp>
15#include <boost/python/operators.hpp>
16#include <boost/python/scope.hpp>
17#include <boost/python/self.hpp>
18
25using namespace boost::python;
26
27// Functions purely to aid with wrapping
28namespace //<unnamed>
29{
30using namespace Mantid::PythonInterface;
31
33void recalculateFromGstar(UnitCell &self, const object &values) {
34 // Create a double matrix and put this in to the unit cell
36}
37
39std::string __str__implementation(const UnitCell &self) {
40 std::stringstream ss;
41 ss << "UnitCell with lattice parameters:";
42 ss << " a = " << self.a();
43 ss << " b = " << self.b();
44 ss << " c = " << self.c();
45
46 ss << " alpha = " << self.alpha();
47 ss << " beta = " << self.beta();
48 ss << " gamma = " << self.gamma();
49
50 return ss.str();
51}
52
54std::string __repr__implementation(const UnitCell &self) {
55 std::stringstream ss;
56 ss << "UnitCell(";
57 ss << self.a() << ", ";
58 ss << self.b() << ", ";
59 ss << self.c() << ", ";
60
61 ss << self.alpha() << ", ";
62 ss << self.beta() << ", ";
63 ss << self.gamma();
64 ss << ")";
65
66 return ss.str();
67}
68
69} // namespace
70
72 enum_<AngleUnits>("AngleUnits").value("Degrees", angDegrees).value("Radians", angRadians).export_values();
73
75 using return_readonly_numpy = return_value_policy<Policies::MatrixRefToNumpy<Converters::WrapReadOnly>>;
76
77 class_<UnitCell>("UnitCell", init<>("Default constructor, with "
78 ":math:`a=b=c=1 \\rm{\\AA}, \\alpha = \\beta = \\gamma = 90^\\circ`"))
79 .def(init<UnitCell const &>((arg("self"), arg("other")), "Copy constructor for creating a new unit cell."))
80 .def(init<double, double, double>((arg("self"), arg("_a"), arg("_b"), arg("_c")),
81 "Constructor using :math:`a, b, c` (in :math:`\\rm{\\AA}`), "
82 ":math:`\\alpha=\\beta=\\gamma=90^\\circ`"))
83 .def(init<double, double, double, double, double, double, optional<int>>(
84 (arg("self"), arg("_a"), arg("_b"), arg("_c"), arg("_alpha"), arg("_beta"), arg("_gamma"),
85 arg("Unit") = static_cast<int>(angDegrees)),
86 "Constructor using "
87 ":math:`a, b, c` (in :math:`\\rm{\\AA}`), :math:`\\alpha, \\beta, "
88 "\\gamma` (in "
89 "degrees or radians). The optional parameter ``Unit`` controls the "
90 "units for the angles, and can have the value of ``Degrees`` or "
91 "``Radians``. By default ``Unit`` = ``Degrees``."))
92 .def("a", (double (UnitCell::*)() const) & UnitCell::a, arg("self"),
93 "Returns the length of the :math:`a` direction of the unit cell in "
94 ":math:`\\rm{\\AA}`.")
95 .def("a1", (double (UnitCell::*)() const) & UnitCell::a1, arg("self"),
96 "Returns the length of the :math:`a_{1} = a` direction of the unit "
97 "cell. "
98 "This is an alias for :func:`~mantid.geometry.UnitCell.a`. ")
99 .def("a2", (double (UnitCell::*)() const) & UnitCell::a2, arg("self"),
100 "Returns the length of the :math:`a_{2} = b` direction of the unit "
101 "cell. "
102 "This is an alias for :func:`~mantid.geometry.UnitCell.b`. ")
103 .def("a3", (double (UnitCell::*)() const) & UnitCell::a3, arg("self"),
104 "Returns the length of the :math:`a_{2} = c` direction of the unit "
105 "cell. "
106 "This is an alias for :func:`~mantid.geometry.UnitCell.c`. ")
107 .def("alpha", (double (UnitCell::*)() const) & UnitCell::alpha, arg("self"),
108 "Returns the :math:`\\alpha` angle for this unit cell in degrees.")
109 .def("alpha1", (double (UnitCell::*)() const) & UnitCell::alpha1, arg("self"),
110 "Returns the :math:`\\alpha_{1} = \\alpha` angle of the unit cell "
111 "in radians. "
112 "See also :func:`~mantid.geometry.UnitCell.alpha`. ")
113 .def("alpha2", (double (UnitCell::*)() const) & UnitCell::alpha2, arg("self"),
114 "Returns the :math:`\\alpha_{2} = \\beta` angle of the unit cell in "
115 "radians. "
116 "See also :func:`~mantid.geometry.UnitCell.beta`. ")
117 .def("alpha3", (double (UnitCell::*)() const) & UnitCell::alpha3, arg("self"),
118 "Returns the :math:`\\alpha_{3} = \\gamma` angle of the unit cell "
119 "in radians. "
120 "See also :func:`~mantid.geometry.UnitCell.gamma`. ")
121 .def("alphastar", (double (UnitCell::*)() const) & UnitCell::alphastar, arg("self"),
122 "Returns the reciprocal :math:`\\alpha` angle for this unit cell in "
123 "degrees.")
124 .def("astar", (double (UnitCell::*)() const) & UnitCell::astar, arg("self"),
125 "Returns the length of the reciprocal :math:`a` direction for this "
126 "unit cell in reciprocal :math:`\\rm{\\AA}`.")
127 .def("b", (double (UnitCell::*)() const) & UnitCell::b, arg("self"),
128 "Returns the length of the :math:`b` direction of the unit cell in "
129 ":math:`\\rm{\\AA}`.")
130 .def("b1", (double (UnitCell::*)() const) & UnitCell::b1, arg("self"),
131 "Returns the length of the :math:`b_{1} = a^{*}` direction of the "
132 "unit "
133 "cell. This is an alias for "
134 ":func:`~mantid.geometry.UnitCell.astar`. ")
135 .def("b2", (double (UnitCell::*)() const) & UnitCell::b2, arg("self"),
136 "Returns the length of the :math:`b_{2} = b^{*}` direction of the "
137 "unit "
138 "cell. This is an alias for "
139 ":func:`~mantid.geometry.UnitCell.bstar`. ")
140 .def("b3", (double (UnitCell::*)() const) & UnitCell::b3, arg("self"),
141 "Returns the length of the :math:`b_{3} = c^{*}` direction of the "
142 "unit "
143 "cell. This is an alias for "
144 ":func:`~mantid.geometry.UnitCell.cstar`. ")
145 .def("beta", (double (UnitCell::*)() const) & UnitCell::beta, arg("self"),
146 "Returns the :math:`\\beta` angle for this unit cell in degrees.")
147 .def("beta1", (double (UnitCell::*)() const) & UnitCell::beta1, arg("self"),
148 "Returns the :math:`\\beta_{1} = \\alpha^{*}` angle of the unit "
149 "cell in "
150 "radians. See also :func:`~mantid.geometry.UnitCell.alphastar`. ")
151 .def("beta2", (double (UnitCell::*)() const) & UnitCell::beta2, arg("self"),
152 "Returns the :math:`\\beta_{2} = \\beta^{*}` angle of the unit cell "
153 "in radians. "
154 "See also :func:`~mantid.geometry.UnitCell.betastar`. ")
155 .def("beta3", (double (UnitCell::*)() const) & UnitCell::beta3, arg("self"),
156 "Returns the :math:`\\beta_{3} = \\gamma^{*}` angle of the unit "
157 "cell in "
158 "radians. See also :func:`~mantid.geometry.UnitCell.gammastar`. ")
159 .def("betastar", (double (UnitCell::*)() const) & UnitCell::betastar, arg("self"),
160 "Returns the :math:`\\beta^{*}` angle for this unit cell in "
161 "degrees.")
162 .def("bstar", (double (UnitCell::*)() const) & UnitCell::bstar, arg("self"),
163 "Returns the length of the :math:`b^{*}` direction for this "
164 "unit cell in reciprocal :math:`\\rm{\\AA}`.")
165 .def("c", (double (UnitCell::*)() const) & UnitCell::c, arg("self"),
166 "Returns the length of the :math:`c` direction of the unit cell in "
167 ":math:`\\rm{\\AA}`.")
168 .def("cstar", (double (UnitCell::*)() const) & UnitCell::cstar, arg("self"),
169 "Returns the length of the :math:`c^{*}` direction for this "
170 "unit cell in reciprocal :math:`\\rm{\\AA}`.")
171 .def("d", (double (UnitCell::*)(double, double, double) const) & UnitCell::d,
172 (arg("self"), arg("h"), arg("k"), arg("l")),
173 "Returns :math:`d`-spacing for a given H, K, L coordinate in "
174 ":math:`\\rm{\\AA}`.")
175 // cppcheck-suppress cstyleCast
176 .def("d", (double (UnitCell::*)(const V3D &) const) & UnitCell::d, (arg("self"), arg("hkl")),
177 "Returns :math:`d`-spacing for a given H, K, L coordinate in "
178 ":math:`\\rm{\\AA}`.")
179 .def("dstar", (double (UnitCell::*)(double, double, double) const) & UnitCell::dstar,
180 (arg("self"), arg("h"), arg("k"), arg("l")),
181 "Returns :math:`d^{*} = 1/d` for a given H, K, L coordinate in "
182 ":math:`\\rm{\\AA}^{3}`.")
183 .def("errora", (double (UnitCell::*)() const) & UnitCell::errora, arg("self"),
184 "Returns the error in the :math:`a` unit cell length.")
185 .def("errorb", (double (UnitCell::*)() const) & UnitCell::errorb, arg("self"),
186 "Returns the error in the :math:`b` unit cell length.")
187 .def("errorc", (double (UnitCell::*)() const) & UnitCell::errorc, arg("self"),
188 "Returns the error in the :math:`c` unit cell length.")
189 .def("erroralpha", (double (UnitCell::*)(int const) const) & UnitCell::erroralpha,
190 (arg("self"), arg("Unit") = static_cast<int>(angDegrees)),
191 "Returns the error in the :math:`\\alpha` angle of the unit cell.")
192 .def("errorbeta", (double (UnitCell::*)(int const) const) & UnitCell::errorbeta,
193 (arg("self"), arg("Unit") = static_cast<int>(angDegrees)),
194 "Returns the error in :math:`\\beta` angle of the unit cell.")
195 .def("errorgamma", (double (UnitCell::*)(int const) const) & UnitCell::errorgamma,
196 (arg("self"), arg("Unit") = static_cast<int>(angDegrees)),
197 "Returns the error in :math:`\\gamma` angle of the unit cell.")
198 .def("gamma", (double (UnitCell::*)() const) & UnitCell::gamma, arg("self"),
199 "Returns the :math:`\\gamma` angle for this unit cell in degrees.")
200 .def("gammastar", (double (UnitCell::*)() const) & UnitCell::gammastar, arg("self"),
201 "Returns the :math:`\\gamma^{*}` angle for this unit cell in "
202 "degrees.")
203 .def("recAngle",
204 (double (UnitCell::*)(double, double, double, double, double, double, int const) const) & UnitCell::recAngle,
205 (arg("self"), arg("h1"), arg("k1"), arg("l1"), arg("h2"), arg("k2"), arg("l2"),
206 arg("Unit") = static_cast<int>(angDegrees)),
207 "Returns the angle in reciprocal space between vectors given by "
208 "(:math:`h_1, k_1, l_1`) and (:math:`h_2, k_2, l_2`) (in "
209 "degrees or radians). The optional parameter ``Unit`` controls "
210 "the units for the angles, and can have the value of ``Degrees`` or "
211 "``Radians``. By default Unit = Degrees")
212 .def("recVolume", (double (UnitCell::*)() const) & UnitCell::recVolume, arg("self"),
213 "Return the volume of the reciprocal unit cell (in "
214 ":math:`\\rm{\\AA}^{-3}`)")
215 .def("set", (void (UnitCell::*)(double, double, double, double, double, double, int const))&UnitCell::set,
216 (arg("self"), arg("_a"), arg("_b"), arg("_c"), arg("_alpha"), arg("_beta"), arg("_gamma"),
217 arg("Unit") = static_cast<int>(angDegrees)),
218 "Set the parameters of the unit cell. Angles can be set in either"
219 "degrees or radians using the ``Unit`` parameter (0 = degrees, "
220 "1 = radians)")
221 .def("seta", (void (UnitCell::*)(double))(&UnitCell::seta), (arg("self"), arg("_a")),
222 "Set the length of the :math:`a` direction of the unit cell.")
223 .def("setalpha", (void (UnitCell::*)(double, int const))(&UnitCell::setalpha),
224 (arg("self"), arg("_alpha"), arg("Unit") = static_cast<int>(angDegrees)),
225 "Set the :math:`\\alpha` angle of the unit cell. The angle can be "
226 "set "
227 "either in degrees or radians using the ``Unit`` parameter.")
228 .def("setb", (void (UnitCell::*)(double))(&UnitCell::setb), (arg("self"), arg("_b")),
229 "Set the length of the :math:`b` direction of the unit cell.")
230 .def("setbeta", (void (UnitCell::*)(double, int const))(&UnitCell::setbeta),
231 (arg("self"), arg("_beta"), arg("Unit") = static_cast<int>(angDegrees)),
232 "Set the :math:`\\beta` angle of the unit cell. The angle can be "
233 "set "
234 "either in degrees or radians using the ``Unit`` parameter.")
235 .def("setc", (void (UnitCell::*)(double))(&UnitCell::setc), (arg("self"), arg("_c")),
236 "Set the length of the :math:`c` direction of the unit cell.")
237 .def("setgamma", (void (UnitCell::*)(double, int const))(&UnitCell::setgamma),
238 (arg("self"), arg("_gamma"), arg("Unit") = static_cast<int>(angDegrees)),
239 "Set the :math:`\\gamma` angle of the unit cell. The angle can be "
240 "set "
241 "either in degrees or radians using the ``Unit`` parameter.")
242 .def("setError",
243 (void (UnitCell::*)(double, double, double, double, double, double, int const))&UnitCell::setError,
244 (arg("self"), arg("_aerr"), arg("_berr"), arg("_cerr"), arg("_alphaerr"), arg("_betaerr"), arg("_gammaerr"),
245 arg("Unit") = static_cast<int>(angDegrees)),
246 "Set the errors in the unit cell parameters.")
247 .def("setErrora", (void (UnitCell::*)(double))(&UnitCell::setErrora), (arg("self"), arg("_aerr")),
248 "Set the error in the length of the :math:`a` direction of the unit "
249 "cell.")
250 .def("setErroralpha", (void (UnitCell::*)(double, int const))(&UnitCell::setErroralpha),
251 (arg("self"), arg("_alphaerr"), arg("Unit") = static_cast<int>(angDegrees)),
252 "Set the error in the :math:`\\alpha` angle of the unit cell.")
253 .def("setErrorb", (void (UnitCell::*)(double))(&UnitCell::setErrorb), (arg("self"), arg("_berr")),
254 "Set the error in the length of the :math:`b` direction of the unit "
255 "cell.")
256 .def("setErrorbeta", (void (UnitCell::*)(double, int const))(&UnitCell::setErrorbeta),
257 (arg("self"), arg("_betaerr"), arg("Unit") = static_cast<int>(angDegrees)),
258 "Set the error in the :math:`\\beta` angle of the unit cell using "
259 "the "
260 "``Unit`` parameter.")
261 .def("setErrorc", (void (UnitCell::*)(double))(&UnitCell::setErrorc), (arg("self"), arg("_cerr")),
262 "Set the error in the length of the :math:`c` direction of the unit "
263 "cell.")
264 .def("setErrorgamma", (void (UnitCell::*)(double, int const))(&UnitCell::setErrorgamma),
265 (arg("self"), arg("_gammaerr"), arg("Unit") = static_cast<int>(angDegrees)),
266 "Set the error in the :math:`\\gamma` angle of the unit cell using "
267 "the "
268 "``Unit`` parameter.")
269 .def("setModVec1", (void (UnitCell::*)(const V3D &))&UnitCell::setModVec1, (arg("self"), arg("vec")),
270 "Set the first modulated structure vector")
271 .def("setModVec2", (void (UnitCell::*)(const V3D &))&UnitCell::setModVec2, (arg("self"), arg("vec")),
272 "Set the second modulated structure vector")
273 .def("setModVec3", (void (UnitCell::*)(const V3D &))&UnitCell::setModVec3, (arg("self"), arg("vec")),
274 "Set the third modulated structure vector")
275 .def("setMaxOrder", &UnitCell::setMaxOrder, "Set the maximum order of modulated vectors searched")
276 .def("volume", (double (UnitCell::*)() const) & UnitCell::volume, arg("self"),
277 "Return the volume of the unit cell (in :math:`\\rm{\\AA}{^3}`)")
278 .def("getG", &UnitCell::getG, arg("self"), return_readonly_numpy(),
279 "Returns the metric tensor for the unit cell. This will return a "
280 ":class:`numpy.ndarray` with shape ``(3,3)``.")
281 .def("getGstar", &UnitCell::getGstar, arg("self"), return_readonly_numpy(),
282 "Returns the metric tensor for the reciprocal unit cell. This will "
283 "return a :class:`numpy.ndarray` with shape ``(3,3)``.")
284 .def("getB", &UnitCell::getB, arg("self"), return_readonly_numpy(),
285 "Returns the :math:`B` matrix for this unit cell. This will be in a "
286 "right-handed coordinate system and using the Busing-Levy "
287 "convention. This will return a :class:`numpy.ndarray` with shape "
288 "``(3,3)``.")
289 .def("getBinv", &UnitCell::getBinv, arg("self"), return_readonly_numpy(),
290 "Returns the inverse of the :math:`B` matrix for this unit cell."
291 "This will return a :class:`numpy.ndarray` with shape ``(3,3)``. "
292 "See also :func:`~mantid.geometry.UnitCell.getB`.")
293 .def("getModHKL", &UnitCell::getModHKL, arg("self"), return_readonly_numpy(),
294 "Returns the :math:`ModHKL` matrix for this unit cell. This will be "
295 "in a "
296 "right-handed coordinate system and using the Busing-Levy "
297 "convention. This will return a :class:`numpy.ndarray` with shape "
298 "``(3,3)``.")
299 .def("getMaxOrder", &UnitCell::getMaxOrder, arg("self"),
300 "Returns the number of modulation vectors. This will return an "
301 "int.")
302 .def("getModVec", &UnitCell::getModVec, (arg("self"), arg("i")), "Returns the ith modulation vector")
303 .def("recalculateFromGstar", &recalculateFromGstar, (arg("self"), arg("NewGstar")),
304 "Recalculate the unit cell parameters from a metric tensor. This "
305 "method accepts a :class:`numpy.ndarray` with shape ``(3,3)``.")
306 .def("__str__", &__str__implementation)
307 .def("__repr__", &__repr__implementation);
308
309 scope().attr("deg2rad") = Mantid::Geometry::deg2rad;
310 scope().attr("rad2deg") = Mantid::Geometry::rad2deg;
311}
void export_UnitCell()
Definition UnitCell.cpp:71
Class to implement unit cell of crystals.
Definition UnitCell.h:44
double astar() const
Get reciprocal lattice parameter.
Definition UnitCell.cpp:178
double betastar() const
Get reciprocal lattice parameter.
Definition UnitCell.cpp:198
const Kernel::DblMatrix & getB() const
Get the B-matrix.
Definition UnitCell.cpp:758
double alpha() const
Get lattice parameter.
Definition UnitCell.cpp:133
double erroralpha(const int angleunit=angDegrees) const
Get lattice parameter error.
Definition UnitCell.cpp:225
void set(double _a, double _b, double _c, double _alpha, double _beta, double _gamma, const int angleunit=angDegrees)
Set lattice parameters.
Definition UnitCell.cpp:303
double b2() const
Get reciprocal lattice parameter.
Definition UnitCell.cpp:153
const Kernel::DblMatrix & getGstar() const
Get the reciprocal metric tensor.
Definition UnitCell.cpp:754
double a(int nd) const
Get lattice parameter a1-a3 as function of index (0-2)
Definition UnitCell.cpp:94
int getMaxOrder() const
Get max order.
Definition UnitCell.cpp:596
double c() const
Get lattice parameter.
Definition UnitCell.cpp:128
const Kernel::DblMatrix & getModHKL() const
Get modulation vectors for satellites.
Definition UnitCell.cpp:548
double volume() const
Volume of the direct unit-cell.
Definition UnitCell.cpp:737
void setModVec2(double _dh2, double _dk2, double _dl2)
Set modulation vectors for satellites.
Definition UnitCell.cpp:421
double gammastar() const
Get reciprocal lattice parameter.
Definition UnitCell.cpp:203
double alpha2() const
Get lattice parameter.
Definition UnitCell.cpp:108
double a2() const
Get lattice parameter.
Definition UnitCell.cpp:84
double d(double h, double k, double l) const
Return d-spacing ( ) for a given h,k,l coordinate.
Definition UnitCell.cpp:700
double errorgamma(const int angleunit=angDegrees) const
Get lattice parameter error.
Definition UnitCell.cpp:252
void setbeta(double _beta, const int angleunit=angDegrees)
Set lattice parameter.
Definition UnitCell.cpp:657
double errorbeta(const int angleunit=angDegrees) const
Get lattice parameter error.
Definition UnitCell.cpp:239
void setErrorc(double _cerr)
Set lattice parameter error.
Definition UnitCell.cpp:631
void setalpha(double _alpha, const int angleunit=angDegrees)
Set lattice parameter.
Definition UnitCell.cpp:636
double beta() const
Get lattice parameter.
Definition UnitCell.cpp:138
void setError(double _aerr, double _berr, double _cerr, double _alphaerr, double _betaerr, double _gammaerr, const int angleunit=angDegrees)
Set lattice parameter errors.
Definition UnitCell.cpp:325
void setgamma(double _gamma, const int angleunit=angDegrees)
Set lattice parameter.
Definition UnitCell.cpp:680
double bstar() const
Get reciprocal lattice parameter.
Definition UnitCell.cpp:183
double a() const
Get lattice parameter.
Definition UnitCell.cpp:118
void setErrorgamma(double _gammaerr, const int angleunit=angDegrees)
Set lattice parameter error.
Definition UnitCell.cpp:692
void setErroralpha(double _alphaerr, const int angleunit=angDegrees)
Set lattice parameter error.
Definition UnitCell.cpp:647
void setErrorbeta(double _betaerr, const int angleunit=angDegrees)
Set lattice parameter error.
Definition UnitCell.cpp:669
double a3() const
Get lattice parameter.
Definition UnitCell.cpp:90
double beta1() const
Get reciprocal lattice parameter.
Definition UnitCell.cpp:163
const Kernel::DblMatrix & getBinv() const
Get the inverse of the B-matrix.
Definition UnitCell.cpp:762
const Kernel::DblMatrix & getG() const
Get the metric tensor.
Definition UnitCell.cpp:750
void setErrorb(double _berr)
Set lattice parameter error.
Definition UnitCell.cpp:622
double alpha1() const
Get lattice parameter.
Definition UnitCell.cpp:103
void setModVec3(double _dh3, double _dk3, double _dl3)
Set modulation vectors for satellites.
Definition UnitCell.cpp:433
double recVolume() const
Volume of the reciprocal lattice.
Definition UnitCell.cpp:743
double b() const
Get lattice parameter.
Definition UnitCell.cpp:123
double beta3() const
Get reciprocal lattice parameter.
Definition UnitCell.cpp:173
double alphastar() const
Get reciprocal lattice parameter.
Definition UnitCell.cpp:193
void setb(double _b)
Set lattice parameter.
Definition UnitCell.cpp:616
const Kernel::V3D getModVec(int j) const
Get modulation vectors for satellites.
Definition UnitCell.cpp:535
double errorc() const
Get lattice parameter error.
Definition UnitCell.cpp:218
double dstar(double h, double k, double l) const
Return d*=1/d ( ) for a given h,k,l coordinate.
Definition UnitCell.cpp:706
double b1() const
Get reciprocal lattice parameter.
Definition UnitCell.cpp:148
double recAngle(double h1, double k1, double l1, double h2, double k2, double l2, const int angleunit=angDegrees) const
Calculate the angle in degrees or radians between two reciprocal vectors (h1,k1,l1) and (h2,...
Definition UnitCell.cpp:718
double alpha3() const
Get lattice parameter.
Definition UnitCell.cpp:113
virtual void recalculateFromGstar(const Kernel::Matrix< double > &NewGstar)
Recalculate lattice from reciprocal metric tensor (Gstar=transpose(UB)*UB)
Definition UnitCell.cpp:836
void setErrora(double _aerr)
Set lattice parameter error.
Definition UnitCell.cpp:612
void setModVec1(double _dh1, double _dk1, double _dl1)
Set modulation vectors for satellites.
Definition UnitCell.cpp:409
void setc(double _c)
Set lattice parameter.
Definition UnitCell.cpp:625
void setMaxOrder(int MaxO)
Set modulation vectors for satellites.
Definition UnitCell.cpp:522
double beta2() const
Get reciprocal lattice parameter.
Definition UnitCell.cpp:168
double cstar() const
Get reciprocal lattice parameter.
Definition UnitCell.cpp:188
double a1() const
Get lattice parameter.
Definition UnitCell.cpp:79
double b3() const
Get reciprocal lattice parameter.
Definition UnitCell.cpp:158
double gamma() const
Get lattice parameter.
Definition UnitCell.cpp:143
double errora() const
Get lattice parameter error.
Definition UnitCell.cpp:208
void seta(double _a)
Set lattice parameter.
Definition UnitCell.cpp:606
double errorb() const
Get lattice parameter error.
Definition UnitCell.cpp:213
Class for 3D vectors.
Definition V3D.h:34
constexpr double deg2rad
Defines units/enum for Crystal work.
Definition AngleUnits.h:20
constexpr double rad2deg
Radians to degrees conversion factor.
Definition AngleUnits.h:23
AngleUnits
Flag for angle units used in UnitCell class.
Definition AngleUnits.h:26
Takes a Python object and if it supports indexing and is two dimensional it attempts to convert it to...