aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-01-16 14:44:06 +0100
committerThomas White <taw@physics.org>2023-01-16 15:08:30 +0100
commit2f097fb86bcde6420d23988885f4c23776a934b7 (patch)
tree74f49c1de661606f13b5ac6b7ade940cd773a882
parentb3be317e1f147298da295ebcb423f6d26d4a830c (diff)
partial_sim: Add quaternion to stream
-rw-r--r--src/partial_sim.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/partial_sim.c b/src/partial_sim.c
index 3fd8cf4c..d934e9f4 100644
--- a/src/partial_sim.c
+++ b/src/partial_sim.c
@@ -410,8 +410,12 @@ static void run_job(void *vwargs, int cookie)
if ( wargs->template_cell == NULL ) {
/* Set up a random orientation */
struct quaternion orientation;
+ char tmp[128];
orientation = random_quaternion(qargs->rngs[cookie]);
crystal_set_cell(cr, cell_rotate(qargs->cell, orientation));
+ snprintf(tmp, 127, "quaternion = %f %f %f %f",
+ orientation.w, orientation.x, orientation.y, orientation.z);
+ crystal_add_notes(cr, tmp);
} else {
crystal_set_cell(cr, wargs->template_cell);
}