aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/symmetry.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2012-10-15 18:51:50 +0200
committerThomas White <taw@physics.org>2012-10-15 18:51:50 +0200
commit79ac9f672d9f01ebce0248102f15cf4d669392b3 (patch)
tree6e34f5f0638924a7ce6b8104fe03813b474f5ba9 /libcrystfel/src/symmetry.c
parent4548f166eeb7d29f28793b39ede58cafaa2b64f8 (diff)
Add add_op_intmat()
Diffstat (limited to 'libcrystfel/src/symmetry.c')
-rw-r--r--libcrystfel/src/symmetry.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/libcrystfel/src/symmetry.c b/libcrystfel/src/symmetry.c
index 5ea22e98..bff64b57 100644
--- a/libcrystfel/src/symmetry.c
+++ b/libcrystfel/src/symmetry.c
@@ -1701,3 +1701,22 @@ const char *symmetry_name(const SymOpList *ops)
{
return ops->name;
}
+
+
+/**
+ * add_op_intmat:
+ * @s: A %SymOpList
+ * @m: An %IntegerMatrix
+ *
+ * Adds @m to the @s. Operations are NOT cross-multiplied, i.e. the result
+ * might not be a point group.
+ */
+
+void add_op_intmat(SymOpList *s, const IntegerMatrix *m)
+{
+ add_symop(s,
+ v(intmat_get(m, 0, 0), intmat_get(m, 0, 1), 0, intmat_get(m, 0, 2)),
+ v(intmat_get(m, 1, 0), intmat_get(m, 1, 1), 0, intmat_get(m, 1, 2)),
+ v(intmat_get(m, 2, 0), intmat_get(m, 2, 1), 0, intmat_get(m, 2, 2)),
+ 1);
+}