From 224a636f1b86d8107c94492d6c5eaaef059312f8 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 1 Feb 2018 15:37:08 +0100 Subject: Create a new UnitCell when rotating the crystal --- src/post-refinement.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/post-refinement.c') diff --git a/src/post-refinement.c b/src/post-refinement.c index 088e25dd..c89669c1 100644 --- a/src/post-refinement.c +++ b/src/post-refinement.c @@ -289,6 +289,7 @@ static double residual_f(const gsl_vector *v, void *pp) RefList *list; struct image im; Crystal *cr; + UnitCell *cell; double res; int i; @@ -297,6 +298,9 @@ static double residual_f(const gsl_vector *v, void *pp) } cr = crystal_copy(pv->cr); + cell = cell_new_from_cell(crystal_get_cell(cr)); + if ( cell == NULL ) return GSL_NAN; + crystal_set_cell(cr, cell); im = *crystal_get_image(cr); crystal_set_image(cr, &im); apply_parameters(v, pv->initial, pv->rv, cr); -- cgit v1.2.3