From fa1c2009f7c7efc1e61e4e882ca0b0fc6ef27c31 Mon Sep 17 00:00:00 2001
From: Johannes Ranke <jranke@uni-bremen.de>
Date: Wed, 12 Nov 2014 18:14:58 +0100
Subject: Fix for IORE in mkinmod

---
 R/mkinmod.R | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'R')

diff --git a/R/mkinmod.R b/R/mkinmod.R
index 8b86303f..d04f811f 100644
--- a/R/mkinmod.R
+++ b/R/mkinmod.R
@@ -88,11 +88,11 @@ mkinmod <- function(..., use_of_ff = "min", speclist = NULL)
     if(is.null(spec[[varname]]$sink)) spec[[varname]]$sink <- TRUE
     if(spec[[varname]]$type %in% c("SFO", "IORE", "SFORB")) { # {{{ Add decline term
       if (use_of_ff == "min") { # Minimum use of formation fractions
+        if(spec[[varname]]$type == "IORE" && length(spec[[varname]]$to) > 0) {
+           stop("Transformation reactions from compounds modelled with IORE\n",
+                "are only supported with formation fractions (use_of_ff = 'max')")
+        }
         if(spec[[varname]]$sink) {
-          if(spec[[varname]]$type == "IORE" && length(spec[[varname]]$to) > 0) {
-             stop("Transformation reactions from compounds modelled with IORE\n",
-                  "are only supported with formation fractions (use_of_ff = 'max')")
-          }
           # If sink is required, add first-order/IORE sink term
           k_compound_sink <- paste("k", box_1, "sink", sep = "_")
           if(spec[[varname]]$type == "IORE") {
-- 
cgit v1.2.1