/* * get_hkl.c * * Small program to write out a list of h,k,l,I values given a structure * * (c) 2006-2010 Thomas White * * Part of CrystFEL - crystallography with a FEL * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include "utils.h" #include "sfac.h" #include "reflections.h" #include "symmetry.h" static void show_help(const char *s) { printf("Syntax: %s [options]\n\n", s); printf( "Write idealised intensity lists.\n" "\n" " -h, --help Display this help message.\n" "\n" " -t, --template= Only include reflections mentioned in file.\n" " --poisson Simulate Poisson samples.\n" " -y, --symmetry= The symmetry of the input file (-i).\n" " -w, --twin= Generate twinned data according to the given\n" " point group.\n" " -o, --output= Output filename (default: stdout).\n" " -i, --intensities= Read intensities from file instead of\n" " calculating them from scratch. You might use\n" " this if you need to apply noise or twinning.\n" " -p, --pdb= PDB file from which to get the structure.\n" ); } /* Apply Poisson noise to all reflections */ static void noisify_reflections(double *ref) { signed int h, k, l; for ( h=-INDMAX; hh, it->k, it->l, &h, &k, &l, holo); if ( find_item(new, h, k, l) ) continue; n = num_equivs(h, k, l, holo); mean = 0.0; skip = 0; for ( j=0; jcell); delete_items(input_items); delete_items(write_items); return 0; }