aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/cell.c15
-rw-r--r--libcrystfel/src/cell.h12
2 files changed, 27 insertions, 0 deletions
diff --git a/libcrystfel/src/cell.c b/libcrystfel/src/cell.c
index 6b1d58c7..e785c1c8 100644
--- a/libcrystfel/src/cell.c
+++ b/libcrystfel/src/cell.c
@@ -579,6 +579,21 @@ LatticeType cell_get_lattice_type(UnitCell *cell)
}
+struct g6 cell_get_G6(UnitCell *cell)
+{
+ double a, b, c, al, be, ga;
+ struct g6 g;
+ cell_get_parameters(cell, &a, &b, &c, &al, &be, &ga);
+ g.A = a*a;
+ g.B = b*b;
+ g.C = c*c;
+ g.D = 2.0*b*c*cos(al);
+ g.E = 2.0*a*c*cos(be);
+ g.F = 2.0*a*b*cos(ga);
+ return g;
+}
+
+
char cell_get_unique_axis(UnitCell *cell)
{
return cell->unique_axis;
diff --git a/libcrystfel/src/cell.h b/libcrystfel/src/cell.h
index 4bbc1be2..e12fc209 100644
--- a/libcrystfel/src/cell.h
+++ b/libcrystfel/src/cell.h
@@ -132,6 +132,18 @@ extern void cell_set_reciprocal(UnitCell *cell,
extern LatticeType cell_get_lattice_type(UnitCell *cell);
extern void cell_set_lattice_type(UnitCell *cell, LatticeType lattice_type);
+struct g6
+{
+ double A;
+ double B;
+ double C;
+ double D;
+ double E;
+ double F;
+};
+
+extern struct g6 cell_get_G6(UnitCell *cell);
+
extern char cell_get_centering(UnitCell *cell);
extern void cell_set_centering(UnitCell *cell, char centering);