From 1c2e32b7bd576bcb4b249c476373ee697ae92102 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 12 Sep 2011 17:31:43 +0200 Subject: Check unit cell is sensible --- src/partial_sim.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/partial_sim.c') diff --git a/src/partial_sim.c b/src/partial_sim.c index ea7be5e0..8fc2fb21 100644 --- a/src/partial_sim.c +++ b/src/partial_sim.c @@ -242,6 +242,12 @@ int main(int argc, char *argv[]) } free(cellfile); + if ( !cell_is_sensible(cell) ) { + ERROR("Invalid unit cell parameters:\n"); + cell_print(cell); + return 1; + } + /* Load geometry */ if ( geomfile == NULL ) { ERROR("You need to give a geometry file.\n"); -- cgit v1.2.3