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 .def("d", (double (UnitCell::*)(const V3D &) const) & UnitCell::d, (arg("self"), arg("hkl")),
176 "Returns :math:`d`-spacing for a given H, K, L coordinate in "
177 ":math:`\\rm{\\AA}`.")
178 .def("dstar", (double (UnitCell::*)(double, double, double) const) & UnitCell::dstar,
179 (arg("self"), arg("h"), arg("k"), arg("l")),
180 "Returns :math:`d^{*} = 1/d` for a given H, K, L coordinate in "
181 ":math:`\\rm{\\AA}^{3}`.")
182 .def("errora", (double (UnitCell::*)() const) & UnitCell::errora, arg("self"),
183 "Returns the error in the :math:`a` unit cell length.")
184 .def("errorb", (double (UnitCell::*)() const) & UnitCell::errorb, arg("self"),
185 "Returns the error in the :math:`b` unit cell length.")
186 .def("errorc", (double (UnitCell::*)() const) & UnitCell::errorc, arg("self"),
187 "Returns the error in the :math:`c` unit cell length.")
188 .def("erroralpha", (double (UnitCell::*)(int const) const) & UnitCell::erroralpha,
189 (arg("self"), arg("Unit") = static_cast<int>(angDegrees)),
190 "Returns the error in the :math:`\\alpha` angle of the unit cell.")
191 .def("errorbeta", (double (UnitCell::*)(int const) const) & UnitCell::errorbeta,
192 (arg("self"), arg("Unit") = static_cast<int>(angDegrees)),
193 "Returns the error in :math:`\\beta` angle of the unit cell.")
194 .def("errorgamma", (double (UnitCell::*)(int const) const) & UnitCell::errorgamma,
195 (arg("self"), arg("Unit") = static_cast<int>(angDegrees)),
196 "Returns the error in :math:`\\gamma` angle of the unit cell.")
197 .def("gamma", (double (UnitCell::*)() const) & UnitCell::gamma, arg("self"),
198 "Returns the :math:`\\gamma` angle for this unit cell in degrees.")
199 .def("gammastar", (double (UnitCell::*)() const) & UnitCell::gammastar, arg("self"),
200 "Returns the :math:`\\gamma^{*}` angle for this unit cell in "
201 "degrees.")
202 .def("recAngle",
203 (double (UnitCell::*)(double, double, double, double, double, double, int const) const) & UnitCell::recAngle,
204 (arg("self"), arg("h1"), arg("k1"), arg("l1"), arg("h2"), arg("k2"), arg("l2"),
205 arg("Unit") = static_cast<int>(angDegrees)),
206 "Returns the angle in reciprocal space between vectors given by "
207 "(:math:`h_1, k_1, l_1`) and (:math:`h_2, k_2, l_2`) (in "
208 "degrees or radians). The optional parameter ``Unit`` controls "
209 "the units for the angles, and can have the value of ``Degrees`` or "
210 "``Radians``. By default Unit = Degrees")
211 .def("recVolume", (double (UnitCell::*)() const) & UnitCell::recVolume, arg("self"),
212 "Return the volume of the reciprocal unit cell (in "
213 ":math:`\\rm{\\AA}^{-3}`)")
214 .def("set", (void (UnitCell::*)(double, double, double, double, double, double, int const)) & UnitCell::set,
215 (arg("self"), arg("_a"), arg("_b"), arg("_c"), arg("_alpha"), arg("_beta"), arg("_gamma"),
216 arg("Unit") = static_cast<int>(angDegrees)),
217 "Set the parameters of the unit cell. Angles can be set in either"
218 "degrees or radians using the ``Unit`` parameter (0 = degrees, "
219 "1 = radians)")
220 .def("seta", (void (UnitCell::*)(double))(&UnitCell::seta), (arg("self"), arg("_a")),
221 "Set the length of the :math:`a` direction of the unit cell.")
222 .def("setalpha", (void (UnitCell::*)(double, int const))(&UnitCell::setalpha),
223 (arg("self"), arg("_alpha"), arg("Unit") = static_cast<int>(angDegrees)),
224 "Set the :math:`\\alpha` angle of the unit cell. The angle can be "
225 "set "
226 "either in degrees or radians using the ``Unit`` parameter.")
227 .def("setb", (void (UnitCell::*)(double))(&UnitCell::setb), (arg("self"), arg("_b")),
228 "Set the length of the :math:`b` direction of the unit cell.")
229 .def("setbeta", (void (UnitCell::*)(double, int const))(&UnitCell::setbeta),
230 (arg("self"), arg("_beta"), arg("Unit") = static_cast<int>(angDegrees)),
231 "Set the :math:`\\beta` angle of the unit cell. The angle can be "
232 "set "
233 "either in degrees or radians using the ``Unit`` parameter.")
234 .def("setc", (void (UnitCell::*)(double))(&UnitCell::setc), (arg("self"), arg("_c")),
235 "Set the length of the :math:`c` direction of the unit cell.")
236 .def("setgamma", (void (UnitCell::*)(double, int const))(&UnitCell::setgamma),
237 (arg("self"), arg("_gamma"), arg("Unit") = static_cast<int>(angDegrees)),
238 "Set the :math:`\\gamma` angle of the unit cell. The angle can be "
239 "set "
240 "either in degrees or radians using the ``Unit`` parameter.")
241 .def("setError",
242 (void (UnitCell::*)(double, double, double, double, double, double, int const)) & UnitCell::setError,
243 (arg("self"), arg("_aerr"), arg("_berr"), arg("_cerr"), arg("_alphaerr"), arg("_betaerr"), arg("_gammaerr"),
244 arg("Unit") = static_cast<int>(angDegrees)),
245 "Set the errors in the unit cell parameters.")
246 .def("setErrora", (void (UnitCell::*)(double))(&UnitCell::setErrora), (arg("self"), arg("_aerr")),
247 "Set the error in the length of the :math:`a` direction of the unit "
248 "cell.")
249 .def("setErroralpha", (void (UnitCell::*)(double, int const))(&UnitCell::setErroralpha),
250 (arg("self"), arg("_alphaerr"), arg("Unit") = static_cast<int>(angDegrees)),
251 "Set the error in the :math:`\\alpha` angle of the unit cell.")
252 .def("setErrorb", (void (UnitCell::*)(double))(&UnitCell::setErrorb), (arg("self"), arg("_berr")),
253 "Set the error in the length of the :math:`b` direction of the unit "
254 "cell.")
255 .def("setErrorbeta", (void (UnitCell::*)(double, int const))(&UnitCell::setErrorbeta),
256 (arg("self"), arg("_betaerr"), arg("Unit") = static_cast<int>(angDegrees)),
257 "Set the error in the :math:`\\beta` angle of the unit cell using "
258 "the "
259 "``Unit`` parameter.")
260 .def("setErrorc", (void (UnitCell::*)(double))(&UnitCell::setErrorc), (arg("self"), arg("_cerr")),
261 "Set the error in the length of the :math:`c` direction of the unit "
262 "cell.")
263 .def("setErrorgamma", (void (UnitCell::*)(double, int const))(&UnitCell::setErrorgamma),
264 (arg("self"), arg("_gammaerr"), arg("Unit") = static_cast<int>(angDegrees)),
265 "Set the error in the :math:`\\gamma` angle of the unit cell using "
266 "the "
267 "``Unit`` parameter.")
268 .def("setModVec1", (void (UnitCell::*)(const V3D &)) & UnitCell::setModVec1, (arg("self"), arg("vec")),
269 "Set the first modulated structure vector")
270 .def("setModVec2", (void (UnitCell::*)(const V3D &)) & UnitCell::setModVec2, (arg("self"), arg("vec")),
271 "Set the second modulated structure vector")
272 .def("setModVec3", (void (UnitCell::*)(const V3D &)) & UnitCell::setModVec3, (arg("self"), arg("vec")),
273 "Set the third modulated structure vector")
274 .def("setMaxOrder", &UnitCell::setMaxOrder, "Set the maximum order of modulated vectors searched")
275 .def("volume", (double (UnitCell::*)() const) & UnitCell::volume, arg("self"),
276 "Return the volume of the unit cell (in :math:`\\rm{\\AA}{^3}`)")
277 .def("getG", &UnitCell::getG, arg("self"), return_readonly_numpy(),
278 "Returns the metric tensor for the unit cell. This will return a "
279 ":class:`numpy.ndarray` with shape ``(3,3)``.")
280 .def("getGstar", &UnitCell::getGstar, arg("self"), return_readonly_numpy(),
281 "Returns the metric tensor for the reciprocal unit cell. This will "
282 "return a :class:`numpy.ndarray` with shape ``(3,3)``.")
283 .def("getB", &UnitCell::getB, arg("self"), return_readonly_numpy(),
284 "Returns the :math:`B` matrix for this unit cell. This will be in a "
285 "right-handed coordinate system and using the Busing-Levy "
286 "convention. This will return a :class:`numpy.ndarray` with shape "
287 "``(3,3)``.")
288 .def("getBinv", &UnitCell::getBinv, arg("self"), return_readonly_numpy(),
289 "Returns the inverse of the :math:`B` matrix for this unit cell."
290 "This will return a :class:`numpy.ndarray` with shape ``(3,3)``. "
291 "See also :func:`~mantid.geometry.UnitCell.getB`.")
292 .def("getModHKL", &UnitCell::getModHKL, arg("self"), return_readonly_numpy(),
293 "Returns the :math:`ModHKL` matrix for this unit cell. This will be "
294 "in a "
295 "right-handed coordinate system and using the Busing-Levy "
296 "convention. This will return a :class:`numpy.ndarray` with shape "
297 "``(3,3)``.")
298 .def("getMaxOrder", &UnitCell::getMaxOrder, arg("self"),
299 "Returns the number of modulation vectors. This will return an "
300 "int.")
301 .def("getModVec", &UnitCell::getModVec, (arg("self"), arg("i")), "Returns the ith modulation vector")
302 .def("recalculateFromGstar", &recalculateFromGstar, (arg("self"), arg("NewGstar")),
303 "Recalculate the unit cell parameters from a metric tensor. This "
304 "method accepts a :class:`numpy.ndarray` with shape ``(3,3)``.")
305 .def("__str__", &__str__implementation)
306 .def("__repr__", &__repr__implementation);
307
308 scope().attr("deg2rad") = Mantid::Geometry::deg2rad;
309 scope().attr("rad2deg") = Mantid::Geometry::rad2deg;
310}
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...