aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-03-03 15:40:22 +0100
committerThomas White <taw@physics.org>2010-03-03 15:40:22 +0100
commit1d59eab730746adeb8b417a50bf864d48c29db88 (patch)
tree5bcf3fe21ca1c10bbdb19c7a561e4e47bb0b2678 /src
parent212ed1d2401348802e1e24ebe16dec69f215c039 (diff)
Refuse to proceed without molecule.pdb
Diffstat (limited to 'src')
-rw-r--r--src/indexamajig.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c
index ab4642b3..e2f50c4a 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -87,6 +87,7 @@ int main(int argc, char *argv[])
int config_verbose = 0;
IndexingMethod indm;
char *indm_str = NULL;
+ struct image image;
/* Long options */
const struct option longopts[] = {
@@ -163,20 +164,25 @@ int main(int argc, char *argv[])
return 1;
}
+ image.molecule = load_molecule();
+ if ( image.molecule == NULL ) {
+ ERROR("You must provide molecule.pdb in the working "
+ "directory.\n");
+ return 1;
+ }
+
n_images = 0;
n_hits = 0;
do {
char line[1024];
struct hdfile *hdfile;
- struct image image;
rval = fgets(line, 1023, fh);
if ( rval == NULL ) continue;
chomp(line);
image.features = NULL;
- image.molecule = load_molecule();
image.data = NULL;
image.indexed_cell = NULL;