diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/check_hkl.c | 15 | ||||
-rw-r--r-- | src/compare_hkl.c | 14 | ||||
-rw-r--r-- | src/get_hkl.c | 24 | ||||
-rw-r--r-- | src/indexamajig.c | 16 | ||||
-rw-r--r-- | src/partial_sim.c | 2 | ||||
-rw-r--r-- | src/pattern_sim.c | 4 | ||||
-rw-r--r-- | src/render_hkl.c | 20 |
7 files changed, 47 insertions, 48 deletions
diff --git a/src/check_hkl.c b/src/check_hkl.c index f22373b0..e10f5f29 100644 --- a/src/check_hkl.c +++ b/src/check_hkl.c @@ -57,7 +57,7 @@ static void show_help(const char *s) " -h, --help Display this help message.\n" " --version Print CrystFEL version number and exit.\n" " -y, --symmetry=<sym> The symmetry of the input file.\n" -" -p, --pdb=<filename> PDB file to use.\n" +" -p, --pdb=<filename> Unit cell file to use (PDB or CrystFEL format).\n" " --rmin=<res> Low resolution cutoff (1/d in m^-1).\n" " --rmax=<res> High resolution cutoff (1/d in m^-1).\n" " --lowres=<n> Low resolution cutoff in (d in A).\n" @@ -692,7 +692,7 @@ int main(int argc, char *argv[]) RefList *list; Reflection *refl; RefListIterator *iter; - char *pdb = NULL; + char *cellfile = NULL; int rej = 0; float rmin_fix = -1.0; float rmax_fix = -1.0; @@ -751,7 +751,7 @@ int main(int argc, char *argv[]) break; case 'p' : - pdb = strdup(optarg); + cellfile = strdup(optarg); break; case 0 : @@ -833,13 +833,12 @@ int main(int argc, char *argv[]) file = strdup(argv[optind++]); - if ( pdb == NULL ) { - ERROR("You need to provide a PDB file containing" - " the unit cell.\n"); + if ( cellfile == NULL ) { + ERROR("You need to provide a unit cell.\n"); return 1; } - cell = load_cell_from_pdb(pdb); - free(pdb); + cell = load_cell_from_file(cellfile); + free(cellfile); raw_list = read_reflections(file); if ( raw_list == NULL ) { diff --git a/src/compare_hkl.c b/src/compare_hkl.c index e10b93aa..a35e4f3b 100644 --- a/src/compare_hkl.c +++ b/src/compare_hkl.c @@ -89,7 +89,7 @@ static void show_help(const char *s) "Compare intensity lists.\n" "\n" " -y, --symmetry=<sym> The symmetry of both the input files.\n" -" -p, --pdb=<filename> PDB file to use.\n" +" -p, --pdb=<filename> Unit cell file to use.\n" " --fom=<FoM> Calculate this figure of merit Choose from:\n" " R1I, R1F, R2, Rsplit, CC, CCstar,\n" " CCano, CRDano, Rano, Rano/Rsplit\n" @@ -916,7 +916,7 @@ int main(int argc, char *argv[]) RefList *list1_raw; RefList *list2_raw; enum fom fom = FOM_R1I; - char *pdb = NULL; + char *cellfile = NULL; float rmin_fix = -1.0; float rmax_fix = -1.0; double rmin, rmax; @@ -974,7 +974,7 @@ int main(int argc, char *argv[]) break; case 'p' : - pdb = strdup(optarg); + cellfile = strdup(optarg); break; case 'u' : @@ -1116,15 +1116,15 @@ int main(int argc, char *argv[]) afile = strdup(argv[optind++]); bfile = strdup(argv[optind]); - if ( pdb == NULL ) { - ERROR("You must provide a PDB file with the unit cell.\n"); + if ( cellfile == NULL ) { + ERROR("You must provide a unit cell.\n"); exit(1); } if ( shell_file == NULL ) shell_file = strdup("shells.dat"); - cell = load_cell_from_pdb(pdb); - free(pdb); + cell = load_cell_from_file(cellfile); + free(cellfile); list1_raw = read_reflections(afile); if ( list1_raw == NULL ) { diff --git a/src/get_hkl.c b/src/get_hkl.c index 3da68ef7..72b73041 100644 --- a/src/get_hkl.c +++ b/src/get_hkl.c @@ -421,7 +421,7 @@ int main(int argc, char *argv[]) char *cutoff_str = NULL; double cutiso = 0.0; float cutn1, cutn2, cutn3; - char *pdb = NULL; + char *cellfile = NULL; char *reindex_str = NULL; SymOpList *reindex = NULL; @@ -487,7 +487,7 @@ int main(int argc, char *argv[]) break; case 'p' : - pdb = strdup(optarg); + cellfile = strdup(optarg); break; case 2 : @@ -715,18 +715,18 @@ int main(int argc, char *argv[]) RefListIterator *iter; UnitCell *cell; - if ( pdb == NULL ) { - ERROR("You must provide a PDB file when using " + if ( cellfile == NULL ) { + ERROR("You must provide a unit cell when using " "--cutoff-angstroms.\n"); return 1; } - cell = load_cell_from_pdb(pdb); + cell = load_cell_from_file(cellfile); if ( cell == NULL ) { - ERROR("Failed to load cell from '%s'\n", pdb); + ERROR("Failed to load cell from '%s'\n", cellfile); return 1; } - free(pdb); + free(cellfile); n = reflist_new(); @@ -762,18 +762,18 @@ int main(int argc, char *argv[]) double csx, csy, csz; double as, bs, cs; - if ( pdb == NULL ) { - ERROR("You must provide a PDB file when using " + if ( cellfile == NULL ) { + ERROR("You must provide a unit cell when using " "--cutoff-angstroms.\n"); return 1; } - cell = load_cell_from_pdb(pdb); + cell = load_cell_from_file(cellfile); if ( cell == NULL ) { - ERROR("Failed to load cell from '%s'\n", pdb); + ERROR("Failed to load cell from '%s'\n", cellfile); return 1; } - free(pdb); + free(cellfile); cell_get_reciprocal(cell, &asx, &asy, &asz, &bsx, &bsy, &bsz, diff --git a/src/indexamajig.c b/src/indexamajig.c index 2ef98c2c..ff4b2243 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -93,8 +93,8 @@ static void show_help(const char *s) " -b, --beam=<file> Get beam parameters from file (provides nominal\n" " wavelength value if no per-shot value is found in\n" " the HDF5 files.\n" -" -p, --pdb=<file> PDB file from which to get the unit cell to match.\n" -" Default: 'molecule.pdb'.\n" +" -p, --pdb=<file> File (PDB or CrystFEL unit cell format) from which\n" +" to get the unit cell. Default: 'molecule.pdb'.\n" " --basename Remove the directory parts of the filenames.\n" " -x, --prefix=<p> Prefix filenames from input file with <p>.\n" " --peaks=<method> Use 'method' for finding peaks. Choose from:\n" @@ -187,7 +187,7 @@ int main(int argc, char *argv[]) IndexingMethod *indm; IndexingPrivate **ipriv; char *indm_str = NULL; - char *pdb = NULL; + char *cellfile = NULL; char *prefix = NULL; char *speaks = NULL; char *toler = NULL; @@ -327,7 +327,7 @@ int main(int argc, char *argv[]) break; case 'p' : - pdb = strdup(optarg); + cellfile = strdup(optarg); break; case 'x' : @@ -606,13 +606,13 @@ int main(int argc, char *argv[]) add_geom_beam_stuff_to_copy_hdf5(iargs.copyme, iargs.det, iargs.beam); - if ( pdb != NULL ) { - iargs.cell = load_cell_from_pdb(pdb); + if ( cellfile != NULL ) { + iargs.cell = load_cell_from_file(cellfile); if ( iargs.cell == NULL ) { - ERROR("Couldn't read unit cell (from %s)\n", pdb); + ERROR("Couldn't read unit cell (from %s)\n", cellfile); return 1; } - free(pdb); + free(cellfile); STATUS("This is what I understood your unit cell to be:\n"); cell_print(iargs.cell); } else { diff --git a/src/partial_sim.c b/src/partial_sim.c index d5933afd..47d8766e 100644 --- a/src/partial_sim.c +++ b/src/partial_sim.c @@ -624,7 +624,7 @@ int main(int argc, char *argv[]) ERROR("You need to give a PDB file with the unit cell.\n"); return 1; } - cell = load_cell_from_pdb(cellfile); + cell = load_cell_from_file(cellfile); if ( cell == NULL ) { ERROR("Failed to get cell from '%s'\n", cellfile); return 1; diff --git a/src/pattern_sim.c b/src/pattern_sim.c index 0889697d..8e048b4e 100644 --- a/src/pattern_sim.c +++ b/src/pattern_sim.c @@ -69,7 +69,7 @@ static void show_help(const char *s) " -h, --help Display this help message.\n" " --version Print CrystFEL version number and exit.\n" "\n" -" -p, --pdb=<file> PDB file from which to get the unit cell.\n" +" -p, --pdb=<file> File from which to get the unit cell.\n" " (The actual Bragg intensities come from the\n" " intensities file)\n" " --gpu Use the GPU to speed up the calculation.\n" @@ -572,7 +572,7 @@ int main(int argc, char *argv[]) free(beamfile); /* Load unit cell */ - input_cell = load_cell_from_pdb(filename); + input_cell = load_cell_from_file(filename); if ( input_cell == NULL ) { exit(1); } diff --git a/src/render_hkl.c b/src/render_hkl.c index bdf1bbe6..1b13be66 100644 --- a/src/render_hkl.c +++ b/src/render_hkl.c @@ -3,11 +3,11 @@ * * Draw pretty renderings of reflection lists * - * Copyright © 2012-2013 Deutsches Elektronen-Synchrotron DESY, + * Copyright © 2012-2014 Deutsches Elektronen-Synchrotron DESY, * a research centre of the Helmholtz Association. * * Authors: - * 2010-2013 Thomas White <taw@physics.org> + * 2010-2014 Thomas White <taw@physics.org> * * This file is part of CrystFEL. * @@ -71,7 +71,7 @@ static void show_help(const char *s) " --zone=<z> Show the <z>th Laue zone.\n" " -o, --output=<filename> Output filename. Default: za.pdf\n" " --boost=<val> Squash colour scale by <val>.\n" -" -p, --pdb=<file> PDB file from which to get the unit cell.\n" +" -p, --pdb=<file> File from which to get the unit cell.\n" " -y, --symmetry=<sym> Expand reflections according to point group <sym>.\n" "\n" " -c, --colscale=<scale> Use the given colour scale. Choose from:\n" @@ -741,7 +741,7 @@ int main(int argc, char *argv[]) int config_sqrt = 0; int config_colkey = 0; int config_zawhinge = 0; - char *pdb = NULL; + char *cellfile = NULL; int r = 0; double boost = 1.0; char *sym_str = NULL; @@ -800,7 +800,7 @@ int main(int argc, char *argv[]) return 0; case 'p' : - pdb = strdup(optarg); + cellfile = strdup(optarg); break; case 'b' : @@ -888,8 +888,8 @@ int main(int argc, char *argv[]) " any longer (I ignored it for you).\n"); } - if ( (pdb == NULL) && !config_colkey ) { - ERROR("You must specify the PDB containing the unit cell.\n"); + if ( (cellfile == NULL) && !config_colkey ) { + ERROR("You must specify the unit cell.\n"); return 1; } @@ -974,9 +974,9 @@ int main(int argc, char *argv[]) infile = argv[optind]; - cell = load_cell_from_pdb(pdb); + cell = load_cell_from_file(cellfile); if ( cell == NULL ) { - ERROR("Couldn't load unit cell from %s\n", pdb); + ERROR("Couldn't load unit cell from %s\n", cellfile); return 1; } list = read_reflections(infile); @@ -993,7 +993,7 @@ int main(int argc, char *argv[]) render_za(cell, list, boost, sym, wght, colscale, rh, rk, rl, dh, dk, dl, outfile, scale_top, zone, &rings); - free(pdb); + free(cellfile); free_symoplist(sym); reflist_free(list); if ( outfile != NULL ) free(outfile); |