From aa8c73d2522db57b0a08fc244235a1d4063f55dc Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Fri, 20 Jun 2014 19:41:10 +0000 Subject: [PATCH] [CTI] Relax formatting requirements for third bodies in reaction strings Allow 'A + B (+M)' in addition to 'A + B (+ M)' Cherry-pick of trunk r2929. --- interfaces/python/ctml_writer.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/interfaces/python/ctml_writer.py b/interfaces/python/ctml_writer.py index 1ad63d341..d7e3adef7 100644 --- a/interfaces/python/ctml_writer.py +++ b/interfaces/python/ctml_writer.py @@ -392,6 +392,10 @@ def getReactionSpecies(s): >>> {'CH3':1, 'H':3.7, 'O2':5.2} """ + # Normalize formatting of falloff third bodies so that there is always a + # space following the '+', e.g. '(+M)' -> '(+ M)' + s = s.replace(' (+', ' (+ ') + # get rid of the '+' signs separating species. Only plus signs # surrounded by spaces are replaced, so that plus signs may be # used in species names (e.g. 'Ar3+')