From bc99e7f4bfc24f8754d3704bc0bdfe508e2012bb Mon Sep 17 00:00:00 2001 From: rieger Date: Wed, 21 May 2008 15:27:46 +0200 Subject: [PATCH] changed value checking for interaction parameters. usage in assessInteraction will be normalized to unit cell size, so all positive values are allowed now --- InteractionsParser.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/InteractionsParser.cpp b/InteractionsParser.cpp index e48388b..a630ccc 100644 --- a/InteractionsParser.cpp +++ b/InteractionsParser.cpp @@ -50,11 +50,10 @@ void InteractionsParser::parseInteraction( interaction.name = ""; for (int i = 0; i < cnt; i++) { - double x_frac, y_frac; + double x_frac, y_frac; // interactions may be given as absolute coordinates and scaled to unit cell size later! string tmp = strtok.nextToken(); if (sscanf(tmp.c_str(), "%lf/%lf", &x_frac, &y_frac) != 2 || - x_frac < 0 || x_frac >= 1 || - y_frac < 0 || y_frac >= 1) { + x_frac < 0 || y_frac < 0) { // Treat last tuple as comment if (i==cnt-1) interaction.name = tmp; -- 2.11.4.GIT