aboutsummaryrefslogtreecommitdiff
path: root/src/whirligig.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-10-23 14:18:40 +0200
committerThomas White <taw@physics.org>2019-03-11 16:49:36 +0100
commit481c13eac53cce18272ff3ef3e4994170c7d2e62 (patch)
treeb90d9fcda17a07d51fd919be4fd88a090da7e783 /src/whirligig.c
parent483593eab5edf7be2f769a8d2db9ac0f38329c8a (diff)
Change horribly confusing names of unit cell comparison functions
cells_are_similar -> compare_cell_parameters_and_orientation compare_cells -> compare_reindexed_cell_parameters_and_orientation cell_tool.c:cells_the_same -> cellutils.c:compare_cell_parameters All comparisons now done in real space, checking that centering is the same, and without uncentering anything.
Diffstat (limited to 'src/whirligig.c')
-rw-r--r--src/whirligig.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/whirligig.c b/src/whirligig.c
index f5a435c2..54ade40a 100644
--- a/src/whirligig.c
+++ b/src/whirligig.c
@@ -309,9 +309,9 @@ static IntegerMatrix *try_all(struct window *win, int n1, int n2,
for ( i=0; i<i1->n_crystals; i++ ) {
for ( j=0; j<i2->n_crystals; j++ ) {
- if ( compare_cells(crystal_get_cell(i1->crystals[i]),
- crystal_get_cell(i2->crystals[j]),
- 0.1, deg2rad(5.0), &m) )
+ if ( compare_reindexed_cell_parameters_and_orientation(crystal_get_cell(i1->crystals[i]),
+ crystal_get_cell(i2->crystals[j]),
+ 0.1, deg2rad(5.0), &m) )
{
if ( !crystal_used(win, n1, i)
&& !crystal_used(win, n2, j) )
@@ -377,9 +377,10 @@ static int try_join(struct window *win, int sn)
for ( j=0; j<win->img[win->join_ptr].n_crystals; j++ ) {
Crystal *cr2;
cr2 = win->img[win->join_ptr].crystals[j];
- if ( compare_cells(ref, crystal_get_cell(cr2),
- 0.1, deg2rad(5.0),
- &win->mat[sn][win->join_ptr]) ) {
+ if ( compare_reindexed_cell_parameters_and_orientation(ref, crystal_get_cell(cr2),
+ 0.1, deg2rad(5.0),
+ &win->mat[sn][win->join_ptr]) )
+ {
win->ser[sn][win->join_ptr] = j;
cell_free(ref);
return 1;