aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-08-12 11:35:44 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:36 +0100
commitc103e26cbe6ec01c87f9497a5279cf4d4d5103b5 (patch)
tree2af741f9ac58cce7bb0f2b22679046cd4ed89a27
parent1d6487eabaf7876a23261dae77240a7e40b1a16a (diff)
Add sanity check
-rw-r--r--src/reax.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/reax.c b/src/reax.c
index f2a7d8e6..eafb1225 100644
--- a/src/reax.c
+++ b/src/reax.c
@@ -339,6 +339,9 @@ void reax_index(IndexingPrivate *pp, struct image *image, UnitCell *cell)
}
+ /* Sanity check */
+ if ( pmax < 1e4 ) return;
+
/* Search for a */
smin = 2.0*pmax * amin;
smax = 2.0*pmax * amax;