From 2059ec75d956d1a1a63f4e215de3986502600623 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 29 Mar 2010 18:43:32 +0200 Subject: compare_hkl: Display R-factor --- src/compare_hkl.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'src/compare_hkl.c') diff --git a/src/compare_hkl.c b/src/compare_hkl.c index 63daf318..433459ed 100644 --- a/src/compare_hkl.c +++ b/src/compare_hkl.c @@ -24,6 +24,7 @@ #include "utils.h" #include "sfac.h" #include "reflections.h" +#include "statistics.h" static void show_help(const char *s) @@ -49,6 +50,12 @@ int main(int argc, char *argv[]) char *afile = NULL; char *bfile = NULL; signed int h, k, l; + double scale, R; + unsigned int *c1; + unsigned int *c2; + unsigned int *cjoint; + int i; + int nc1, nc2, ncom; /* Long options */ const struct option longopts[] = { @@ -93,12 +100,14 @@ int main(int argc, char *argv[]) } cell = load_cell_from_pdb("molecule.pdb"); - ref1 = read_reflections(afile, NULL); + c1 = new_list_count(); + ref1 = read_reflections(afile, c1); if ( ref1 == NULL ) { ERROR("Couldn't open file '%s'\n", afile); return 1; } - ref2 = read_reflections(bfile, NULL); + c2 = new_list_count(); + ref2 = read_reflections(bfile, c2); if ( ref2 == NULL ) { ERROR("Couldn't open file '%s'\n", bfile); return 1; @@ -122,6 +131,20 @@ int main(int argc, char *argv[]) } } + cjoint = new_list_count(); + nc1 = 0; + nc2 = 0; + ncom = 0; + for ( i=0; i