/* Generated by Cython 0.28.5 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "name": "metaphor.chem_gm.core.gmtoolbox",
        "sources": [
            "metaphor/chem_gm/core/gmtoolbox.py"
        ]
    },
    "module_name": "metaphor.chem_gm.core.gmtoolbox"
}
END: Cython Metadata */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.6+ or Python 3.3+.
#else
#define CYTHON_ABI "0_28_5"
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #if PY_VERSION_HEX >= 0x02070000
    #define HAVE_LONG_LONG
  #endif
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 0
  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT (0 && PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
  #undef SHIFT
  #undef BASE
  #undef MASK
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
           typedef unsigned char     uint8_t;
           typedef unsigned int      uint32_t;
        #else
           typedef unsigned __int8   uint8_t;
           typedef unsigned __int32  uint32_t;
        #endif
    #endif
#else
   #include <stdint.h>
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__ ) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif

#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #elif defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif

#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0; // PyThread_create_key reports success always
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif // TSS (Thread Specific Storage) API
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
#else
#define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
  #define PyObject_Unicode             PyObject_Str
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

#if defined(WIN32) || defined(MS_WINDOWS)
  #define _USE_MATH_DEFINES
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif


#define __PYX_ERR(f_index, lineno, Ln_error) \
{ \
  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
}

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__metaphor__chem_gm__core__gmtoolbox
#define __PYX_HAVE_API__metaphor__chem_gm__core__gmtoolbox
/* Early includes */
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }

static PyObject *__pyx_m = NULL;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_cython_runtime = NULL;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;


static const char *__pyx_f[] = {
  "metaphor/chem_gm/core/gmtoolbox.py",
};

/*--- Type declarations ---*/
struct __pyx_obj_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix;
struct __pyx_defaults;
typedef struct __pyx_defaults __pyx_defaults;
struct __pyx_defaults1;
typedef struct __pyx_defaults1 __pyx_defaults1;
struct __pyx_defaults {
  PyObject *__pyx_arg_header;
};
struct __pyx_defaults1 {
  PyObject *__pyx_arg_extrarow;
  PyObject *__pyx_arg_header;
  PyObject *__pyx_arg_sheets;
};

/* "metaphor/chem_gm/core/gmtoolbox.py":52
 *         config.set("connectivity", key2long(key), str(connect[key]))
 * 
 * def getMinMaxMatrix(Mat, names, nb=10, indextest=0):             # <<<<<<<<<<<<<<
 *     N, M = Mat.shape
 *     nb = min(nb, N/2)
 */
struct __pyx_obj_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix {
  PyObject_HEAD
  PyObject *__pyx_v_indextest;
};


/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext()\
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

/* RaiseArgTupleInvalid.proto */
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);

/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

/* ParseKeywords.proto */
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
    const char* function_name);

/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

/* GetModuleGlobalName.proto */
static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);

/* PyCFunctionFastCall.proto */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
#else
#define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
#endif

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
#else
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
#endif
#endif

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

/* ObjectGetItem.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
#else
#define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
#endif

/* None.proto */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

/* IterFinish.proto */
static CYTHON_INLINE int __Pyx_IterFinish(void);

/* UnpackItemEndCheck.proto */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_TrueDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_TrueDivideObjC(op1, op2, intval, inplace)\
    (inplace ? PyNumber_InPlaceTrueDivide(op1, op2) : PyNumber_TrueDivide(op1, op2))
#endif

/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

/* FetchCommonType.proto */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);

/* CythonFunction.proto */
#define __Pyx_CyFunction_USED 1
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#define __Pyx_CyFunction_GetClassObj(f)\
    (((__pyx_CyFunctionObject *) (f))->func_classobj)
#define __Pyx_CyFunction_Defaults(type, f)\
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
    PyCFunctionObject func;
#if PY_VERSION_HEX < 0x030500A0
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
    PyObject *func_classobj;
    void *defaults;
    int defaults_pyobjects;
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
} __pyx_CyFunctionObject;
static PyTypeObject *__pyx_CyFunctionType = 0;
#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\
    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *self,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __pyx_CyFunction_init(void);

/* SliceObject.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
        int has_cstart, int has_cstop, int wraparound);

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* py_abs.proto */
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject *__Pyx_PyLong_AbsNeg(PyObject *num);
#define __Pyx_PyNumber_Absolute(x)\
    ((likely(PyLong_CheckExact(x))) ?\
         (likely(Py_SIZE(x) >= 0) ? (Py_INCREF(x), (x)) : __Pyx_PyLong_AbsNeg(x)) :\
         PyNumber_Absolute(x))
#else
#define __Pyx_PyNumber_Absolute(x)  PyNumber_Absolute(x)
#endif

/* PyObjectLookupSpecial.proto */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) {
    PyObject *res;
    PyTypeObject *tp = Py_TYPE(obj);
#if PY_MAJOR_VERSION < 3
    if (unlikely(PyInstance_Check(obj)))
        return __Pyx_PyObject_GetAttrStr(obj, attr_name);
#endif
    res = _PyType_Lookup(tp, attr_name);
    if (likely(res)) {
        descrgetfunc f = Py_TYPE(res)->tp_descr_get;
        if (!f) {
            Py_INCREF(res);
        } else {
            res = f(res, obj, (PyObject *)tp);
        }
    } else {
        PyErr_SetObject(PyExc_AttributeError, attr_name);
    }
    return res;
}
#else
#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
#endif

/* PyObjectCallNoArg.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
#else
#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* PyObjectSetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace)\
    (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
#endif

/* PyObjectFormat.proto */
#if CYTHON_USE_UNICODE_WRITER
static PyObject* __Pyx_PyObject_Format(PyObject* s, PyObject* f);
#else
#define __Pyx_PyObject_Format(s, f) PyObject_Format(s, f)
#endif

/* IncludeStringH.proto */
#include <string.h>

/* JoinPyUnicode.proto */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char);

/* None.proto */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);

/* PyObjectFormatAndDecref.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f);
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f);

/* PyObjectCallMethod1.proto */
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg);

/* pop_index.proto */
static PyObject* __Pyx__PyObject_PopNewIndex(PyObject* L, PyObject* py_ix);
static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, PyObject* py_ix);
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static PyObject* __Pyx__PyList_PopIndex(PyObject* L, PyObject* py_ix, Py_ssize_t ix);
#define __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\
    (likely(PyList_CheckExact(L) && __Pyx_fits_Py_ssize_t(ix, type, is_signed))) ?\
        __Pyx__PyList_PopIndex(L, py_ix, ix) : (\
        (unlikely(py_ix == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\
            __Pyx__PyObject_PopIndex(L, py_ix)))
#define __Pyx_PyList_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\
    __Pyx_fits_Py_ssize_t(ix, type, is_signed) ?\
        __Pyx__PyList_PopIndex(L, py_ix, ix) : (\
        (unlikely(py_ix == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\
            __Pyx__PyObject_PopIndex(L, py_ix)))
#else
#define __Pyx_PyList_PopIndex(L, py_ix, ix, is_signed, type, to_py_func)\
    __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func)
#define __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\
    (unlikely(py_ix == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\
        __Pyx__PyObject_PopIndex(L, py_ix))
#endif

/* PySequenceContains.proto */
static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* BytesEquals.proto */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);

/* UnicodeEquals.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);

/* PyObjectCallMethod0.proto */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);

/* RaiseNoneIterError.proto */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

/* UnpackTupleError.proto */
static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);

/* UnpackTuple2.proto */
#define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\
    (likely(is_tuple || PyTuple_Check(tuple)) ?\
        (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\
            __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\
            (__Pyx_UnpackTupleError(tuple, 2), -1)) :\
        __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple))
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
    PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple);
static int __Pyx_unpack_tuple2_generic(
    PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple);

/* dict_iter.proto */
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_is_dict);
static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
                                              PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);

/* py_dict_keys.proto */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d);

/* UnpackUnboundCMethod.proto */
typedef struct {
    PyObject *type;
    PyObject **method_name;
    PyCFunction func;
    PyObject *method;
    int flag;
} __Pyx_CachedCFunction;

/* CallUnboundCMethod0.proto */
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CallUnboundCMethod0(cfunc, self)\
    (likely((cfunc)->func) ?\
        (likely((cfunc)->flag == METH_NOARGS) ?  (*((cfunc)->func))(self, NULL) :\
         (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ?\
            (PY_VERSION_HEX >= 0x030700A0 ?\
                (*(__Pyx_PyCFunctionFast)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\
                (*(__Pyx_PyCFunctionFastWithKeywords)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\
          (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\
            (*(__Pyx_PyCFunctionFastWithKeywords)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\
            (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ?  ((*(PyCFunctionWithKeywords)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\
               ((cfunc)->flag == METH_VARARGS ?  (*((cfunc)->func))(self, __pyx_empty_tuple) :\
               __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\
        __Pyx__CallUnboundCMethod0(cfunc, self))
#else
#define __Pyx_CallUnboundCMethod0(cfunc, self)  __Pyx__CallUnboundCMethod0(cfunc, self)
#endif

/* DictGetItem.proto */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
#define __Pyx_PyObject_Dict_GetItem(obj, name)\
    (likely(PyDict_CheckExact(obj)) ?\
     __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
#else
#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#define __Pyx_PyObject_Dict_GetItem(obj, name)  PyObject_GetItem(obj, name)
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\
    PyObject_RichCompare(op1, op2, Py_EQ)
    #endif

/* CallUnboundCMethod1.proto */
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#else
#define __Pyx_CallUnboundCMethod1(cfunc, self, arg)  __Pyx__CallUnboundCMethod1(cfunc, self, arg)
#endif

/* append.proto */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AndObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_AndObjC(op1, op2, intval, inplace)\
    (inplace ? PyNumber_InPlaceAnd(op1, op2) : PyNumber_And(op1, op2))
#endif

/* SliceObject.proto */
#define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)\
    __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)
static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
        PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
        int has_cstart, int has_cstop, int wraparound);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractCObj(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_SubtractCObj(op1, op2, intval, inplace)\
    (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
#endif

/* ListExtend.proto */
static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject* none = _PyList_Extend((PyListObject*)L, v);
    if (unlikely(!none))
        return -1;
    Py_DECREF(none);
    return 0;
#else
    return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
#endif
}

/* SetItemInt.proto */
#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
               __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
                                               int is_list, int wraparound, int boundscheck);

/* PyObject_GenericGetAttrNoDict.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
#endif

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* CalculateMetaclass.proto */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);

/* SetNameInClass.proto */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
#elif CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
#else
#define __Pyx_SetNameInClass(ns, name, value)  PyObject_SetItem(ns, name, value)
#endif

/* Py3ClassCreate.proto */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
                                           PyObject *mkw, PyObject *modname, PyObject *doc);
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);

/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif

/* CodeObjectCache.proto */
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);

/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);

/* InitStrings.proto */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);


/* Module declarations from 'metaphor.chem_gm.core.gmtoolbox' */
static PyTypeObject *__pyx_ptype_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix = 0;
#define __Pyx_MODULE_NAME "metaphor.chem_gm.core.gmtoolbox"
extern int __pyx_module_is_main_metaphor__chem_gm__core__gmtoolbox;
int __pyx_module_is_main_metaphor__chem_gm__core__gmtoolbox = 0;

/* Implementation of 'metaphor.chem_gm.core.gmtoolbox' */
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_print;
static PyObject *__pyx_builtin_sorted;
static PyObject *__pyx_builtin_zip;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_open;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_AttributeError;
static const char __pyx_k_0[] = "0";
static const char __pyx_k_1[] = "-1";
static const char __pyx_k_C[] = "C";
static const char __pyx_k_M[] = "M";
static const char __pyx_k_N[] = "N";
static const char __pyx_k_d[] = "d";
static const char __pyx_k_e[] = "e";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_j[] = "j";
static const char __pyx_k_n[] = "n";
static const char __pyx_k_s[] = "%s";
static const char __pyx_k_w[] = "w";
static const char __pyx_k_Cn[] = "Cn";
static const char __pyx_k_LM[] = "LM";
static const char __pyx_k__4[] = "";
static const char __pyx_k__5[] = "_";
static const char __pyx_k_dN[] = "%dN";
static const char __pyx_k_dl[] = "dl";
static const char __pyx_k_ff[] = "ff";
static const char __pyx_k_ii[] = "ii";
static const char __pyx_k_l1[] = "l1";
static const char __pyx_k_ma[] = "ma";
static const char __pyx_k_nb[] = "nb";
static const char __pyx_k_ni[] = "ni";
static const char __pyx_k_no[] = "no";
static const char __pyx_k_np[] = "np";
static const char __pyx_k_os[] = "os";
static const char __pyx_k_st[] = "st";
static const char __pyx_k_xl[] = "xl";
static const char __pyx_k_Mat[] = "Mat";
static const char __pyx_k__27[] = "|";
static const char __pyx_k__41[] = ",";
static const char __pyx_k__55[] = "-";
static const char __pyx_k__75[] = "*";
static const char __pyx_k_ccl[] = "ccl";
static const char __pyx_k_cfg[] = ".cfg";
static const char __pyx_k_chi[] = "chi";
static const char __pyx_k_cur[] = "cur";
static const char __pyx_k_dgr[] = "dgr";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_err[] = "err";
static const char __pyx_k_ext[] = "ext";
static const char __pyx_k_get[] = "get";
static const char __pyx_k_grd[] = "grd";
static const char __pyx_k_hii[] = "hii";
static const char __pyx_k_ind[] = "ind";
static const char __pyx_k_iso[] = "iso";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_lib[] = "lib";
static const char __pyx_k_lig[] = "lig";
static const char __pyx_k_lst[] = "lst";
static const char __pyx_k_max[] = " max & ";
static const char __pyx_k_min[] = " min";
static const char __pyx_k_mol[] = "mol";
static const char __pyx_k_opt[] = "opt";
static const char __pyx_k_pop[] = "pop";
static const char __pyx_k_pyd[] = ".pyd";
static const char __pyx_k_res[] = "res";
static const char __pyx_k_sec[] = "sec";
static const char __pyx_k_set[] = "set";
static const char __pyx_k_sys[] = "sys";
static const char __pyx_k_val[] = "val";
static const char __pyx_k_vec[] = "vec";
static const char __pyx_k_w_2[] = "w+";
static const char __pyx_k_zip[] = "zip";
static const char __pyx_k_Cn_s[] = "Cn%s";
static const char __pyx_k__209[] = ":";
static const char __pyx_k_base[] = "base";
static const char __pyx_k_ccls[] = "ccls";
static const char __pyx_k_chi1[] = "chi1";
static const char __pyx_k_chi2[] = "chi2";
static const char __pyx_k_col0[] = "col0";
static const char __pyx_k_cond[] = "cond";
static const char __pyx_k_conf[] = "conf";
static const char __pyx_k_copy[] = "copy";
static const char __pyx_k_cost[] = "cost";
static const char __pyx_k_dgrs[] = "dgrs";
static const char __pyx_k_dico[] = "dico";
static const char __pyx_k_dict[] = "dict";
static const char __pyx_k_exit[] = "__exit__";
static const char __pyx_k_fval[] = "fval";
static const char __pyx_k_grds[] = "grds";
static const char __pyx_k_head[] = "head";
static const char __pyx_k_info[] = "info";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_iso1[] = "iso1";
static const char __pyx_k_iso2[] = "iso2";
static const char __pyx_k_item[] = "item";
static const char __pyx_k_join[] = "join";
static const char __pyx_k_keys[] = "keys";
static const char __pyx_k_left[] = "left";
static const char __pyx_k_lig2[] = "lig2";
static const char __pyx_k_lrow[] = "lrow";
static const char __pyx_k_lsts[] = "lsts";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_mask[] = "mask";
static const char __pyx_k_mean[] = "mean";
static const char __pyx_k_mess[] = "mess";
static const char __pyx_k_mol0[] = "mol0";
static const char __pyx_k_mol1[] = "mol1";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_open[] = "open";
static const char __pyx_k_path[] = "path";
static const char __pyx_k_ppty[] = "ppty";
static const char __pyx_k_prop[] = "prop";
static const char __pyx_k_read[] = "read";
static const char __pyx_k_root[] = "root";
static const char __pyx_k_row0[] = "row0";
static const char __pyx_k_save[] = "save";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_sort[] = "sort";
static const char __pyx_k_test[] = "test";
static const char __pyx_k_true[] = "true";
static const char __pyx_k_Class[] = "Class";
static const char __pyx_k_Excel[] = "Excel";
static const char __pyx_k_LOO_s[] = "LOO %s";
static const char __pyx_k_OKchi[] = "OKchi";
static const char __pyx_k_OKiso[] = "OKiso";
static const char __pyx_k_atoms[] = "atoms";
static const char __pyx_k_cfg_2[] = "cfg";
static const char __pyx_k_chain[] = "chain";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_debug[] = "debug";
static const char __pyx_k_dictt[] = "dictt";
static const char __pyx_k_enter[] = "__enter__";
static const char __pyx_k_extra[] = "extra";
static const char __pyx_k_files[] = "files";
static const char __pyx_k_index[] = "index";
static const char __pyx_k_isdir[] = "isdir";
static const char __pyx_k_isint[] = "isint";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_lower[] = "lower";
static const char __pyx_k_max_2[] = "max";
static const char __pyx_k_min_2[] = "min";
static const char __pyx_k_model[] = "model";
static const char __pyx_k_monal[] = "monal";
static const char __pyx_k_names[] = "names";
static const char __pyx_k_numpy[] = "numpy";
static const char __pyx_k_oplst[] = "oplst";
static const char __pyx_k_ppath[] = "ppath";
static const char __pyx_k_print[] = "print";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_resst[] = "resst";
static const char __pyx_k_shape[] = "shape";
static const char __pyx_k_sheet[] = "sheet";
static const char __pyx_k_split[] = "split";
static const char __pyx_k_super[] = "super";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_write[] = "write";
static const char __pyx_k_zeros[] = "zeros";
static const char __pyx_k_Atomes[] = "Atomes";
static const char __pyx_k_append[] = "append";
static const char __pyx_k_ccllst[] = "ccllst";
static const char __pyx_k_chikey[] = "chikey";
static const char __pyx_k_chimax[] = "chimax";
static const char __pyx_k_config[] = "config";
static const char __pyx_k_cost_s[] = "cost(%s)";
static const char __pyx_k_ctypes[] = "ctypes";
static const char __pyx_k_curcol[] = "curcol";
static const char __pyx_k_currow[] = "currow";
static const char __pyx_k_doHash[] = "doHash";
static const char __pyx_k_exists[] = "exists";
static const char __pyx_k_extras[] = "extras";
static const char __pyx_k_getcwd[] = "getcwd";
static const char __pyx_k_getint[] = "getint";
static const char __pyx_k_header[] = "header";
static const char __pyx_k_hidden[] = "hidden";
static const char __pyx_k_hijmax[] = "hijmax";
static const char __pyx_k_hijmin[] = "hijmin";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_isfull[] = "isfull";
static const char __pyx_k_islong[] = "islong";
static const char __pyx_k_isokey[] = "isokey";
static const char __pyx_k_isomax[] = "isomax";
static const char __pyx_k_keyfct[] = "keyfct";
static const char __pyx_k_lefter[] = "lefter";
static const char __pyx_k_minmax[] = "minmax";
static const char __pyx_k_mmlst0[] = "mmlst0";
static const char __pyx_k_mmlst1[] = "mmlst1";
static const char __pyx_k_module[] = "module";
static const char __pyx_k_name_2[] = "__name__";
static const char __pyx_k_object[] = "object";
static const char __pyx_k_option[] = "option";
static const char __pyx_k_origin[] = "origin";
static const char __pyx_k_prefix[] = "prefix";
static const char __pyx_k_repeat[] = "repeat";
static const char __pyx_k_reseau[] = "reseau";
static const char __pyx_k_result[] = "result";
static const char __pyx_k_rowend[] = "rowend";
static const char __pyx_k_setter[] = "setter";
static const char __pyx_k_sheets[] = "sheets";
static const char __pyx_k_shutil[] = "shutil";
static const char __pyx_k_sorted[] = "sorted";
static const char __pyx_k_source[] = "source";
static const char __pyx_k_stdout[] = "stdout";
static const char __pyx_k_target[] = "target";
static const char __pyx_k_test_2[] = "__test__";
static const char __pyx_k_titles[] = "titles";
static const char __pyx_k_to_add[] = "to_add";
static const char __pyx_k_writer[] = "writer";
static const char __pyx_k_Atomes1[] = "Atomes1";
static const char __pyx_k_Atomes2[] = "Atomes2";
static const char __pyx_k_ExcelXP[] = "ExcelXP";
static const char __pyx_k_abspath[] = "abspath";
static const char __pyx_k_asarray[] = "asarray";
static const char __pyx_k_baselen[] = "_baselen";
static const char __pyx_k_central[] = "central";
static const char __pyx_k_cfgfile[] = "cfgfile";
static const char __pyx_k_classif[] = "classif";
static const char __pyx_k_conkeys[] = "conkeys";
static const char __pyx_k_connect[] = "connect";
static const char __pyx_k_curalgo[] = "curalgo";
static const char __pyx_k_default[] = "default";
static const char __pyx_k_dispMat[] = "dispMat";
static const char __pyx_k_extra_d[] = "extra(%d)";
static const char __pyx_k_fullres[] = "fullres";
static const char __pyx_k_general[] = "general";
static const char __pyx_k_gmconst[] = "gmconst";
static const char __pyx_k_gmutils[] = "gmutils";
static const char __pyx_k_gradlst[] = "gradlst";
static const char __pyx_k_headers[] = "headers";
static const char __pyx_k_hijmean[] = "hijmean";
static const char __pyx_k_ismodif[] = "ismodif";
static const char __pyx_k_lastGMM[] = "lastGMM";
static const char __pyx_k_lefters[] = "lefters";
static const char __pyx_k_loadtxt[] = "loadtxt";
static const char __pyx_k_locconf[] = "locconf";
static const char __pyx_k_longkey[] = "longkey";
static const char __pyx_k_mkdtemp[] = "mkdtemp";
static const char __pyx_k_modconf[] = "modconf";
static const char __pyx_k_moddict[] = "moddict";
static const char __pyx_k_newline[] = "newline";
static const char __pyx_k_options[] = "options";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_prevLOO[] = "prevLOO";
static const char __pyx_k_projMat[] = "projMat";
static const char __pyx_k_reshash[] = "reshash";
static const char __pyx_k_reslong[] = "reslong";
static const char __pyx_k_reverse[] = "reverse";
static const char __pyx_k_section[] = "section";
static const char __pyx_k_sheet_1[] = "sheet_1";
static const char __pyx_k_sources[] = "sources";
static const char __pyx_k_targets[] = "targets";
static const char __pyx_k_valtest[] = "valtest";
static const char __pyx_k_ExcelCsv[] = "ExcelCsv";
static const char __pyx_k_GMEngine[] = "GMEngine";
static const char __pyx_k_Leverage[] = "Leverage";
static const char __pyx_k_Property[] = "Property";
static const char __pyx_k_Residual[] = "Residual";
static const char __pyx_k_absolute[] = "absolute ";
static const char __pyx_k_atomdict[] = "atomdict";
static const char __pyx_k_atomkeys[] = "atomkeys";
static const char __pyx_k_basename[] = "basename";
static const char __pyx_k_c_size_t[] = "c_size_t";
static const char __pyx_k_computed[] = "computed";
static const char __pyx_k_conffile[] = "conffile";
static const char __pyx_k_cyclekey[] = "cyclekey";
static const char __pyx_k_dataRoot[] = "dataRoot";
static const char __pyx_k_docreate[] = "docreate";
static const char __pyx_k_endswith[] = "endswith";
static const char __pyx_k_extended[] = "extended";
static const char __pyx_k_extrarow[] = "extrarow";
static const char __pyx_k_filename[] = "filename";
static const char __pyx_k_getArray[] = "getArray";
static const char __pyx_k_getModel[] = "getModel";
static const char __pyx_k_getfloat[] = "getfloat";
static const char __pyx_k_gradekey[] = "gradekey";
static const char __pyx_k_grademax[] = "grademax";
static const char __pyx_k_isHidden[] = "isHidden";
static const char __pyx_k_iterData[] = "iterData";
static const char __pyx_k_iterator[] = "iterator";
static const char __pyx_k_jacobian[] = "jacobian";
static const char __pyx_k_key2long[] = "key2long";
static const char __pyx_k_keyshort[] = "keyshort";
static const char __pyx_k_leverage[] = "leverage";
static const char __pyx_k_make_dir[] = "make_dir";
static const char __pyx_k_minmaxst[] = "minmaxst";
static const char __pyx_k_module_2[] = "__module__";
static const char __pyx_k_numpy_ma[] = "numpy.ma";
static const char __pyx_k_pathname[] = "pathname";
static const char __pyx_k_pptyname[] = "pptyname";
static const char __pyx_k_projects[] = "projects";
static const char __pyx_k_property[] = "property";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_residual[] = "residual";
static const char __pyx_k_sbaselen[] = "sbaselen";
static const char __pyx_k_sections[] = "sections";
static const char __pyx_k_selected[] = "selected";
static const char __pyx_k_setModel[] = "setModel";
static const char __pyx_k_tempDirs[] = "tempDirs";
static const char __pyx_k_tempfile[] = "tempfile";
static const char __pyx_k_training[] = "training";
static const char __pyx_k_triangle[] = "triangle";
static const char __pyx_k_withdiag[] = "withdiag";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_baselen_2[] = "baselen";
static const char __pyx_k_chargekey[] = "chargekey";
static const char __pyx_k_configstr[] = "configstr";
static const char __pyx_k_cumulatom[] = "cumulatom";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_extraopts[] = "extraopts";
static const char __pyx_k_indextest[] = "indextest";
static const char __pyx_k_itertools[] = "itertools";
static const char __pyx_k_key2short[] = "key2short";
static const char __pyx_k_leverages[] = "leverages ";
static const char __pyx_k_mainTitle[] = "mainTitle";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_modelconf[] = "modelconf";
static const char __pyx_k_modeldict[] = "_modeldict";
static const char __pyx_k_newprefix[] = "newprefix";
static const char __pyx_k_occurence[] = "occurence";
static const char __pyx_k_onDestroy[] = "onDestroy";
static const char __pyx_k_paramlist[] = "paramlist";
static const char __pyx_k_quotechar[] = "quotechar";
static const char __pyx_k_stconnect[] = "stconnect";
static const char __pyx_k_write_col[] = "write_col";
static const char __pyx_k_write_row[] = "write_row";
static const char __pyx_k_AtomsLower[] = "AtomsLower";
static const char __pyx_k_CCharOnlys[] = "CCharOnlys";
static const char __pyx_k_Computed_s[] = "Computed %s";
static const char __pyx_k_ExtraSheet[] = "ExtraSheet";
static const char __pyx_k_Hydrogenes[] = "Hydrogenes";
static const char __pyx_k_Leverage_s[] = "Leverage(%s)";
static const char __pyx_k_Residual_s[] = "Residual(%s)";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_capitalize[] = "capitalize";
static const char __pyx_k_configFile[] = "_configFile";
static const char __pyx_k_datasource[] = "datasource";
static const char __pyx_k_defaultcfg[] = "defaultcfg";
static const char __pyx_k_extrasheet[] = "extrasheet";
static const char __pyx_k_fullconfig[] = "fullconfig";
static const char __pyx_k_getDefault[] = "getDefault";
static const char __pyx_k_getResults[] = "getResults";
static const char __pyx_k_getTempDir[] = "getTempDir";
static const char __pyx_k_getdefault[] = "getdefault";
static const char __pyx_k_has_option[] = "has_option";
static const char __pyx_k_inputCount[] = "inputCount";
static const char __pyx_k_inputNames[] = "inputNames";
static const char __pyx_k_minmaxsize[] = "minmaxsize";
static const char __pyx_k_monalconst[] = "monalconst";
static const char __pyx_k_optionlist[] = "optionlist";
static const char __pyx_k_projectDir[] = "projectDir";
static const char __pyx_k_properties[] = "properties";
static const char __pyx_k_readConfig[] = "readConfig";
static const char __pyx_k_resultlist[] = "resultlist";
static const char __pyx_k_saveNpToXl[] = "saveNpToXl";
static const char __pyx_k_startswith[] = "startswith";
static const char __pyx_k_structdict[] = "structdict";
static const char __pyx_k_trainlabel[] = "trainlabel";
static const char __pyx_k_withhidden[] = "withhidden";
static const char __pyx_k_withprefix[] = "withprefix";
static const char __pyx_k_withtitles[] = "withtitles";
static const char __pyx_k_workingDir[] = "workingDir";
static const char __pyx_k_workingdir[] = "workingdir";
static const char __pyx_k_INPUT_COUNT[] = "INPUT_COUNT";
static const char __pyx_k_OrderedDict[] = "OrderedDict";
static const char __pyx_k_VE_JACOBIAN[] = "VE_JACOBIAN";
static const char __pyx_k_add_section[] = "add_section";
static const char __pyx_k_cclinputlst[] = "cclinputlst";
static const char __pyx_k_collections[] = "collections";
static const char __pyx_k_connectlist[] = "connectlist";
static const char __pyx_k_curproperty[] = "curproperty";
static const char __pyx_k_defaultConf[] = "defaultConf";
static const char __pyx_k_defaultdict[] = "defaultdict";
static const char __pyx_k_getFromConf[] = "_getFromConf";
static const char __pyx_k_has_section[] = "has_section";
static const char __pyx_k_max_abs_hij[] = "max(abs(hij))";
static const char __pyx_k_min_abs_hij[] = "min(abs(hij))";
static const char __pyx_k_optionoccur[] = "optionoccur";
static const char __pyx_k_outputCount[] = "outputCount";
static const char __pyx_k_outputNames[] = "outputNames";
static const char __pyx_k_projectConf[] = "_projectConf";
static const char __pyx_k_saveNpsToXl[] = "saveNpsToXl";
static const char __pyx_k_sconfigFile[] = "sconfigFile";
static const char __pyx_k_shortTitles[] = "shortTitles";
static const char __pyx_k_sworkingDir[] = "sworkingDir";
static const char __pyx_k_training__s[] = "training_%s";
static const char __pyx_k_OUTPUT_COUNT[] = "OUTPUT_COUNT";
static const char __pyx_k_checkconnect[] = "checkconnect";
static const char __pyx_k_configFile_2[] = "configFile";
static const char __pyx_k_connectivity[] = "connectivity";
static const char __pyx_k_correlMatrix[] = "correlMatrix";
static const char __pyx_k_dataiterator[] = "dataiterator";
static const char __pyx_k_extraoptslow[] = "extraoptslow";
static const char __pyx_k_getModelBase[] = "getModelBase";
static const char __pyx_k_getModelDict[] = "getModelDict";
static const char __pyx_k_grdinputlist[] = "grdinputlist";
static const char __pyx_k_has_hydrogen[] = "has_hydrogen";
static const char __pyx_k_hashFromDict[] = "hashFromDict";
static const char __pyx_k_masked_array[] = "masked_array";
static const char __pyx_k_mean_abs_hij[] = "mean(abs(hij))";
static const char __pyx_k_removemodule[] = "removemodule";
static const char __pyx_k_setmodelconf[] = "setmodelconf";
static const char __pyx_k_sourceTitles[] = "sourceTitles";
static const char __pyx_k_updateConfig[] = "updateConfig";
static const char __pyx_k_writeconnect[] = "writeconnect";
static const char __pyx_k_GMEngine_save[] = "GMEngine.save";
static const char __pyx_k_ModelCfgItems[] = "ModelCfgItems";
static const char __pyx_k_add_worksheet[] = "add_worksheet";
static const char __pyx_k_getConfigHash[] = "getConfigHash";
static const char __pyx_k_getintdefault[] = "getintdefault";
static const char __pyx_k_modelConfFile[] = "_modelConfFile";
static const char __pyx_k_modelSelected[] = "modelSelected";
static const char __pyx_k_modelconfdict[] = "_modelconfdict";
static const char __pyx_k_projectConf_2[] = "projectConf";
static const char __pyx_k_remove_option[] = "remove_option";
static const char __pyx_k_saveModelConf[] = "saveModelConf";
static const char __pyx_k_simplecentral[] = "simplecentral";
static const char __pyx_k_structkeysloc[] = "structkeysloc";
static const char __pyx_k_AttributeError[] = "AttributeError";
static const char __pyx_k_candidatecount[] = "candidatecount";
static const char __pyx_k_defaultConnect[] = "defaultConnect";
static const char __pyx_k_doremovemodule[] = "doremovemodule";
static const char __pyx_k_fromconfig2Str[] = "fromconfig2Str";
static const char __pyx_k_getProjectConf[] = "getProjectConf";
static const char __pyx_k_getSectionDict[] = "getSectionDict";
static const char __pyx_k_hashFromConfig[] = "hashFromConfig";
static const char __pyx_k_monal_Property[] = "monal.Property";
static const char __pyx_k_parameterNames[] = "parameterNames";
static const char __pyx_k_remove_section[] = "remove_section";
static const char __pyx_k_setDefaultConf[] = "setDefaultConf";
static const char __pyx_k_setProjectConf[] = "setProjectConf";
static const char __pyx_k_GMEngine___init[] = "GMEngine.__init__";
static const char __pyx_k_GMEngine_extras[] = "GMEngine.extras";
static const char __pyx_k_defaultModified[] = "defaultModified";
static const char __pyx_k_getDefaultItems[] = "getDefaultItems";
static const char __pyx_k_getMinMaxMatrix[] = "getMinMaxMatrix";
static const char __pyx_k_modulestoremove[] = "modulestoremove";
static const char __pyx_k_nntoolbox_utils[] = "nntoolbox.utils";
static const char __pyx_k_saveDefaultConf[] = "saveDefaultConf";
static const char __pyx_k_GMEngine_baselen[] = "GMEngine.baselen";
static const char __pyx_k_GMEngine_connect[] = "GMEngine.connect";
static const char __pyx_k_getItemsFromConf[] = "_getItemsFromConf";
static const char __pyx_k_monal_util_utils[] = "monal.util.utils";
static const char __pyx_k_projectionMatrix[] = "projectionMatrix";
static const char __pyx_k_GMEngine_dataRoot[] = "GMEngine.dataRoot";
static const char __pyx_k_GMEngine_getModel[] = "GMEngine.getModel";
static const char __pyx_k_GMEngine_sbaselen[] = "GMEngine.sbaselen";
static const char __pyx_k_GMEngine_setModel[] = "GMEngine.setModel";
static const char __pyx_k_defaultConfigFile[] = "defaultConfigFile";
static const char __pyx_k_getDefaultOptions[] = "getDefaultOptions";
static const char __pyx_k_getbooleandefault[] = "getbooleandefault";
static const char __pyx_k_GMEngine_modelconf[] = "GMEngine.modelconf";
static const char __pyx_k_GMEngine_onDestroy[] = "GMEngine.onDestroy";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_fromConfigstr2Dict[] = "fromConfigstr2Dict";
static const char __pyx_k_fullProjectIniFile[] = "fullProjectIniFile";
static const char __pyx_k_getMinMaxMatrixSym[] = "getMinMaxMatrixSym";
static const char __pyx_k_getOptionsFromConf[] = "_getOptionsFromConf";
static const char __pyx_k_getTargetsFromFile[] = "getTargetsFromFile";
static const char __pyx_k_getTransferResults[] = "getTransferResults";
static const char __pyx_k_monal_util_toolbox[] = "monal.util.toolbox";
static const char __pyx_k_GMEngine_configFile[] = "GMEngine.configFile";
static const char __pyx_k_GMEngine_getDefault[] = "GMEngine.getDefault";
static const char __pyx_k_GMEngine_getResults[] = "GMEngine.getResults";
static const char __pyx_k_GMEngine_getTempDir[] = "GMEngine.getTempDir";
static const char __pyx_k_GMEngine_readConfig[] = "GMEngine.readConfig";
static const char __pyx_k_GMEngine_workingDir[] = "GMEngine.workingDir";
static const char __pyx_k_getModelKeyFromConf[] = "getModelKeyFromConf";
static const char __pyx_k_getProjectConfItems[] = "getProjectConfItems";
static const char __pyx_k_GMEngine_projectConf[] = "GMEngine.projectConf";
static const char __pyx_k_GMEngine_sconfigFile[] = "GMEngine.sconfigFile";
static const char __pyx_k_GMEngine_sworkingDir[] = "GMEngine.sworkingDir";
static const char __pyx_k_nonASCIICharsConvert[] = "nonASCIICharsConvert";
static const char __pyx_k_GMEngine__getFromConf[] = "GMEngine._getFromConf";
static const char __pyx_k_GMEngine_checkconnect[] = "GMEngine.checkconnect";
static const char __pyx_k_GMEngine_dataiterator[] = "GMEngine.dataiterator";
static const char __pyx_k_GMEngine_getModelDict[] = "GMEngine.getModelDict";
static const char __pyx_k_GMEngine_setmodelconf[] = "GMEngine.setmodelconf";
static const char __pyx_k_GMEngine_updateConfig[] = "GMEngine.updateConfig";
static const char __pyx_k_VE_TRAINING_DATA_LONG[] = "VE_TRAINING_DATA_LONG";
static const char __pyx_k_defaultedConfigParser[] = "defaultedConfigParser";
static const char __pyx_k_getProjectConfOptions[] = "getProjectConfOptions";
static const char __pyx_k_nntoolbox_filetoolbox[] = "nntoolbox.filetoolbox";
static const char __pyx_k_richDictFromConfigstr[] = "richDictFromConfigstr";
static const char __pyx_k_GMEngine_ModelCfgItems[] = "GMEngine.ModelCfgItems";
static const char __pyx_k_GMEngine_modelSelected[] = "GMEngine.modelSelected";
static const char __pyx_k_GMEngine_saveModelConf[] = "GMEngine.saveModelConf";
static const char __pyx_k_GMEngine_getProjectConf[] = "GMEngine.getProjectConf";
static const char __pyx_k_GMEngine_setDefaultConf[] = "GMEngine.setDefaultConf";
static const char __pyx_k_GMEngine_setProjectConf[] = "GMEngine.setProjectConf";
static const char __pyx_k_clearProjectConfOptions[] = "clearProjectConfOptions";
static const char __pyx_k_monal_datareader__excel[] = "monal.datareader._excel";
static const char __pyx_k_GMEngine_getDefaultItems[] = "GMEngine.getDefaultItems";
static const char __pyx_k_GMEngine_saveDefaultConf[] = "GMEngine.saveDefaultConf";
static const char __pyx_k_updateConfigFromConfigstr[] = "updateConfigFromConfigstr";
static const char __pyx_k_GMEngine__getItemsFromConf[] = "GMEngine._getItemsFromConf";
static const char __pyx_k_GMEngine_getDefaultOptions[] = "GMEngine.getDefaultOptions";
static const char __pyx_k_GMEngine_fullProjectIniFile[] = "GMEngine.fullProjectIniFile";
static const char __pyx_k_GMEngine_getTargetsFromFile[] = "GMEngine.getTargetsFromFile";
static const char __pyx_k_BJMA_H_Si3_Br5_mol0_Class_5N[] = "BJMA_H_Si3_Br5_mol0_Class_5N";
static const char __pyx_k_GMEngine__getOptionsFromConf[] = "GMEngine._getOptionsFromConf";
static const char __pyx_k_GMEngine_getProjectConfItems[] = "GMEngine.getProjectConfItems";
static const char __pyx_k_fromconfig2Str_locals_lambda[] = "fromconfig2Str.<locals>.<lambda>";
static const char __pyx_k_getMinMaxMatrix_locals_lambda[] = "getMinMaxMatrix.<locals>.<lambda>";
static const char __pyx_k_nntoolbox_configparsertoolbox[] = "nntoolbox.configparsertoolbox";
static const char __pyx_k_GMEngine_connect_locals_lambda[] = "GMEngine.connect.<locals>.<lambda>";
static const char __pyx_k_GMEngine_getProjectConfOptions[] = "GMEngine.getProjectConfOptions";
static const char __pyx_k_GMEngine___init___locals_lambda[] = "GMEngine.__init__.<locals>.<lambda>";
static const char __pyx_k_metaphor_chem_gm_core_gmtoolbox[] = "metaphor.chem_gm.core.gmtoolbox";
static const char __pyx_k_GMEngine_clearProjectConfOptions[] = "GMEngine.clearProjectConfOptions";
static const char __pyx_k_class_GMEngine_Gestionnaire_comm[] = "class GMEngine\n    Gestionnaire commun a toutes pages de \"Graph Mmachine\" du moteur de \n    configuration de Graph Machine.\n    ";
static const char __pyx_k_getMinMaxMatrixSym_first_param_m[] = "getMinMaxMatrixSym first param must be a square symetric matrix";
static const char __pyx_k_getMinMaxMatrixSym_locals_lambda[] = "getMinMaxMatrixSym.<locals>.<lambda>";
static const char __pyx_k_metaphor_chem_gm_core_gmtoolbox_2[] = "metaphor/chem_gm/core/gmtoolbox.py";
static PyObject *__pyx_kp_u_0;
static PyObject *__pyx_kp_u_1;
static PyObject *__pyx_n_s_Atomes;
static PyObject *__pyx_n_s_Atomes1;
static PyObject *__pyx_n_s_Atomes2;
static PyObject *__pyx_n_s_AtomsLower;
static PyObject *__pyx_n_s_AttributeError;
static PyObject *__pyx_n_u_BJMA_H_Si3_Br5_mol0_Class_5N;
static PyObject *__pyx_n_s_C;
static PyObject *__pyx_n_s_CCharOnlys;
static PyObject *__pyx_n_u_Class;
static PyObject *__pyx_n_u_Cn;
static PyObject *__pyx_kp_u_Cn_s;
static PyObject *__pyx_kp_u_Computed_s;
static PyObject *__pyx_n_s_Excel;
static PyObject *__pyx_n_s_ExcelCsv;
static PyObject *__pyx_n_s_ExcelXP;
static PyObject *__pyx_n_u_ExtraSheet;
static PyObject *__pyx_n_s_GMEngine;
static PyObject *__pyx_n_s_iso885915_GMEngine;
static PyObject *__pyx_n_s_GMEngine_ModelCfgItems;
static PyObject *__pyx_n_s_GMEngine___init;
static PyObject *__pyx_n_s_GMEngine___init___locals_lambda;
static PyObject *__pyx_n_s_GMEngine__getFromConf;
static PyObject *__pyx_n_s_GMEngine__getItemsFromConf;
static PyObject *__pyx_n_s_GMEngine__getOptionsFromConf;
static PyObject *__pyx_n_s_GMEngine_baselen;
static PyObject *__pyx_n_s_GMEngine_checkconnect;
static PyObject *__pyx_n_s_GMEngine_clearProjectConfOptions;
static PyObject *__pyx_n_s_GMEngine_configFile;
static PyObject *__pyx_n_s_GMEngine_connect;
static PyObject *__pyx_n_s_GMEngine_connect_locals_lambda;
static PyObject *__pyx_n_s_GMEngine_dataRoot;
static PyObject *__pyx_n_s_GMEngine_dataiterator;
static PyObject *__pyx_n_s_GMEngine_extras;
static PyObject *__pyx_n_s_GMEngine_fullProjectIniFile;
static PyObject *__pyx_n_s_GMEngine_getDefault;
static PyObject *__pyx_n_s_GMEngine_getDefaultItems;
static PyObject *__pyx_n_s_GMEngine_getDefaultOptions;
static PyObject *__pyx_n_s_GMEngine_getModel;
static PyObject *__pyx_n_s_GMEngine_getModelDict;
static PyObject *__pyx_n_s_GMEngine_getProjectConf;
static PyObject *__pyx_n_s_GMEngine_getProjectConfItems;
static PyObject *__pyx_n_s_GMEngine_getProjectConfOptions;
static PyObject *__pyx_n_s_GMEngine_getResults;
static PyObject *__pyx_n_s_GMEngine_getTargetsFromFile;
static PyObject *__pyx_n_s_GMEngine_getTempDir;
static PyObject *__pyx_n_s_GMEngine_modelSelected;
static PyObject *__pyx_n_s_GMEngine_modelconf;
static PyObject *__pyx_n_s_GMEngine_onDestroy;
static PyObject *__pyx_n_s_GMEngine_projectConf;
static PyObject *__pyx_n_s_GMEngine_readConfig;
static PyObject *__pyx_n_s_GMEngine_save;
static PyObject *__pyx_n_s_GMEngine_saveDefaultConf;
static PyObject *__pyx_n_s_GMEngine_saveModelConf;
static PyObject *__pyx_n_s_GMEngine_sbaselen;
static PyObject *__pyx_n_s_GMEngine_sconfigFile;
static PyObject *__pyx_n_s_GMEngine_setDefaultConf;
static PyObject *__pyx_n_s_GMEngine_setModel;
static PyObject *__pyx_n_s_GMEngine_setProjectConf;
static PyObject *__pyx_n_s_GMEngine_setmodelconf;
static PyObject *__pyx_n_s_GMEngine_sworkingDir;
static PyObject *__pyx_n_s_GMEngine_updateConfig;
static PyObject *__pyx_n_s_GMEngine_workingDir;
static PyObject *__pyx_n_s_Hydrogenes;
static PyObject *__pyx_n_s_INPUT_COUNT;
static PyObject *__pyx_n_u_LM;
static PyObject *__pyx_kp_u_LOO_s;
static PyObject *__pyx_n_u_Leverage;
static PyObject *__pyx_kp_u_Leverage_s;
static PyObject *__pyx_n_s_M;
static PyObject *__pyx_n_s_Mat;
static PyObject *__pyx_n_s_ModelCfgItems;
static PyObject *__pyx_n_s_N;
static PyObject *__pyx_n_u_N;
static PyObject *__pyx_n_s_OKchi;
static PyObject *__pyx_n_s_OKiso;
static PyObject *__pyx_n_s_OUTPUT_COUNT;
static PyObject *__pyx_n_s_OrderedDict;
static PyObject *__pyx_n_s_Property;
static PyObject *__pyx_n_u_Residual;
static PyObject *__pyx_kp_u_Residual_s;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_s_VE_JACOBIAN;
static PyObject *__pyx_n_s_VE_TRAINING_DATA_LONG;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_kp_u__209;
static PyObject *__pyx_kp_u__27;
static PyObject *__pyx_kp_u__4;
static PyObject *__pyx_kp_u__41;
static PyObject *__pyx_n_s__5;
static PyObject *__pyx_n_u__5;
static PyObject *__pyx_kp_u__55;
static PyObject *__pyx_n_s__75;
static PyObject *__pyx_kp_u_absolute;
static PyObject *__pyx_n_s_abspath;
static PyObject *__pyx_n_s_add_section;
static PyObject *__pyx_n_s_add_worksheet;
static PyObject *__pyx_n_s_append;
static PyObject *__pyx_n_s_asarray;
static PyObject *__pyx_n_s_atomdict;
static PyObject *__pyx_n_s_atomkeys;
static PyObject *__pyx_n_s_atoms;
static PyObject *__pyx_n_s_base;
static PyObject *__pyx_n_s_baselen;
static PyObject *__pyx_n_s_baselen_2;
static PyObject *__pyx_n_s_basename;
static PyObject *__pyx_n_s_c_size_t;
static PyObject *__pyx_n_s_candidatecount;
static PyObject *__pyx_n_u_candidatecount;
static PyObject *__pyx_n_s_capitalize;
static PyObject *__pyx_n_u_ccl;
static PyObject *__pyx_n_s_cclinputlst;
static PyObject *__pyx_n_s_ccllst;
static PyObject *__pyx_n_u_ccls;
static PyObject *__pyx_n_s_central;
static PyObject *__pyx_n_u_central;
static PyObject *__pyx_kp_u_cfg;
static PyObject *__pyx_n_s_cfg_2;
static PyObject *__pyx_n_s_cfgfile;
static PyObject *__pyx_n_s_chain;
static PyObject *__pyx_n_s_chargekey;
static PyObject *__pyx_n_s_checkconnect;
static PyObject *__pyx_n_u_chi;
static PyObject *__pyx_n_u_chi1;
static PyObject *__pyx_n_u_chi2;
static PyObject *__pyx_n_s_chikey;
static PyObject *__pyx_n_s_chimax;
static PyObject *__pyx_kp_s_class_GMEngine_Gestionnaire_comm;
static PyObject *__pyx_n_s_classif;
static PyObject *__pyx_n_u_classif;
static PyObject *__pyx_n_s_clearProjectConfOptions;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_n_s_col0;
static PyObject *__pyx_n_s_collections;
static PyObject *__pyx_n_s_computed;
static PyObject *__pyx_n_s_cond;
static PyObject *__pyx_n_s_conf;
static PyObject *__pyx_n_s_conffile;
static PyObject *__pyx_n_s_config;
static PyObject *__pyx_n_s_configFile;
static PyObject *__pyx_n_s_configFile_2;
static PyObject *__pyx_n_s_configstr;
static PyObject *__pyx_n_s_conkeys;
static PyObject *__pyx_n_s_connect;
static PyObject *__pyx_n_s_connectivity;
static PyObject *__pyx_n_u_connectivity;
static PyObject *__pyx_n_s_connectlist;
static PyObject *__pyx_n_s_copy;
static PyObject *__pyx_n_s_correlMatrix;
static PyObject *__pyx_n_u_cost;
static PyObject *__pyx_kp_u_cost_s;
static PyObject *__pyx_n_s_ctypes;
static PyObject *__pyx_n_s_cumulatom;
static PyObject *__pyx_n_s_cur;
static PyObject *__pyx_n_s_curalgo;
static PyObject *__pyx_n_s_curcol;
static PyObject *__pyx_n_s_curproperty;
static PyObject *__pyx_n_s_currow;
static PyObject *__pyx_n_s_cyclekey;
static PyObject *__pyx_n_u_d;
static PyObject *__pyx_kp_u_dN;
static PyObject *__pyx_n_s_dataRoot;
static PyObject *__pyx_n_s_dataiterator;
static PyObject *__pyx_n_s_datasource;
static PyObject *__pyx_n_s_debug;
static PyObject *__pyx_n_s_default;
static PyObject *__pyx_n_s_defaultConf;
static PyObject *__pyx_n_s_defaultConfigFile;
static PyObject *__pyx_n_s_defaultConnect;
static PyObject *__pyx_n_s_defaultModified;
static PyObject *__pyx_n_s_defaultcfg;
static PyObject *__pyx_n_s_defaultdict;
static PyObject *__pyx_n_s_defaultedConfigParser;
static PyObject *__pyx_n_u_dgr;
static PyObject *__pyx_n_u_dgrs;
static PyObject *__pyx_n_s_dico;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_dictt;
static PyObject *__pyx_n_s_dispMat;
static PyObject *__pyx_n_s_dl;
static PyObject *__pyx_n_s_doHash;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_docreate;
static PyObject *__pyx_n_s_doremovemodule;
static PyObject *__pyx_n_s_e;
static PyObject *__pyx_n_s_endswith;
static PyObject *__pyx_n_s_enter;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_err;
static PyObject *__pyx_n_s_exists;
static PyObject *__pyx_n_s_exit;
static PyObject *__pyx_n_s_ext;
static PyObject *__pyx_n_s_extended;
static PyObject *__pyx_n_s_extra;
static PyObject *__pyx_n_u_extra;
static PyObject *__pyx_kp_u_extra_d;
static PyObject *__pyx_n_s_extraopts;
static PyObject *__pyx_n_s_extraoptslow;
static PyObject *__pyx_n_s_extrarow;
static PyObject *__pyx_n_s_extras;
static PyObject *__pyx_n_u_extras;
static PyObject *__pyx_n_s_extrasheet;
static PyObject *__pyx_n_s_ff;
static PyObject *__pyx_n_s_filename;
static PyObject *__pyx_n_s_files;
static PyObject *__pyx_n_s_fromConfigstr2Dict;
static PyObject *__pyx_n_s_fromconfig2Str;
static PyObject *__pyx_n_s_fromconfig2Str_locals_lambda;
static PyObject *__pyx_n_s_fullProjectIniFile;
static PyObject *__pyx_n_s_fullconfig;
static PyObject *__pyx_n_s_fullres;
static PyObject *__pyx_n_s_fval;
static PyObject *__pyx_n_u_general;
static PyObject *__pyx_n_s_get;
static PyObject *__pyx_n_s_getArray;
static PyObject *__pyx_n_s_getConfigHash;
static PyObject *__pyx_n_s_getDefault;
static PyObject *__pyx_n_s_getDefaultItems;
static PyObject *__pyx_n_s_getDefaultOptions;
static PyObject *__pyx_n_s_getFromConf;
static PyObject *__pyx_n_s_getItemsFromConf;
static PyObject *__pyx_n_s_getMinMaxMatrix;
static PyObject *__pyx_n_s_getMinMaxMatrixSym;
static PyObject *__pyx_kp_u_getMinMaxMatrixSym_first_param_m;
static PyObject *__pyx_n_s_getMinMaxMatrixSym_locals_lambda;
static PyObject *__pyx_n_s_getMinMaxMatrix_locals_lambda;
static PyObject *__pyx_n_s_getModel;
static PyObject *__pyx_n_s_getModelBase;
static PyObject *__pyx_n_s_getModelDict;
static PyObject *__pyx_n_s_getModelKeyFromConf;
static PyObject *__pyx_n_s_getOptionsFromConf;
static PyObject *__pyx_n_s_getProjectConf;
static PyObject *__pyx_n_s_getProjectConfItems;
static PyObject *__pyx_n_s_getProjectConfOptions;
static PyObject *__pyx_n_s_getResults;
static PyObject *__pyx_n_s_getSectionDict;
static PyObject *__pyx_n_s_getTargetsFromFile;
static PyObject *__pyx_n_s_getTempDir;
static PyObject *__pyx_n_s_getTransferResults;
static PyObject *__pyx_n_s_getbooleandefault;
static PyObject *__pyx_n_s_getcwd;
static PyObject *__pyx_n_s_getdefault;
static PyObject *__pyx_n_s_getfloat;
static PyObject *__pyx_n_s_getint;
static PyObject *__pyx_n_s_getintdefault;
static PyObject *__pyx_n_s_gmconst;
static PyObject *__pyx_n_s_gmutils;
static PyObject *__pyx_n_s_gradekey;
static PyObject *__pyx_n_s_grademax;
static PyObject *__pyx_n_s_gradlst;
static PyObject *__pyx_n_u_grd;
static PyObject *__pyx_n_s_grdinputlist;
static PyObject *__pyx_n_u_grds;
static PyObject *__pyx_n_s_has_hydrogen;
static PyObject *__pyx_n_s_has_option;
static PyObject *__pyx_n_s_has_section;
static PyObject *__pyx_n_s_hashFromConfig;
static PyObject *__pyx_n_s_hashFromDict;
static PyObject *__pyx_n_s_head;
static PyObject *__pyx_n_s_header;
static PyObject *__pyx_n_s_headers;
static PyObject *__pyx_n_s_hidden;
static PyObject *__pyx_n_u_hidden;
static PyObject *__pyx_n_s_hii;
static PyObject *__pyx_n_s_hijmax;
static PyObject *__pyx_n_s_hijmean;
static PyObject *__pyx_n_s_hijmin;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_ii;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_ind;
static PyObject *__pyx_n_s_index;
static PyObject *__pyx_n_s_indextest;
static PyObject *__pyx_n_s_info;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_n_s_inputCount;
static PyObject *__pyx_n_s_inputNames;
static PyObject *__pyx_n_s_isHidden;
static PyObject *__pyx_n_s_isdir;
static PyObject *__pyx_n_s_isfull;
static PyObject *__pyx_n_s_isint;
static PyObject *__pyx_n_s_islong;
static PyObject *__pyx_n_s_ismodif;
static PyObject *__pyx_n_u_iso;
static PyObject *__pyx_n_u_iso1;
static PyObject *__pyx_n_u_iso2;
static PyObject *__pyx_n_s_isokey;
static PyObject *__pyx_n_s_isomax;
static PyObject *__pyx_n_s_item;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_iterData;
static PyObject *__pyx_n_s_iterator;
static PyObject *__pyx_n_s_itertools;
static PyObject *__pyx_n_s_j;
static PyObject *__pyx_n_s_jacobian;
static PyObject *__pyx_n_s_join;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_s_key2long;
static PyObject *__pyx_n_s_key2short;
static PyObject *__pyx_n_s_keyfct;
static PyObject *__pyx_n_s_keys;
static PyObject *__pyx_n_s_keyshort;
static PyObject *__pyx_n_s_l1;
static PyObject *__pyx_n_s_lastGMM;
static PyObject *__pyx_n_s_left;
static PyObject *__pyx_n_s_lefter;
static PyObject *__pyx_n_s_lefters;
static PyObject *__pyx_n_s_leverage;
static PyObject *__pyx_n_u_leverage;
static PyObject *__pyx_kp_u_leverages;
static PyObject *__pyx_n_u_lib;
static PyObject *__pyx_n_s_lig;
static PyObject *__pyx_n_s_lig2;
static PyObject *__pyx_n_s_loadtxt;
static PyObject *__pyx_n_s_locconf;
static PyObject *__pyx_n_s_longkey;
static PyObject *__pyx_n_s_lower;
static PyObject *__pyx_n_s_lrow;
static PyObject *__pyx_n_s_lst;
static PyObject *__pyx_n_s_lsts;
static PyObject *__pyx_n_s_ma;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_u_main;
static PyObject *__pyx_n_s_mainTitle;
static PyObject *__pyx_n_s_make_dir;
static PyObject *__pyx_n_s_mask;
static PyObject *__pyx_n_s_masked_array;
static PyObject *__pyx_kp_u_max;
static PyObject *__pyx_n_s_max_2;
static PyObject *__pyx_kp_u_max_abs_hij;
static PyObject *__pyx_n_s_mean;
static PyObject *__pyx_kp_u_mean_abs_hij;
static PyObject *__pyx_n_s_mess;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_metaphor_chem_gm_core_gmtoolbox;
static PyObject *__pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2;
static PyObject *__pyx_kp_u_min;
static PyObject *__pyx_n_s_min_2;
static PyObject *__pyx_kp_u_min_abs_hij;
static PyObject *__pyx_n_s_minmax;
static PyObject *__pyx_n_s_minmaxsize;
static PyObject *__pyx_n_s_minmaxst;
static PyObject *__pyx_n_s_mkdtemp;
static PyObject *__pyx_n_s_mmlst0;
static PyObject *__pyx_n_s_mmlst1;
static PyObject *__pyx_n_s_modconf;
static PyObject *__pyx_n_s_moddict;
static PyObject *__pyx_n_u_model;
static PyObject *__pyx_n_s_modelConfFile;
static PyObject *__pyx_n_s_modelSelected;
static PyObject *__pyx_n_s_modelconf;
static PyObject *__pyx_n_s_modelconfdict;
static PyObject *__pyx_n_s_modeldict;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_module_2;
static PyObject *__pyx_n_s_modulestoremove;
static PyObject *__pyx_n_u_mol;
static PyObject *__pyx_n_u_mol0;
static PyObject *__pyx_n_s_mol1;
static PyObject *__pyx_n_u_mol1;
static PyObject *__pyx_n_s_monal;
static PyObject *__pyx_n_s_monal_Property;
static PyObject *__pyx_n_s_monal_datareader__excel;
static PyObject *__pyx_n_s_monal_util_toolbox;
static PyObject *__pyx_n_s_monal_util_utils;
static PyObject *__pyx_n_s_monalconst;
static PyObject *__pyx_n_s_n;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_name_2;
static PyObject *__pyx_n_s_names;
static PyObject *__pyx_n_s_nb;
static PyObject *__pyx_n_s_newline;
static PyObject *__pyx_n_s_newprefix;
static PyObject *__pyx_n_s_ni;
static PyObject *__pyx_n_s_nntoolbox_configparsertoolbox;
static PyObject *__pyx_n_s_nntoolbox_filetoolbox;
static PyObject *__pyx_n_s_nntoolbox_utils;
static PyObject *__pyx_n_s_no;
static PyObject *__pyx_n_s_nonASCIICharsConvert;
static PyObject *__pyx_n_s_np;
static PyObject *__pyx_n_s_numpy;
static PyObject *__pyx_n_s_numpy_ma;
static PyObject *__pyx_n_s_object;
static PyObject *__pyx_n_u_occurence;
static PyObject *__pyx_n_s_onDestroy;
static PyObject *__pyx_n_s_open;
static PyObject *__pyx_n_s_oplst;
static PyObject *__pyx_n_s_opt;
static PyObject *__pyx_n_s_option;
static PyObject *__pyx_n_s_optionlist;
static PyObject *__pyx_n_s_optionoccur;
static PyObject *__pyx_n_s_options;
static PyObject *__pyx_n_s_origin;
static PyObject *__pyx_n_s_os;
static PyObject *__pyx_n_s_outputCount;
static PyObject *__pyx_n_s_outputNames;
static PyObject *__pyx_n_s_parameterNames;
static PyObject *__pyx_n_s_paramlist;
static PyObject *__pyx_n_s_path;
static PyObject *__pyx_n_s_pathname;
static PyObject *__pyx_n_s_pop;
static PyObject *__pyx_n_s_ppath;
static PyObject *__pyx_n_s_ppty;
static PyObject *__pyx_n_s_pptyname;
static PyObject *__pyx_n_s_prefix;
static PyObject *__pyx_n_u_prefix;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_prevLOO;
static PyObject *__pyx_n_s_print;
static PyObject *__pyx_n_s_projMat;
static PyObject *__pyx_n_s_projectConf;
static PyObject *__pyx_n_s_projectConf_2;
static PyObject *__pyx_n_s_projectDir;
static PyObject *__pyx_n_s_projectionMatrix;
static PyObject *__pyx_n_u_projects;
static PyObject *__pyx_n_s_prop;
static PyObject *__pyx_n_u_properties;
static PyObject *__pyx_n_u_property;
static PyObject *__pyx_kp_u_pyd;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_quotechar;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_read;
static PyObject *__pyx_n_s_readConfig;
static PyObject *__pyx_n_s_remove_option;
static PyObject *__pyx_n_s_remove_section;
static PyObject *__pyx_n_s_removemodule;
static PyObject *__pyx_n_s_repeat;
static PyObject *__pyx_n_s_res;
static PyObject *__pyx_n_s_reseau;
static PyObject *__pyx_n_s_reshash;
static PyObject *__pyx_n_s_residual;
static PyObject *__pyx_n_s_reslong;
static PyObject *__pyx_n_s_resst;
static PyObject *__pyx_n_s_result;
static PyObject *__pyx_n_s_resultlist;
static PyObject *__pyx_n_s_reverse;
static PyObject *__pyx_n_s_richDictFromConfigstr;
static PyObject *__pyx_n_s_root;
static PyObject *__pyx_n_u_root;
static PyObject *__pyx_n_s_row0;
static PyObject *__pyx_n_s_rowend;
static PyObject *__pyx_kp_u_s;
static PyObject *__pyx_n_s_save;
static PyObject *__pyx_n_s_saveDefaultConf;
static PyObject *__pyx_n_s_saveModelConf;
static PyObject *__pyx_n_s_saveNpToXl;
static PyObject *__pyx_n_s_saveNpsToXl;
static PyObject *__pyx_n_s_sbaselen;
static PyObject *__pyx_n_s_sconfigFile;
static PyObject *__pyx_n_s_sec;
static PyObject *__pyx_n_s_section;
static PyObject *__pyx_n_s_sections;
static PyObject *__pyx_n_u_selected;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_set;
static PyObject *__pyx_n_s_setDefaultConf;
static PyObject *__pyx_n_s_setModel;
static PyObject *__pyx_n_s_setProjectConf;
static PyObject *__pyx_n_s_setmodelconf;
static PyObject *__pyx_n_s_setter;
static PyObject *__pyx_n_s_shape;
static PyObject *__pyx_n_s_sheet;
static PyObject *__pyx_n_u_sheet_1;
static PyObject *__pyx_n_s_sheets;
static PyObject *__pyx_n_s_shortTitles;
static PyObject *__pyx_n_s_shutil;
static PyObject *__pyx_n_s_simplecentral;
static PyObject *__pyx_n_s_sort;
static PyObject *__pyx_n_s_sorted;
static PyObject *__pyx_n_s_source;
static PyObject *__pyx_n_s_sourceTitles;
static PyObject *__pyx_n_s_sources;
static PyObject *__pyx_n_s_split;
static PyObject *__pyx_n_s_st;
static PyObject *__pyx_n_s_startswith;
static PyObject *__pyx_n_s_stconnect;
static PyObject *__pyx_n_s_stdout;
static PyObject *__pyx_n_s_structdict;
static PyObject *__pyx_n_s_structkeysloc;
static PyObject *__pyx_n_s_super;
static PyObject *__pyx_n_s_sworkingDir;
static PyObject *__pyx_n_s_sys;
static PyObject *__pyx_n_s_target;
static PyObject *__pyx_n_s_targets;
static PyObject *__pyx_n_s_tempDirs;
static PyObject *__pyx_n_s_tempfile;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_test_2;
static PyObject *__pyx_n_s_titles;
static PyObject *__pyx_n_s_to_add;
static PyObject *__pyx_n_u_training;
static PyObject *__pyx_kp_u_training__s;
static PyObject *__pyx_n_s_trainlabel;
static PyObject *__pyx_n_s_triangle;
static PyObject *__pyx_n_u_true;
static PyObject *__pyx_n_s_updateConfig;
static PyObject *__pyx_n_s_updateConfigFromConfigstr;
static PyObject *__pyx_n_s_val;
static PyObject *__pyx_n_s_valtest;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_vec;
static PyObject *__pyx_n_u_w;
static PyObject *__pyx_kp_u_w_2;
static PyObject *__pyx_n_s_withdiag;
static PyObject *__pyx_n_s_withhidden;
static PyObject *__pyx_n_s_withprefix;
static PyObject *__pyx_n_s_withtitles;
static PyObject *__pyx_n_s_workingDir;
static PyObject *__pyx_n_s_workingdir;
static PyObject *__pyx_n_u_workingdir;
static PyObject *__pyx_n_s_write;
static PyObject *__pyx_n_s_write_col;
static PyObject *__pyx_n_s_write_row;
static PyObject *__pyx_n_s_writeconnect;
static PyObject *__pyx_n_s_writer;
static PyObject *__pyx_n_s_xl;
static PyObject *__pyx_n_s_zeros;
static PyObject *__pyx_n_s_zip;
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_writeconnect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_config, PyObject *__pyx_v_connect); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda(PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_2getMinMaxMatrix(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_Mat, PyObject *__pyx_v_names, PyObject *__pyx_v_nb, PyObject *__pyx_v_indextest); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_4getMinMaxMatrixSym(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_Mat, PyObject *__pyx_v_nb, PyObject *__pyx_v_withdiag); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_26__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_6saveNpToXl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_source, PyObject *__pyx_v_header, PyObject *__pyx_v_sheet); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_28__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8saveNpsToXl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_sources, PyObject *__pyx_v_sourceTitles, PyObject *__pyx_v_shortTitles, PyObject *__pyx_v_extra, PyObject *__pyx_v_extrasheet, PyObject *__pyx_v_extrarow, PyObject *__pyx_v_header, PyObject *__pyx_v_headers, PyObject *__pyx_v_lefter, PyObject *__pyx_v_lefters, PyObject *__pyx_v_sheets, PyObject *__pyx_v_minmax); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_10richDictFromConfigstr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_configstr, CYTHON_UNUSED PyObject *__pyx_v_hidden, CYTHON_UNUSED PyObject *__pyx_v_target, CYTHON_UNUSED PyObject *__pyx_v_longkey, CYTHON_UNUSED PyObject *__pyx_v_grademax); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_12fromConfigstr2Dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_configstr, PyObject *__pyx_v_hidden, PyObject *__pyx_v_target, PyObject *__pyx_v_longkey, PyObject *__pyx_v_grademax); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_14updateConfigFromConfigstr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_configstr, PyObject *__pyx_v_config); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_16hashFromDict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dict, PyObject *__pyx_v_hidden, PyObject *__pyx_v_fullconfig, PyObject *__pyx_v_withhidden); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_18hashFromConfig(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_config, PyObject *__pyx_v_hidden, PyObject *__pyx_v_fullconfig, PyObject *__pyx_v_withhidden); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_20fromconfig2Str(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dict, PyObject *__pyx_v_hidden, PyObject *__pyx_v_fullconfig, PyObject *__pyx_v_withhidden, PyObject *__pyx_v_simplecentral); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_22getModelBase(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_config, PyObject *__pyx_v_moddict, PyObject *__pyx_v_hidden, PyObject *__pyx_v_fullconfig, PyObject *__pyx_v_withprefix, PyObject *__pyx_v_withhidden, PyObject *__pyx_v_simplecentral, PyObject *__pyx_v_candidatecount, PyObject *__pyx_v_ext); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_24getModelKeyFromConf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_config, PyObject *__pyx_v_doHash); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda3(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda4(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda5(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_projectDir, PyObject *__pyx_v_defaultcfg, PyObject *__pyx_v_debug); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_2checkconnect(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_conf, PyObject *__pyx_v_islong); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_4setDefaultConf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_conffile); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_6dataiterator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_8onDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_10baselen(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_12sbaselen(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_14getTempDir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_16setmodelconf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_18modelconf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_origin); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_20saveModelConf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_22saveDefaultConf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_24modelSelected(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_ppty); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_26getTargetsFromFile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_28ModelCfgItems(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_30save(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_32getDefault(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_section, PyObject *__pyx_v_option, PyObject *__pyx_v_default, PyObject *__pyx_v_docreate); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_34getProjectConf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_section, PyObject *__pyx_v_option, PyObject *__pyx_v_default, PyObject *__pyx_v_docreate); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_36_getFromConf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_conf, PyObject *__pyx_v_section, PyObject *__pyx_v_option, PyObject *__pyx_v_default, PyObject *__pyx_v_docreate); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_38setProjectConf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_section, PyObject *__pyx_v_option, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_40getDefaultOptions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_section); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_42getDefaultItems(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_section); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_44getProjectConfOptions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_section); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_46getProjectConfItems(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_section); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_48_getOptionsFromConf(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_conf, PyObject *__pyx_v_section); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_50_getItemsFromConf(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_conf, PyObject *__pyx_v_section); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_52clearProjectConfOptions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_section, PyObject *__pyx_v_optionlist, PyObject *__pyx_v_doremovemodule); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_54getModelDict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_cfgfile); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_56getModel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_config); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_58setModel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_config, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_60workingDir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_62sworkingDir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_64dataRoot(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_66projectConf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_68configFile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_70sconfigFile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_72readConfig(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_74fullProjectIniFile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_76updateConfig(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_section, PyObject *__pyx_v_items); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda6(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_78connect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_config); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_80extras(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_config); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_82getResults(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_reseau, PyObject *__pyx_v_quotechar, PyObject *__pyx_v_withtitles, PyObject *__pyx_v_pptyname); /* proto */
static PyObject *__pyx_tp_new_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_keys = {0, &__pyx_n_s_keys, 0, 0, 0};
static __Pyx_CachedCFunction __pyx_umethod_PyList_Type_index = {0, &__pyx_n_s_index, 0, 0, 0};
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_4;
static PyObject *__pyx_int_10;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_int_neg_2;
static PyObject *__pyx_int_neg_3;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_slice__10;
static PyObject *__pyx_slice__11;
static PyObject *__pyx_slice__12;
static PyObject *__pyx_slice__13;
static PyObject *__pyx_slice__14;
static PyObject *__pyx_slice__15;
static PyObject *__pyx_slice__16;
static PyObject *__pyx_slice__17;
static PyObject *__pyx_slice__18;
static PyObject *__pyx_slice__19;
static PyObject *__pyx_slice__20;
static PyObject *__pyx_slice__21;
static PyObject *__pyx_slice__22;
static PyObject *__pyx_slice__23;
static PyObject *__pyx_slice__24;
static PyObject *__pyx_slice__25;
static PyObject *__pyx_slice__26;
static PyObject *__pyx_slice__29;
static PyObject *__pyx_slice__30;
static PyObject *__pyx_slice__37;
static PyObject *__pyx_slice__39;
static PyObject *__pyx_slice__58;
static PyObject *__pyx_slice__65;
static PyObject *__pyx_tuple__28;
static PyObject *__pyx_tuple__31;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__33;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__40;
static PyObject *__pyx_tuple__42;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__45;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__47;
static PyObject *__pyx_tuple__48;
static PyObject *__pyx_tuple__49;
static PyObject *__pyx_tuple__50;
static PyObject *__pyx_tuple__51;
static PyObject *__pyx_tuple__52;
static PyObject *__pyx_tuple__53;
static PyObject *__pyx_tuple__54;
static PyObject *__pyx_tuple__56;
static PyObject *__pyx_tuple__57;
static PyObject *__pyx_tuple__59;
static PyObject *__pyx_tuple__60;
static PyObject *__pyx_tuple__61;
static PyObject *__pyx_tuple__62;
static PyObject *__pyx_tuple__63;
static PyObject *__pyx_tuple__64;
static PyObject *__pyx_tuple__66;
static PyObject *__pyx_tuple__67;
static PyObject *__pyx_tuple__68;
static PyObject *__pyx_tuple__69;
static PyObject *__pyx_tuple__70;
static PyObject *__pyx_tuple__71;
static PyObject *__pyx_tuple__72;
static PyObject *__pyx_tuple__73;
static PyObject *__pyx_tuple__74;
static PyObject *__pyx_tuple__76;
static PyObject *__pyx_tuple__78;
static PyObject *__pyx_tuple__80;
static PyObject *__pyx_tuple__81;
static PyObject *__pyx_tuple__83;
static PyObject *__pyx_tuple__84;
static PyObject *__pyx_tuple__86;
static PyObject *__pyx_tuple__88;
static PyObject *__pyx_tuple__90;
static PyObject *__pyx_tuple__91;
static PyObject *__pyx_tuple__93;
static PyObject *__pyx_tuple__94;
static PyObject *__pyx_tuple__96;
static PyObject *__pyx_tuple__98;
static PyObject *__pyx_tuple__99;
static PyObject *__pyx_tuple__101;
static PyObject *__pyx_tuple__102;
static PyObject *__pyx_tuple__104;
static PyObject *__pyx_tuple__105;
static PyObject *__pyx_tuple__107;
static PyObject *__pyx_tuple__108;
static PyObject *__pyx_tuple__110;
static PyObject *__pyx_tuple__111;
static PyObject *__pyx_tuple__112;
static PyObject *__pyx_tuple__114;
static PyObject *__pyx_tuple__115;
static PyObject *__pyx_tuple__117;
static PyObject *__pyx_tuple__119;
static PyObject *__pyx_tuple__120;
static PyObject *__pyx_tuple__122;
static PyObject *__pyx_tuple__124;
static PyObject *__pyx_tuple__126;
static PyObject *__pyx_tuple__128;
static PyObject *__pyx_tuple__130;
static PyObject *__pyx_tuple__131;
static PyObject *__pyx_tuple__133;
static PyObject *__pyx_tuple__135;
static PyObject *__pyx_tuple__136;
static PyObject *__pyx_tuple__138;
static PyObject *__pyx_tuple__140;
static PyObject *__pyx_tuple__141;
static PyObject *__pyx_tuple__143;
static PyObject *__pyx_tuple__145;
static PyObject *__pyx_tuple__147;
static PyObject *__pyx_tuple__149;
static PyObject *__pyx_tuple__150;
static PyObject *__pyx_tuple__152;
static PyObject *__pyx_tuple__153;
static PyObject *__pyx_tuple__155;
static PyObject *__pyx_tuple__156;
static PyObject *__pyx_tuple__158;
static PyObject *__pyx_tuple__159;
static PyObject *__pyx_tuple__161;
static PyObject *__pyx_tuple__163;
static PyObject *__pyx_tuple__165;
static PyObject *__pyx_tuple__167;
static PyObject *__pyx_tuple__169;
static PyObject *__pyx_tuple__171;
static PyObject *__pyx_tuple__173;
static PyObject *__pyx_tuple__175;
static PyObject *__pyx_tuple__176;
static PyObject *__pyx_tuple__178;
static PyObject *__pyx_tuple__180;
static PyObject *__pyx_tuple__182;
static PyObject *__pyx_tuple__184;
static PyObject *__pyx_tuple__186;
static PyObject *__pyx_tuple__188;
static PyObject *__pyx_tuple__190;
static PyObject *__pyx_tuple__192;
static PyObject *__pyx_tuple__194;
static PyObject *__pyx_tuple__196;
static PyObject *__pyx_tuple__197;
static PyObject *__pyx_tuple__199;
static PyObject *__pyx_tuple__201;
static PyObject *__pyx_tuple__203;
static PyObject *__pyx_tuple__205;
static PyObject *__pyx_tuple__207;
static PyObject *__pyx_tuple__208;
static PyObject *__pyx_codeobj__77;
static PyObject *__pyx_codeobj__79;
static PyObject *__pyx_codeobj__82;
static PyObject *__pyx_codeobj__85;
static PyObject *__pyx_codeobj__87;
static PyObject *__pyx_codeobj__89;
static PyObject *__pyx_codeobj__92;
static PyObject *__pyx_codeobj__95;
static PyObject *__pyx_codeobj__97;
static PyObject *__pyx_codeobj__100;
static PyObject *__pyx_codeobj__103;
static PyObject *__pyx_codeobj__106;
static PyObject *__pyx_codeobj__109;
static PyObject *__pyx_codeobj__113;
static PyObject *__pyx_codeobj__116;
static PyObject *__pyx_codeobj__118;
static PyObject *__pyx_codeobj__121;
static PyObject *__pyx_codeobj__123;
static PyObject *__pyx_codeobj__125;
static PyObject *__pyx_codeobj__127;
static PyObject *__pyx_codeobj__129;
static PyObject *__pyx_codeobj__132;
static PyObject *__pyx_codeobj__134;
static PyObject *__pyx_codeobj__137;
static PyObject *__pyx_codeobj__139;
static PyObject *__pyx_codeobj__142;
static PyObject *__pyx_codeobj__144;
static PyObject *__pyx_codeobj__146;
static PyObject *__pyx_codeobj__148;
static PyObject *__pyx_codeobj__151;
static PyObject *__pyx_codeobj__154;
static PyObject *__pyx_codeobj__157;
static PyObject *__pyx_codeobj__160;
static PyObject *__pyx_codeobj__162;
static PyObject *__pyx_codeobj__164;
static PyObject *__pyx_codeobj__166;
static PyObject *__pyx_codeobj__168;
static PyObject *__pyx_codeobj__170;
static PyObject *__pyx_codeobj__172;
static PyObject *__pyx_codeobj__174;
static PyObject *__pyx_codeobj__177;
static PyObject *__pyx_codeobj__179;
static PyObject *__pyx_codeobj__181;
static PyObject *__pyx_codeobj__183;
static PyObject *__pyx_codeobj__185;
static PyObject *__pyx_codeobj__187;
static PyObject *__pyx_codeobj__189;
static PyObject *__pyx_codeobj__191;
static PyObject *__pyx_codeobj__193;
static PyObject *__pyx_codeobj__195;
static PyObject *__pyx_codeobj__198;
static PyObject *__pyx_codeobj__200;
static PyObject *__pyx_codeobj__202;
static PyObject *__pyx_codeobj__204;
static PyObject *__pyx_codeobj__206;
/* Late includes */

/* "metaphor/chem_gm/core/gmtoolbox.py":46
 * defaultConf = None
 * 
 * def writeconnect(config, connect):             # <<<<<<<<<<<<<<
 *     if not config.has_section("connectivity"):
 *         config.add_section("connectivity")
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_1writeconnect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_1writeconnect = {"writeconnect", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_1writeconnect, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_1writeconnect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_config = 0;
  PyObject *__pyx_v_connect = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("writeconnect (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_config,&__pyx_n_s_connect,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_config)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_connect)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("writeconnect", 1, 2, 2, 1); __PYX_ERR(0, 46, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "writeconnect") < 0)) __PYX_ERR(0, 46, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_config = values[0];
    __pyx_v_connect = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("writeconnect", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 46, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.writeconnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_writeconnect(__pyx_self, __pyx_v_config, __pyx_v_connect);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_writeconnect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_config, PyObject *__pyx_v_connect) {
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  __Pyx_RefNannySetupContext("writeconnect", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":47
 * 
 * def writeconnect(config, connect):
 *     if not config.has_section("connectivity"):             # <<<<<<<<<<<<<<
 *         config.add_section("connectivity")
 *     for key in connect:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_has_section); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = ((!__pyx_t_3) != 0);
  if (__pyx_t_4) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":48
 * def writeconnect(config, connect):
 *     if not config.has_section("connectivity"):
 *         config.add_section("connectivity")             # <<<<<<<<<<<<<<
 *     for key in connect:
 *         config.set("connectivity", key2long(key), str(connect[key]))
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_add_section); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":47
 * 
 * def writeconnect(config, connect):
 *     if not config.has_section("connectivity"):             # <<<<<<<<<<<<<<
 *         config.add_section("connectivity")
 *     for key in connect:
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":49
 *     if not config.has_section("connectivity"):
 *         config.add_section("connectivity")
 *     for key in connect:             # <<<<<<<<<<<<<<
 *         config.set("connectivity", key2long(key), str(connect[key]))
 * 
 */
  if (likely(PyList_CheckExact(__pyx_v_connect)) || PyTuple_CheckExact(__pyx_v_connect)) {
    __pyx_t_1 = __pyx_v_connect; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_connect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 49, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 49, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 49, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_6(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 49, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":50
 *         config.add_section("connectivity")
 *     for key in connect:
 *         config.set("connectivity", key2long(key), str(connect[key]))             # <<<<<<<<<<<<<<
 * 
 * def getMinMaxMatrix(Mat, names, nb=10, indextest=0):
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_set); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 50, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_key2long); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 50, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
      }
    }
    if (!__pyx_t_10) {
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_key); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 50, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_key};
        __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 50, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_8);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_key};
        __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 50, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_8);
      } else
      #endif
      {
        __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 50, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_key);
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 50, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_connect, __pyx_v_key); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 50, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_11 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 50, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = NULL;
    __pyx_t_12 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_12 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_n_u_connectivity, __pyx_t_8, __pyx_t_11};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_n_u_connectivity, __pyx_t_8, __pyx_t_11};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    } else
    #endif
    {
      __pyx_t_10 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 50, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (__pyx_t_9) {
        __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
      }
      __Pyx_INCREF(__pyx_n_u_connectivity);
      __Pyx_GIVEREF(__pyx_n_u_connectivity);
      PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_12, __pyx_n_u_connectivity);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_12, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_12, __pyx_t_11);
      __pyx_t_8 = 0;
      __pyx_t_11 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":49
 *     if not config.has_section("connectivity"):
 *         config.add_section("connectivity")
 *     for key in connect:             # <<<<<<<<<<<<<<
 *         config.set("connectivity", key2long(key), str(connect[key]))
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":46
 * defaultConf = None
 * 
 * def writeconnect(config, connect):             # <<<<<<<<<<<<<<
 *     if not config.has_section("connectivity"):
 *         config.add_section("connectivity")
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.writeconnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":52
 *         config.set("connectivity", key2long(key), str(connect[key]))
 * 
 * def getMinMaxMatrix(Mat, names, nb=10, indextest=0):             # <<<<<<<<<<<<<<
 *     N, M = Mat.shape
 *     nb = min(nb, N/2)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_3getMinMaxMatrix(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_3getMinMaxMatrix = {"getMinMaxMatrix", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_3getMinMaxMatrix, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_3getMinMaxMatrix(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_Mat = 0;
  PyObject *__pyx_v_names = 0;
  PyObject *__pyx_v_nb = 0;
  PyObject *__pyx_v_indextest = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getMinMaxMatrix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_Mat,&__pyx_n_s_names,&__pyx_n_s_nb,&__pyx_n_s_indextest,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)__pyx_int_10));
    values[3] = ((PyObject *)((PyObject *)__pyx_int_0));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Mat)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_names)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getMinMaxMatrix", 0, 2, 4, 1); __PYX_ERR(0, 52, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nb);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_indextest);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getMinMaxMatrix") < 0)) __PYX_ERR(0, 52, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_Mat = values[0];
    __pyx_v_names = values[1];
    __pyx_v_nb = values[2];
    __pyx_v_indextest = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getMinMaxMatrix", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 52, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.getMinMaxMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_2getMinMaxMatrix(__pyx_self, __pyx_v_Mat, __pyx_v_names, __pyx_v_nb, __pyx_v_indextest);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":56
 *     nb = min(nb, N/2)
 *     lst = [(name, vec) for vec, name in zip(Mat, names)]
 *     lsts = sorted(lst, key=lambda x: x[1][indextest], reverse=True)             # <<<<<<<<<<<<<<
 *     return lsts[:nb], lsts[-nb:]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_15getMinMaxMatrix_lambda(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_15getMinMaxMatrix_lambda = {"lambda", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_15getMinMaxMatrix_lambda, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_15getMinMaxMatrix_lambda(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda(__pyx_self, ((PyObject *)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  struct __pyx_obj_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix *__pyx_cur_scope;
  struct __pyx_obj_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("lambda", 0);
  __pyx_outer_scope = (struct __pyx_obj_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_x, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_indextest)) { __Pyx_RaiseClosureNameError("indextest"); __PYX_ERR(0, 56, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_indextest); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.getMinMaxMatrix.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":52
 *         config.set("connectivity", key2long(key), str(connect[key]))
 * 
 * def getMinMaxMatrix(Mat, names, nb=10, indextest=0):             # <<<<<<<<<<<<<<
 *     N, M = Mat.shape
 *     nb = min(nb, N/2)
 */

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_2getMinMaxMatrix(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_Mat, PyObject *__pyx_v_names, PyObject *__pyx_v_nb, PyObject *__pyx_v_indextest) {
  struct __pyx_obj_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix *__pyx_cur_scope;
  PyObject *__pyx_v_N = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_M = NULL;
  PyObject *__pyx_v_lst = NULL;
  PyObject *__pyx_v_lsts = NULL;
  PyObject *__pyx_7genexpr__pyx_v_vec = NULL;
  PyObject *__pyx_7genexpr__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("getMinMaxMatrix", 0);
  __pyx_cur_scope = (struct __pyx_obj_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix *)__pyx_tp_new_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix(__pyx_ptype_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 52, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_indextest = __pyx_v_indextest;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_indextest);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_indextest);
  __Pyx_INCREF(__pyx_v_nb);

  /* "metaphor/chem_gm/core/gmtoolbox.py":53
 * 
 * def getMinMaxMatrix(Mat, names, nb=10, indextest=0):
 *     N, M = Mat.shape             # <<<<<<<<<<<<<<
 *     nb = min(nb, N/2)
 *     lst = [(name, vec) for vec, name in zip(Mat, names)]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_Mat, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 53, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 53, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 53, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 53, __pyx_L1_error)
    __pyx_t_5 = NULL;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 53, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_N = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_M = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":54
 * def getMinMaxMatrix(Mat, names, nb=10, indextest=0):
 *     N, M = Mat.shape
 *     nb = min(nb, N/2)             # <<<<<<<<<<<<<<
 *     lst = [(name, vec) for vec, name in zip(Mat, names)]
 *     lsts = sorted(lst, key=lambda x: x[1][indextest], reverse=True)
 */
  __pyx_t_1 = __Pyx_PyInt_TrueDivideObjC(__pyx_v_N, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_nb);
  __pyx_t_3 = __pyx_v_nb;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 54, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_6) {
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
  } else {
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_2 = __pyx_t_3;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_nb, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":55
 *     N, M = Mat.shape
 *     nb = min(nb, N/2)
 *     lst = [(name, vec) for vec, name in zip(Mat, names)]             # <<<<<<<<<<<<<<
 *     lsts = sorted(lst, key=lambda x: x[1][indextest], reverse=True)
 *     return lsts[:nb], lsts[-nb:]
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_Mat);
    __Pyx_GIVEREF(__pyx_v_Mat);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_Mat);
    __Pyx_INCREF(__pyx_v_names);
    __Pyx_GIVEREF(__pyx_v_names);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_names);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 55, __pyx_L7_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 55, __pyx_L7_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 55, __pyx_L7_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_8(__pyx_t_2);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 55, __pyx_L7_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
        PyObject* sequence = __pyx_t_3;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 55, __pyx_L7_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_9);
        #else
        __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 55, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 55, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_10 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 55, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = Py_TYPE(__pyx_t_10)->tp_iternext;
        index = 0; __pyx_t_4 = __pyx_t_5(__pyx_t_10); if (unlikely(!__pyx_t_4)) goto __pyx_L10_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_4);
        index = 1; __pyx_t_9 = __pyx_t_5(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L10_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_9);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_10), 2) < 0) __PYX_ERR(0, 55, __pyx_L7_error)
        __pyx_t_5 = NULL;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L11_unpacking_done;
        __pyx_L10_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_5 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 55, __pyx_L7_error)
        __pyx_L11_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_vec, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_name, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_7genexpr__pyx_v_name);
      __Pyx_GIVEREF(__pyx_7genexpr__pyx_v_name);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_7genexpr__pyx_v_name);
      __Pyx_INCREF(__pyx_7genexpr__pyx_v_vec);
      __Pyx_GIVEREF(__pyx_7genexpr__pyx_v_vec);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_7genexpr__pyx_v_vec);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 55, __pyx_L7_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_name); __pyx_7genexpr__pyx_v_name = 0;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_vec); __pyx_7genexpr__pyx_v_vec = 0;
    goto __pyx_L12_exit_scope;
    __pyx_L7_error:;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_name); __pyx_7genexpr__pyx_v_name = 0;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_vec); __pyx_7genexpr__pyx_v_vec = 0;
    goto __pyx_L1_error;
    __pyx_L12_exit_scope:;
  } /* exit inner scope */
  __pyx_v_lst = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":56
 *     nb = min(nb, N/2)
 *     lst = [(name, vec) for vec, name in zip(Mat, names)]
 *     lsts = sorted(lst, key=lambda x: x[1][indextest], reverse=True)             # <<<<<<<<<<<<<<
 *     return lsts[:nb], lsts[-nb:]
 * 
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_lst);
  __Pyx_GIVEREF(__pyx_v_lst);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_lst);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_15getMinMaxMatrix_lambda, 0, __pyx_n_s_getMinMaxMatrix_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_key, __pyx_t_3) < 0) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_reverse, Py_True) < 0) __PYX_ERR(0, 56, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_lsts = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":57
 *     lst = [(name, vec) for vec, name in zip(Mat, names)]
 *     lsts = sorted(lst, key=lambda x: x[1][indextest], reverse=True)
 *     return lsts[:nb], lsts[-nb:]             # <<<<<<<<<<<<<<
 * 
 * def getMinMaxMatrixSym(Mat, nb=10, withdiag=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_lsts, 0, 0, NULL, &__pyx_v_nb, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Negative(__pyx_v_nb); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_lsts, 0, 0, &__pyx_t_2, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_3 = 0;
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":52
 *         config.set("connectivity", key2long(key), str(connect[key]))
 * 
 * def getMinMaxMatrix(Mat, names, nb=10, indextest=0):             # <<<<<<<<<<<<<<
 *     N, M = Mat.shape
 *     nb = min(nb, N/2)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.getMinMaxMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_N);
  __Pyx_XDECREF(__pyx_v_M);
  __Pyx_XDECREF(__pyx_v_lst);
  __Pyx_XDECREF(__pyx_v_lsts);
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_vec);
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_nb);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":59
 *     return lsts[:nb], lsts[-nb:]
 * 
 * def getMinMaxMatrixSym(Mat, nb=10, withdiag=True):             # <<<<<<<<<<<<<<
 *     N, M = Mat.shape
 *     if N != M:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_5getMinMaxMatrixSym(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_5getMinMaxMatrixSym = {"getMinMaxMatrixSym", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_5getMinMaxMatrixSym, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_5getMinMaxMatrixSym(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_Mat = 0;
  PyObject *__pyx_v_nb = 0;
  PyObject *__pyx_v_withdiag = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getMinMaxMatrixSym (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_Mat,&__pyx_n_s_nb,&__pyx_n_s_withdiag,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)__pyx_int_10));
    values[2] = ((PyObject *)((PyObject *)Py_True));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Mat)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nb);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_withdiag);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getMinMaxMatrixSym") < 0)) __PYX_ERR(0, 59, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_Mat = values[0];
    __pyx_v_nb = values[1];
    __pyx_v_withdiag = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getMinMaxMatrixSym", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 59, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.getMinMaxMatrixSym", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_4getMinMaxMatrixSym(__pyx_self, __pyx_v_Mat, __pyx_v_nb, __pyx_v_withdiag);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":69
 *         for j in range(i+int(bool(withdiag))):
 *             lst.append((i, j, abs(Mat[i, j])))
 *     lsts = sorted(lst, key=lambda x: x[2], reverse=True)             # <<<<<<<<<<<<<<
 *     lsts = [(val[0], val[1]) for val in lsts]
 *     return lsts[:nb], lsts[-nb:]
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_18getMinMaxMatrixSym_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_18getMinMaxMatrixSym_lambda1 = {"lambda1", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_18getMinMaxMatrixSym_lambda1, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_18getMinMaxMatrixSym_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self, ((PyObject *)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("lambda1", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_x, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.getMinMaxMatrixSym.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":59
 *     return lsts[:nb], lsts[-nb:]
 * 
 * def getMinMaxMatrixSym(Mat, nb=10, withdiag=True):             # <<<<<<<<<<<<<<
 *     N, M = Mat.shape
 *     if N != M:
 */

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_4getMinMaxMatrixSym(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_Mat, PyObject *__pyx_v_nb, PyObject *__pyx_v_withdiag) {
  PyObject *__pyx_v_N = NULL;
  PyObject *__pyx_v_M = NULL;
  PyObject *__pyx_v_st = NULL;
  PyObject *__pyx_v_lst = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_j = NULL;
  PyObject *__pyx_v_lsts = NULL;
  PyObject *__pyx_8genexpr1__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  __Pyx_RefNannySetupContext("getMinMaxMatrixSym", 0);
  __Pyx_INCREF(__pyx_v_nb);

  /* "metaphor/chem_gm/core/gmtoolbox.py":60
 * 
 * def getMinMaxMatrixSym(Mat, nb=10, withdiag=True):
 *     N, M = Mat.shape             # <<<<<<<<<<<<<<
 *     if N != M:
 *         st = "getMinMaxMatrixSym first param must be a square symetric matrix"
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_Mat, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 60, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 60, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 60, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 60, __pyx_L1_error)
    __pyx_t_5 = NULL;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 60, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_N = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_M = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":61
 * def getMinMaxMatrixSym(Mat, nb=10, withdiag=True):
 *     N, M = Mat.shape
 *     if N != M:             # <<<<<<<<<<<<<<
 *         st = "getMinMaxMatrixSym first param must be a square symetric matrix"
 *         raise TypeError(st)
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_N, __pyx_v_M, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_6)) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":62
 *     N, M = Mat.shape
 *     if N != M:
 *         st = "getMinMaxMatrixSym first param must be a square symetric matrix"             # <<<<<<<<<<<<<<
 *         raise TypeError(st)
 *     nb = min(nb, N/2)
 */
    __Pyx_INCREF(__pyx_kp_u_getMinMaxMatrixSym_first_param_m);
    __pyx_v_st = __pyx_kp_u_getMinMaxMatrixSym_first_param_m;

    /* "metaphor/chem_gm/core/gmtoolbox.py":63
 *     if N != M:
 *         st = "getMinMaxMatrixSym first param must be a square symetric matrix"
 *         raise TypeError(st)             # <<<<<<<<<<<<<<
 *     nb = min(nb, N/2)
 *     lst = []
 */
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_v_st); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 63, __pyx_L1_error)

    /* "metaphor/chem_gm/core/gmtoolbox.py":61
 * def getMinMaxMatrixSym(Mat, nb=10, withdiag=True):
 *     N, M = Mat.shape
 *     if N != M:             # <<<<<<<<<<<<<<
 *         st = "getMinMaxMatrixSym first param must be a square symetric matrix"
 *         raise TypeError(st)
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":64
 *         st = "getMinMaxMatrixSym first param must be a square symetric matrix"
 *         raise TypeError(st)
 *     nb = min(nb, N/2)             # <<<<<<<<<<<<<<
 *     lst = []
 *     for i in range(N):
 */
  __pyx_t_1 = __Pyx_PyInt_TrueDivideObjC(__pyx_v_N, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_nb);
  __pyx_t_3 = __pyx_v_nb;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_6) {
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
  } else {
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_2 = __pyx_t_3;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_nb, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":65
 *         raise TypeError(st)
 *     nb = min(nb, N/2)
 *     lst = []             # <<<<<<<<<<<<<<
 *     for i in range(N):
 *         for j in range(i+int(bool(withdiag))):
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_lst = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":66
 *     nb = min(nb, N/2)
 *     lst = []
 *     for i in range(N):             # <<<<<<<<<<<<<<
 *         for j in range(i+int(bool(withdiag))):
 *             lst.append((i, j, abs(Mat[i, j])))
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 66, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 66, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 66, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_8(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 66, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":67
 *     lst = []
 *     for i in range(N):
 *         for j in range(i+int(bool(withdiag))):             # <<<<<<<<<<<<<<
 *             lst.append((i, j, abs(Mat[i, j])))
 *     lsts = sorted(lst, key=lambda x: x[2], reverse=True)
 */
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_withdiag); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 67, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 67, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Add(__pyx_v_i, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 67, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 67, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_10)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 67, __pyx_L1_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 67, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 67, __pyx_L1_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 67, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_10(__pyx_t_1);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 67, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":68
 *     for i in range(N):
 *         for j in range(i+int(bool(withdiag))):
 *             lst.append((i, j, abs(Mat[i, j])))             # <<<<<<<<<<<<<<
 *     lsts = sorted(lst, key=lambda x: x[2], reverse=True)
 *     lsts = [(val[0], val[1]) for val in lsts]
 */
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 68, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_i);
      __Pyx_GIVEREF(__pyx_v_i);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_i);
      __Pyx_INCREF(__pyx_v_j);
      __Pyx_GIVEREF(__pyx_v_j);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_j);
      __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_Mat, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 68, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyNumber_Absolute(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 68, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 68, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_i);
      __Pyx_GIVEREF(__pyx_v_i);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_i);
      __Pyx_INCREF(__pyx_v_j);
      __Pyx_GIVEREF(__pyx_v_j);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_j);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_lst, __pyx_t_4); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 68, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":67
 *     lst = []
 *     for i in range(N):
 *         for j in range(i+int(bool(withdiag))):             # <<<<<<<<<<<<<<
 *             lst.append((i, j, abs(Mat[i, j])))
 *     lsts = sorted(lst, key=lambda x: x[2], reverse=True)
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":66
 *     nb = min(nb, N/2)
 *     lst = []
 *     for i in range(N):             # <<<<<<<<<<<<<<
 *         for j in range(i+int(bool(withdiag))):
 *             lst.append((i, j, abs(Mat[i, j])))
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":69
 *         for j in range(i+int(bool(withdiag))):
 *             lst.append((i, j, abs(Mat[i, j])))
 *     lsts = sorted(lst, key=lambda x: x[2], reverse=True)             # <<<<<<<<<<<<<<
 *     lsts = [(val[0], val[1]) for val in lsts]
 *     return lsts[:nb], lsts[-nb:]
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_lst);
  __Pyx_GIVEREF(__pyx_v_lst);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lst);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_18getMinMaxMatrixSym_lambda1, 0, __pyx_n_s_getMinMaxMatrixSym_locals_lambda, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_key, __pyx_t_4) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_reverse, Py_True) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_lsts = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":70
 *             lst.append((i, j, abs(Mat[i, j])))
 *     lsts = sorted(lst, key=lambda x: x[2], reverse=True)
 *     lsts = [(val[0], val[1]) for val in lsts]             # <<<<<<<<<<<<<<
 *     return lsts[:nb], lsts[-nb:]
 * 
 */
  { /* enter inner scope */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L12_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (likely(PyList_CheckExact(__pyx_v_lsts)) || PyTuple_CheckExact(__pyx_v_lsts)) {
      __pyx_t_1 = __pyx_v_lsts; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_lsts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 70, __pyx_L12_error)
    }
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 70, __pyx_L12_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L12_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 70, __pyx_L12_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L12_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_8(__pyx_t_1);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 70, __pyx_L12_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_val, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_8genexpr1__pyx_v_val, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_8genexpr1__pyx_v_val, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 70, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 70, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_3);
      __pyx_t_2 = 0;
      __pyx_t_3 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 70, __pyx_L12_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_val); __pyx_8genexpr1__pyx_v_val = 0;
    goto __pyx_L15_exit_scope;
    __pyx_L12_error:;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_val); __pyx_8genexpr1__pyx_v_val = 0;
    goto __pyx_L1_error;
    __pyx_L15_exit_scope:;
  } /* exit inner scope */
  __Pyx_DECREF_SET(__pyx_v_lsts, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":71
 *     lsts = sorted(lst, key=lambda x: x[2], reverse=True)
 *     lsts = [(val[0], val[1]) for val in lsts]
 *     return lsts[:nb], lsts[-nb:]             # <<<<<<<<<<<<<<
 * 
 * def saveNpToXl(filename, source, header=[], sheet="sheet_1"):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_lsts, 0, 0, NULL, &__pyx_v_nb, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyNumber_Negative(__pyx_v_nb); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_v_lsts, 0, 0, &__pyx_t_1, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_12);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_12);
  __pyx_t_4 = 0;
  __pyx_t_12 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":59
 *     return lsts[:nb], lsts[-nb:]
 * 
 * def getMinMaxMatrixSym(Mat, nb=10, withdiag=True):             # <<<<<<<<<<<<<<
 *     N, M = Mat.shape
 *     if N != M:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.getMinMaxMatrixSym", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_N);
  __Pyx_XDECREF(__pyx_v_M);
  __Pyx_XDECREF(__pyx_v_st);
  __Pyx_XDECREF(__pyx_v_lst);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_j);
  __Pyx_XDECREF(__pyx_v_lsts);
  __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_nb);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":73
 *     return lsts[:nb], lsts[-nb:]
 * 
 * def saveNpToXl(filename, source, header=[], sheet="sheet_1"):             # <<<<<<<<<<<<<<
 *     with Excel(filename, sheet) as xl:
 *         if header:
 */

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_26__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_header);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_header);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_header);
  __Pyx_INCREF(((PyObject*)__pyx_n_u_sheet_1));
  __Pyx_GIVEREF(((PyObject*)__pyx_n_u_sheet_1));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject*)__pyx_n_u_sheet_1));
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_7saveNpToXl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_7saveNpToXl = {"saveNpToXl", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_7saveNpToXl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_7saveNpToXl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_filename = 0;
  PyObject *__pyx_v_source = 0;
  PyObject *__pyx_v_header = 0;
  PyObject *__pyx_v_sheet = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("saveNpToXl (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_source,&__pyx_n_s_header,&__pyx_n_s_sheet,0};
    PyObject* values[4] = {0,0,0,0};
    __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
    values[2] = __pyx_dynamic_args->__pyx_arg_header;
    values[3] = ((PyObject *)((PyObject*)__pyx_n_u_sheet_1));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filename)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("saveNpToXl", 0, 2, 4, 1); __PYX_ERR(0, 73, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_header);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sheet);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "saveNpToXl") < 0)) __PYX_ERR(0, 73, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_filename = values[0];
    __pyx_v_source = values[1];
    __pyx_v_header = values[2];
    __pyx_v_sheet = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("saveNpToXl", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 73, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.saveNpToXl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_6saveNpToXl(__pyx_self, __pyx_v_filename, __pyx_v_source, __pyx_v_header, __pyx_v_sheet);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_6saveNpToXl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_source, PyObject *__pyx_v_header, PyObject *__pyx_v_sheet) {
  PyObject *__pyx_v_xl = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  __Pyx_RefNannySetupContext("saveNpToXl", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":74
 * 
 * def saveNpToXl(filename, source, header=[], sheet="sheet_1"):
 *     with Excel(filename, sheet) as xl:             # <<<<<<<<<<<<<<
 *         if header:
 *             xl.write(header, newline=True)
 */
  /*with:*/ {
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Excel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_filename, __pyx_v_sheet};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_filename, __pyx_v_sheet};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 74, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_INCREF(__pyx_v_filename);
      __Pyx_GIVEREF(__pyx_v_filename);
      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_filename);
      __Pyx_INCREF(__pyx_v_sheet);
      __Pyx_GIVEREF(__pyx_v_sheet);
      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_sheet);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 74, __pyx_L3_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L3_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    /*try:*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_9);
        /*try:*/ {
          __pyx_v_xl = __pyx_t_5;
          __pyx_t_5 = 0;

          /* "metaphor/chem_gm/core/gmtoolbox.py":75
 * def saveNpToXl(filename, source, header=[], sheet="sheet_1"):
 *     with Excel(filename, sheet) as xl:
 *         if header:             # <<<<<<<<<<<<<<
 *             xl.write(header, newline=True)
 *         xl.write(source)
 */
          __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_header); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 75, __pyx_L7_error)
          if (__pyx_t_10) {

            /* "metaphor/chem_gm/core/gmtoolbox.py":76
 *     with Excel(filename, sheet) as xl:
 *         if header:
 *             xl.write(header, newline=True)             # <<<<<<<<<<<<<<
 *         xl.write(source)
 * 
 */
            __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 76, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_INCREF(__pyx_v_header);
            __Pyx_GIVEREF(__pyx_v_header);
            PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_header);
            __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_newline, Py_True) < 0) __PYX_ERR(0, 76, __pyx_L7_error)
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 76, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

            /* "metaphor/chem_gm/core/gmtoolbox.py":75
 * def saveNpToXl(filename, source, header=[], sheet="sheet_1"):
 *     with Excel(filename, sheet) as xl:
 *         if header:             # <<<<<<<<<<<<<<
 *             xl.write(header, newline=True)
 *         xl.write(source)
 */
          }

          /* "metaphor/chem_gm/core/gmtoolbox.py":77
 *         if header:
 *             xl.write(header, newline=True)
 *         xl.write(source)             # <<<<<<<<<<<<<<
 * 
 * def saveNpsToXl(filename, sources, sourceTitles=None, shortTitles=None,
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_1 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_1)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_1);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
            }
          }
          if (!__pyx_t_1) {
            __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 77, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
          } else {
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_2)) {
              PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_source};
              __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 77, __pyx_L7_error)
              __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
              __Pyx_GOTREF(__pyx_t_3);
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
              PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_source};
              __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 77, __pyx_L7_error)
              __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
              __Pyx_GOTREF(__pyx_t_3);
            } else
            #endif
            {
              __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 77, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL;
              __Pyx_INCREF(__pyx_v_source);
              __Pyx_GIVEREF(__pyx_v_source);
              PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_source);
              __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 77, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            }
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "metaphor/chem_gm/core/gmtoolbox.py":74
 * 
 * def saveNpToXl(filename, source, header=[], sheet="sheet_1"):
 *     with Excel(filename, sheet) as xl:             # <<<<<<<<<<<<<<
 *         if header:
 *             xl.write(header, newline=True)
 */
        }
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.saveNpToXl", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_5) < 0) __PYX_ERR(0, 74, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_1 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 74, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (__pyx_t_10 < 0) __PYX_ERR(0, 74, __pyx_L9_except_error)
          __pyx_t_12 = ((!(__pyx_t_10 != 0)) != 0);
          if (__pyx_t_12) {
            __Pyx_GIVEREF(__pyx_t_3);
            __Pyx_GIVEREF(__pyx_t_2);
            __Pyx_XGIVEREF(__pyx_t_5);
            __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_2, __pyx_t_5);
            __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_5 = 0; 
            __PYX_ERR(0, 74, __pyx_L9_except_error)
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        __pyx_L12_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_6) {
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__3, NULL);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 74, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L17;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L1_error;
    __pyx_L17:;
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":73
 *     return lsts[:nb], lsts[-nb:]
 * 
 * def saveNpToXl(filename, source, header=[], sheet="sheet_1"):             # <<<<<<<<<<<<<<
 *     with Excel(filename, sheet) as xl:
 *         if header:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.saveNpToXl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_xl);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":79
 *         xl.write(source)
 * 
 * def saveNpsToXl(filename, sources, sourceTitles=None, shortTitles=None,             # <<<<<<<<<<<<<<
 *     extra=None, extrasheet=None, extrarow=[], header=[], headers=None,
 *     lefter=None, lefters=None, sheets=[""], minmax=0):
 */

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_28__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);

  /* "metaphor/chem_gm/core/gmtoolbox.py":81
 * def saveNpsToXl(filename, sources, sourceTitles=None, shortTitles=None,
 *     extra=None, extrasheet=None, extrarow=[], header=[], headers=None,
 *     lefter=None, lefters=None, sheets=[""], minmax=0):             # <<<<<<<<<<<<<<
 *     minmaxsize = minmax
 *     if len(sources):
 */
  __pyx_t_1 = PyTuple_New(11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)Py_None));
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_extrarow);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_extrarow);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_extrarow);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_header);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_header);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_header);
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 6, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 7, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 8, ((PyObject *)Py_None));
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_sheets);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_sheets);
  PyTuple_SET_ITEM(__pyx_t_1, 9, __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_sheets);
  __Pyx_INCREF(((PyObject *)__pyx_int_0));
  __Pyx_GIVEREF(((PyObject *)__pyx_int_0));
  PyTuple_SET_ITEM(__pyx_t_1, 10, ((PyObject *)__pyx_int_0));

  /* "metaphor/chem_gm/core/gmtoolbox.py":79
 *         xl.write(source)
 * 
 * def saveNpsToXl(filename, sources, sourceTitles=None, shortTitles=None,             # <<<<<<<<<<<<<<
 *     extra=None, extrasheet=None, extrarow=[], header=[], headers=None,
 *     lefter=None, lefters=None, sheets=[""], minmax=0):
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_9saveNpsToXl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_9saveNpsToXl = {"saveNpsToXl", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_9saveNpsToXl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_9saveNpsToXl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_filename = 0;
  PyObject *__pyx_v_sources = 0;
  PyObject *__pyx_v_sourceTitles = 0;
  PyObject *__pyx_v_shortTitles = 0;
  PyObject *__pyx_v_extra = 0;
  PyObject *__pyx_v_extrasheet = 0;
  PyObject *__pyx_v_extrarow = 0;
  PyObject *__pyx_v_header = 0;
  PyObject *__pyx_v_headers = 0;
  PyObject *__pyx_v_lefter = 0;
  PyObject *__pyx_v_lefters = 0;
  PyObject *__pyx_v_sheets = 0;
  PyObject *__pyx_v_minmax = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("saveNpsToXl (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_sources,&__pyx_n_s_sourceTitles,&__pyx_n_s_shortTitles,&__pyx_n_s_extra,&__pyx_n_s_extrasheet,&__pyx_n_s_extrarow,&__pyx_n_s_header,&__pyx_n_s_headers,&__pyx_n_s_lefter,&__pyx_n_s_lefters,&__pyx_n_s_sheets,&__pyx_n_s_minmax,0};
    PyObject* values[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0};
    __pyx_defaults1 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self);
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    values[4] = ((PyObject *)((PyObject *)Py_None));
    values[5] = ((PyObject *)((PyObject *)Py_None));
    values[6] = __pyx_dynamic_args->__pyx_arg_extrarow;
    values[7] = __pyx_dynamic_args->__pyx_arg_header;
    values[8] = ((PyObject *)((PyObject *)Py_None));
    values[9] = ((PyObject *)((PyObject *)Py_None));
    values[10] = ((PyObject *)((PyObject *)Py_None));
    values[11] = __pyx_dynamic_args->__pyx_arg_sheets;
    values[12] = ((PyObject *)((PyObject *)__pyx_int_0));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        CYTHON_FALLTHROUGH;
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filename)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sources)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("saveNpsToXl", 0, 2, 13, 1); __PYX_ERR(0, 79, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sourceTitles);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shortTitles);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_extra);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_extrasheet);
          if (value) { values[5] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_extrarow);
          if (value) { values[6] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_header);
          if (value) { values[7] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_headers);
          if (value) { values[8] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lefter);
          if (value) { values[9] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 10:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lefters);
          if (value) { values[10] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 11:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sheets);
          if (value) { values[11] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 12:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_minmax);
          if (value) { values[12] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "saveNpsToXl") < 0)) __PYX_ERR(0, 79, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        CYTHON_FALLTHROUGH;
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_filename = values[0];
    __pyx_v_sources = values[1];
    __pyx_v_sourceTitles = values[2];
    __pyx_v_shortTitles = values[3];
    __pyx_v_extra = values[4];
    __pyx_v_extrasheet = values[5];
    __pyx_v_extrarow = values[6];
    __pyx_v_header = values[7];
    __pyx_v_headers = values[8];
    __pyx_v_lefter = values[9];
    __pyx_v_lefters = values[10];
    __pyx_v_sheets = values[11];
    __pyx_v_minmax = values[12];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("saveNpsToXl", 0, 2, 13, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 79, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.saveNpsToXl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8saveNpsToXl(__pyx_self, __pyx_v_filename, __pyx_v_sources, __pyx_v_sourceTitles, __pyx_v_shortTitles, __pyx_v_extra, __pyx_v_extrasheet, __pyx_v_extrarow, __pyx_v_header, __pyx_v_headers, __pyx_v_lefter, __pyx_v_lefters, __pyx_v_sheets, __pyx_v_minmax);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8saveNpsToXl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_sources, PyObject *__pyx_v_sourceTitles, PyObject *__pyx_v_shortTitles, PyObject *__pyx_v_extra, PyObject *__pyx_v_extrasheet, PyObject *__pyx_v_extrarow, PyObject *__pyx_v_header, PyObject *__pyx_v_headers, PyObject *__pyx_v_lefter, PyObject *__pyx_v_lefters, PyObject *__pyx_v_sheets, PyObject *__pyx_v_minmax) {
  PyObject *__pyx_v_minmaxsize = NULL;
  Py_ssize_t __pyx_v_dl;
  PyObject *__pyx_v_xl = NULL;
  PyObject *__pyx_v_err = NULL;
  PyObject *__pyx_v_mainTitle = NULL;
  PyObject *__pyx_v_iterator = NULL;
  PyObject *__pyx_v_source = NULL;
  PyObject *__pyx_v_dispMat = NULL;
  PyObject *__pyx_v_projMat = NULL;
  PyObject *__pyx_v_head = NULL;
  PyObject *__pyx_v_left = NULL;
  PyObject *__pyx_v_sheet = NULL;
  PyObject *__pyx_v_col0 = NULL;
  PyObject *__pyx_v_row0 = NULL;
  PyObject *__pyx_v_rowend = NULL;
  PyObject *__pyx_v_cur = NULL;
  PyObject *__pyx_v_minmaxst = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_lst = NULL;
  PyObject *__pyx_v_ind = NULL;
  PyObject *__pyx_v_lig = NULL;
  PyObject *__pyx_v_hii = NULL;
  PyObject *__pyx_v_mask = NULL;
  PyObject *__pyx_v_lig2 = NULL;
  PyObject *__pyx_v_hijmean = NULL;
  PyObject *__pyx_v_hijmin = NULL;
  PyObject *__pyx_v_hijmax = NULL;
  PyObject *__pyx_v_mmlst0 = NULL;
  PyObject *__pyx_v_mmlst1 = NULL;
  PyObject *__pyx_v_N = NULL;
  PyObject *__pyx_v_paramlist = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_v_mess = NULL;
  PyObject *__pyx_8genexpr2__pyx_v_val = NULL;
  PyObject *__pyx_8genexpr3__pyx_v_val = NULL;
  PyObject *__pyx_8genexpr4__pyx_v_val = NULL;
  PyObject *__pyx_8genexpr5__pyx_v_val = NULL;
  PyObject *__pyx_8genexpr6__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  int __pyx_t_20;
  char const *__pyx_t_21;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  int __pyx_t_28;
  int __pyx_t_29;
  PyObject *(*__pyx_t_30)(PyObject *);
  PyObject *(*__pyx_t_31)(PyObject *);
  PyObject *__pyx_t_32 = NULL;
  PyObject *__pyx_t_33 = NULL;
  PyObject *(*__pyx_t_34)(PyObject *);
  Py_UCS4 __pyx_t_35;
  char const *__pyx_t_36;
  __Pyx_RefNannySetupContext("saveNpsToXl", 0);
  __Pyx_INCREF(__pyx_v_extrasheet);
  __Pyx_INCREF(__pyx_v_headers);
  __Pyx_INCREF(__pyx_v_lefters);
  __Pyx_INCREF(__pyx_v_sheets);

  /* "metaphor/chem_gm/core/gmtoolbox.py":82
 *     extra=None, extrasheet=None, extrarow=[], header=[], headers=None,
 *     lefter=None, lefters=None, sheets=[""], minmax=0):
 *     minmaxsize = minmax             # <<<<<<<<<<<<<<
 *     if len(sources):
 *         dl = len(sources) - len(sheets)
 */
  __Pyx_INCREF(__pyx_v_minmax);
  __pyx_v_minmaxsize = __pyx_v_minmax;

  /* "metaphor/chem_gm/core/gmtoolbox.py":83
 *     lefter=None, lefters=None, sheets=[""], minmax=0):
 *     minmaxsize = minmax
 *     if len(sources):             # <<<<<<<<<<<<<<
 *         dl = len(sources) - len(sheets)
 *         sheets = sheets if not dl else chain(sheets, repeat("", dl))
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_sources); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 83, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":84
 *     minmaxsize = minmax
 *     if len(sources):
 *         dl = len(sources) - len(sheets)             # <<<<<<<<<<<<<<
 *         sheets = sheets if not dl else chain(sheets, repeat("", dl))
 *         with Excel(filename) as xl:  #, optimized_write=True
 */
    __pyx_t_1 = PyObject_Length(__pyx_v_sources); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 84, __pyx_L1_error)
    __pyx_t_3 = PyObject_Length(__pyx_v_sheets); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 84, __pyx_L1_error)
    __pyx_v_dl = (__pyx_t_1 - __pyx_t_3);

    /* "metaphor/chem_gm/core/gmtoolbox.py":85
 *     if len(sources):
 *         dl = len(sources) - len(sheets)
 *         sheets = sheets if not dl else chain(sheets, repeat("", dl))             # <<<<<<<<<<<<<<
 *         with Excel(filename) as xl:  #, optimized_write=True
 *             if extra:
 */
    if (((!(__pyx_v_dl != 0)) != 0)) {
      __Pyx_INCREF(__pyx_v_sheets);
      __pyx_t_4 = __pyx_v_sheets;
    } else {
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_chain); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 85, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_repeat); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 85, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_dl); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 85, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      __pyx_t_11 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_11 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_kp_u__4, __pyx_t_9};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 85, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_kp_u__4, __pyx_t_9};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 85, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 85, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__pyx_t_10) {
          __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
        }
        __Pyx_INCREF(__pyx_kp_u__4);
        __Pyx_GIVEREF(__pyx_kp_u__4);
        PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_kp_u__4);
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_9);
        __pyx_t_9 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_12, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 85, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_11 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_11 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_sheets, __pyx_t_7};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 85, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_sheets, __pyx_t_7};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 85, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 85, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__pyx_t_8) {
          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_8); __pyx_t_8 = NULL;
        }
        __Pyx_INCREF(__pyx_v_sheets);
        __Pyx_GIVEREF(__pyx_v_sheets);
        PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_v_sheets);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_7);
        __pyx_t_7 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 85, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_4 = __pyx_t_5;
      __pyx_t_5 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_sheets, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":86
 *         dl = len(sources) - len(sheets)
 *         sheets = sheets if not dl else chain(sheets, repeat("", dl))
 *         with Excel(filename) as xl:  #, optimized_write=True             # <<<<<<<<<<<<<<
 *             if extra:
 *                 try:
 */
    /*with:*/ {
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Excel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 86, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      if (!__pyx_t_6) {
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 86, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_filename};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 86, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_filename};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 86, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        {
          __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 86, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_6); __pyx_t_6 = NULL;
          __Pyx_INCREF(__pyx_v_filename);
          __Pyx_GIVEREF(__pyx_v_filename);
          PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_filename);
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 86, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_13 = __Pyx_PyObject_LookupSpecial(__pyx_t_4, __pyx_n_s_exit); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 86, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_12 = __Pyx_PyObject_LookupSpecial(__pyx_t_4, __pyx_n_s_enter); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 86, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_12);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_12, function);
        }
      }
      if (__pyx_t_6) {
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 86, __pyx_L4_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else {
        __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 86, __pyx_L4_error)
      }
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = __pyx_t_5;
      __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          /*try:*/ {
            __pyx_v_xl = __pyx_t_12;
            __pyx_t_12 = 0;

            /* "metaphor/chem_gm/core/gmtoolbox.py":87
 *         sheets = sheets if not dl else chain(sheets, repeat("", dl))
 *         with Excel(filename) as xl:  #, optimized_write=True
 *             if extra:             # <<<<<<<<<<<<<<
 *                 try:
 *                     extrasheet = extrasheet if extrasheet else "ExtraSheet"
 */
            __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_extra); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 87, __pyx_L8_error)
            if (__pyx_t_2) {

              /* "metaphor/chem_gm/core/gmtoolbox.py":88
 *         with Excel(filename) as xl:  #, optimized_write=True
 *             if extra:
 *                 try:             # <<<<<<<<<<<<<<
 *                     extrasheet = extrasheet if extrasheet else "ExtraSheet"
 *                     xl.add_worksheet(extrasheet)
 */
              {
                __Pyx_PyThreadState_declare
                __Pyx_PyThreadState_assign
                __Pyx_ExceptionSave(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
                __Pyx_XGOTREF(__pyx_t_17);
                __Pyx_XGOTREF(__pyx_t_18);
                __Pyx_XGOTREF(__pyx_t_19);
                /*try:*/ {

                  /* "metaphor/chem_gm/core/gmtoolbox.py":89
 *             if extra:
 *                 try:
 *                     extrasheet = extrasheet if extrasheet else "ExtraSheet"             # <<<<<<<<<<<<<<
 *                     xl.add_worksheet(extrasheet)
 *                     extra.save(xl, lrow=extrarow)
 */
                  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_extrasheet); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 89, __pyx_L15_error)
                  if (__pyx_t_2) {
                    __Pyx_INCREF(__pyx_v_extrasheet);
                    __pyx_t_12 = __pyx_v_extrasheet;
                  } else {
                    __Pyx_INCREF(__pyx_n_u_ExtraSheet);
                    __pyx_t_12 = __pyx_n_u_ExtraSheet;
                  }
                  __Pyx_DECREF_SET(__pyx_v_extrasheet, __pyx_t_12);
                  __pyx_t_12 = 0;

                  /* "metaphor/chem_gm/core/gmtoolbox.py":90
 *                 try:
 *                     extrasheet = extrasheet if extrasheet else "ExtraSheet"
 *                     xl.add_worksheet(extrasheet)             # <<<<<<<<<<<<<<
 *                     extra.save(xl, lrow=extrarow)
 *                 except Exception as err:
 */
                  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_add_worksheet); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L15_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __pyx_t_5 = NULL;
                  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
                    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
                    if (likely(__pyx_t_5)) {
                      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
                      __Pyx_INCREF(__pyx_t_5);
                      __Pyx_INCREF(function);
                      __Pyx_DECREF_SET(__pyx_t_4, function);
                    }
                  }
                  if (!__pyx_t_5) {
                    __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_extrasheet); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 90, __pyx_L15_error)
                    __Pyx_GOTREF(__pyx_t_12);
                  } else {
                    #if CYTHON_FAST_PYCALL
                    if (PyFunction_Check(__pyx_t_4)) {
                      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_extrasheet};
                      __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 90, __pyx_L15_error)
                      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                      __Pyx_GOTREF(__pyx_t_12);
                    } else
                    #endif
                    #if CYTHON_FAST_PYCCALL
                    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
                      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_extrasheet};
                      __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 90, __pyx_L15_error)
                      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                      __Pyx_GOTREF(__pyx_t_12);
                    } else
                    #endif
                    {
                      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 90, __pyx_L15_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
                      __Pyx_INCREF(__pyx_v_extrasheet);
                      __Pyx_GIVEREF(__pyx_v_extrasheet);
                      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_extrasheet);
                      __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 90, __pyx_L15_error)
                      __Pyx_GOTREF(__pyx_t_12);
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                    }
                  }
                  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

                  /* "metaphor/chem_gm/core/gmtoolbox.py":91
 *                     extrasheet = extrasheet if extrasheet else "ExtraSheet"
 *                     xl.add_worksheet(extrasheet)
 *                     extra.save(xl, lrow=extrarow)             # <<<<<<<<<<<<<<
 *                 except Exception as err:
 *                     print(err)
 */
                  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_extra, __pyx_n_s_save); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 91, __pyx_L15_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 91, __pyx_L15_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_INCREF(__pyx_v_xl);
                  __Pyx_GIVEREF(__pyx_v_xl);
                  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_xl);
                  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 91, __pyx_L15_error)
                  __Pyx_GOTREF(__pyx_t_6);
                  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_lrow, __pyx_v_extrarow) < 0) __PYX_ERR(0, 91, __pyx_L15_error)
                  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 91, __pyx_L15_error)
                  __Pyx_GOTREF(__pyx_t_5);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

                  /* "metaphor/chem_gm/core/gmtoolbox.py":88
 *         with Excel(filename) as xl:  #, optimized_write=True
 *             if extra:
 *                 try:             # <<<<<<<<<<<<<<
 *                     extrasheet = extrasheet if extrasheet else "ExtraSheet"
 *                     xl.add_worksheet(extrasheet)
 */
                }
                __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
                __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
                __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
                goto __pyx_L20_try_end;
                __pyx_L15_error:;
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

                /* "metaphor/chem_gm/core/gmtoolbox.py":92
 *                     xl.add_worksheet(extrasheet)
 *                     extra.save(xl, lrow=extrarow)
 *                 except Exception as err:             # <<<<<<<<<<<<<<
 *                     print(err)
 * 
 */
                __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
                if (__pyx_t_11) {
                  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.saveNpsToXl", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_4) < 0) __PYX_ERR(0, 92, __pyx_L17_except_error)
                  __Pyx_GOTREF(__pyx_t_5);
                  __Pyx_GOTREF(__pyx_t_6);
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_INCREF(__pyx_t_6);
                  __pyx_v_err = __pyx_t_6;
                  /*try:*/ {

                    /* "metaphor/chem_gm/core/gmtoolbox.py":93
 *                     extra.save(xl, lrow=extrarow)
 *                 except Exception as err:
 *                     print(err)             # <<<<<<<<<<<<<<
 * 
 *             mainTitle = "" if not sourceTitles else sourceTitles[0]
 */
                    __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_v_err); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 93, __pyx_L26_error)
                    __Pyx_GOTREF(__pyx_t_12);
                    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                  }

                  /* "metaphor/chem_gm/core/gmtoolbox.py":92
 *                     xl.add_worksheet(extrasheet)
 *                     extra.save(xl, lrow=extrarow)
 *                 except Exception as err:             # <<<<<<<<<<<<<<
 *                     print(err)
 * 
 */
                  /*finally:*/ {
                    /*normal exit:*/{
                      __Pyx_DECREF(__pyx_v_err);
                      __pyx_v_err = NULL;
                      goto __pyx_L27;
                    }
                    __pyx_L26_error:;
                    /*exception exit:*/{
                      __Pyx_PyThreadState_declare
                      __Pyx_PyThreadState_assign
                      __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0;
                      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_25, &__pyx_t_26, &__pyx_t_27);
                      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24) < 0)) __Pyx_ErrFetch(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
                      __Pyx_XGOTREF(__pyx_t_22);
                      __Pyx_XGOTREF(__pyx_t_23);
                      __Pyx_XGOTREF(__pyx_t_24);
                      __Pyx_XGOTREF(__pyx_t_25);
                      __Pyx_XGOTREF(__pyx_t_26);
                      __Pyx_XGOTREF(__pyx_t_27);
                      __pyx_t_11 = __pyx_lineno; __pyx_t_20 = __pyx_clineno; __pyx_t_21 = __pyx_filename;
                      {
                        __Pyx_DECREF(__pyx_v_err);
                        __pyx_v_err = NULL;
                      }
                      if (PY_MAJOR_VERSION >= 3) {
                        __Pyx_XGIVEREF(__pyx_t_25);
                        __Pyx_XGIVEREF(__pyx_t_26);
                        __Pyx_XGIVEREF(__pyx_t_27);
                        __Pyx_ExceptionReset(__pyx_t_25, __pyx_t_26, __pyx_t_27);
                      }
                      __Pyx_XGIVEREF(__pyx_t_22);
                      __Pyx_XGIVEREF(__pyx_t_23);
                      __Pyx_XGIVEREF(__pyx_t_24);
                      __Pyx_ErrRestore(__pyx_t_22, __pyx_t_23, __pyx_t_24);
                      __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0;
                      __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_20; __pyx_filename = __pyx_t_21;
                      goto __pyx_L17_except_error;
                    }
                    __pyx_L27:;
                  }
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  goto __pyx_L16_exception_handled;
                }
                goto __pyx_L17_except_error;
                __pyx_L17_except_error:;

                /* "metaphor/chem_gm/core/gmtoolbox.py":88
 *         with Excel(filename) as xl:  #, optimized_write=True
 *             if extra:
 *                 try:             # <<<<<<<<<<<<<<
 *                     extrasheet = extrasheet if extrasheet else "ExtraSheet"
 *                     xl.add_worksheet(extrasheet)
 */
                __Pyx_XGIVEREF(__pyx_t_17);
                __Pyx_XGIVEREF(__pyx_t_18);
                __Pyx_XGIVEREF(__pyx_t_19);
                __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
                goto __pyx_L8_error;
                __pyx_L16_exception_handled:;
                __Pyx_XGIVEREF(__pyx_t_17);
                __Pyx_XGIVEREF(__pyx_t_18);
                __Pyx_XGIVEREF(__pyx_t_19);
                __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
                __pyx_L20_try_end:;
              }

              /* "metaphor/chem_gm/core/gmtoolbox.py":87
 *         sheets = sheets if not dl else chain(sheets, repeat("", dl))
 *         with Excel(filename) as xl:  #, optimized_write=True
 *             if extra:             # <<<<<<<<<<<<<<
 *                 try:
 *                     extrasheet = extrasheet if extrasheet else "ExtraSheet"
 */
            }

            /* "metaphor/chem_gm/core/gmtoolbox.py":95
 *                     print(err)
 * 
 *             mainTitle = "" if not sourceTitles else sourceTitles[0]             # <<<<<<<<<<<<<<
 *             lefters = lefters if ((lefters is not None) and len(lefters)) else repeat(lefter)
 *             headers = headers if (headers is not None) else repeat(header)
 */
            __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_sourceTitles); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 95, __pyx_L8_error)
            if (((!__pyx_t_2) != 0)) {
              __Pyx_INCREF(__pyx_kp_u__4);
              __pyx_t_4 = __pyx_kp_u__4;
            } else {
              __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_sourceTitles, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 95, __pyx_L8_error)
              __Pyx_GOTREF(__pyx_t_6);
              __pyx_t_4 = __pyx_t_6;
              __pyx_t_6 = 0;
            }
            __pyx_v_mainTitle = __pyx_t_4;
            __pyx_t_4 = 0;

            /* "metaphor/chem_gm/core/gmtoolbox.py":96
 * 
 *             mainTitle = "" if not sourceTitles else sourceTitles[0]
 *             lefters = lefters if ((lefters is not None) and len(lefters)) else repeat(lefter)             # <<<<<<<<<<<<<<
 *             headers = headers if (headers is not None) else repeat(header)
 * 
 */
            __pyx_t_28 = (__pyx_v_lefters != Py_None);
            __pyx_t_29 = (__pyx_t_28 != 0);
            if (__pyx_t_29) {
            } else {
              __pyx_t_2 = __pyx_t_29;
              goto __pyx_L32_bool_binop_done;
            }
            __pyx_t_3 = PyObject_Length(__pyx_v_lefters); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 96, __pyx_L8_error)
            __pyx_t_29 = (__pyx_t_3 != 0);
            __pyx_t_2 = __pyx_t_29;
            __pyx_L32_bool_binop_done:;
            if (__pyx_t_2) {
              __Pyx_INCREF(__pyx_v_lefters);
              __pyx_t_4 = __pyx_v_lefters;
            } else {
              __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_repeat); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 96, __pyx_L8_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_12 = NULL;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_5);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_5, function);
                }
              }
              if (!__pyx_t_12) {
                __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_lefter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 96, __pyx_L8_error)
                __Pyx_GOTREF(__pyx_t_6);
              } else {
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_5)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_lefter};
                  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 96, __pyx_L8_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_6);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_lefter};
                  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 96, __pyx_L8_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_6);
                } else
                #endif
                {
                  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 96, __pyx_L8_error)
                  __Pyx_GOTREF(__pyx_t_7);
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  __Pyx_INCREF(__pyx_v_lefter);
                  __Pyx_GIVEREF(__pyx_v_lefter);
                  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_lefter);
                  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 96, __pyx_L8_error)
                  __Pyx_GOTREF(__pyx_t_6);
                  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                }
              }
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __pyx_t_4 = __pyx_t_6;
              __pyx_t_6 = 0;
            }
            __Pyx_DECREF_SET(__pyx_v_lefters, __pyx_t_4);
            __pyx_t_4 = 0;

            /* "metaphor/chem_gm/core/gmtoolbox.py":97
 *             mainTitle = "" if not sourceTitles else sourceTitles[0]
 *             lefters = lefters if ((lefters is not None) and len(lefters)) else repeat(lefter)
 *             headers = headers if (headers is not None) else repeat(header)             # <<<<<<<<<<<<<<
 * 
 *             iterator = zip(sources, headers, lefters, sheets)
 */
            __pyx_t_2 = (__pyx_v_headers != Py_None);
            if ((__pyx_t_2 != 0)) {
              __Pyx_INCREF(__pyx_v_headers);
              __pyx_t_4 = __pyx_v_headers;
            } else {
              __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_repeat); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 97, __pyx_L8_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_7 = NULL;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
                __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
                if (likely(__pyx_t_7)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
                  __Pyx_INCREF(__pyx_t_7);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_5, function);
                }
              }
              if (!__pyx_t_7) {
                __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_header); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L8_error)
                __Pyx_GOTREF(__pyx_t_6);
              } else {
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_5)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_header};
                  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L8_error)
                  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                  __Pyx_GOTREF(__pyx_t_6);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_header};
                  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L8_error)
                  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                  __Pyx_GOTREF(__pyx_t_6);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 97, __pyx_L8_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7); __pyx_t_7 = NULL;
                  __Pyx_INCREF(__pyx_v_header);
                  __Pyx_GIVEREF(__pyx_v_header);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_header);
                  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L8_error)
                  __Pyx_GOTREF(__pyx_t_6);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
              }
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __pyx_t_4 = __pyx_t_6;
              __pyx_t_6 = 0;
            }
            __Pyx_DECREF_SET(__pyx_v_headers, __pyx_t_4);
            __pyx_t_4 = 0;

            /* "metaphor/chem_gm/core/gmtoolbox.py":99
 *             headers = headers if (headers is not None) else repeat(header)
 * 
 *             iterator = zip(sources, headers, lefters, sheets)             # <<<<<<<<<<<<<<
 *             for (source, dispMat, projMat), head, left, sheet in iterator:
 *                 try:
 */
            __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_INCREF(__pyx_v_sources);
            __Pyx_GIVEREF(__pyx_v_sources);
            PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_sources);
            __Pyx_INCREF(__pyx_v_headers);
            __Pyx_GIVEREF(__pyx_v_headers);
            PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_headers);
            __Pyx_INCREF(__pyx_v_lefters);
            __Pyx_GIVEREF(__pyx_v_lefters);
            PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_lefters);
            __Pyx_INCREF(__pyx_v_sheets);
            __Pyx_GIVEREF(__pyx_v_sheets);
            PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_sheets);
            __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 99, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_v_iterator = __pyx_t_6;
            __pyx_t_6 = 0;

            /* "metaphor/chem_gm/core/gmtoolbox.py":100
 * 
 *             iterator = zip(sources, headers, lefters, sheets)
 *             for (source, dispMat, projMat), head, left, sheet in iterator:             # <<<<<<<<<<<<<<
 *                 try:
 * # protection pour eviter de sortir inopinement des enregistrements de gros
 */
            if (likely(PyList_CheckExact(__pyx_v_iterator)) || PyTuple_CheckExact(__pyx_v_iterator)) {
              __pyx_t_6 = __pyx_v_iterator; __Pyx_INCREF(__pyx_t_6); __pyx_t_3 = 0;
              __pyx_t_30 = NULL;
            } else {
              __pyx_t_3 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_iterator); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 100, __pyx_L8_error)
              __Pyx_GOTREF(__pyx_t_6);
              __pyx_t_30 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 100, __pyx_L8_error)
            }
            for (;;) {
              if (likely(!__pyx_t_30)) {
                if (likely(PyList_CheckExact(__pyx_t_6))) {
                  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_6)) break;
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_4 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 100, __pyx_L8_error)
                  #else
                  __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 100, __pyx_L8_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  #endif
                } else {
                  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 100, __pyx_L8_error)
                  #else
                  __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 100, __pyx_L8_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  #endif
                }
              } else {
                __pyx_t_4 = __pyx_t_30(__pyx_t_6);
                if (unlikely(!__pyx_t_4)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 100, __pyx_L8_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_4);
              }
              if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
                PyObject* sequence = __pyx_t_4;
                Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
                if (unlikely(size != 4)) {
                  if (size > 4) __Pyx_RaiseTooManyValuesError(4);
                  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                  __PYX_ERR(0, 100, __pyx_L8_error)
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                if (likely(PyTuple_CheckExact(sequence))) {
                  __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
                  __pyx_t_12 = PyTuple_GET_ITEM(sequence, 1); 
                  __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); 
                  __pyx_t_8 = PyTuple_GET_ITEM(sequence, 3); 
                } else {
                  __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
                  __pyx_t_12 = PyList_GET_ITEM(sequence, 1); 
                  __pyx_t_7 = PyList_GET_ITEM(sequence, 2); 
                  __pyx_t_8 = PyList_GET_ITEM(sequence, 3); 
                }
                __Pyx_INCREF(__pyx_t_5);
                __Pyx_INCREF(__pyx_t_12);
                __Pyx_INCREF(__pyx_t_7);
                __Pyx_INCREF(__pyx_t_8);
                #else
                {
                  Py_ssize_t i;
                  PyObject** temps[4] = {&__pyx_t_5,&__pyx_t_12,&__pyx_t_7,&__pyx_t_8};
                  for (i=0; i < 4; i++) {
                    PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 100, __pyx_L8_error)
                    __Pyx_GOTREF(item);
                    *(temps[i]) = item;
                  }
                }
                #endif
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              } else {
                Py_ssize_t index = -1;
                PyObject** temps[4] = {&__pyx_t_5,&__pyx_t_12,&__pyx_t_7,&__pyx_t_8};
                __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 100, __pyx_L8_error)
                __Pyx_GOTREF(__pyx_t_9);
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_t_31 = Py_TYPE(__pyx_t_9)->tp_iternext;
                for (index=0; index < 4; index++) {
                  PyObject* item = __pyx_t_31(__pyx_t_9); if (unlikely(!item)) goto __pyx_L36_unpacking_failed;
                  __Pyx_GOTREF(item);
                  *(temps[index]) = item;
                }
                if (__Pyx_IternextUnpackEndCheck(__pyx_t_31(__pyx_t_9), 4) < 0) __PYX_ERR(0, 100, __pyx_L8_error)
                __pyx_t_31 = NULL;
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                goto __pyx_L37_unpacking_done;
                __pyx_L36_unpacking_failed:;
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                __pyx_t_31 = NULL;
                if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
                __PYX_ERR(0, 100, __pyx_L8_error)
                __pyx_L37_unpacking_done:;
              }
              if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
                PyObject* sequence = __pyx_t_5;
                Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
                if (unlikely(size != 3)) {
                  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
                  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                  __PYX_ERR(0, 100, __pyx_L8_error)
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                if (likely(PyTuple_CheckExact(sequence))) {
                  __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
                  __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); 
                  __pyx_t_32 = PyTuple_GET_ITEM(sequence, 2); 
                } else {
                  __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
                  __pyx_t_10 = PyList_GET_ITEM(sequence, 1); 
                  __pyx_t_32 = PyList_GET_ITEM(sequence, 2); 
                }
                __Pyx_INCREF(__pyx_t_9);
                __Pyx_INCREF(__pyx_t_10);
                __Pyx_INCREF(__pyx_t_32);
                #else
                __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 100, __pyx_L8_error)
                __Pyx_GOTREF(__pyx_t_9);
                __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 100, __pyx_L8_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_32 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 100, __pyx_L8_error)
                __Pyx_GOTREF(__pyx_t_32);
                #endif
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              } else {
                Py_ssize_t index = -1;
                __pyx_t_33 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_33)) __PYX_ERR(0, 100, __pyx_L8_error)
                __Pyx_GOTREF(__pyx_t_33);
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                __pyx_t_31 = Py_TYPE(__pyx_t_33)->tp_iternext;
                index = 0; __pyx_t_9 = __pyx_t_31(__pyx_t_33); if (unlikely(!__pyx_t_9)) goto __pyx_L38_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_9);
                index = 1; __pyx_t_10 = __pyx_t_31(__pyx_t_33); if (unlikely(!__pyx_t_10)) goto __pyx_L38_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_10);
                index = 2; __pyx_t_32 = __pyx_t_31(__pyx_t_33); if (unlikely(!__pyx_t_32)) goto __pyx_L38_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_32);
                if (__Pyx_IternextUnpackEndCheck(__pyx_t_31(__pyx_t_33), 3) < 0) __PYX_ERR(0, 100, __pyx_L8_error)
                __pyx_t_31 = NULL;
                __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
                goto __pyx_L39_unpacking_done;
                __pyx_L38_unpacking_failed:;
                __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
                __pyx_t_31 = NULL;
                if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
                __PYX_ERR(0, 100, __pyx_L8_error)
                __pyx_L39_unpacking_done:;
              }
              __Pyx_XDECREF_SET(__pyx_v_source, __pyx_t_9);
              __pyx_t_9 = 0;
              __Pyx_XDECREF_SET(__pyx_v_dispMat, __pyx_t_10);
              __pyx_t_10 = 0;
              __Pyx_XDECREF_SET(__pyx_v_projMat, __pyx_t_32);
              __pyx_t_32 = 0;
              __Pyx_XDECREF_SET(__pyx_v_head, __pyx_t_12);
              __pyx_t_12 = 0;
              __Pyx_XDECREF_SET(__pyx_v_left, __pyx_t_7);
              __pyx_t_7 = 0;
              __Pyx_XDECREF_SET(__pyx_v_sheet, __pyx_t_8);
              __pyx_t_8 = 0;

              /* "metaphor/chem_gm/core/gmtoolbox.py":101
 *             iterator = zip(sources, headers, lefters, sheets)
 *             for (source, dispMat, projMat), head, left, sheet in iterator:
 *                 try:             # <<<<<<<<<<<<<<
 * # protection pour eviter de sortir inopinement des enregistrements de gros
 * # fichiers de resultats
 */
              {
                __Pyx_PyThreadState_declare
                __Pyx_PyThreadState_assign
                __Pyx_ExceptionSave(&__pyx_t_19, &__pyx_t_18, &__pyx_t_17);
                __Pyx_XGOTREF(__pyx_t_19);
                __Pyx_XGOTREF(__pyx_t_18);
                __Pyx_XGOTREF(__pyx_t_17);
                /*try:*/ {

                  /* "metaphor/chem_gm/core/gmtoolbox.py":104
 * # protection pour eviter de sortir inopinement des enregistrements de gros
 * # fichiers de resultats
 *                     xl.add_worksheet(sheet)             # <<<<<<<<<<<<<<
 *                     col0 = 0
 *                     row0 = 0
 */
                  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_add_worksheet); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 104, __pyx_L40_error)
                  __Pyx_GOTREF(__pyx_t_8);
                  __pyx_t_7 = NULL;
                  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
                    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
                    if (likely(__pyx_t_7)) {
                      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
                      __Pyx_INCREF(__pyx_t_7);
                      __Pyx_INCREF(function);
                      __Pyx_DECREF_SET(__pyx_t_8, function);
                    }
                  }
                  if (!__pyx_t_7) {
                    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_sheet); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 104, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_4);
                  } else {
                    #if CYTHON_FAST_PYCALL
                    if (PyFunction_Check(__pyx_t_8)) {
                      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_sheet};
                      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 104, __pyx_L40_error)
                      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                      __Pyx_GOTREF(__pyx_t_4);
                    } else
                    #endif
                    #if CYTHON_FAST_PYCCALL
                    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
                      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_sheet};
                      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 104, __pyx_L40_error)
                      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                      __Pyx_GOTREF(__pyx_t_4);
                    } else
                    #endif
                    {
                      __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 104, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_12);
                      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7); __pyx_t_7 = NULL;
                      __Pyx_INCREF(__pyx_v_sheet);
                      __Pyx_GIVEREF(__pyx_v_sheet);
                      PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_sheet);
                      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 104, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                    }
                  }
                  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

                  /* "metaphor/chem_gm/core/gmtoolbox.py":105
 * # fichiers de resultats
 *                     xl.add_worksheet(sheet)
 *                     col0 = 0             # <<<<<<<<<<<<<<
 *                     row0 = 0
 *                     rowend = 0
 */
                  __Pyx_INCREF(__pyx_int_0);
                  __Pyx_XDECREF_SET(__pyx_v_col0, __pyx_int_0);

                  /* "metaphor/chem_gm/core/gmtoolbox.py":106
 *                     xl.add_worksheet(sheet)
 *                     col0 = 0
 *                     row0 = 0             # <<<<<<<<<<<<<<
 *                     rowend = 0
 *                     if mainTitle:
 */
                  __Pyx_INCREF(__pyx_int_0);
                  __Pyx_XDECREF_SET(__pyx_v_row0, __pyx_int_0);

                  /* "metaphor/chem_gm/core/gmtoolbox.py":107
 *                     col0 = 0
 *                     row0 = 0
 *                     rowend = 0             # <<<<<<<<<<<<<<
 *                     if mainTitle:
 *                         xl.write([mainTitle], 0, 0, newline=True)
 */
                  __Pyx_INCREF(__pyx_int_0);
                  __Pyx_XDECREF_SET(__pyx_v_rowend, __pyx_int_0);

                  /* "metaphor/chem_gm/core/gmtoolbox.py":108
 *                     row0 = 0
 *                     rowend = 0
 *                     if mainTitle:             # <<<<<<<<<<<<<<
 *                         xl.write([mainTitle], 0, 0, newline=True)
 *                         xl.currow = 1
 */
                  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_mainTitle); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 108, __pyx_L40_error)
                  if (__pyx_t_2) {

                    /* "metaphor/chem_gm/core/gmtoolbox.py":109
 *                     rowend = 0
 *                     if mainTitle:
 *                         xl.write([mainTitle], 0, 0, newline=True)             # <<<<<<<<<<<<<<
 *                         xl.currow = 1
 *                         row0 = 1
 */
                    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_4);
                    __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 109, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_8);
                    __Pyx_INCREF(__pyx_v_mainTitle);
                    __Pyx_GIVEREF(__pyx_v_mainTitle);
                    PyList_SET_ITEM(__pyx_t_8, 0, __pyx_v_mainTitle);
                    __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 109, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_12);
                    __Pyx_GIVEREF(__pyx_t_8);
                    PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_8);
                    __Pyx_INCREF(__pyx_int_0);
                    __Pyx_GIVEREF(__pyx_int_0);
                    PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_int_0);
                    __Pyx_INCREF(__pyx_int_0);
                    __Pyx_GIVEREF(__pyx_int_0);
                    PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_int_0);
                    __pyx_t_8 = 0;
                    __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 109, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_8);
                    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_newline, Py_True) < 0) __PYX_ERR(0, 109, __pyx_L40_error)
                    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_12, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 109, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_7);
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

                    /* "metaphor/chem_gm/core/gmtoolbox.py":110
 *                     if mainTitle:
 *                         xl.write([mainTitle], 0, 0, newline=True)
 *                         xl.currow = 1             # <<<<<<<<<<<<<<
 *                         row0 = 1
 *                     if left:
 */
                    if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_currow, __pyx_int_1) < 0) __PYX_ERR(0, 110, __pyx_L40_error)

                    /* "metaphor/chem_gm/core/gmtoolbox.py":111
 *                         xl.write([mainTitle], 0, 0, newline=True)
 *                         xl.currow = 1
 *                         row0 = 1             # <<<<<<<<<<<<<<
 *                     if left:
 *                         #left = [C CharOnlys(val) for val in left]
 */
                    __Pyx_INCREF(__pyx_int_1);
                    __Pyx_DECREF_SET(__pyx_v_row0, __pyx_int_1);

                    /* "metaphor/chem_gm/core/gmtoolbox.py":108
 *                     row0 = 0
 *                     rowend = 0
 *                     if mainTitle:             # <<<<<<<<<<<<<<
 *                         xl.write([mainTitle], 0, 0, newline=True)
 *                         xl.currow = 1
 */
                  }

                  /* "metaphor/chem_gm/core/gmtoolbox.py":112
 *                         xl.currow = 1
 *                         row0 = 1
 *                     if left:             # <<<<<<<<<<<<<<
 *                         #left = [C CharOnlys(val) for val in left]
 *                         left = [nonASCIICharsConvert(val) for val in left]
 */
                  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_left); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 112, __pyx_L40_error)
                  if (__pyx_t_2) {

                    /* "metaphor/chem_gm/core/gmtoolbox.py":114
 *                     if left:
 *                         #left = [C CharOnlys(val) for val in left]
 *                         left = [nonASCIICharsConvert(val) for val in left]             # <<<<<<<<<<<<<<
 *                         col0 = 1
 *                         if head:
 */
                    { /* enter inner scope */
                      __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 114, __pyx_L52_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      if (likely(PyList_CheckExact(__pyx_v_left)) || PyTuple_CheckExact(__pyx_v_left)) {
                        __pyx_t_8 = __pyx_v_left; __Pyx_INCREF(__pyx_t_8); __pyx_t_1 = 0;
                        __pyx_t_34 = NULL;
                      } else {
                        __pyx_t_1 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_left); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 114, __pyx_L52_error)
                        __Pyx_GOTREF(__pyx_t_8);
                        __pyx_t_34 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_34)) __PYX_ERR(0, 114, __pyx_L52_error)
                      }
                      for (;;) {
                        if (likely(!__pyx_t_34)) {
                          if (likely(PyList_CheckExact(__pyx_t_8))) {
                            if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_8)) break;
                            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                            __pyx_t_12 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_1); __Pyx_INCREF(__pyx_t_12); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 114, __pyx_L52_error)
                            #else
                            __pyx_t_12 = PySequence_ITEM(__pyx_t_8, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 114, __pyx_L52_error)
                            __Pyx_GOTREF(__pyx_t_12);
                            #endif
                          } else {
                            if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
                            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                            __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_1); __Pyx_INCREF(__pyx_t_12); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 114, __pyx_L52_error)
                            #else
                            __pyx_t_12 = PySequence_ITEM(__pyx_t_8, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 114, __pyx_L52_error)
                            __Pyx_GOTREF(__pyx_t_12);
                            #endif
                          }
                        } else {
                          __pyx_t_12 = __pyx_t_34(__pyx_t_8);
                          if (unlikely(!__pyx_t_12)) {
                            PyObject* exc_type = PyErr_Occurred();
                            if (exc_type) {
                              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                              else __PYX_ERR(0, 114, __pyx_L52_error)
                            }
                            break;
                          }
                          __Pyx_GOTREF(__pyx_t_12);
                        }
                        __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_val, __pyx_t_12);
                        __pyx_t_12 = 0;
                        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonASCIICharsConvert); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 114, __pyx_L52_error)
                        __Pyx_GOTREF(__pyx_t_4);
                        __pyx_t_5 = NULL;
                        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
                          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
                          if (likely(__pyx_t_5)) {
                            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
                            __Pyx_INCREF(__pyx_t_5);
                            __Pyx_INCREF(function);
                            __Pyx_DECREF_SET(__pyx_t_4, function);
                          }
                        }
                        if (!__pyx_t_5) {
                          __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_8genexpr2__pyx_v_val); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 114, __pyx_L52_error)
                          __Pyx_GOTREF(__pyx_t_12);
                        } else {
                          #if CYTHON_FAST_PYCALL
                          if (PyFunction_Check(__pyx_t_4)) {
                            PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_8genexpr2__pyx_v_val};
                            __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 114, __pyx_L52_error)
                            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                            __Pyx_GOTREF(__pyx_t_12);
                          } else
                          #endif
                          #if CYTHON_FAST_PYCCALL
                          if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
                            PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_8genexpr2__pyx_v_val};
                            __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 114, __pyx_L52_error)
                            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                            __Pyx_GOTREF(__pyx_t_12);
                          } else
                          #endif
                          {
                            __pyx_t_32 = PyTuple_New(1+1); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 114, __pyx_L52_error)
                            __Pyx_GOTREF(__pyx_t_32);
                            __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_32, 0, __pyx_t_5); __pyx_t_5 = NULL;
                            __Pyx_INCREF(__pyx_8genexpr2__pyx_v_val);
                            __Pyx_GIVEREF(__pyx_8genexpr2__pyx_v_val);
                            PyTuple_SET_ITEM(__pyx_t_32, 0+1, __pyx_8genexpr2__pyx_v_val);
                            __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_32, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 114, __pyx_L52_error)
                            __Pyx_GOTREF(__pyx_t_12);
                            __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                          }
                        }
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 114, __pyx_L52_error)
                        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                      }
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                      __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_val); __pyx_8genexpr2__pyx_v_val = 0;
                      goto __pyx_L55_exit_scope;
                      __pyx_L52_error:;
                      __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_val); __pyx_8genexpr2__pyx_v_val = 0;
                      goto __pyx_L40_error;
                      __pyx_L55_exit_scope:;
                    } /* exit inner scope */
                    __Pyx_DECREF_SET(__pyx_v_left, __pyx_t_7);
                    __pyx_t_7 = 0;

                    /* "metaphor/chem_gm/core/gmtoolbox.py":115
 *                         #left = [C CharOnlys(val) for val in left]
 *                         left = [nonASCIICharsConvert(val) for val in left]
 *                         col0 = 1             # <<<<<<<<<<<<<<
 *                         if head:
 *                             row0 += 1
 */
                    __Pyx_INCREF(__pyx_int_1);
                    __Pyx_DECREF_SET(__pyx_v_col0, __pyx_int_1);

                    /* "metaphor/chem_gm/core/gmtoolbox.py":116
 *                         left = [nonASCIICharsConvert(val) for val in left]
 *                         col0 = 1
 *                         if head:             # <<<<<<<<<<<<<<
 *                             row0 += 1
 *                         cur = xl.currow
 */
                    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_head); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 116, __pyx_L40_error)
                    if (__pyx_t_2) {

                      /* "metaphor/chem_gm/core/gmtoolbox.py":117
 *                         col0 = 1
 *                         if head:
 *                             row0 += 1             # <<<<<<<<<<<<<<
 *                         cur = xl.currow
 *                         xl.currow = row0
 */
                      __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_v_row0, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 117, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF_SET(__pyx_v_row0, __pyx_t_7);
                      __pyx_t_7 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":116
 *                         left = [nonASCIICharsConvert(val) for val in left]
 *                         col0 = 1
 *                         if head:             # <<<<<<<<<<<<<<
 *                             row0 += 1
 *                         cur = xl.currow
 */
                    }

                    /* "metaphor/chem_gm/core/gmtoolbox.py":118
 *                         if head:
 *                             row0 += 1
 *                         cur = xl.currow             # <<<<<<<<<<<<<<
 *                         xl.currow = row0
 *                         xl.write_col(left)
 */
                    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_currow); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 118, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_7);
                    __Pyx_XDECREF_SET(__pyx_v_cur, __pyx_t_7);
                    __pyx_t_7 = 0;

                    /* "metaphor/chem_gm/core/gmtoolbox.py":119
 *                             row0 += 1
 *                         cur = xl.currow
 *                         xl.currow = row0             # <<<<<<<<<<<<<<
 *                         xl.write_col(left)
 *                         rowend = xl.currow
 */
                    if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_currow, __pyx_v_row0) < 0) __PYX_ERR(0, 119, __pyx_L40_error)

                    /* "metaphor/chem_gm/core/gmtoolbox.py":120
 *                         cur = xl.currow
 *                         xl.currow = row0
 *                         xl.write_col(left)             # <<<<<<<<<<<<<<
 *                         rowend = xl.currow
 *                         xl.currow = cur
 */
                    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_write_col); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 120, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_8);
                    __pyx_t_12 = NULL;
                    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
                      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_8);
                      if (likely(__pyx_t_12)) {
                        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
                        __Pyx_INCREF(__pyx_t_12);
                        __Pyx_INCREF(function);
                        __Pyx_DECREF_SET(__pyx_t_8, function);
                      }
                    }
                    if (!__pyx_t_12) {
                      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_left); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 120, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_7);
                    } else {
                      #if CYTHON_FAST_PYCALL
                      if (PyFunction_Check(__pyx_t_8)) {
                        PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_left};
                        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 120, __pyx_L40_error)
                        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                        __Pyx_GOTREF(__pyx_t_7);
                      } else
                      #endif
                      #if CYTHON_FAST_PYCCALL
                      if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
                        PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_left};
                        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 120, __pyx_L40_error)
                        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                        __Pyx_GOTREF(__pyx_t_7);
                      } else
                      #endif
                      {
                        __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 120, __pyx_L40_error)
                        __Pyx_GOTREF(__pyx_t_4);
                        __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_12); __pyx_t_12 = NULL;
                        __Pyx_INCREF(__pyx_v_left);
                        __Pyx_GIVEREF(__pyx_v_left);
                        PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_left);
                        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 120, __pyx_L40_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      }
                    }
                    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

                    /* "metaphor/chem_gm/core/gmtoolbox.py":121
 *                         xl.currow = row0
 *                         xl.write_col(left)
 *                         rowend = xl.currow             # <<<<<<<<<<<<<<
 *                         xl.currow = cur
 * 
 */
                    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_currow); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 121, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_7);
                    __Pyx_DECREF_SET(__pyx_v_rowend, __pyx_t_7);
                    __pyx_t_7 = 0;

                    /* "metaphor/chem_gm/core/gmtoolbox.py":122
 *                         xl.write_col(left)
 *                         rowend = xl.currow
 *                         xl.currow = cur             # <<<<<<<<<<<<<<
 * 
 *                     if head:
 */
                    if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_currow, __pyx_v_cur) < 0) __PYX_ERR(0, 122, __pyx_L40_error)

                    /* "metaphor/chem_gm/core/gmtoolbox.py":112
 *                         xl.currow = 1
 *                         row0 = 1
 *                     if left:             # <<<<<<<<<<<<<<
 *                         #left = [C CharOnlys(val) for val in left]
 *                         left = [nonASCIICharsConvert(val) for val in left]
 */
                  }

                  /* "metaphor/chem_gm/core/gmtoolbox.py":124
 *                         xl.currow = cur
 * 
 *                     if head:             # <<<<<<<<<<<<<<
 *                         xl.write(head, row0-1, col0, newline=True)
 *                     xl.write(source, row0, col0)
 */
                  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_head); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 124, __pyx_L40_error)
                  if (__pyx_t_2) {

                    /* "metaphor/chem_gm/core/gmtoolbox.py":125
 * 
 *                     if head:
 *                         xl.write(head, row0-1, col0, newline=True)             # <<<<<<<<<<<<<<
 *                     xl.write(source, row0, col0)
 *                     if minmax:
 */
                    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_write); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 125, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_7);
                    __pyx_t_8 = __Pyx_PyInt_SubtractObjC(__pyx_v_row0, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 125, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_8);
                    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_4);
                    __Pyx_INCREF(__pyx_v_head);
                    __Pyx_GIVEREF(__pyx_v_head);
                    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_head);
                    __Pyx_GIVEREF(__pyx_t_8);
                    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_8);
                    __Pyx_INCREF(__pyx_v_col0);
                    __Pyx_GIVEREF(__pyx_v_col0);
                    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_col0);
                    __pyx_t_8 = 0;
                    __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 125, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_8);
                    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_newline, Py_True) < 0) __PYX_ERR(0, 125, __pyx_L40_error)
                    __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 125, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_12);
                    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

                    /* "metaphor/chem_gm/core/gmtoolbox.py":124
 *                         xl.currow = cur
 * 
 *                     if head:             # <<<<<<<<<<<<<<
 *                         xl.write(head, row0-1, col0, newline=True)
 *                     xl.write(source, row0, col0)
 */
                  }

                  /* "metaphor/chem_gm/core/gmtoolbox.py":126
 *                     if head:
 *                         xl.write(head, row0-1, col0, newline=True)
 *                     xl.write(source, row0, col0)             # <<<<<<<<<<<<<<
 *                     if minmax:
 *                         minmaxst = "leverages %d max & %d min"%(minmaxsize,
 */
                  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_write); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 126, __pyx_L40_error)
                  __Pyx_GOTREF(__pyx_t_8);
                  __pyx_t_4 = NULL;
                  __pyx_t_20 = 0;
                  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
                    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
                    if (likely(__pyx_t_4)) {
                      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
                      __Pyx_INCREF(__pyx_t_4);
                      __Pyx_INCREF(function);
                      __Pyx_DECREF_SET(__pyx_t_8, function);
                      __pyx_t_20 = 1;
                    }
                  }
                  #if CYTHON_FAST_PYCALL
                  if (PyFunction_Check(__pyx_t_8)) {
                    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_source, __pyx_v_row0, __pyx_v_col0};
                    __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_20, 3+__pyx_t_20); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 126, __pyx_L40_error)
                    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                    __Pyx_GOTREF(__pyx_t_12);
                  } else
                  #endif
                  #if CYTHON_FAST_PYCCALL
                  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
                    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_source, __pyx_v_row0, __pyx_v_col0};
                    __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_20, 3+__pyx_t_20); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 126, __pyx_L40_error)
                    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                    __Pyx_GOTREF(__pyx_t_12);
                  } else
                  #endif
                  {
                    __pyx_t_7 = PyTuple_New(3+__pyx_t_20); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 126, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_7);
                    if (__pyx_t_4) {
                      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
                    }
                    __Pyx_INCREF(__pyx_v_source);
                    __Pyx_GIVEREF(__pyx_v_source);
                    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_20, __pyx_v_source);
                    __Pyx_INCREF(__pyx_v_row0);
                    __Pyx_GIVEREF(__pyx_v_row0);
                    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_20, __pyx_v_row0);
                    __Pyx_INCREF(__pyx_v_col0);
                    __Pyx_GIVEREF(__pyx_v_col0);
                    PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_20, __pyx_v_col0);
                    __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 126, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_12);
                    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                  }
                  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

                  /* "metaphor/chem_gm/core/gmtoolbox.py":127
 *                         xl.write(head, row0-1, col0, newline=True)
 *                     xl.write(source, row0, col0)
 *                     if minmax:             # <<<<<<<<<<<<<<
 *                         minmaxst = "leverages %d max & %d min"%(minmaxsize,
 *                                                                 minmaxsize)
 */
                  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_minmax); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 127, __pyx_L40_error)
                  if (__pyx_t_2) {

                    /* "metaphor/chem_gm/core/gmtoolbox.py":128
 *                     xl.write(source, row0, col0)
 *                     if minmax:
 *                         minmaxst = "leverages %d max & %d min"%(minmaxsize,             # <<<<<<<<<<<<<<
 *                                                                 minmaxsize)
 *                         xl.currow = rowend + 1
 */
                    __pyx_t_12 = PyTuple_New(5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 128, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_12);
                    __pyx_t_1 = 0;
                    __pyx_t_35 = 127;
                    __Pyx_INCREF(__pyx_kp_u_leverages);
                    __pyx_t_1 += 10;
                    __Pyx_GIVEREF(__pyx_kp_u_leverages);
                    PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_kp_u_leverages);
                    __pyx_t_8 = __Pyx_PyObject_Format(__pyx_v_minmaxsize, __pyx_n_u_d); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 128, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_8);
                    __pyx_t_35 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_35) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_35;
                    __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
                    __Pyx_GIVEREF(__pyx_t_8);
                    PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_8);
                    __pyx_t_8 = 0;
                    __Pyx_INCREF(__pyx_kp_u_max);
                    __pyx_t_1 += 7;
                    __Pyx_GIVEREF(__pyx_kp_u_max);
                    PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_kp_u_max);

                    /* "metaphor/chem_gm/core/gmtoolbox.py":129
 *                     if minmax:
 *                         minmaxst = "leverages %d max & %d min"%(minmaxsize,
 *                                                                 minmaxsize)             # <<<<<<<<<<<<<<
 *                         xl.currow = rowend + 1
 *                         xl.curcol = col0 - 1
 */
                    __pyx_t_8 = __Pyx_PyObject_Format(__pyx_v_minmaxsize, __pyx_n_u_d); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 129, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_8);
                    __pyx_t_35 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_35) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_35;
                    __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
                    __Pyx_GIVEREF(__pyx_t_8);
                    PyTuple_SET_ITEM(__pyx_t_12, 3, __pyx_t_8);
                    __pyx_t_8 = 0;
                    __Pyx_INCREF(__pyx_kp_u_min);
                    __pyx_t_1 += 4;
                    __Pyx_GIVEREF(__pyx_kp_u_min);
                    PyTuple_SET_ITEM(__pyx_t_12, 4, __pyx_kp_u_min);

                    /* "metaphor/chem_gm/core/gmtoolbox.py":128
 *                     xl.write(source, row0, col0)
 *                     if minmax:
 *                         minmaxst = "leverages %d max & %d min"%(minmaxsize,             # <<<<<<<<<<<<<<
 *                                                                 minmaxsize)
 *                         xl.currow = rowend + 1
 */
                    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_12, 5, __pyx_t_1, __pyx_t_35); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 128, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_8);
                    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                    __Pyx_XDECREF_SET(__pyx_v_minmaxst, ((PyObject*)__pyx_t_8));
                    __pyx_t_8 = 0;

                    /* "metaphor/chem_gm/core/gmtoolbox.py":130
 *                         minmaxst = "leverages %d max & %d min"%(minmaxsize,
 *                                                                 minmaxsize)
 *                         xl.currow = rowend + 1             # <<<<<<<<<<<<<<
 *                         xl.curcol = col0 - 1
 *                         xl.write([minmaxst])
 */
                    __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_v_rowend, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 130, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_8);
                    if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_currow, __pyx_t_8) < 0) __PYX_ERR(0, 130, __pyx_L40_error)
                    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

                    /* "metaphor/chem_gm/core/gmtoolbox.py":131
 *                                                                 minmaxsize)
 *                         xl.currow = rowend + 1
 *                         xl.curcol = col0 - 1             # <<<<<<<<<<<<<<
 *                         xl.write([minmaxst])
 *                         xl.currow += 2
 */
                    __pyx_t_8 = __Pyx_PyInt_SubtractObjC(__pyx_v_col0, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 131, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_8);
                    if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_curcol, __pyx_t_8) < 0) __PYX_ERR(0, 131, __pyx_L40_error)
                    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

                    /* "metaphor/chem_gm/core/gmtoolbox.py":132
 *                         xl.currow = rowend + 1
 *                         xl.curcol = col0 - 1
 *                         xl.write([minmaxst])             # <<<<<<<<<<<<<<
 *                         xl.currow += 2
 *                         if head:
 */
                    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_write); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 132, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_12);
                    __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 132, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_7);
                    __Pyx_INCREF(__pyx_v_minmaxst);
                    __Pyx_GIVEREF(__pyx_v_minmaxst);
                    PyList_SET_ITEM(__pyx_t_7, 0, __pyx_v_minmaxst);
                    __pyx_t_4 = NULL;
                    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
                      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_12);
                      if (likely(__pyx_t_4)) {
                        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                        __Pyx_INCREF(__pyx_t_4);
                        __Pyx_INCREF(function);
                        __Pyx_DECREF_SET(__pyx_t_12, function);
                      }
                    }
                    if (!__pyx_t_4) {
                      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 132, __pyx_L40_error)
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                      __Pyx_GOTREF(__pyx_t_8);
                    } else {
                      #if CYTHON_FAST_PYCALL
                      if (PyFunction_Check(__pyx_t_12)) {
                        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_7};
                        __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 132, __pyx_L40_error)
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_GOTREF(__pyx_t_8);
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                      } else
                      #endif
                      #if CYTHON_FAST_PYCCALL
                      if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_7};
                        __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 132, __pyx_L40_error)
                        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_GOTREF(__pyx_t_8);
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                      } else
                      #endif
                      {
                        __pyx_t_32 = PyTuple_New(1+1); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 132, __pyx_L40_error)
                        __Pyx_GOTREF(__pyx_t_32);
                        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_32, 0, __pyx_t_4); __pyx_t_4 = NULL;
                        __Pyx_GIVEREF(__pyx_t_7);
                        PyTuple_SET_ITEM(__pyx_t_32, 0+1, __pyx_t_7);
                        __pyx_t_7 = 0;
                        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_32, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 132, __pyx_L40_error)
                        __Pyx_GOTREF(__pyx_t_8);
                        __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                      }
                    }
                    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

                    /* "metaphor/chem_gm/core/gmtoolbox.py":133
 *                         xl.curcol = col0 - 1
 *                         xl.write([minmaxst])
 *                         xl.currow += 2             # <<<<<<<<<<<<<<
 *                         if head:
 *                             xl.write(head, newline=True)
 */
                    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_currow); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 133, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_8);
                    __pyx_t_12 = __Pyx_PyInt_AddObjC(__pyx_t_8, __pyx_int_2, 2, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 133, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_12);
                    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                    if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_currow, __pyx_t_12) < 0) __PYX_ERR(0, 133, __pyx_L40_error)
                    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

                    /* "metaphor/chem_gm/core/gmtoolbox.py":134
 *                         xl.write([minmaxst])
 *                         xl.currow += 2
 *                         if head:             # <<<<<<<<<<<<<<
 *                             xl.write(head, newline=True)
 *                         xl.curcol = col0 - 1
 */
                    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_head); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 134, __pyx_L40_error)
                    if (__pyx_t_2) {

                      /* "metaphor/chem_gm/core/gmtoolbox.py":135
 *                         xl.currow += 2
 *                         if head:
 *                             xl.write(head, newline=True)             # <<<<<<<<<<<<<<
 *                         xl.curcol = col0 - 1
 *                         res = getMinMaxMatrix(source, left, nb = minmaxsize,
 */
                      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_write); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 135, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_12);
                      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 135, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __Pyx_INCREF(__pyx_v_head);
                      __Pyx_GIVEREF(__pyx_v_head);
                      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_head);
                      __pyx_t_32 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 135, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_32);
                      if (PyDict_SetItem(__pyx_t_32, __pyx_n_s_newline, Py_True) < 0) __PYX_ERR(0, 135, __pyx_L40_error)
                      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_8, __pyx_t_32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 135, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                      __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":134
 *                         xl.write([minmaxst])
 *                         xl.currow += 2
 *                         if head:             # <<<<<<<<<<<<<<
 *                             xl.write(head, newline=True)
 *                         xl.curcol = col0 - 1
 */
                    }

                    /* "metaphor/chem_gm/core/gmtoolbox.py":136
 *                         if head:
 *                             xl.write(head, newline=True)
 *                         xl.curcol = col0 - 1             # <<<<<<<<<<<<<<
 *                         res = getMinMaxMatrix(source, left, nb = minmaxsize,
 *                                               indextest=2)
 */
                    __pyx_t_7 = __Pyx_PyInt_SubtractObjC(__pyx_v_col0, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 136, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_7);
                    if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_curcol, __pyx_t_7) < 0) __PYX_ERR(0, 136, __pyx_L40_error)
                    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

                    /* "metaphor/chem_gm/core/gmtoolbox.py":137
 *                             xl.write(head, newline=True)
 *                         xl.curcol = col0 - 1
 *                         res = getMinMaxMatrix(source, left, nb = minmaxsize,             # <<<<<<<<<<<<<<
 *                                               indextest=2)
 *                         xl.write(res[0])
 */
                    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_getMinMaxMatrix); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 137, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_7);
                    __pyx_t_32 = PyTuple_New(2); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 137, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_32);
                    __Pyx_INCREF(__pyx_v_source);
                    __Pyx_GIVEREF(__pyx_v_source);
                    PyTuple_SET_ITEM(__pyx_t_32, 0, __pyx_v_source);
                    __Pyx_INCREF(__pyx_v_left);
                    __Pyx_GIVEREF(__pyx_v_left);
                    PyTuple_SET_ITEM(__pyx_t_32, 1, __pyx_v_left);
                    __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 137, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_8);
                    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_nb, __pyx_v_minmaxsize) < 0) __PYX_ERR(0, 137, __pyx_L40_error)
                    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_indextest, __pyx_int_2) < 0) __PYX_ERR(0, 137, __pyx_L40_error)
                    __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_32, __pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 137, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_12);
                    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                    __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                    __Pyx_XDECREF_SET(__pyx_v_res, __pyx_t_12);
                    __pyx_t_12 = 0;

                    /* "metaphor/chem_gm/core/gmtoolbox.py":139
 *                         res = getMinMaxMatrix(source, left, nb = minmaxsize,
 *                                               indextest=2)
 *                         xl.write(res[0])             # <<<<<<<<<<<<<<
 *                         xl.currow += 1
 *                         xl.write(res[1])
 */
                    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_write); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 139, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_8);
                    __pyx_t_32 = __Pyx_GetItemInt(__pyx_v_res, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 139, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_32);
                    __pyx_t_7 = NULL;
                    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
                      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
                      if (likely(__pyx_t_7)) {
                        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
                        __Pyx_INCREF(__pyx_t_7);
                        __Pyx_INCREF(function);
                        __Pyx_DECREF_SET(__pyx_t_8, function);
                      }
                    }
                    if (!__pyx_t_7) {
                      __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_32); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 139, __pyx_L40_error)
                      __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                      __Pyx_GOTREF(__pyx_t_12);
                    } else {
                      #if CYTHON_FAST_PYCALL
                      if (PyFunction_Check(__pyx_t_8)) {
                        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_32};
                        __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 139, __pyx_L40_error)
                        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __Pyx_GOTREF(__pyx_t_12);
                        __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                      } else
                      #endif
                      #if CYTHON_FAST_PYCCALL
                      if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
                        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_32};
                        __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 139, __pyx_L40_error)
                        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __Pyx_GOTREF(__pyx_t_12);
                        __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                      } else
                      #endif
                      {
                        __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L40_error)
                        __Pyx_GOTREF(__pyx_t_4);
                        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); __pyx_t_7 = NULL;
                        __Pyx_GIVEREF(__pyx_t_32);
                        PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_32);
                        __pyx_t_32 = 0;
                        __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 139, __pyx_L40_error)
                        __Pyx_GOTREF(__pyx_t_12);
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      }
                    }
                    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

                    /* "metaphor/chem_gm/core/gmtoolbox.py":140
 *                                               indextest=2)
 *                         xl.write(res[0])
 *                         xl.currow += 1             # <<<<<<<<<<<<<<
 *                         xl.write(res[1])
 *                         rowend = xl.currow
 */
                    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_currow); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 140, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_12);
                    __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_t_12, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 140, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_8);
                    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                    if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_currow, __pyx_t_8) < 0) __PYX_ERR(0, 140, __pyx_L40_error)
                    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

                    /* "metaphor/chem_gm/core/gmtoolbox.py":141
 *                         xl.write(res[0])
 *                         xl.currow += 1
 *                         xl.write(res[1])             # <<<<<<<<<<<<<<
 *                         rowend = xl.currow
 *                         xl.currow = cur
 */
                    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_write); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 141, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_12);
                    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_res, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_4);
                    __pyx_t_32 = NULL;
                    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
                      __pyx_t_32 = PyMethod_GET_SELF(__pyx_t_12);
                      if (likely(__pyx_t_32)) {
                        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                        __Pyx_INCREF(__pyx_t_32);
                        __Pyx_INCREF(function);
                        __Pyx_DECREF_SET(__pyx_t_12, function);
                      }
                    }
                    if (!__pyx_t_32) {
                      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 141, __pyx_L40_error)
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __Pyx_GOTREF(__pyx_t_8);
                    } else {
                      #if CYTHON_FAST_PYCALL
                      if (PyFunction_Check(__pyx_t_12)) {
                        PyObject *__pyx_temp[2] = {__pyx_t_32, __pyx_t_4};
                        __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 141, __pyx_L40_error)
                        __Pyx_XDECREF(__pyx_t_32); __pyx_t_32 = 0;
                        __Pyx_GOTREF(__pyx_t_8);
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      } else
                      #endif
                      #if CYTHON_FAST_PYCCALL
                      if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                        PyObject *__pyx_temp[2] = {__pyx_t_32, __pyx_t_4};
                        __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 141, __pyx_L40_error)
                        __Pyx_XDECREF(__pyx_t_32); __pyx_t_32 = 0;
                        __Pyx_GOTREF(__pyx_t_8);
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      } else
                      #endif
                      {
                        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 141, __pyx_L40_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __Pyx_GIVEREF(__pyx_t_32); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_32); __pyx_t_32 = NULL;
                        __Pyx_GIVEREF(__pyx_t_4);
                        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4);
                        __pyx_t_4 = 0;
                        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 141, __pyx_L40_error)
                        __Pyx_GOTREF(__pyx_t_8);
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                      }
                    }
                    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

                    /* "metaphor/chem_gm/core/gmtoolbox.py":142
 *                         xl.currow += 1
 *                         xl.write(res[1])
 *                         rowend = xl.currow             # <<<<<<<<<<<<<<
 *                         xl.currow = cur
 *                     minmaxst = "absolute %d max & %d min"%(minmaxsize,
 */
                    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_currow); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 142, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_8);
                    __Pyx_DECREF_SET(__pyx_v_rowend, __pyx_t_8);
                    __pyx_t_8 = 0;

                    /* "metaphor/chem_gm/core/gmtoolbox.py":143
 *                         xl.write(res[1])
 *                         rowend = xl.currow
 *                         xl.currow = cur             # <<<<<<<<<<<<<<
 *                     minmaxst = "absolute %d max & %d min"%(minmaxsize,
 *                                                            minmaxsize)
 */
                    if (unlikely(!__pyx_v_cur)) { __Pyx_RaiseUnboundLocalError("cur"); __PYX_ERR(0, 143, __pyx_L40_error) }
                    if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_currow, __pyx_v_cur) < 0) __PYX_ERR(0, 143, __pyx_L40_error)

                    /* "metaphor/chem_gm/core/gmtoolbox.py":127
 *                         xl.write(head, row0-1, col0, newline=True)
 *                     xl.write(source, row0, col0)
 *                     if minmax:             # <<<<<<<<<<<<<<
 *                         minmaxst = "leverages %d max & %d min"%(minmaxsize,
 *                                                                 minmaxsize)
 */
                  }

                  /* "metaphor/chem_gm/core/gmtoolbox.py":144
 *                         rowend = xl.currow
 *                         xl.currow = cur
 *                     minmaxst = "absolute %d max & %d min"%(minmaxsize,             # <<<<<<<<<<<<<<
 *                                                            minmaxsize)
 *                     if projMat is not None:
 */
                  __pyx_t_8 = PyTuple_New(5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 144, __pyx_L40_error)
                  __Pyx_GOTREF(__pyx_t_8);
                  __pyx_t_1 = 0;
                  __pyx_t_35 = 127;
                  __Pyx_INCREF(__pyx_kp_u_absolute);
                  __pyx_t_1 += 9;
                  __Pyx_GIVEREF(__pyx_kp_u_absolute);
                  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_absolute);
                  __pyx_t_12 = __Pyx_PyObject_Format(__pyx_v_minmaxsize, __pyx_n_u_d); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 144, __pyx_L40_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  __pyx_t_35 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_35) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_35;
                  __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
                  __Pyx_GIVEREF(__pyx_t_12);
                  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_12);
                  __pyx_t_12 = 0;
                  __Pyx_INCREF(__pyx_kp_u_max);
                  __pyx_t_1 += 7;
                  __Pyx_GIVEREF(__pyx_kp_u_max);
                  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u_max);

                  /* "metaphor/chem_gm/core/gmtoolbox.py":145
 *                         xl.currow = cur
 *                     minmaxst = "absolute %d max & %d min"%(minmaxsize,
 *                                                            minmaxsize)             # <<<<<<<<<<<<<<
 *                     if projMat is not None:
 * 
 */
                  __pyx_t_12 = __Pyx_PyObject_Format(__pyx_v_minmaxsize, __pyx_n_u_d); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 145, __pyx_L40_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  __pyx_t_35 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_35) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_35;
                  __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
                  __Pyx_GIVEREF(__pyx_t_12);
                  PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_12);
                  __pyx_t_12 = 0;
                  __Pyx_INCREF(__pyx_kp_u_min);
                  __pyx_t_1 += 4;
                  __Pyx_GIVEREF(__pyx_kp_u_min);
                  PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_kp_u_min);

                  /* "metaphor/chem_gm/core/gmtoolbox.py":144
 *                         rowend = xl.currow
 *                         xl.currow = cur
 *                     minmaxst = "absolute %d max & %d min"%(minmaxsize,             # <<<<<<<<<<<<<<
 *                                                            minmaxsize)
 *                     if projMat is not None:
 */
                  __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_8, 5, __pyx_t_1, __pyx_t_35); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 144, __pyx_L40_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                  __Pyx_XDECREF_SET(__pyx_v_minmaxst, ((PyObject*)__pyx_t_12));
                  __pyx_t_12 = 0;

                  /* "metaphor/chem_gm/core/gmtoolbox.py":146
 *                     minmaxst = "absolute %d max & %d min"%(minmaxsize,
 *                                                            minmaxsize)
 *                     if projMat is not None:             # <<<<<<<<<<<<<<
 * 
 *                         if (shortTitles is not None) and len(shortTitles) >= 1:
 */
                  __pyx_t_2 = (__pyx_v_projMat != Py_None);
                  __pyx_t_29 = (__pyx_t_2 != 0);
                  if (__pyx_t_29) {

                    /* "metaphor/chem_gm/core/gmtoolbox.py":148
 *                     if projMat is not None:
 * 
 *                         if (shortTitles is not None) and len(shortTitles) >= 1:             # <<<<<<<<<<<<<<
 *                             #xl.add_worksheet("%s_%s"%(sheet, shortTitles[0]))
 *                             lst = sheet.split("_")
 */
                    __pyx_t_2 = (__pyx_v_shortTitles != Py_None);
                    __pyx_t_28 = (__pyx_t_2 != 0);
                    if (__pyx_t_28) {
                    } else {
                      __pyx_t_29 = __pyx_t_28;
                      goto __pyx_L62_bool_binop_done;
                    }
                    __pyx_t_1 = PyObject_Length(__pyx_v_shortTitles); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 148, __pyx_L40_error)
                    __pyx_t_28 = ((__pyx_t_1 >= 1) != 0);
                    __pyx_t_29 = __pyx_t_28;
                    __pyx_L62_bool_binop_done:;
                    if (__pyx_t_29) {

                      /* "metaphor/chem_gm/core/gmtoolbox.py":150
 *                         if (shortTitles is not None) and len(shortTitles) >= 1:
 *                             #xl.add_worksheet("%s_%s"%(sheet, shortTitles[0]))
 *                             lst = sheet.split("_")             # <<<<<<<<<<<<<<
 *                             xl.add_worksheet("%s_%s"%(lst[-1], shortTitles[0]))
 *                             col0 = 1
 */
                      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_sheet, __pyx_n_s_split); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 150, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_12);
                      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 150, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                      __Pyx_XDECREF_SET(__pyx_v_lst, __pyx_t_8);
                      __pyx_t_8 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":151
 *                             #xl.add_worksheet("%s_%s"%(sheet, shortTitles[0]))
 *                             lst = sheet.split("_")
 *                             xl.add_worksheet("%s_%s"%(lst[-1], shortTitles[0]))             # <<<<<<<<<<<<<<
 *                             col0 = 1
 *                             row0 = 0
 */
                      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_add_worksheet); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 151, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_12);
                      __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 151, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_t_1 = 0;
                      __pyx_t_35 = 127;
                      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_lst, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_32 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 151, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_32);
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __pyx_t_35 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_32) > __pyx_t_35) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_32) : __pyx_t_35;
                      __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_32);
                      __Pyx_GIVEREF(__pyx_t_32);
                      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_32);
                      __pyx_t_32 = 0;
                      __Pyx_INCREF(__pyx_n_u__5);
                      __pyx_t_1 += 1;
                      __Pyx_GIVEREF(__pyx_n_u__5);
                      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_n_u__5);
                      __pyx_t_32 = __Pyx_GetItemInt(__pyx_v_shortTitles, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 151, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_32);
                      __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_32), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                      __pyx_t_35 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_35) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_35;
                      __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
                      __Pyx_GIVEREF(__pyx_t_4);
                      PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_4);
                      __pyx_t_4 = 0;
                      __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_7, 3, __pyx_t_1, __pyx_t_35); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                      __pyx_t_7 = NULL;
                      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
                        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_12);
                        if (likely(__pyx_t_7)) {
                          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                          __Pyx_INCREF(__pyx_t_7);
                          __Pyx_INCREF(function);
                          __Pyx_DECREF_SET(__pyx_t_12, function);
                        }
                      }
                      if (!__pyx_t_7) {
                        __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 151, __pyx_L40_error)
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_GOTREF(__pyx_t_8);
                      } else {
                        #if CYTHON_FAST_PYCALL
                        if (PyFunction_Check(__pyx_t_12)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
                          __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 151, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                          __Pyx_GOTREF(__pyx_t_8);
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        } else
                        #endif
                        #if CYTHON_FAST_PYCCALL
                        if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
                          __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 151, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                          __Pyx_GOTREF(__pyx_t_8);
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        } else
                        #endif
                        {
                          __pyx_t_32 = PyTuple_New(1+1); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 151, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_32);
                          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_32, 0, __pyx_t_7); __pyx_t_7 = NULL;
                          __Pyx_GIVEREF(__pyx_t_4);
                          PyTuple_SET_ITEM(__pyx_t_32, 0+1, __pyx_t_4);
                          __pyx_t_4 = 0;
                          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_32, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 151, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                        }
                      }
                      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":152
 *                             lst = sheet.split("_")
 *                             xl.add_worksheet("%s_%s"%(lst[-1], shortTitles[0]))
 *                             col0 = 1             # <<<<<<<<<<<<<<
 *                             row0 = 0
 *                             rowend = row0
 */
                      __Pyx_INCREF(__pyx_int_1);
                      __Pyx_DECREF_SET(__pyx_v_col0, __pyx_int_1);

                      /* "metaphor/chem_gm/core/gmtoolbox.py":153
 *                             xl.add_worksheet("%s_%s"%(lst[-1], shortTitles[0]))
 *                             col0 = 1
 *                             row0 = 0             # <<<<<<<<<<<<<<
 *                             rowend = row0
 *                         xl.currow = rowend + 1
 */
                      __Pyx_INCREF(__pyx_int_0);
                      __Pyx_DECREF_SET(__pyx_v_row0, __pyx_int_0);

                      /* "metaphor/chem_gm/core/gmtoolbox.py":154
 *                             col0 = 1
 *                             row0 = 0
 *                             rowend = row0             # <<<<<<<<<<<<<<
 *                         xl.currow = rowend + 1
 *                         xl.curcol = col0
 */
                      __Pyx_INCREF(__pyx_v_row0);
                      __Pyx_DECREF_SET(__pyx_v_rowend, __pyx_v_row0);

                      /* "metaphor/chem_gm/core/gmtoolbox.py":148
 *                     if projMat is not None:
 * 
 *                         if (shortTitles is not None) and len(shortTitles) >= 1:             # <<<<<<<<<<<<<<
 *                             #xl.add_worksheet("%s_%s"%(sheet, shortTitles[0]))
 *                             lst = sheet.split("_")
 */
                    }

                    /* "metaphor/chem_gm/core/gmtoolbox.py":155
 *                             row0 = 0
 *                             rowend = row0
 *                         xl.currow = rowend + 1             # <<<<<<<<<<<<<<
 *                         xl.curcol = col0
 * 
 */
                    __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_v_rowend, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 155, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_8);
                    if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_currow, __pyx_t_8) < 0) __PYX_ERR(0, 155, __pyx_L40_error)
                    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

                    /* "metaphor/chem_gm/core/gmtoolbox.py":156
 *                             rowend = row0
 *                         xl.currow = rowend + 1
 *                         xl.curcol = col0             # <<<<<<<<<<<<<<
 * 
 *                         #if sourceTitles[1]:
 */
                    if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_curcol, __pyx_v_col0) < 0) __PYX_ERR(0, 156, __pyx_L40_error)

                    /* "metaphor/chem_gm/core/gmtoolbox.py":159
 * 
 *                         #if sourceTitles[1]:
 *                         xl.curcol = 2             # <<<<<<<<<<<<<<
 *                         xl.write(["leverage", "mean(abs(hij))", "min(abs(hij))",
 *                                    "max(abs(hij))"], newline=True)
 */
                    if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_curcol, __pyx_int_2) < 0) __PYX_ERR(0, 159, __pyx_L40_error)

                    /* "metaphor/chem_gm/core/gmtoolbox.py":160
 *                         #if sourceTitles[1]:
 *                         xl.curcol = 2
 *                         xl.write(["leverage", "mean(abs(hij))", "min(abs(hij))",             # <<<<<<<<<<<<<<
 *                                    "max(abs(hij))"], newline=True)
 *                         xl.curcol = col0
 */
                    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_write); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 160, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_8);
                    __pyx_t_12 = PyList_New(4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 160, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_12);
                    __Pyx_INCREF(__pyx_n_u_leverage);
                    __Pyx_GIVEREF(__pyx_n_u_leverage);
                    PyList_SET_ITEM(__pyx_t_12, 0, __pyx_n_u_leverage);
                    __Pyx_INCREF(__pyx_kp_u_mean_abs_hij);
                    __Pyx_GIVEREF(__pyx_kp_u_mean_abs_hij);
                    PyList_SET_ITEM(__pyx_t_12, 1, __pyx_kp_u_mean_abs_hij);
                    __Pyx_INCREF(__pyx_kp_u_min_abs_hij);
                    __Pyx_GIVEREF(__pyx_kp_u_min_abs_hij);
                    PyList_SET_ITEM(__pyx_t_12, 2, __pyx_kp_u_min_abs_hij);
                    __Pyx_INCREF(__pyx_kp_u_max_abs_hij);
                    __Pyx_GIVEREF(__pyx_kp_u_max_abs_hij);
                    PyList_SET_ITEM(__pyx_t_12, 3, __pyx_kp_u_max_abs_hij);
                    __pyx_t_32 = PyTuple_New(1); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 160, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_32);
                    __Pyx_GIVEREF(__pyx_t_12);
                    PyTuple_SET_ITEM(__pyx_t_32, 0, __pyx_t_12);
                    __pyx_t_12 = 0;

                    /* "metaphor/chem_gm/core/gmtoolbox.py":161
 *                         xl.curcol = 2
 *                         xl.write(["leverage", "mean(abs(hij))", "min(abs(hij))",
 *                                    "max(abs(hij))"], newline=True)             # <<<<<<<<<<<<<<
 *                         xl.curcol = col0
 *                         if left:
 */
                    __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 161, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_12);
                    if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_newline, Py_True) < 0) __PYX_ERR(0, 161, __pyx_L40_error)

                    /* "metaphor/chem_gm/core/gmtoolbox.py":160
 *                         #if sourceTitles[1]:
 *                         xl.curcol = 2
 *                         xl.write(["leverage", "mean(abs(hij))", "min(abs(hij))",             # <<<<<<<<<<<<<<
 *                                    "max(abs(hij))"], newline=True)
 *                         xl.curcol = col0
 */
                    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_32, __pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 160, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_4);
                    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                    __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

                    /* "metaphor/chem_gm/core/gmtoolbox.py":162
 *                         xl.write(["leverage", "mean(abs(hij))", "min(abs(hij))",
 *                                    "max(abs(hij))"], newline=True)
 *                         xl.curcol = col0             # <<<<<<<<<<<<<<
 *                         if left:
 *                             cur = xl.currow
 */
                    if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_curcol, __pyx_v_col0) < 0) __PYX_ERR(0, 162, __pyx_L40_error)

                    /* "metaphor/chem_gm/core/gmtoolbox.py":163
 *                                    "max(abs(hij))"], newline=True)
 *                         xl.curcol = col0
 *                         if left:             # <<<<<<<<<<<<<<
 *                             cur = xl.currow
 *                             xl.write_col(left)
 */
                    __pyx_t_29 = __Pyx_PyObject_IsTrue(__pyx_v_left); if (unlikely(__pyx_t_29 < 0)) __PYX_ERR(0, 163, __pyx_L40_error)
                    if (__pyx_t_29) {

                      /* "metaphor/chem_gm/core/gmtoolbox.py":164
 *                         xl.curcol = col0
 *                         if left:
 *                             cur = xl.currow             # <<<<<<<<<<<<<<
 *                             xl.write_col(left)
 *                             xl.curcol += 1
 */
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_currow); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 164, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_XDECREF_SET(__pyx_v_cur, __pyx_t_4);
                      __pyx_t_4 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":165
 *                         if left:
 *                             cur = xl.currow
 *                             xl.write_col(left)             # <<<<<<<<<<<<<<
 *                             xl.curcol += 1
 *                             rowend = xl.currow
 */
                      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_write_col); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 165, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_12);
                      __pyx_t_32 = NULL;
                      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
                        __pyx_t_32 = PyMethod_GET_SELF(__pyx_t_12);
                        if (likely(__pyx_t_32)) {
                          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                          __Pyx_INCREF(__pyx_t_32);
                          __Pyx_INCREF(function);
                          __Pyx_DECREF_SET(__pyx_t_12, function);
                        }
                      }
                      if (!__pyx_t_32) {
                        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_left); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L40_error)
                        __Pyx_GOTREF(__pyx_t_4);
                      } else {
                        #if CYTHON_FAST_PYCALL
                        if (PyFunction_Check(__pyx_t_12)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_32, __pyx_v_left};
                          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_32); __pyx_t_32 = 0;
                          __Pyx_GOTREF(__pyx_t_4);
                        } else
                        #endif
                        #if CYTHON_FAST_PYCCALL
                        if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_32, __pyx_v_left};
                          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_32); __pyx_t_32 = 0;
                          __Pyx_GOTREF(__pyx_t_4);
                        } else
                        #endif
                        {
                          __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 165, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          __Pyx_GIVEREF(__pyx_t_32); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_32); __pyx_t_32 = NULL;
                          __Pyx_INCREF(__pyx_v_left);
                          __Pyx_GIVEREF(__pyx_v_left);
                          PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_left);
                          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_4);
                          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        }
                      }
                      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":166
 *                             cur = xl.currow
 *                             xl.write_col(left)
 *                             xl.curcol += 1             # <<<<<<<<<<<<<<
 *                             rowend = xl.currow
 *                             xl.currow = cur
 */
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_curcol); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_12 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 166, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_12);
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_curcol, __pyx_t_12) < 0) __PYX_ERR(0, 166, __pyx_L40_error)
                      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":167
 *                             xl.write_col(left)
 *                             xl.curcol += 1
 *                             rowend = xl.currow             # <<<<<<<<<<<<<<
 *                             xl.currow = cur
 * 
 */
                      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_currow); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 167, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_12);
                      __Pyx_DECREF_SET(__pyx_v_rowend, __pyx_t_12);
                      __pyx_t_12 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":168
 *                             xl.curcol += 1
 *                             rowend = xl.currow
 *                             xl.currow = cur             # <<<<<<<<<<<<<<
 * 
 * 
 */
                      if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_currow, __pyx_v_cur) < 0) __PYX_ERR(0, 168, __pyx_L40_error)

                      /* "metaphor/chem_gm/core/gmtoolbox.py":163
 *                                    "max(abs(hij))"], newline=True)
 *                         xl.curcol = col0
 *                         if left:             # <<<<<<<<<<<<<<
 *                             cur = xl.currow
 *                             xl.write_col(left)
 */
                    }

                    /* "metaphor/chem_gm/core/gmtoolbox.py":172
 * 
 *                         #xl.write(projMat, triangle=1)
 *                         for ind, lig in enumerate(projMat):             # <<<<<<<<<<<<<<
 *                             hii = lig[ind]
 *                             mask = np.zeros(lig.shape)
 */
                    __Pyx_INCREF(__pyx_int_0);
                    __pyx_t_12 = __pyx_int_0;
                    if (likely(PyList_CheckExact(__pyx_v_projMat)) || PyTuple_CheckExact(__pyx_v_projMat)) {
                      __pyx_t_4 = __pyx_v_projMat; __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = 0;
                      __pyx_t_34 = NULL;
                    } else {
                      __pyx_t_1 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_projMat); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 172, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_34 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_34)) __PYX_ERR(0, 172, __pyx_L40_error)
                    }
                    for (;;) {
                      if (likely(!__pyx_t_34)) {
                        if (likely(PyList_CheckExact(__pyx_t_4))) {
                          if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_4)) break;
                          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                          __pyx_t_8 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_8); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 172, __pyx_L40_error)
                          #else
                          __pyx_t_8 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 172, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          #endif
                        } else {
                          if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
                          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                          __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_8); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 172, __pyx_L40_error)
                          #else
                          __pyx_t_8 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 172, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          #endif
                        }
                      } else {
                        __pyx_t_8 = __pyx_t_34(__pyx_t_4);
                        if (unlikely(!__pyx_t_8)) {
                          PyObject* exc_type = PyErr_Occurred();
                          if (exc_type) {
                            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                            else __PYX_ERR(0, 172, __pyx_L40_error)
                          }
                          break;
                        }
                        __Pyx_GOTREF(__pyx_t_8);
                      }
                      __Pyx_XDECREF_SET(__pyx_v_lig, __pyx_t_8);
                      __pyx_t_8 = 0;
                      __Pyx_INCREF(__pyx_t_12);
                      __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_12);
                      __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_t_12, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 172, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __Pyx_DECREF(__pyx_t_12);
                      __pyx_t_12 = __pyx_t_8;
                      __pyx_t_8 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":173
 *                         #xl.write(projMat, triangle=1)
 *                         for ind, lig in enumerate(projMat):
 *                             hii = lig[ind]             # <<<<<<<<<<<<<<
 *                             mask = np.zeros(lig.shape)
 *                             mask[ind] = 1
 */
                      __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_lig, __pyx_v_ind); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 173, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __Pyx_XDECREF_SET(__pyx_v_hii, __pyx_t_8);
                      __pyx_t_8 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":174
 *                         for ind, lig in enumerate(projMat):
 *                             hii = lig[ind]
 *                             mask = np.zeros(lig.shape)             # <<<<<<<<<<<<<<
 *                             mask[ind] = 1
 *                             lig2 = abs(ma.masked_array(lig, mask))
 */
                      __pyx_t_32 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 174, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_32);
                      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_32, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 174, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                      __pyx_t_32 = __Pyx_PyObject_GetAttrStr(__pyx_v_lig, __pyx_n_s_shape); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 174, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_32);
                      __pyx_t_5 = NULL;
                      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
                        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
                        if (likely(__pyx_t_5)) {
                          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
                          __Pyx_INCREF(__pyx_t_5);
                          __Pyx_INCREF(function);
                          __Pyx_DECREF_SET(__pyx_t_7, function);
                        }
                      }
                      if (!__pyx_t_5) {
                        __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_32); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 174, __pyx_L40_error)
                        __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                        __Pyx_GOTREF(__pyx_t_8);
                      } else {
                        #if CYTHON_FAST_PYCALL
                        if (PyFunction_Check(__pyx_t_7)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_32};
                          __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 174, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                          __Pyx_GOTREF(__pyx_t_8);
                          __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                        } else
                        #endif
                        #if CYTHON_FAST_PYCCALL
                        if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_32};
                          __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 174, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                          __Pyx_GOTREF(__pyx_t_8);
                          __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                        } else
                        #endif
                        {
                          __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 174, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_10);
                          __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); __pyx_t_5 = NULL;
                          __Pyx_GIVEREF(__pyx_t_32);
                          PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_32);
                          __pyx_t_32 = 0;
                          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 174, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                        }
                      }
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                      __Pyx_XDECREF_SET(__pyx_v_mask, __pyx_t_8);
                      __pyx_t_8 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":175
 *                             hii = lig[ind]
 *                             mask = np.zeros(lig.shape)
 *                             mask[ind] = 1             # <<<<<<<<<<<<<<
 *                             lig2 = abs(ma.masked_array(lig, mask))
 *                             #lig[:ind] + lig[ind+1:]
 */
                      if (unlikely(PyObject_SetItem(__pyx_v_mask, __pyx_v_ind, __pyx_int_1) < 0)) __PYX_ERR(0, 175, __pyx_L40_error)

                      /* "metaphor/chem_gm/core/gmtoolbox.py":176
 *                             mask = np.zeros(lig.shape)
 *                             mask[ind] = 1
 *                             lig2 = abs(ma.masked_array(lig, mask))             # <<<<<<<<<<<<<<
 *                             #lig[:ind] + lig[ind+1:]
 *                             hijmean = np.mean(lig2)
 */
                      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 176, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_masked_array); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 176, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_10);
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                      __pyx_t_7 = NULL;
                      __pyx_t_20 = 0;
                      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10);
                        if (likely(__pyx_t_7)) {
                          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                          __Pyx_INCREF(__pyx_t_7);
                          __Pyx_INCREF(function);
                          __Pyx_DECREF_SET(__pyx_t_10, function);
                          __pyx_t_20 = 1;
                        }
                      }
                      #if CYTHON_FAST_PYCALL
                      if (PyFunction_Check(__pyx_t_10)) {
                        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_lig, __pyx_v_mask};
                        __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 176, __pyx_L40_error)
                        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __Pyx_GOTREF(__pyx_t_8);
                      } else
                      #endif
                      #if CYTHON_FAST_PYCCALL
                      if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_lig, __pyx_v_mask};
                        __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 176, __pyx_L40_error)
                        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __Pyx_GOTREF(__pyx_t_8);
                      } else
                      #endif
                      {
                        __pyx_t_32 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 176, __pyx_L40_error)
                        __Pyx_GOTREF(__pyx_t_32);
                        if (__pyx_t_7) {
                          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_32, 0, __pyx_t_7); __pyx_t_7 = NULL;
                        }
                        __Pyx_INCREF(__pyx_v_lig);
                        __Pyx_GIVEREF(__pyx_v_lig);
                        PyTuple_SET_ITEM(__pyx_t_32, 0+__pyx_t_20, __pyx_v_lig);
                        __Pyx_INCREF(__pyx_v_mask);
                        __Pyx_GIVEREF(__pyx_v_mask);
                        PyTuple_SET_ITEM(__pyx_t_32, 1+__pyx_t_20, __pyx_v_mask);
                        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_32, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 176, __pyx_L40_error)
                        __Pyx_GOTREF(__pyx_t_8);
                        __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                      }
                      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                      __pyx_t_10 = __Pyx_PyNumber_Absolute(__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 176, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_10);
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                      __Pyx_XDECREF_SET(__pyx_v_lig2, __pyx_t_10);
                      __pyx_t_10 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":178
 *                             lig2 = abs(ma.masked_array(lig, mask))
 *                             #lig[:ind] + lig[ind+1:]
 *                             hijmean = np.mean(lig2)             # <<<<<<<<<<<<<<
 *                             hijmin = np.min(lig2)
 *                             hijmax = np.max(lig2)
 */
                      __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 178, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __pyx_t_32 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_mean); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 178, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_32);
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                      __pyx_t_8 = NULL;
                      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_32))) {
                        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_32);
                        if (likely(__pyx_t_8)) {
                          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_32);
                          __Pyx_INCREF(__pyx_t_8);
                          __Pyx_INCREF(function);
                          __Pyx_DECREF_SET(__pyx_t_32, function);
                        }
                      }
                      if (!__pyx_t_8) {
                        __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_32, __pyx_v_lig2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 178, __pyx_L40_error)
                        __Pyx_GOTREF(__pyx_t_10);
                      } else {
                        #if CYTHON_FAST_PYCALL
                        if (PyFunction_Check(__pyx_t_32)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_lig2};
                          __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_32, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 178, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                          __Pyx_GOTREF(__pyx_t_10);
                        } else
                        #endif
                        #if CYTHON_FAST_PYCCALL
                        if (__Pyx_PyFastCFunction_Check(__pyx_t_32)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_lig2};
                          __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_32, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 178, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                          __Pyx_GOTREF(__pyx_t_10);
                        } else
                        #endif
                        {
                          __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 178, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_7);
                          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL;
                          __Pyx_INCREF(__pyx_v_lig2);
                          __Pyx_GIVEREF(__pyx_v_lig2);
                          PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_lig2);
                          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_32, __pyx_t_7, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 178, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_10);
                          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        }
                      }
                      __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                      __Pyx_XDECREF_SET(__pyx_v_hijmean, __pyx_t_10);
                      __pyx_t_10 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":179
 *                             #lig[:ind] + lig[ind+1:]
 *                             hijmean = np.mean(lig2)
 *                             hijmin = np.min(lig2)             # <<<<<<<<<<<<<<
 *                             hijmax = np.max(lig2)
 *                             #if left:
 */
                      __pyx_t_32 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 179, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_32);
                      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_32, __pyx_n_s_min_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 179, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                      __pyx_t_32 = NULL;
                      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
                        __pyx_t_32 = PyMethod_GET_SELF(__pyx_t_7);
                        if (likely(__pyx_t_32)) {
                          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
                          __Pyx_INCREF(__pyx_t_32);
                          __Pyx_INCREF(function);
                          __Pyx_DECREF_SET(__pyx_t_7, function);
                        }
                      }
                      if (!__pyx_t_32) {
                        __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_lig2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 179, __pyx_L40_error)
                        __Pyx_GOTREF(__pyx_t_10);
                      } else {
                        #if CYTHON_FAST_PYCALL
                        if (PyFunction_Check(__pyx_t_7)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_32, __pyx_v_lig2};
                          __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 179, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_32); __pyx_t_32 = 0;
                          __Pyx_GOTREF(__pyx_t_10);
                        } else
                        #endif
                        #if CYTHON_FAST_PYCCALL
                        if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_32, __pyx_v_lig2};
                          __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 179, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_32); __pyx_t_32 = 0;
                          __Pyx_GOTREF(__pyx_t_10);
                        } else
                        #endif
                        {
                          __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 179, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          __Pyx_GIVEREF(__pyx_t_32); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_32); __pyx_t_32 = NULL;
                          __Pyx_INCREF(__pyx_v_lig2);
                          __Pyx_GIVEREF(__pyx_v_lig2);
                          PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_lig2);
                          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 179, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_10);
                          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        }
                      }
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                      __Pyx_XDECREF_SET(__pyx_v_hijmin, __pyx_t_10);
                      __pyx_t_10 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":180
 *                             hijmean = np.mean(lig2)
 *                             hijmin = np.min(lig2)
 *                             hijmax = np.max(lig2)             # <<<<<<<<<<<<<<
 *                             #if left:
 *                             #    xl.write_row((left[ind], hii, hijmean, hijmin, hijmax), newline=True)
 */
                      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 180, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_max_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 180, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                      __pyx_t_7 = NULL;
                      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
                        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
                        if (likely(__pyx_t_7)) {
                          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
                          __Pyx_INCREF(__pyx_t_7);
                          __Pyx_INCREF(function);
                          __Pyx_DECREF_SET(__pyx_t_8, function);
                        }
                      }
                      if (!__pyx_t_7) {
                        __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_lig2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 180, __pyx_L40_error)
                        __Pyx_GOTREF(__pyx_t_10);
                      } else {
                        #if CYTHON_FAST_PYCALL
                        if (PyFunction_Check(__pyx_t_8)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_lig2};
                          __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 180, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                          __Pyx_GOTREF(__pyx_t_10);
                        } else
                        #endif
                        #if CYTHON_FAST_PYCCALL
                        if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_lig2};
                          __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 180, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                          __Pyx_GOTREF(__pyx_t_10);
                        } else
                        #endif
                        {
                          __pyx_t_32 = PyTuple_New(1+1); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 180, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_32);
                          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_32, 0, __pyx_t_7); __pyx_t_7 = NULL;
                          __Pyx_INCREF(__pyx_v_lig2);
                          __Pyx_GIVEREF(__pyx_v_lig2);
                          PyTuple_SET_ITEM(__pyx_t_32, 0+1, __pyx_v_lig2);
                          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_32, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 180, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_10);
                          __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                        }
                      }
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                      __Pyx_XDECREF_SET(__pyx_v_hijmax, __pyx_t_10);
                      __pyx_t_10 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":184
 *                             #    xl.write_row((left[ind], hii, hijmean, hijmin, hijmax), newline=True)
 *                             #else:
 *                             xl.write_row((hii, hijmean, hijmin, hijmax), newline=True)             # <<<<<<<<<<<<<<
 * 
 * 
 */
                      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_write_row); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 184, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_10);
                      __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 184, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __Pyx_INCREF(__pyx_v_hii);
                      __Pyx_GIVEREF(__pyx_v_hii);
                      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_hii);
                      __Pyx_INCREF(__pyx_v_hijmean);
                      __Pyx_GIVEREF(__pyx_v_hijmean);
                      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_hijmean);
                      __Pyx_INCREF(__pyx_v_hijmin);
                      __Pyx_GIVEREF(__pyx_v_hijmin);
                      PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_hijmin);
                      __Pyx_INCREF(__pyx_v_hijmax);
                      __Pyx_GIVEREF(__pyx_v_hijmax);
                      PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_v_hijmax);
                      __pyx_t_32 = PyTuple_New(1); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 184, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_32);
                      __Pyx_GIVEREF(__pyx_t_8);
                      PyTuple_SET_ITEM(__pyx_t_32, 0, __pyx_t_8);
                      __pyx_t_8 = 0;
                      __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 184, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_newline, Py_True) < 0) __PYX_ERR(0, 184, __pyx_L40_error)
                      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_32, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 184, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                      __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":172
 * 
 *                         #xl.write(projMat, triangle=1)
 *                         for ind, lig in enumerate(projMat):             # <<<<<<<<<<<<<<
 *                             hii = lig[ind]
 *                             mask = np.zeros(lig.shape)
 */
                    }
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

                    /* "metaphor/chem_gm/core/gmtoolbox.py":187
 * 
 * 
 *                         if minmax:             # <<<<<<<<<<<<<<
 *                             xl.currow = rowend + 1
 *                             xl.curcol = 0
 */
                    __pyx_t_29 = __Pyx_PyObject_IsTrue(__pyx_v_minmax); if (unlikely(__pyx_t_29 < 0)) __PYX_ERR(0, 187, __pyx_L40_error)
                    if (__pyx_t_29) {

                      /* "metaphor/chem_gm/core/gmtoolbox.py":188
 * 
 *                         if minmax:
 *                             xl.currow = rowend + 1             # <<<<<<<<<<<<<<
 *                             xl.curcol = 0
 *                             xl.write([minmaxst])  #, newline=True)
 */
                      __pyx_t_12 = __Pyx_PyInt_AddObjC(__pyx_v_rowend, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 188, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_12);
                      if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_currow, __pyx_t_12) < 0) __PYX_ERR(0, 188, __pyx_L40_error)
                      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":189
 *                         if minmax:
 *                             xl.currow = rowend + 1
 *                             xl.curcol = 0             # <<<<<<<<<<<<<<
 *                             xl.write([minmaxst])  #, newline=True)
 *                             xl.curcol = col0 - 1
 */
                      if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_curcol, __pyx_int_0) < 0) __PYX_ERR(0, 189, __pyx_L40_error)

                      /* "metaphor/chem_gm/core/gmtoolbox.py":190
 *                             xl.currow = rowend + 1
 *                             xl.curcol = 0
 *                             xl.write([minmaxst])  #, newline=True)             # <<<<<<<<<<<<<<
 *                             xl.curcol = col0 - 1
 *                             res = getMinMaxMatrixSym(projMat, nb = minmaxsize,
 */
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 190, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 190, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_INCREF(__pyx_v_minmaxst);
                      __Pyx_GIVEREF(__pyx_v_minmaxst);
                      PyList_SET_ITEM(__pyx_t_7, 0, __pyx_v_minmaxst);
                      __pyx_t_8 = NULL;
                      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
                        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
                        if (likely(__pyx_t_8)) {
                          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
                          __Pyx_INCREF(__pyx_t_8);
                          __Pyx_INCREF(function);
                          __Pyx_DECREF_SET(__pyx_t_4, function);
                        }
                      }
                      if (!__pyx_t_8) {
                        __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 190, __pyx_L40_error)
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __Pyx_GOTREF(__pyx_t_12);
                      } else {
                        #if CYTHON_FAST_PYCALL
                        if (PyFunction_Check(__pyx_t_4)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
                          __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 190, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                          __Pyx_GOTREF(__pyx_t_12);
                          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        } else
                        #endif
                        #if CYTHON_FAST_PYCCALL
                        if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
                          __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 190, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                          __Pyx_GOTREF(__pyx_t_12);
                          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        } else
                        #endif
                        {
                          __pyx_t_32 = PyTuple_New(1+1); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 190, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_32);
                          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_32, 0, __pyx_t_8); __pyx_t_8 = NULL;
                          __Pyx_GIVEREF(__pyx_t_7);
                          PyTuple_SET_ITEM(__pyx_t_32, 0+1, __pyx_t_7);
                          __pyx_t_7 = 0;
                          __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_32, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 190, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_12);
                          __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                        }
                      }
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":191
 *                             xl.curcol = 0
 *                             xl.write([minmaxst])  #, newline=True)
 *                             xl.curcol = col0 - 1             # <<<<<<<<<<<<<<
 *                             res = getMinMaxMatrixSym(projMat, nb = minmaxsize,
 *                                                      withdiag=False)
 */
                      __pyx_t_12 = __Pyx_PyInt_SubtractObjC(__pyx_v_col0, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 191, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_12);
                      if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_curcol, __pyx_t_12) < 0) __PYX_ERR(0, 191, __pyx_L40_error)
                      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":192
 *                             xl.write([minmaxst])  #, newline=True)
 *                             xl.curcol = col0 - 1
 *                             res = getMinMaxMatrixSym(projMat, nb = minmaxsize,             # <<<<<<<<<<<<<<
 *                                                      withdiag=False)
 *                             mmlst0 =  np.asarray([(left[val[0]], left[val[1]],
 */
                      __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_getMinMaxMatrixSym); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 192, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_12);
                      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 192, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_INCREF(__pyx_v_projMat);
                      __Pyx_GIVEREF(__pyx_v_projMat);
                      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_projMat);
                      __pyx_t_32 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 192, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_32);
                      if (PyDict_SetItem(__pyx_t_32, __pyx_n_s_nb, __pyx_v_minmaxsize) < 0) __PYX_ERR(0, 192, __pyx_L40_error)

                      /* "metaphor/chem_gm/core/gmtoolbox.py":193
 *                             xl.curcol = col0 - 1
 *                             res = getMinMaxMatrixSym(projMat, nb = minmaxsize,
 *                                                      withdiag=False)             # <<<<<<<<<<<<<<
 *                             mmlst0 =  np.asarray([(left[val[0]], left[val[1]],
 *                                             projMat[val]) for val in res[0]])
 */
                      if (PyDict_SetItem(__pyx_t_32, __pyx_n_s_withdiag, Py_False) < 0) __PYX_ERR(0, 192, __pyx_L40_error)

                      /* "metaphor/chem_gm/core/gmtoolbox.py":192
 *                             xl.write([minmaxst])  #, newline=True)
 *                             xl.curcol = col0 - 1
 *                             res = getMinMaxMatrixSym(projMat, nb = minmaxsize,             # <<<<<<<<<<<<<<
 *                                                      withdiag=False)
 *                             mmlst0 =  np.asarray([(left[val[0]], left[val[1]],
 */
                      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_4, __pyx_t_32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 192, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                      __Pyx_XDECREF_SET(__pyx_v_res, __pyx_t_7);
                      __pyx_t_7 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":194
 *                             res = getMinMaxMatrixSym(projMat, nb = minmaxsize,
 *                                                      withdiag=False)
 *                             mmlst0 =  np.asarray([(left[val[0]], left[val[1]],             # <<<<<<<<<<<<<<
 *                                             projMat[val]) for val in res[0]])
 *                             mmlst1 =  np.asarray([(left[val[0]], left[val[1]],
 */
                      __pyx_t_32 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 194, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_32);
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_32, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 194, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                      { /* enter inner scope */
                        __pyx_t_32 = PyList_New(0); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 194, __pyx_L70_error)
                        __Pyx_GOTREF(__pyx_t_32);

                        /* "metaphor/chem_gm/core/gmtoolbox.py":195
 *                                                      withdiag=False)
 *                             mmlst0 =  np.asarray([(left[val[0]], left[val[1]],
 *                                             projMat[val]) for val in res[0]])             # <<<<<<<<<<<<<<
 *                             mmlst1 =  np.asarray([(left[val[0]], left[val[1]],
 *                                             projMat[val]) for val in res[1]])
 */
                        __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_res, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 195, __pyx_L70_error)
                        __Pyx_GOTREF(__pyx_t_12);
                        if (likely(PyList_CheckExact(__pyx_t_12)) || PyTuple_CheckExact(__pyx_t_12)) {
                          __pyx_t_8 = __pyx_t_12; __Pyx_INCREF(__pyx_t_8); __pyx_t_1 = 0;
                          __pyx_t_34 = NULL;
                        } else {
                          __pyx_t_1 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 195, __pyx_L70_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          __pyx_t_34 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_34)) __PYX_ERR(0, 195, __pyx_L70_error)
                        }
                        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                        for (;;) {
                          if (likely(!__pyx_t_34)) {
                            if (likely(PyList_CheckExact(__pyx_t_8))) {
                              if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_8)) break;
                              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                              __pyx_t_12 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_1); __Pyx_INCREF(__pyx_t_12); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 195, __pyx_L70_error)
                              #else
                              __pyx_t_12 = PySequence_ITEM(__pyx_t_8, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 195, __pyx_L70_error)
                              __Pyx_GOTREF(__pyx_t_12);
                              #endif
                            } else {
                              if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
                              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                              __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_1); __Pyx_INCREF(__pyx_t_12); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 195, __pyx_L70_error)
                              #else
                              __pyx_t_12 = PySequence_ITEM(__pyx_t_8, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 195, __pyx_L70_error)
                              __Pyx_GOTREF(__pyx_t_12);
                              #endif
                            }
                          } else {
                            __pyx_t_12 = __pyx_t_34(__pyx_t_8);
                            if (unlikely(!__pyx_t_12)) {
                              PyObject* exc_type = PyErr_Occurred();
                              if (exc_type) {
                                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                                else __PYX_ERR(0, 195, __pyx_L70_error)
                              }
                              break;
                            }
                            __Pyx_GOTREF(__pyx_t_12);
                          }
                          __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_val, __pyx_t_12);
                          __pyx_t_12 = 0;

                          /* "metaphor/chem_gm/core/gmtoolbox.py":194
 *                             res = getMinMaxMatrixSym(projMat, nb = minmaxsize,
 *                                                      withdiag=False)
 *                             mmlst0 =  np.asarray([(left[val[0]], left[val[1]],             # <<<<<<<<<<<<<<
 *                                             projMat[val]) for val in res[0]])
 *                             mmlst1 =  np.asarray([(left[val[0]], left[val[1]],
 */
                          __pyx_t_12 = __Pyx_GetItemInt(__pyx_8genexpr3__pyx_v_val, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 194, __pyx_L70_error)
                          __Pyx_GOTREF(__pyx_t_12);
                          __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_left, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 194, __pyx_L70_error)
                          __Pyx_GOTREF(__pyx_t_10);
                          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                          __pyx_t_12 = __Pyx_GetItemInt(__pyx_8genexpr3__pyx_v_val, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 194, __pyx_L70_error)
                          __Pyx_GOTREF(__pyx_t_12);
                          __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_left, __pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 194, __pyx_L70_error)
                          __Pyx_GOTREF(__pyx_t_5);
                          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

                          /* "metaphor/chem_gm/core/gmtoolbox.py":195
 *                                                      withdiag=False)
 *                             mmlst0 =  np.asarray([(left[val[0]], left[val[1]],
 *                                             projMat[val]) for val in res[0]])             # <<<<<<<<<<<<<<
 *                             mmlst1 =  np.asarray([(left[val[0]], left[val[1]],
 *                                             projMat[val]) for val in res[1]])
 */
                          __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_v_projMat, __pyx_8genexpr3__pyx_v_val); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 195, __pyx_L70_error)
                          __Pyx_GOTREF(__pyx_t_12);

                          /* "metaphor/chem_gm/core/gmtoolbox.py":194
 *                             res = getMinMaxMatrixSym(projMat, nb = minmaxsize,
 *                                                      withdiag=False)
 *                             mmlst0 =  np.asarray([(left[val[0]], left[val[1]],             # <<<<<<<<<<<<<<
 *                                             projMat[val]) for val in res[0]])
 *                             mmlst1 =  np.asarray([(left[val[0]], left[val[1]],
 */
                          __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 194, __pyx_L70_error)
                          __Pyx_GOTREF(__pyx_t_9);
                          __Pyx_GIVEREF(__pyx_t_10);
                          PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10);
                          __Pyx_GIVEREF(__pyx_t_5);
                          PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_5);
                          __Pyx_GIVEREF(__pyx_t_12);
                          PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_12);
                          __pyx_t_10 = 0;
                          __pyx_t_5 = 0;
                          __pyx_t_12 = 0;
                          if (unlikely(__Pyx_ListComp_Append(__pyx_t_32, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 194, __pyx_L70_error)
                          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

                          /* "metaphor/chem_gm/core/gmtoolbox.py":195
 *                                                      withdiag=False)
 *                             mmlst0 =  np.asarray([(left[val[0]], left[val[1]],
 *                                             projMat[val]) for val in res[0]])             # <<<<<<<<<<<<<<
 *                             mmlst1 =  np.asarray([(left[val[0]], left[val[1]],
 *                                             projMat[val]) for val in res[1]])
 */
                        }
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_val); __pyx_8genexpr3__pyx_v_val = 0;
                        goto __pyx_L73_exit_scope;
                        __pyx_L70_error:;
                        __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_val); __pyx_8genexpr3__pyx_v_val = 0;
                        goto __pyx_L40_error;
                        __pyx_L73_exit_scope:;
                      } /* exit inner scope */
                      __pyx_t_8 = NULL;
                      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
                        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
                        if (likely(__pyx_t_8)) {
                          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
                          __Pyx_INCREF(__pyx_t_8);
                          __Pyx_INCREF(function);
                          __Pyx_DECREF_SET(__pyx_t_4, function);
                        }
                      }
                      if (!__pyx_t_8) {
                        __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 194, __pyx_L40_error)
                        __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                        __Pyx_GOTREF(__pyx_t_7);
                      } else {
                        #if CYTHON_FAST_PYCALL
                        if (PyFunction_Check(__pyx_t_4)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_32};
                          __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 194, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                          __Pyx_GOTREF(__pyx_t_7);
                          __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                        } else
                        #endif
                        #if CYTHON_FAST_PYCCALL
                        if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_32};
                          __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 194, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                          __Pyx_GOTREF(__pyx_t_7);
                          __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                        } else
                        #endif
                        {
                          __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 194, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_9);
                          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
                          __Pyx_GIVEREF(__pyx_t_32);
                          PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_32);
                          __pyx_t_32 = 0;
                          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 194, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_7);
                          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                        }
                      }
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __Pyx_XDECREF_SET(__pyx_v_mmlst0, __pyx_t_7);
                      __pyx_t_7 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":196
 *                             mmlst0 =  np.asarray([(left[val[0]], left[val[1]],
 *                                             projMat[val]) for val in res[0]])
 *                             mmlst1 =  np.asarray([(left[val[0]], left[val[1]],             # <<<<<<<<<<<<<<
 *                                             projMat[val]) for val in res[1]])
 *                             xl.currow += 1
 */
                      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 196, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 196, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_9);
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      { /* enter inner scope */
                        __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 196, __pyx_L76_error)
                        __Pyx_GOTREF(__pyx_t_4);

                        /* "metaphor/chem_gm/core/gmtoolbox.py":197
 *                                             projMat[val]) for val in res[0]])
 *                             mmlst1 =  np.asarray([(left[val[0]], left[val[1]],
 *                                             projMat[val]) for val in res[1]])             # <<<<<<<<<<<<<<
 *                             xl.currow += 1
 *                             xl.write(mmlst0)
 */
                        __pyx_t_32 = __Pyx_GetItemInt(__pyx_v_res, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 197, __pyx_L76_error)
                        __Pyx_GOTREF(__pyx_t_32);
                        if (likely(PyList_CheckExact(__pyx_t_32)) || PyTuple_CheckExact(__pyx_t_32)) {
                          __pyx_t_8 = __pyx_t_32; __Pyx_INCREF(__pyx_t_8); __pyx_t_1 = 0;
                          __pyx_t_34 = NULL;
                        } else {
                          __pyx_t_1 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_32); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 197, __pyx_L76_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          __pyx_t_34 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_34)) __PYX_ERR(0, 197, __pyx_L76_error)
                        }
                        __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                        for (;;) {
                          if (likely(!__pyx_t_34)) {
                            if (likely(PyList_CheckExact(__pyx_t_8))) {
                              if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_8)) break;
                              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                              __pyx_t_32 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_1); __Pyx_INCREF(__pyx_t_32); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 197, __pyx_L76_error)
                              #else
                              __pyx_t_32 = PySequence_ITEM(__pyx_t_8, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 197, __pyx_L76_error)
                              __Pyx_GOTREF(__pyx_t_32);
                              #endif
                            } else {
                              if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
                              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                              __pyx_t_32 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_1); __Pyx_INCREF(__pyx_t_32); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 197, __pyx_L76_error)
                              #else
                              __pyx_t_32 = PySequence_ITEM(__pyx_t_8, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 197, __pyx_L76_error)
                              __Pyx_GOTREF(__pyx_t_32);
                              #endif
                            }
                          } else {
                            __pyx_t_32 = __pyx_t_34(__pyx_t_8);
                            if (unlikely(!__pyx_t_32)) {
                              PyObject* exc_type = PyErr_Occurred();
                              if (exc_type) {
                                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                                else __PYX_ERR(0, 197, __pyx_L76_error)
                              }
                              break;
                            }
                            __Pyx_GOTREF(__pyx_t_32);
                          }
                          __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_val, __pyx_t_32);
                          __pyx_t_32 = 0;

                          /* "metaphor/chem_gm/core/gmtoolbox.py":196
 *                             mmlst0 =  np.asarray([(left[val[0]], left[val[1]],
 *                                             projMat[val]) for val in res[0]])
 *                             mmlst1 =  np.asarray([(left[val[0]], left[val[1]],             # <<<<<<<<<<<<<<
 *                                             projMat[val]) for val in res[1]])
 *                             xl.currow += 1
 */
                          __pyx_t_32 = __Pyx_GetItemInt(__pyx_8genexpr4__pyx_v_val, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 196, __pyx_L76_error)
                          __Pyx_GOTREF(__pyx_t_32);
                          __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_v_left, __pyx_t_32); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 196, __pyx_L76_error)
                          __Pyx_GOTREF(__pyx_t_12);
                          __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                          __pyx_t_32 = __Pyx_GetItemInt(__pyx_8genexpr4__pyx_v_val, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 196, __pyx_L76_error)
                          __Pyx_GOTREF(__pyx_t_32);
                          __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_left, __pyx_t_32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L76_error)
                          __Pyx_GOTREF(__pyx_t_5);
                          __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;

                          /* "metaphor/chem_gm/core/gmtoolbox.py":197
 *                                             projMat[val]) for val in res[0]])
 *                             mmlst1 =  np.asarray([(left[val[0]], left[val[1]],
 *                                             projMat[val]) for val in res[1]])             # <<<<<<<<<<<<<<
 *                             xl.currow += 1
 *                             xl.write(mmlst0)
 */
                          __pyx_t_32 = __Pyx_PyObject_GetItem(__pyx_v_projMat, __pyx_8genexpr4__pyx_v_val); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 197, __pyx_L76_error)
                          __Pyx_GOTREF(__pyx_t_32);

                          /* "metaphor/chem_gm/core/gmtoolbox.py":196
 *                             mmlst0 =  np.asarray([(left[val[0]], left[val[1]],
 *                                             projMat[val]) for val in res[0]])
 *                             mmlst1 =  np.asarray([(left[val[0]], left[val[1]],             # <<<<<<<<<<<<<<
 *                                             projMat[val]) for val in res[1]])
 *                             xl.currow += 1
 */
                          __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 196, __pyx_L76_error)
                          __Pyx_GOTREF(__pyx_t_10);
                          __Pyx_GIVEREF(__pyx_t_12);
                          PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_12);
                          __Pyx_GIVEREF(__pyx_t_5);
                          PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_5);
                          __Pyx_GIVEREF(__pyx_t_32);
                          PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_32);
                          __pyx_t_12 = 0;
                          __pyx_t_5 = 0;
                          __pyx_t_32 = 0;
                          if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 196, __pyx_L76_error)
                          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

                          /* "metaphor/chem_gm/core/gmtoolbox.py":197
 *                                             projMat[val]) for val in res[0]])
 *                             mmlst1 =  np.asarray([(left[val[0]], left[val[1]],
 *                                             projMat[val]) for val in res[1]])             # <<<<<<<<<<<<<<
 *                             xl.currow += 1
 *                             xl.write(mmlst0)
 */
                        }
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_val); __pyx_8genexpr4__pyx_v_val = 0;
                        goto __pyx_L79_exit_scope;
                        __pyx_L76_error:;
                        __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_val); __pyx_8genexpr4__pyx_v_val = 0;
                        goto __pyx_L40_error;
                        __pyx_L79_exit_scope:;
                      } /* exit inner scope */
                      __pyx_t_8 = NULL;
                      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
                        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
                        if (likely(__pyx_t_8)) {
                          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                          __Pyx_INCREF(__pyx_t_8);
                          __Pyx_INCREF(function);
                          __Pyx_DECREF_SET(__pyx_t_9, function);
                        }
                      }
                      if (!__pyx_t_8) {
                        __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 196, __pyx_L40_error)
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_GOTREF(__pyx_t_7);
                      } else {
                        #if CYTHON_FAST_PYCALL
                        if (PyFunction_Check(__pyx_t_9)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_4};
                          __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 196, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                          __Pyx_GOTREF(__pyx_t_7);
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        } else
                        #endif
                        #if CYTHON_FAST_PYCCALL
                        if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_4};
                          __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 196, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                          __Pyx_GOTREF(__pyx_t_7);
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        } else
                        #endif
                        {
                          __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 196, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_10);
                          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
                          __Pyx_GIVEREF(__pyx_t_4);
                          PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_4);
                          __pyx_t_4 = 0;
                          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 196, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_7);
                          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                        }
                      }
                      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                      __Pyx_XDECREF_SET(__pyx_v_mmlst1, __pyx_t_7);
                      __pyx_t_7 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":198
 *                             mmlst1 =  np.asarray([(left[val[0]], left[val[1]],
 *                                             projMat[val]) for val in res[1]])
 *                             xl.currow += 1             # <<<<<<<<<<<<<<
 *                             xl.write(mmlst0)
 *                             xl.currow += 1
 */
                      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_currow); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 198, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_t_7, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 198, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_9);
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                      if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_currow, __pyx_t_9) < 0) __PYX_ERR(0, 198, __pyx_L40_error)
                      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":199
 *                                             projMat[val]) for val in res[1]])
 *                             xl.currow += 1
 *                             xl.write(mmlst0)             # <<<<<<<<<<<<<<
 *                             xl.currow += 1
 *                             xl.write(mmlst1)
 */
                      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_write); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 199, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_t_10 = NULL;
                      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
                        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
                        if (likely(__pyx_t_10)) {
                          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
                          __Pyx_INCREF(__pyx_t_10);
                          __Pyx_INCREF(function);
                          __Pyx_DECREF_SET(__pyx_t_7, function);
                        }
                      }
                      if (!__pyx_t_10) {
                        __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_mmlst0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 199, __pyx_L40_error)
                        __Pyx_GOTREF(__pyx_t_9);
                      } else {
                        #if CYTHON_FAST_PYCALL
                        if (PyFunction_Check(__pyx_t_7)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_mmlst0};
                          __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 199, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                          __Pyx_GOTREF(__pyx_t_9);
                        } else
                        #endif
                        #if CYTHON_FAST_PYCCALL
                        if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_mmlst0};
                          __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 199, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                          __Pyx_GOTREF(__pyx_t_9);
                        } else
                        #endif
                        {
                          __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_4);
                          __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_10); __pyx_t_10 = NULL;
                          __Pyx_INCREF(__pyx_v_mmlst0);
                          __Pyx_GIVEREF(__pyx_v_mmlst0);
                          PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_mmlst0);
                          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 199, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_9);
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        }
                      }
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":200
 *                             xl.currow += 1
 *                             xl.write(mmlst0)
 *                             xl.currow += 1             # <<<<<<<<<<<<<<
 *                             xl.write(mmlst1)
 *                             rowend = xl.currow
 */
                      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_currow); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 200, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_9);
                      __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_9, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 200, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                      if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_currow, __pyx_t_7) < 0) __PYX_ERR(0, 200, __pyx_L40_error)
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":201
 *                             xl.write(mmlst0)
 *                             xl.currow += 1
 *                             xl.write(mmlst1)             # <<<<<<<<<<<<<<
 *                             rowend = xl.currow
 *                             xl.currow = cur
 */
                      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_write); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 201, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_9);
                      __pyx_t_4 = NULL;
                      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
                        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
                        if (likely(__pyx_t_4)) {
                          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                          __Pyx_INCREF(__pyx_t_4);
                          __Pyx_INCREF(function);
                          __Pyx_DECREF_SET(__pyx_t_9, function);
                        }
                      }
                      if (!__pyx_t_4) {
                        __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_mmlst1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 201, __pyx_L40_error)
                        __Pyx_GOTREF(__pyx_t_7);
                      } else {
                        #if CYTHON_FAST_PYCALL
                        if (PyFunction_Check(__pyx_t_9)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_mmlst1};
                          __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 201, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_GOTREF(__pyx_t_7);
                        } else
                        #endif
                        #if CYTHON_FAST_PYCCALL
                        if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_mmlst1};
                          __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 201, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_GOTREF(__pyx_t_7);
                        } else
                        #endif
                        {
                          __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 201, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_10);
                          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); __pyx_t_4 = NULL;
                          __Pyx_INCREF(__pyx_v_mmlst1);
                          __Pyx_GIVEREF(__pyx_v_mmlst1);
                          PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_mmlst1);
                          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 201, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_7);
                          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                        }
                      }
                      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":202
 *                             xl.currow += 1
 *                             xl.write(mmlst1)
 *                             rowend = xl.currow             # <<<<<<<<<<<<<<
 *                             xl.currow = cur
 * 
 */
                      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_currow); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 202, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF_SET(__pyx_v_rowend, __pyx_t_7);
                      __pyx_t_7 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":203
 *                             xl.write(mmlst1)
 *                             rowend = xl.currow
 *                             xl.currow = cur             # <<<<<<<<<<<<<<
 * 
 *                     if dispMat is not None:
 */
                      if (unlikely(!__pyx_v_cur)) { __Pyx_RaiseUnboundLocalError("cur"); __PYX_ERR(0, 203, __pyx_L40_error) }
                      if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_currow, __pyx_v_cur) < 0) __PYX_ERR(0, 203, __pyx_L40_error)

                      /* "metaphor/chem_gm/core/gmtoolbox.py":187
 * 
 * 
 *                         if minmax:             # <<<<<<<<<<<<<<
 *                             xl.currow = rowend + 1
 *                             xl.curcol = 0
 */
                    }

                    /* "metaphor/chem_gm/core/gmtoolbox.py":146
 *                     minmaxst = "absolute %d max & %d min"%(minmaxsize,
 *                                                            minmaxsize)
 *                     if projMat is not None:             # <<<<<<<<<<<<<<
 * 
 *                         if (shortTitles is not None) and len(shortTitles) >= 1:
 */
                  }

                  /* "metaphor/chem_gm/core/gmtoolbox.py":205
 *                             xl.currow = cur
 * 
 *                     if dispMat is not None:             # <<<<<<<<<<<<<<
 *                         if (shortTitles is not None) and len(shortTitles) >= 2:
 *                             lst = sheet.split("_")
 */
                  __pyx_t_29 = (__pyx_v_dispMat != Py_None);
                  __pyx_t_28 = (__pyx_t_29 != 0);
                  if (__pyx_t_28) {

                    /* "metaphor/chem_gm/core/gmtoolbox.py":206
 * 
 *                     if dispMat is not None:
 *                         if (shortTitles is not None) and len(shortTitles) >= 2:             # <<<<<<<<<<<<<<
 *                             lst = sheet.split("_")
 *                             xl.add_worksheet("%s_%s"%(lst[-1], shortTitles[1]))
 */
                    __pyx_t_29 = (__pyx_v_shortTitles != Py_None);
                    __pyx_t_2 = (__pyx_t_29 != 0);
                    if (__pyx_t_2) {
                    } else {
                      __pyx_t_28 = __pyx_t_2;
                      goto __pyx_L82_bool_binop_done;
                    }
                    __pyx_t_1 = PyObject_Length(__pyx_v_shortTitles); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 206, __pyx_L40_error)
                    __pyx_t_2 = ((__pyx_t_1 >= 2) != 0);
                    __pyx_t_28 = __pyx_t_2;
                    __pyx_L82_bool_binop_done:;
                    if (__pyx_t_28) {

                      /* "metaphor/chem_gm/core/gmtoolbox.py":207
 *                     if dispMat is not None:
 *                         if (shortTitles is not None) and len(shortTitles) >= 2:
 *                             lst = sheet.split("_")             # <<<<<<<<<<<<<<
 *                             xl.add_worksheet("%s_%s"%(lst[-1], shortTitles[1]))
 *                             col0 = 1
 */
                      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sheet, __pyx_n_s_split); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 207, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 207, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_9);
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                      __Pyx_XDECREF_SET(__pyx_v_lst, __pyx_t_9);
                      __pyx_t_9 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":208
 *                         if (shortTitles is not None) and len(shortTitles) >= 2:
 *                             lst = sheet.split("_")
 *                             xl.add_worksheet("%s_%s"%(lst[-1], shortTitles[1]))             # <<<<<<<<<<<<<<
 *                             col0 = 1
 *                             row0 = 0
 */
                      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_add_worksheet); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 208, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 208, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_10);
                      __pyx_t_1 = 0;
                      __pyx_t_35 = 127;
                      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_lst, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 208, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 208, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __pyx_t_35 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_35) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_35;
                      __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
                      __Pyx_GIVEREF(__pyx_t_8);
                      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8);
                      __pyx_t_8 = 0;
                      __Pyx_INCREF(__pyx_n_u__5);
                      __pyx_t_1 += 1;
                      __Pyx_GIVEREF(__pyx_n_u__5);
                      PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_n_u__5);
                      __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_shortTitles, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 208, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_8), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 208, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                      __pyx_t_35 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_35) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_35;
                      __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
                      __Pyx_GIVEREF(__pyx_t_4);
                      PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_4);
                      __pyx_t_4 = 0;
                      __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_10, 3, __pyx_t_1, __pyx_t_35); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 208, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                      __pyx_t_10 = NULL;
                      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
                        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
                        if (likely(__pyx_t_10)) {
                          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
                          __Pyx_INCREF(__pyx_t_10);
                          __Pyx_INCREF(function);
                          __Pyx_DECREF_SET(__pyx_t_7, function);
                        }
                      }
                      if (!__pyx_t_10) {
                        __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 208, __pyx_L40_error)
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_GOTREF(__pyx_t_9);
                      } else {
                        #if CYTHON_FAST_PYCALL
                        if (PyFunction_Check(__pyx_t_7)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_4};
                          __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 208, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                          __Pyx_GOTREF(__pyx_t_9);
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        } else
                        #endif
                        #if CYTHON_FAST_PYCCALL
                        if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_4};
                          __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 208, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                          __Pyx_GOTREF(__pyx_t_9);
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        } else
                        #endif
                        {
                          __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 208, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10); __pyx_t_10 = NULL;
                          __Pyx_GIVEREF(__pyx_t_4);
                          PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_4);
                          __pyx_t_4 = 0;
                          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 208, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_9);
                          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        }
                      }
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":209
 *                             lst = sheet.split("_")
 *                             xl.add_worksheet("%s_%s"%(lst[-1], shortTitles[1]))
 *                             col0 = 1             # <<<<<<<<<<<<<<
 *                             row0 = 0
 *                             rowend = row0
 */
                      __Pyx_INCREF(__pyx_int_1);
                      __Pyx_DECREF_SET(__pyx_v_col0, __pyx_int_1);

                      /* "metaphor/chem_gm/core/gmtoolbox.py":210
 *                             xl.add_worksheet("%s_%s"%(lst[-1], shortTitles[1]))
 *                             col0 = 1
 *                             row0 = 0             # <<<<<<<<<<<<<<
 *                             rowend = row0
 *                         N = dispMat.shape[0]
 */
                      __Pyx_INCREF(__pyx_int_0);
                      __Pyx_DECREF_SET(__pyx_v_row0, __pyx_int_0);

                      /* "metaphor/chem_gm/core/gmtoolbox.py":211
 *                             col0 = 1
 *                             row0 = 0
 *                             rowend = row0             # <<<<<<<<<<<<<<
 *                         N = dispMat.shape[0]
 *                         paramlist = head[-N:]
 */
                      __Pyx_INCREF(__pyx_v_row0);
                      __Pyx_DECREF_SET(__pyx_v_rowend, __pyx_v_row0);

                      /* "metaphor/chem_gm/core/gmtoolbox.py":206
 * 
 *                     if dispMat is not None:
 *                         if (shortTitles is not None) and len(shortTitles) >= 2:             # <<<<<<<<<<<<<<
 *                             lst = sheet.split("_")
 *                             xl.add_worksheet("%s_%s"%(lst[-1], shortTitles[1]))
 */
                    }

                    /* "metaphor/chem_gm/core/gmtoolbox.py":212
 *                             row0 = 0
 *                             rowend = row0
 *                         N = dispMat.shape[0]             # <<<<<<<<<<<<<<
 *                         paramlist = head[-N:]
 *                         xl.currow = rowend + 1
 */
                    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_dispMat, __pyx_n_s_shape); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 212, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_9);
                    __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_9, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 212, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_7);
                    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                    __Pyx_XDECREF_SET(__pyx_v_N, __pyx_t_7);
                    __pyx_t_7 = 0;

                    /* "metaphor/chem_gm/core/gmtoolbox.py":213
 *                             rowend = row0
 *                         N = dispMat.shape[0]
 *                         paramlist = head[-N:]             # <<<<<<<<<<<<<<
 *                         xl.currow = rowend + 1
 *                         xl.curcol = col0
 */
                    __pyx_t_7 = PyNumber_Negative(__pyx_v_N); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 213, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_7);
                    __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_head, 0, 0, &__pyx_t_7, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 213, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_9);
                    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                    __Pyx_XDECREF_SET(__pyx_v_paramlist, __pyx_t_9);
                    __pyx_t_9 = 0;

                    /* "metaphor/chem_gm/core/gmtoolbox.py":214
 *                         N = dispMat.shape[0]
 *                         paramlist = head[-N:]
 *                         xl.currow = rowend + 1             # <<<<<<<<<<<<<<
 *                         xl.curcol = col0
 *                         if sourceTitles[2]:
 */
                    __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_v_rowend, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 214, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_9);
                    if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_currow, __pyx_t_9) < 0) __PYX_ERR(0, 214, __pyx_L40_error)
                    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

                    /* "metaphor/chem_gm/core/gmtoolbox.py":215
 *                         paramlist = head[-N:]
 *                         xl.currow = rowend + 1
 *                         xl.curcol = col0             # <<<<<<<<<<<<<<
 *                         if sourceTitles[2]:
 *                             xl.curcol = 0
 */
                    if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_curcol, __pyx_v_col0) < 0) __PYX_ERR(0, 215, __pyx_L40_error)

                    /* "metaphor/chem_gm/core/gmtoolbox.py":216
 *                         xl.currow = rowend + 1
 *                         xl.curcol = col0
 *                         if sourceTitles[2]:             # <<<<<<<<<<<<<<
 *                             xl.curcol = 0
 *                             xl.write([sourceTitles[2]], newline=True)
 */
                    __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_sourceTitles, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 216, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_9);
                    __pyx_t_28 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_28 < 0)) __PYX_ERR(0, 216, __pyx_L40_error)
                    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                    if (__pyx_t_28) {

                      /* "metaphor/chem_gm/core/gmtoolbox.py":217
 *                         xl.curcol = col0
 *                         if sourceTitles[2]:
 *                             xl.curcol = 0             # <<<<<<<<<<<<<<
 *                             xl.write([sourceTitles[2]], newline=True)
 *                             xl.curcol = col0
 */
                      if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_curcol, __pyx_int_0) < 0) __PYX_ERR(0, 217, __pyx_L40_error)

                      /* "metaphor/chem_gm/core/gmtoolbox.py":218
 *                         if sourceTitles[2]:
 *                             xl.curcol = 0
 *                             xl.write([sourceTitles[2]], newline=True)             # <<<<<<<<<<<<<<
 *                             xl.curcol = col0
 *                         if paramlist:
 */
                      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_write); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 218, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_9);
                      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_sourceTitles, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 218, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 218, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __Pyx_GIVEREF(__pyx_t_7);
                      PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
                      __pyx_t_7 = 0;
                      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 218, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_GIVEREF(__pyx_t_8);
                      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
                      __pyx_t_8 = 0;
                      __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 218, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_newline, Py_True) < 0) __PYX_ERR(0, 218, __pyx_L40_error)
                      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 218, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":219
 *                             xl.curcol = 0
 *                             xl.write([sourceTitles[2]], newline=True)
 *                             xl.curcol = col0             # <<<<<<<<<<<<<<
 *                         if paramlist:
 *                             #xl.curcol -= 1
 */
                      if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_curcol, __pyx_v_col0) < 0) __PYX_ERR(0, 219, __pyx_L40_error)

                      /* "metaphor/chem_gm/core/gmtoolbox.py":216
 *                         xl.currow = rowend + 1
 *                         xl.curcol = col0
 *                         if sourceTitles[2]:             # <<<<<<<<<<<<<<
 *                             xl.curcol = 0
 *                             xl.write([sourceTitles[2]], newline=True)
 */
                    }

                    /* "metaphor/chem_gm/core/gmtoolbox.py":220
 *                             xl.write([sourceTitles[2]], newline=True)
 *                             xl.curcol = col0
 *                         if paramlist:             # <<<<<<<<<<<<<<
 *                             #xl.curcol -= 1
 *                             xl.write_row(paramlist, newline=True)
 */
                    __pyx_t_28 = __Pyx_PyObject_IsTrue(__pyx_v_paramlist); if (unlikely(__pyx_t_28 < 0)) __PYX_ERR(0, 220, __pyx_L40_error)
                    if (__pyx_t_28) {

                      /* "metaphor/chem_gm/core/gmtoolbox.py":222
 *                         if paramlist:
 *                             #xl.curcol -= 1
 *                             xl.write_row(paramlist, newline=True)             # <<<<<<<<<<<<<<
 *                             cur = xl.currow
 *                             xl.write_col(paramlist)
 */
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_write_row); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 222, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 222, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __Pyx_INCREF(__pyx_v_paramlist);
                      __Pyx_GIVEREF(__pyx_v_paramlist);
                      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_paramlist);
                      __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 222, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_newline, Py_True) < 0) __PYX_ERR(0, 222, __pyx_L40_error)
                      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 222, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_9);
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":223
 *                             #xl.curcol -= 1
 *                             xl.write_row(paramlist, newline=True)
 *                             cur = xl.currow             # <<<<<<<<<<<<<<
 *                             xl.write_col(paramlist)
 *                             xl.curcol += 1
 */
                      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_currow); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 223, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_9);
                      __Pyx_XDECREF_SET(__pyx_v_cur, __pyx_t_9);
                      __pyx_t_9 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":224
 *                             xl.write_row(paramlist, newline=True)
 *                             cur = xl.currow
 *                             xl.write_col(paramlist)             # <<<<<<<<<<<<<<
 *                             xl.curcol += 1
 *                             rowend = xl.currow
 */
                      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_write_col); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 224, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_t_8 = NULL;
                      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
                        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
                        if (likely(__pyx_t_8)) {
                          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
                          __Pyx_INCREF(__pyx_t_8);
                          __Pyx_INCREF(function);
                          __Pyx_DECREF_SET(__pyx_t_7, function);
                        }
                      }
                      if (!__pyx_t_8) {
                        __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_paramlist); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 224, __pyx_L40_error)
                        __Pyx_GOTREF(__pyx_t_9);
                      } else {
                        #if CYTHON_FAST_PYCALL
                        if (PyFunction_Check(__pyx_t_7)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_paramlist};
                          __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 224, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                          __Pyx_GOTREF(__pyx_t_9);
                        } else
                        #endif
                        #if CYTHON_FAST_PYCCALL
                        if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_paramlist};
                          __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 224, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                          __Pyx_GOTREF(__pyx_t_9);
                        } else
                        #endif
                        {
                          __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 224, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_4);
                          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __pyx_t_8 = NULL;
                          __Pyx_INCREF(__pyx_v_paramlist);
                          __Pyx_GIVEREF(__pyx_v_paramlist);
                          PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_paramlist);
                          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 224, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_9);
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        }
                      }
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":225
 *                             cur = xl.currow
 *                             xl.write_col(paramlist)
 *                             xl.curcol += 1             # <<<<<<<<<<<<<<
 *                             rowend = xl.currow
 *                             xl.currow = cur
 */
                      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_curcol); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 225, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_9);
                      __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_9, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 225, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                      if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_curcol, __pyx_t_7) < 0) __PYX_ERR(0, 225, __pyx_L40_error)
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":226
 *                             xl.write_col(paramlist)
 *                             xl.curcol += 1
 *                             rowend = xl.currow             # <<<<<<<<<<<<<<
 *                             xl.currow = cur
 *                         xl.write(dispMat, triangle=2)
 */
                      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_currow); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 226, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF_SET(__pyx_v_rowend, __pyx_t_7);
                      __pyx_t_7 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":227
 *                             xl.curcol += 1
 *                             rowend = xl.currow
 *                             xl.currow = cur             # <<<<<<<<<<<<<<
 *                         xl.write(dispMat, triangle=2)
 *                         if minmax:
 */
                      if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_currow, __pyx_v_cur) < 0) __PYX_ERR(0, 227, __pyx_L40_error)

                      /* "metaphor/chem_gm/core/gmtoolbox.py":220
 *                             xl.write([sourceTitles[2]], newline=True)
 *                             xl.curcol = col0
 *                         if paramlist:             # <<<<<<<<<<<<<<
 *                             #xl.curcol -= 1
 *                             xl.write_row(paramlist, newline=True)
 */
                    }

                    /* "metaphor/chem_gm/core/gmtoolbox.py":228
 *                             rowend = xl.currow
 *                             xl.currow = cur
 *                         xl.write(dispMat, triangle=2)             # <<<<<<<<<<<<<<
 *                         if minmax:
 *                             xl.currow = rowend + 1
 */
                    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_write); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 228, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_7);
                    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 228, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_9);
                    __Pyx_INCREF(__pyx_v_dispMat);
                    __Pyx_GIVEREF(__pyx_v_dispMat);
                    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_dispMat);
                    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_4);
                    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_triangle, __pyx_int_2) < 0) __PYX_ERR(0, 228, __pyx_L40_error)
                    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 228, __pyx_L40_error)
                    __Pyx_GOTREF(__pyx_t_8);
                    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

                    /* "metaphor/chem_gm/core/gmtoolbox.py":229
 *                             xl.currow = cur
 *                         xl.write(dispMat, triangle=2)
 *                         if minmax:             # <<<<<<<<<<<<<<
 *                             xl.currow = rowend + 1
 *                             xl.curcol = 0
 */
                    __pyx_t_28 = __Pyx_PyObject_IsTrue(__pyx_v_minmax); if (unlikely(__pyx_t_28 < 0)) __PYX_ERR(0, 229, __pyx_L40_error)
                    if (__pyx_t_28) {

                      /* "metaphor/chem_gm/core/gmtoolbox.py":230
 *                         xl.write(dispMat, triangle=2)
 *                         if minmax:
 *                             xl.currow = rowend + 1             # <<<<<<<<<<<<<<
 *                             xl.curcol = 0
 *                             xl.write([minmaxst])
 */
                      __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_v_rowend, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 230, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_currow, __pyx_t_8) < 0) __PYX_ERR(0, 230, __pyx_L40_error)
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":231
 *                         if minmax:
 *                             xl.currow = rowend + 1
 *                             xl.curcol = 0             # <<<<<<<<<<<<<<
 *                             xl.write([minmaxst])
 *                             xl.curcol = col0 - 1
 */
                      if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_curcol, __pyx_int_0) < 0) __PYX_ERR(0, 231, __pyx_L40_error)

                      /* "metaphor/chem_gm/core/gmtoolbox.py":232
 *                             xl.currow = rowend + 1
 *                             xl.curcol = 0
 *                             xl.write([minmaxst])             # <<<<<<<<<<<<<<
 *                             xl.curcol = col0 - 1
 *                             res = getMinMaxMatrixSym(dispMat, nb = minmaxsize,
 */
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 232, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 232, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_9);
                      __Pyx_INCREF(__pyx_v_minmaxst);
                      __Pyx_GIVEREF(__pyx_v_minmaxst);
                      PyList_SET_ITEM(__pyx_t_9, 0, __pyx_v_minmaxst);
                      __pyx_t_7 = NULL;
                      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
                        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
                        if (likely(__pyx_t_7)) {
                          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
                          __Pyx_INCREF(__pyx_t_7);
                          __Pyx_INCREF(function);
                          __Pyx_DECREF_SET(__pyx_t_4, function);
                        }
                      }
                      if (!__pyx_t_7) {
                        __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 232, __pyx_L40_error)
                        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                        __Pyx_GOTREF(__pyx_t_8);
                      } else {
                        #if CYTHON_FAST_PYCALL
                        if (PyFunction_Check(__pyx_t_4)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_9};
                          __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 232, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                          __Pyx_GOTREF(__pyx_t_8);
                          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                        } else
                        #endif
                        #if CYTHON_FAST_PYCCALL
                        if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_9};
                          __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 232, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                          __Pyx_GOTREF(__pyx_t_8);
                          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                        } else
                        #endif
                        {
                          __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 232, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_10);
                          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL;
                          __Pyx_GIVEREF(__pyx_t_9);
                          PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_9);
                          __pyx_t_9 = 0;
                          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 232, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                        }
                      }
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":233
 *                             xl.curcol = 0
 *                             xl.write([minmaxst])
 *                             xl.curcol = col0 - 1             # <<<<<<<<<<<<<<
 *                             res = getMinMaxMatrixSym(dispMat, nb = minmaxsize,
 *                                                      withdiag=False)
 */
                      __pyx_t_8 = __Pyx_PyInt_SubtractObjC(__pyx_v_col0, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 233, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_curcol, __pyx_t_8) < 0) __PYX_ERR(0, 233, __pyx_L40_error)
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":234
 *                             xl.write([minmaxst])
 *                             xl.curcol = col0 - 1
 *                             res = getMinMaxMatrixSym(dispMat, nb = minmaxsize,             # <<<<<<<<<<<<<<
 *                                                      withdiag=False)
 *                             mmlst0 =  np.asarray([(paramlist[val[0]],
 */
                      __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_getMinMaxMatrixSym); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 234, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_8);
                      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_INCREF(__pyx_v_dispMat);
                      __Pyx_GIVEREF(__pyx_v_dispMat);
                      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_dispMat);
                      __pyx_t_10 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 234, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_10);
                      if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_nb, __pyx_v_minmaxsize) < 0) __PYX_ERR(0, 234, __pyx_L40_error)

                      /* "metaphor/chem_gm/core/gmtoolbox.py":235
 *                             xl.curcol = col0 - 1
 *                             res = getMinMaxMatrixSym(dispMat, nb = minmaxsize,
 *                                                      withdiag=False)             # <<<<<<<<<<<<<<
 *                             mmlst0 =  np.asarray([(paramlist[val[0]],
 *                                 paramlist[val[1]], dispMat[val]) for val in res[0]])
 */
                      if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_withdiag, Py_False) < 0) __PYX_ERR(0, 234, __pyx_L40_error)

                      /* "metaphor/chem_gm/core/gmtoolbox.py":234
 *                             xl.write([minmaxst])
 *                             xl.curcol = col0 - 1
 *                             res = getMinMaxMatrixSym(dispMat, nb = minmaxsize,             # <<<<<<<<<<<<<<
 *                                                      withdiag=False)
 *                             mmlst0 =  np.asarray([(paramlist[val[0]],
 */
                      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 234, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_9);
                      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                      __Pyx_XDECREF_SET(__pyx_v_res, __pyx_t_9);
                      __pyx_t_9 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":236
 *                             res = getMinMaxMatrixSym(dispMat, nb = minmaxsize,
 *                                                      withdiag=False)
 *                             mmlst0 =  np.asarray([(paramlist[val[0]],             # <<<<<<<<<<<<<<
 *                                 paramlist[val[1]], dispMat[val]) for val in res[0]])
 *                             mmlst1 =  np.asarray([(paramlist[val[0]],
 */
                      __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 236, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_10);
                      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 236, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                      { /* enter inner scope */
                        __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 236, __pyx_L89_error)
                        __Pyx_GOTREF(__pyx_t_10);

                        /* "metaphor/chem_gm/core/gmtoolbox.py":237
 *                                                      withdiag=False)
 *                             mmlst0 =  np.asarray([(paramlist[val[0]],
 *                                 paramlist[val[1]], dispMat[val]) for val in res[0]])             # <<<<<<<<<<<<<<
 *                             mmlst1 =  np.asarray([(paramlist[val[0]],
 *                                 paramlist[val[1]], dispMat[val]) for val in res[1]])
 */
                        __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_res, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 237, __pyx_L89_error)
                        __Pyx_GOTREF(__pyx_t_8);
                        if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
                          __pyx_t_7 = __pyx_t_8; __Pyx_INCREF(__pyx_t_7); __pyx_t_1 = 0;
                          __pyx_t_34 = NULL;
                        } else {
                          __pyx_t_1 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 237, __pyx_L89_error)
                          __Pyx_GOTREF(__pyx_t_7);
                          __pyx_t_34 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_34)) __PYX_ERR(0, 237, __pyx_L89_error)
                        }
                        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                        for (;;) {
                          if (likely(!__pyx_t_34)) {
                            if (likely(PyList_CheckExact(__pyx_t_7))) {
                              if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_7)) break;
                              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                              __pyx_t_8 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_1); __Pyx_INCREF(__pyx_t_8); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 237, __pyx_L89_error)
                              #else
                              __pyx_t_8 = PySequence_ITEM(__pyx_t_7, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 237, __pyx_L89_error)
                              __Pyx_GOTREF(__pyx_t_8);
                              #endif
                            } else {
                              if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
                              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                              __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_1); __Pyx_INCREF(__pyx_t_8); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 237, __pyx_L89_error)
                              #else
                              __pyx_t_8 = PySequence_ITEM(__pyx_t_7, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 237, __pyx_L89_error)
                              __Pyx_GOTREF(__pyx_t_8);
                              #endif
                            }
                          } else {
                            __pyx_t_8 = __pyx_t_34(__pyx_t_7);
                            if (unlikely(!__pyx_t_8)) {
                              PyObject* exc_type = PyErr_Occurred();
                              if (exc_type) {
                                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                                else __PYX_ERR(0, 237, __pyx_L89_error)
                              }
                              break;
                            }
                            __Pyx_GOTREF(__pyx_t_8);
                          }
                          __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_val, __pyx_t_8);
                          __pyx_t_8 = 0;

                          /* "metaphor/chem_gm/core/gmtoolbox.py":236
 *                             res = getMinMaxMatrixSym(dispMat, nb = minmaxsize,
 *                                                      withdiag=False)
 *                             mmlst0 =  np.asarray([(paramlist[val[0]],             # <<<<<<<<<<<<<<
 *                                 paramlist[val[1]], dispMat[val]) for val in res[0]])
 *                             mmlst1 =  np.asarray([(paramlist[val[0]],
 */
                          __pyx_t_8 = __Pyx_GetItemInt(__pyx_8genexpr5__pyx_v_val, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 236, __pyx_L89_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          __pyx_t_32 = __Pyx_PyObject_GetItem(__pyx_v_paramlist, __pyx_t_8); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 236, __pyx_L89_error)
                          __Pyx_GOTREF(__pyx_t_32);
                          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

                          /* "metaphor/chem_gm/core/gmtoolbox.py":237
 *                                                      withdiag=False)
 *                             mmlst0 =  np.asarray([(paramlist[val[0]],
 *                                 paramlist[val[1]], dispMat[val]) for val in res[0]])             # <<<<<<<<<<<<<<
 *                             mmlst1 =  np.asarray([(paramlist[val[0]],
 *                                 paramlist[val[1]], dispMat[val]) for val in res[1]])
 */
                          __pyx_t_8 = __Pyx_GetItemInt(__pyx_8genexpr5__pyx_v_val, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 237, __pyx_L89_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_paramlist, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 237, __pyx_L89_error)
                          __Pyx_GOTREF(__pyx_t_5);
                          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                          __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_dispMat, __pyx_8genexpr5__pyx_v_val); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 237, __pyx_L89_error)
                          __Pyx_GOTREF(__pyx_t_8);

                          /* "metaphor/chem_gm/core/gmtoolbox.py":236
 *                             res = getMinMaxMatrixSym(dispMat, nb = minmaxsize,
 *                                                      withdiag=False)
 *                             mmlst0 =  np.asarray([(paramlist[val[0]],             # <<<<<<<<<<<<<<
 *                                 paramlist[val[1]], dispMat[val]) for val in res[0]])
 *                             mmlst1 =  np.asarray([(paramlist[val[0]],
 */
                          __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 236, __pyx_L89_error)
                          __Pyx_GOTREF(__pyx_t_12);
                          __Pyx_GIVEREF(__pyx_t_32);
                          PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_32);
                          __Pyx_GIVEREF(__pyx_t_5);
                          PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_5);
                          __Pyx_GIVEREF(__pyx_t_8);
                          PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_8);
                          __pyx_t_32 = 0;
                          __pyx_t_5 = 0;
                          __pyx_t_8 = 0;
                          if (unlikely(__Pyx_ListComp_Append(__pyx_t_10, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 236, __pyx_L89_error)
                          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

                          /* "metaphor/chem_gm/core/gmtoolbox.py":237
 *                                                      withdiag=False)
 *                             mmlst0 =  np.asarray([(paramlist[val[0]],
 *                                 paramlist[val[1]], dispMat[val]) for val in res[0]])             # <<<<<<<<<<<<<<
 *                             mmlst1 =  np.asarray([(paramlist[val[0]],
 *                                 paramlist[val[1]], dispMat[val]) for val in res[1]])
 */
                        }
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_val); __pyx_8genexpr5__pyx_v_val = 0;
                        goto __pyx_L92_exit_scope;
                        __pyx_L89_error:;
                        __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_val); __pyx_8genexpr5__pyx_v_val = 0;
                        goto __pyx_L40_error;
                        __pyx_L92_exit_scope:;
                      } /* exit inner scope */
                      __pyx_t_7 = NULL;
                      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
                        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
                        if (likely(__pyx_t_7)) {
                          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
                          __Pyx_INCREF(__pyx_t_7);
                          __Pyx_INCREF(function);
                          __Pyx_DECREF_SET(__pyx_t_4, function);
                        }
                      }
                      if (!__pyx_t_7) {
                        __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 236, __pyx_L40_error)
                        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                        __Pyx_GOTREF(__pyx_t_9);
                      } else {
                        #if CYTHON_FAST_PYCALL
                        if (PyFunction_Check(__pyx_t_4)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_10};
                          __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 236, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                          __Pyx_GOTREF(__pyx_t_9);
                          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                        } else
                        #endif
                        #if CYTHON_FAST_PYCCALL
                        if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_10};
                          __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 236, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                          __Pyx_GOTREF(__pyx_t_9);
                          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                        } else
                        #endif
                        {
                          __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 236, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_12);
                          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7); __pyx_t_7 = NULL;
                          __Pyx_GIVEREF(__pyx_t_10);
                          PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_10);
                          __pyx_t_10 = 0;
                          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_12, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 236, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_9);
                          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                        }
                      }
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      __Pyx_XDECREF_SET(__pyx_v_mmlst0, __pyx_t_9);
                      __pyx_t_9 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":238
 *                             mmlst0 =  np.asarray([(paramlist[val[0]],
 *                                 paramlist[val[1]], dispMat[val]) for val in res[0]])
 *                             mmlst1 =  np.asarray([(paramlist[val[0]],             # <<<<<<<<<<<<<<
 *                                 paramlist[val[1]], dispMat[val]) for val in res[1]])
 *                             xl.currow += 1
 */
                      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 238, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_12);
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                      { /* enter inner scope */
                        __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L95_error)
                        __Pyx_GOTREF(__pyx_t_4);

                        /* "metaphor/chem_gm/core/gmtoolbox.py":239
 *                                 paramlist[val[1]], dispMat[val]) for val in res[0]])
 *                             mmlst1 =  np.asarray([(paramlist[val[0]],
 *                                 paramlist[val[1]], dispMat[val]) for val in res[1]])             # <<<<<<<<<<<<<<
 *                             xl.currow += 1
 *                             xl.write(mmlst0)
 */
                        __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_res, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 239, __pyx_L95_error)
                        __Pyx_GOTREF(__pyx_t_10);
                        if (likely(PyList_CheckExact(__pyx_t_10)) || PyTuple_CheckExact(__pyx_t_10)) {
                          __pyx_t_7 = __pyx_t_10; __Pyx_INCREF(__pyx_t_7); __pyx_t_1 = 0;
                          __pyx_t_34 = NULL;
                        } else {
                          __pyx_t_1 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 239, __pyx_L95_error)
                          __Pyx_GOTREF(__pyx_t_7);
                          __pyx_t_34 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_34)) __PYX_ERR(0, 239, __pyx_L95_error)
                        }
                        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                        for (;;) {
                          if (likely(!__pyx_t_34)) {
                            if (likely(PyList_CheckExact(__pyx_t_7))) {
                              if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_7)) break;
                              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                              __pyx_t_10 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_1); __Pyx_INCREF(__pyx_t_10); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 239, __pyx_L95_error)
                              #else
                              __pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 239, __pyx_L95_error)
                              __Pyx_GOTREF(__pyx_t_10);
                              #endif
                            } else {
                              if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
                              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                              __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_1); __Pyx_INCREF(__pyx_t_10); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 239, __pyx_L95_error)
                              #else
                              __pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 239, __pyx_L95_error)
                              __Pyx_GOTREF(__pyx_t_10);
                              #endif
                            }
                          } else {
                            __pyx_t_10 = __pyx_t_34(__pyx_t_7);
                            if (unlikely(!__pyx_t_10)) {
                              PyObject* exc_type = PyErr_Occurred();
                              if (exc_type) {
                                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                                else __PYX_ERR(0, 239, __pyx_L95_error)
                              }
                              break;
                            }
                            __Pyx_GOTREF(__pyx_t_10);
                          }
                          __Pyx_XDECREF_SET(__pyx_8genexpr6__pyx_v_val, __pyx_t_10);
                          __pyx_t_10 = 0;

                          /* "metaphor/chem_gm/core/gmtoolbox.py":238
 *                             mmlst0 =  np.asarray([(paramlist[val[0]],
 *                                 paramlist[val[1]], dispMat[val]) for val in res[0]])
 *                             mmlst1 =  np.asarray([(paramlist[val[0]],             # <<<<<<<<<<<<<<
 *                                 paramlist[val[1]], dispMat[val]) for val in res[1]])
 *                             xl.currow += 1
 */
                          __pyx_t_10 = __Pyx_GetItemInt(__pyx_8genexpr6__pyx_v_val, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 238, __pyx_L95_error)
                          __Pyx_GOTREF(__pyx_t_10);
                          __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_paramlist, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 238, __pyx_L95_error)
                          __Pyx_GOTREF(__pyx_t_8);
                          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

                          /* "metaphor/chem_gm/core/gmtoolbox.py":239
 *                                 paramlist[val[1]], dispMat[val]) for val in res[0]])
 *                             mmlst1 =  np.asarray([(paramlist[val[0]],
 *                                 paramlist[val[1]], dispMat[val]) for val in res[1]])             # <<<<<<<<<<<<<<
 *                             xl.currow += 1
 *                             xl.write(mmlst0)
 */
                          __pyx_t_10 = __Pyx_GetItemInt(__pyx_8genexpr6__pyx_v_val, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 239, __pyx_L95_error)
                          __Pyx_GOTREF(__pyx_t_10);
                          __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_paramlist, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 239, __pyx_L95_error)
                          __Pyx_GOTREF(__pyx_t_5);
                          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                          __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_dispMat, __pyx_8genexpr6__pyx_v_val); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 239, __pyx_L95_error)
                          __Pyx_GOTREF(__pyx_t_10);

                          /* "metaphor/chem_gm/core/gmtoolbox.py":238
 *                             mmlst0 =  np.asarray([(paramlist[val[0]],
 *                                 paramlist[val[1]], dispMat[val]) for val in res[0]])
 *                             mmlst1 =  np.asarray([(paramlist[val[0]],             # <<<<<<<<<<<<<<
 *                                 paramlist[val[1]], dispMat[val]) for val in res[1]])
 *                             xl.currow += 1
 */
                          __pyx_t_32 = PyTuple_New(3); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 238, __pyx_L95_error)
                          __Pyx_GOTREF(__pyx_t_32);
                          __Pyx_GIVEREF(__pyx_t_8);
                          PyTuple_SET_ITEM(__pyx_t_32, 0, __pyx_t_8);
                          __Pyx_GIVEREF(__pyx_t_5);
                          PyTuple_SET_ITEM(__pyx_t_32, 1, __pyx_t_5);
                          __Pyx_GIVEREF(__pyx_t_10);
                          PyTuple_SET_ITEM(__pyx_t_32, 2, __pyx_t_10);
                          __pyx_t_8 = 0;
                          __pyx_t_5 = 0;
                          __pyx_t_10 = 0;
                          if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_32))) __PYX_ERR(0, 238, __pyx_L95_error)
                          __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;

                          /* "metaphor/chem_gm/core/gmtoolbox.py":239
 *                                 paramlist[val[1]], dispMat[val]) for val in res[0]])
 *                             mmlst1 =  np.asarray([(paramlist[val[0]],
 *                                 paramlist[val[1]], dispMat[val]) for val in res[1]])             # <<<<<<<<<<<<<<
 *                             xl.currow += 1
 *                             xl.write(mmlst0)
 */
                        }
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_val); __pyx_8genexpr6__pyx_v_val = 0;
                        goto __pyx_L98_exit_scope;
                        __pyx_L95_error:;
                        __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_val); __pyx_8genexpr6__pyx_v_val = 0;
                        goto __pyx_L40_error;
                        __pyx_L98_exit_scope:;
                      } /* exit inner scope */
                      __pyx_t_7 = NULL;
                      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_12);
                        if (likely(__pyx_t_7)) {
                          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                          __Pyx_INCREF(__pyx_t_7);
                          __Pyx_INCREF(function);
                          __Pyx_DECREF_SET(__pyx_t_12, function);
                        }
                      }
                      if (!__pyx_t_7) {
                        __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 238, __pyx_L40_error)
                        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        __Pyx_GOTREF(__pyx_t_9);
                      } else {
                        #if CYTHON_FAST_PYCALL
                        if (PyFunction_Check(__pyx_t_12)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
                          __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 238, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                          __Pyx_GOTREF(__pyx_t_9);
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        } else
                        #endif
                        #if CYTHON_FAST_PYCCALL
                        if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
                          __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 238, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                          __Pyx_GOTREF(__pyx_t_9);
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        } else
                        #endif
                        {
                          __pyx_t_32 = PyTuple_New(1+1); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 238, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_32);
                          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_32, 0, __pyx_t_7); __pyx_t_7 = NULL;
                          __Pyx_GIVEREF(__pyx_t_4);
                          PyTuple_SET_ITEM(__pyx_t_32, 0+1, __pyx_t_4);
                          __pyx_t_4 = 0;
                          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_32, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 238, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_9);
                          __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                        }
                      }
                      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                      __Pyx_XDECREF_SET(__pyx_v_mmlst1, __pyx_t_9);
                      __pyx_t_9 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":240
 *                             mmlst1 =  np.asarray([(paramlist[val[0]],
 *                                 paramlist[val[1]], dispMat[val]) for val in res[1]])
 *                             xl.currow += 1             # <<<<<<<<<<<<<<
 *                             xl.write(mmlst0)
 *                             xl.currow += 1
 */
                      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_currow); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 240, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_9);
                      __pyx_t_12 = __Pyx_PyInt_AddObjC(__pyx_t_9, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 240, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_12);
                      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                      if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_currow, __pyx_t_12) < 0) __PYX_ERR(0, 240, __pyx_L40_error)
                      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":241
 *                                 paramlist[val[1]], dispMat[val]) for val in res[1]])
 *                             xl.currow += 1
 *                             xl.write(mmlst0)             # <<<<<<<<<<<<<<
 *                             xl.currow += 1
 *                             xl.write(mmlst1)
 */
                      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_write); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 241, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_9);
                      __pyx_t_32 = NULL;
                      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
                        __pyx_t_32 = PyMethod_GET_SELF(__pyx_t_9);
                        if (likely(__pyx_t_32)) {
                          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                          __Pyx_INCREF(__pyx_t_32);
                          __Pyx_INCREF(function);
                          __Pyx_DECREF_SET(__pyx_t_9, function);
                        }
                      }
                      if (!__pyx_t_32) {
                        __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_mmlst0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 241, __pyx_L40_error)
                        __Pyx_GOTREF(__pyx_t_12);
                      } else {
                        #if CYTHON_FAST_PYCALL
                        if (PyFunction_Check(__pyx_t_9)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_32, __pyx_v_mmlst0};
                          __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 241, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_32); __pyx_t_32 = 0;
                          __Pyx_GOTREF(__pyx_t_12);
                        } else
                        #endif
                        #if CYTHON_FAST_PYCCALL
                        if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_32, __pyx_v_mmlst0};
                          __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 241, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_32); __pyx_t_32 = 0;
                          __Pyx_GOTREF(__pyx_t_12);
                        } else
                        #endif
                        {
                          __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 241, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_4);
                          __Pyx_GIVEREF(__pyx_t_32); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_32); __pyx_t_32 = NULL;
                          __Pyx_INCREF(__pyx_v_mmlst0);
                          __Pyx_GIVEREF(__pyx_v_mmlst0);
                          PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_mmlst0);
                          __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_4, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 241, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_12);
                          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                        }
                      }
                      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":242
 *                             xl.currow += 1
 *                             xl.write(mmlst0)
 *                             xl.currow += 1             # <<<<<<<<<<<<<<
 *                             xl.write(mmlst1)
 *                             rowend = xl.currow
 */
                      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_currow); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 242, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_12);
                      __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_t_12, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 242, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_9);
                      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                      if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_currow, __pyx_t_9) < 0) __PYX_ERR(0, 242, __pyx_L40_error)
                      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":243
 *                             xl.write(mmlst0)
 *                             xl.currow += 1
 *                             xl.write(mmlst1)             # <<<<<<<<<<<<<<
 *                             rowend = xl.currow
 *                             xl.currow = cur
 */
                      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_write); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 243, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_12);
                      __pyx_t_4 = NULL;
                      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
                        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_12);
                        if (likely(__pyx_t_4)) {
                          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                          __Pyx_INCREF(__pyx_t_4);
                          __Pyx_INCREF(function);
                          __Pyx_DECREF_SET(__pyx_t_12, function);
                        }
                      }
                      if (!__pyx_t_4) {
                        __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_mmlst1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 243, __pyx_L40_error)
                        __Pyx_GOTREF(__pyx_t_9);
                      } else {
                        #if CYTHON_FAST_PYCALL
                        if (PyFunction_Check(__pyx_t_12)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_mmlst1};
                          __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 243, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_GOTREF(__pyx_t_9);
                        } else
                        #endif
                        #if CYTHON_FAST_PYCCALL
                        if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_mmlst1};
                          __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 243, __pyx_L40_error)
                          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                          __Pyx_GOTREF(__pyx_t_9);
                        } else
                        #endif
                        {
                          __pyx_t_32 = PyTuple_New(1+1); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 243, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_32);
                          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_32, 0, __pyx_t_4); __pyx_t_4 = NULL;
                          __Pyx_INCREF(__pyx_v_mmlst1);
                          __Pyx_GIVEREF(__pyx_v_mmlst1);
                          PyTuple_SET_ITEM(__pyx_t_32, 0+1, __pyx_v_mmlst1);
                          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_32, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 243, __pyx_L40_error)
                          __Pyx_GOTREF(__pyx_t_9);
                          __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                        }
                      }
                      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":244
 *                             xl.currow += 1
 *                             xl.write(mmlst1)
 *                             rowend = xl.currow             # <<<<<<<<<<<<<<
 *                             xl.currow = cur
 *                 except Exception as e:
 */
                      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_xl, __pyx_n_s_currow); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 244, __pyx_L40_error)
                      __Pyx_GOTREF(__pyx_t_9);
                      __Pyx_DECREF_SET(__pyx_v_rowend, __pyx_t_9);
                      __pyx_t_9 = 0;

                      /* "metaphor/chem_gm/core/gmtoolbox.py":245
 *                             xl.write(mmlst1)
 *                             rowend = xl.currow
 *                             xl.currow = cur             # <<<<<<<<<<<<<<
 *                 except Exception as e:
 *                     mess = e
 */
                      if (unlikely(!__pyx_v_cur)) { __Pyx_RaiseUnboundLocalError("cur"); __PYX_ERR(0, 245, __pyx_L40_error) }
                      if (__Pyx_PyObject_SetAttrStr(__pyx_v_xl, __pyx_n_s_currow, __pyx_v_cur) < 0) __PYX_ERR(0, 245, __pyx_L40_error)

                      /* "metaphor/chem_gm/core/gmtoolbox.py":229
 *                             xl.currow = cur
 *                         xl.write(dispMat, triangle=2)
 *                         if minmax:             # <<<<<<<<<<<<<<
 *                             xl.currow = rowend + 1
 *                             xl.curcol = 0
 */
                    }

                    /* "metaphor/chem_gm/core/gmtoolbox.py":205
 *                             xl.currow = cur
 * 
 *                     if dispMat is not None:             # <<<<<<<<<<<<<<
 *                         if (shortTitles is not None) and len(shortTitles) >= 2:
 *                             lst = sheet.split("_")
 */
                  }

                  /* "metaphor/chem_gm/core/gmtoolbox.py":101
 *             iterator = zip(sources, headers, lefters, sheets)
 *             for (source, dispMat, projMat), head, left, sheet in iterator:
 *                 try:             # <<<<<<<<<<<<<<
 * # protection pour eviter de sortir inopinement des enregistrements de gros
 * # fichiers de resultats
 */
                }
                __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
                __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
                __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
                goto __pyx_L47_try_end;
                __pyx_L40_error:;
                __Pyx_XDECREF(__pyx_t_33); __pyx_t_33 = 0;
                __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_XDECREF(__pyx_t_32); __pyx_t_32 = 0;
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

                /* "metaphor/chem_gm/core/gmtoolbox.py":246
 *                             rowend = xl.currow
 *                             xl.currow = cur
 *                 except Exception as e:             # <<<<<<<<<<<<<<
 *                     mess = e
 *                     print(mess)
 */
                __pyx_t_20 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
                if (__pyx_t_20) {
                  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.saveNpsToXl", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_12, &__pyx_t_32) < 0) __PYX_ERR(0, 246, __pyx_L42_except_error)
                  __Pyx_GOTREF(__pyx_t_9);
                  __Pyx_GOTREF(__pyx_t_12);
                  __Pyx_GOTREF(__pyx_t_32);
                  __Pyx_INCREF(__pyx_t_12);
                  __pyx_v_e = __pyx_t_12;
                  /*try:*/ {

                    /* "metaphor/chem_gm/core/gmtoolbox.py":247
 *                             xl.currow = cur
 *                 except Exception as e:
 *                     mess = e             # <<<<<<<<<<<<<<
 *                     print(mess)
 *         #xl.save()
 */
                    __Pyx_INCREF(__pyx_v_e);
                    __Pyx_XDECREF_SET(__pyx_v_mess, __pyx_v_e);

                    /* "metaphor/chem_gm/core/gmtoolbox.py":248
 *                 except Exception as e:
 *                     mess = e
 *                     print(mess)             # <<<<<<<<<<<<<<
 *         #xl.save()
 *         pass
 */
                    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_v_mess); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 248, __pyx_L104_error)
                    __Pyx_GOTREF(__pyx_t_4);
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  }

                  /* "metaphor/chem_gm/core/gmtoolbox.py":246
 *                             rowend = xl.currow
 *                             xl.currow = cur
 *                 except Exception as e:             # <<<<<<<<<<<<<<
 *                     mess = e
 *                     print(mess)
 */
                  /*finally:*/ {
                    /*normal exit:*/{
                      __Pyx_DECREF(__pyx_v_e);
                      __pyx_v_e = NULL;
                      goto __pyx_L105;
                    }
                    __pyx_L104_error:;
                    /*exception exit:*/{
                      __Pyx_PyThreadState_declare
                      __Pyx_PyThreadState_assign
                      __pyx_t_27 = 0; __pyx_t_26 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0;
                      __Pyx_XDECREF(__pyx_t_33); __pyx_t_33 = 0;
                      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_24, &__pyx_t_23, &__pyx_t_22);
                      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_27, &__pyx_t_26, &__pyx_t_25) < 0)) __Pyx_ErrFetch(&__pyx_t_27, &__pyx_t_26, &__pyx_t_25);
                      __Pyx_XGOTREF(__pyx_t_27);
                      __Pyx_XGOTREF(__pyx_t_26);
                      __Pyx_XGOTREF(__pyx_t_25);
                      __Pyx_XGOTREF(__pyx_t_24);
                      __Pyx_XGOTREF(__pyx_t_23);
                      __Pyx_XGOTREF(__pyx_t_22);
                      __pyx_t_20 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_36 = __pyx_filename;
                      {
                        __Pyx_DECREF(__pyx_v_e);
                        __pyx_v_e = NULL;
                      }
                      if (PY_MAJOR_VERSION >= 3) {
                        __Pyx_XGIVEREF(__pyx_t_24);
                        __Pyx_XGIVEREF(__pyx_t_23);
                        __Pyx_XGIVEREF(__pyx_t_22);
                        __Pyx_ExceptionReset(__pyx_t_24, __pyx_t_23, __pyx_t_22);
                      }
                      __Pyx_XGIVEREF(__pyx_t_27);
                      __Pyx_XGIVEREF(__pyx_t_26);
                      __Pyx_XGIVEREF(__pyx_t_25);
                      __Pyx_ErrRestore(__pyx_t_27, __pyx_t_26, __pyx_t_25);
                      __pyx_t_27 = 0; __pyx_t_26 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0;
                      __pyx_lineno = __pyx_t_20; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_36;
                      goto __pyx_L42_except_error;
                    }
                    __pyx_L105:;
                  }
                  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
                  goto __pyx_L41_exception_handled;
                }
                goto __pyx_L42_except_error;
                __pyx_L42_except_error:;

                /* "metaphor/chem_gm/core/gmtoolbox.py":101
 *             iterator = zip(sources, headers, lefters, sheets)
 *             for (source, dispMat, projMat), head, left, sheet in iterator:
 *                 try:             # <<<<<<<<<<<<<<
 * # protection pour eviter de sortir inopinement des enregistrements de gros
 * # fichiers de resultats
 */
                __Pyx_XGIVEREF(__pyx_t_19);
                __Pyx_XGIVEREF(__pyx_t_18);
                __Pyx_XGIVEREF(__pyx_t_17);
                __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_18, __pyx_t_17);
                goto __pyx_L8_error;
                __pyx_L41_exception_handled:;
                __Pyx_XGIVEREF(__pyx_t_19);
                __Pyx_XGIVEREF(__pyx_t_18);
                __Pyx_XGIVEREF(__pyx_t_17);
                __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_18, __pyx_t_17);
                __pyx_L47_try_end:;
              }

              /* "metaphor/chem_gm/core/gmtoolbox.py":100
 * 
 *             iterator = zip(sources, headers, lefters, sheets)
 *             for (source, dispMat, projMat), head, left, sheet in iterator:             # <<<<<<<<<<<<<<
 *                 try:
 * # protection pour eviter de sortir inopinement des enregistrements de gros
 */
            }
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

            /* "metaphor/chem_gm/core/gmtoolbox.py":86
 *         dl = len(sources) - len(sheets)
 *         sheets = sheets if not dl else chain(sheets, repeat("", dl))
 *         with Excel(filename) as xl:  #, optimized_write=True             # <<<<<<<<<<<<<<
 *             if extra:
 *                 try:
 */
          }
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          goto __pyx_L13_try_end;
          __pyx_L8_error:;
          __Pyx_XDECREF(__pyx_t_33); __pyx_t_33 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_32); __pyx_t_32 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.saveNpsToXl", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_32, &__pyx_t_12) < 0) __PYX_ERR(0, 86, __pyx_L10_except_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_GOTREF(__pyx_t_32);
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_9 = PyTuple_Pack(3, __pyx_t_6, __pyx_t_32, __pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 86, __pyx_L10_except_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_9, NULL);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 86, __pyx_L10_except_error)
            __Pyx_GOTREF(__pyx_t_17);
            __pyx_t_28 = __Pyx_PyObject_IsTrue(__pyx_t_17);
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            if (__pyx_t_28 < 0) __PYX_ERR(0, 86, __pyx_L10_except_error)
            __pyx_t_2 = ((!(__pyx_t_28 != 0)) != 0);
            if (__pyx_t_2) {
              __Pyx_GIVEREF(__pyx_t_6);
              __Pyx_GIVEREF(__pyx_t_32);
              __Pyx_XGIVEREF(__pyx_t_12);
              __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_32, __pyx_t_12);
              __pyx_t_6 = 0; __pyx_t_32 = 0; __pyx_t_12 = 0; 
              __PYX_ERR(0, 86, __pyx_L10_except_error)
            }
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            goto __pyx_L9_exception_handled;
          }
          __pyx_L10_except_error:;
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
          goto __pyx_L1_error;
          __pyx_L9_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
          __pyx_L13_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_13) {
            __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_tuple__8, NULL);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 86, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          }
          goto __pyx_L7;
        }
        __pyx_L7:;
      }
      goto __pyx_L113;
      __pyx_L4_error:;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      goto __pyx_L1_error;
      __pyx_L113:;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":83
 *     lefter=None, lefters=None, sheets=[""], minmax=0):
 *     minmaxsize = minmax
 *     if len(sources):             # <<<<<<<<<<<<<<
 *         dl = len(sources) - len(sheets)
 *         sheets = sheets if not dl else chain(sheets, repeat("", dl))
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":79
 *         xl.write(source)
 * 
 * def saveNpsToXl(filename, sources, sourceTitles=None, shortTitles=None,             # <<<<<<<<<<<<<<
 *     extra=None, extrasheet=None, extrarow=[], header=[], headers=None,
 *     lefter=None, lefters=None, sheets=[""], minmax=0):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_32);
  __Pyx_XDECREF(__pyx_t_33);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.saveNpsToXl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_minmaxsize);
  __Pyx_XDECREF(__pyx_v_xl);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_mainTitle);
  __Pyx_XDECREF(__pyx_v_iterator);
  __Pyx_XDECREF(__pyx_v_source);
  __Pyx_XDECREF(__pyx_v_dispMat);
  __Pyx_XDECREF(__pyx_v_projMat);
  __Pyx_XDECREF(__pyx_v_head);
  __Pyx_XDECREF(__pyx_v_left);
  __Pyx_XDECREF(__pyx_v_sheet);
  __Pyx_XDECREF(__pyx_v_col0);
  __Pyx_XDECREF(__pyx_v_row0);
  __Pyx_XDECREF(__pyx_v_rowend);
  __Pyx_XDECREF(__pyx_v_cur);
  __Pyx_XDECREF(__pyx_v_minmaxst);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_lst);
  __Pyx_XDECREF(__pyx_v_ind);
  __Pyx_XDECREF(__pyx_v_lig);
  __Pyx_XDECREF(__pyx_v_hii);
  __Pyx_XDECREF(__pyx_v_mask);
  __Pyx_XDECREF(__pyx_v_lig2);
  __Pyx_XDECREF(__pyx_v_hijmean);
  __Pyx_XDECREF(__pyx_v_hijmin);
  __Pyx_XDECREF(__pyx_v_hijmax);
  __Pyx_XDECREF(__pyx_v_mmlst0);
  __Pyx_XDECREF(__pyx_v_mmlst1);
  __Pyx_XDECREF(__pyx_v_N);
  __Pyx_XDECREF(__pyx_v_paramlist);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_mess);
  __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_val);
  __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_val);
  __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_val);
  __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_val);
  __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_extrasheet);
  __Pyx_XDECREF(__pyx_v_headers);
  __Pyx_XDECREF(__pyx_v_lefters);
  __Pyx_XDECREF(__pyx_v_sheets);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":252
 *         pass
 * 
 * def richDictFromConfigstr(configstr, hidden=0, target=None, longkey=False, grademax=0):             # <<<<<<<<<<<<<<
 *     dico = fromConfigstr2Dict(configstr, hidden=0, target=None, longkey=False, grademax=0)
 *     return dico
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_11richDictFromConfigstr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_11richDictFromConfigstr = {"richDictFromConfigstr", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_11richDictFromConfigstr, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_11richDictFromConfigstr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_configstr = 0;
  CYTHON_UNUSED PyObject *__pyx_v_hidden = 0;
  CYTHON_UNUSED PyObject *__pyx_v_target = 0;
  CYTHON_UNUSED PyObject *__pyx_v_longkey = 0;
  CYTHON_UNUSED PyObject *__pyx_v_grademax = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("richDictFromConfigstr (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_configstr,&__pyx_n_s_hidden,&__pyx_n_s_target,&__pyx_n_s_longkey,&__pyx_n_s_grademax,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[1] = ((PyObject *)((PyObject *)__pyx_int_0));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_False));
    values[4] = ((PyObject *)((PyObject *)__pyx_int_0));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_configstr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hidden);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_longkey);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grademax);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "richDictFromConfigstr") < 0)) __PYX_ERR(0, 252, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_configstr = values[0];
    __pyx_v_hidden = values[1];
    __pyx_v_target = values[2];
    __pyx_v_longkey = values[3];
    __pyx_v_grademax = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("richDictFromConfigstr", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 252, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.richDictFromConfigstr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_10richDictFromConfigstr(__pyx_self, __pyx_v_configstr, __pyx_v_hidden, __pyx_v_target, __pyx_v_longkey, __pyx_v_grademax);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_10richDictFromConfigstr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_configstr, CYTHON_UNUSED PyObject *__pyx_v_hidden, CYTHON_UNUSED PyObject *__pyx_v_target, CYTHON_UNUSED PyObject *__pyx_v_longkey, CYTHON_UNUSED PyObject *__pyx_v_grademax) {
  PyObject *__pyx_v_dico = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("richDictFromConfigstr", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":253
 * 
 * def richDictFromConfigstr(configstr, hidden=0, target=None, longkey=False, grademax=0):
 *     dico = fromConfigstr2Dict(configstr, hidden=0, target=None, longkey=False, grademax=0)             # <<<<<<<<<<<<<<
 *     return dico
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_fromConfigstr2Dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_configstr);
  __Pyx_GIVEREF(__pyx_v_configstr);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_configstr);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_hidden, __pyx_int_0) < 0) __PYX_ERR(0, 253, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_target, Py_None) < 0) __PYX_ERR(0, 253, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_longkey, Py_False) < 0) __PYX_ERR(0, 253, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_grademax, __pyx_int_0) < 0) __PYX_ERR(0, 253, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_dico = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":254
 * def richDictFromConfigstr(configstr, hidden=0, target=None, longkey=False, grademax=0):
 *     dico = fromConfigstr2Dict(configstr, hidden=0, target=None, longkey=False, grademax=0)
 *     return dico             # <<<<<<<<<<<<<<
 * 
 * def fromConfigstr2Dict(configstr, hidden=0, target=None, longkey=False, grademax=0):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_dico);
  __pyx_r = __pyx_v_dico;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":252
 *         pass
 * 
 * def richDictFromConfigstr(configstr, hidden=0, target=None, longkey=False, grademax=0):             # <<<<<<<<<<<<<<
 *     dico = fromConfigstr2Dict(configstr, hidden=0, target=None, longkey=False, grademax=0)
 *     return dico
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.richDictFromConfigstr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dico);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":256
 *     return dico
 * 
 * def fromConfigstr2Dict(configstr, hidden=0, target=None, longkey=False, grademax=0):             # <<<<<<<<<<<<<<
 *     """Cration d'un dictionnaire de connexions  partir d'une chane de
 *     connexion.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_13fromConfigstr2Dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_7chem_gm_4core_9gmtoolbox_12fromConfigstr2Dict[] = "Cr\303\251ation d'un dictionnaire de connexions \303\240 partir d'une cha\303\256ne de \n    connexion.\n    ";
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_13fromConfigstr2Dict = {"fromConfigstr2Dict", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_13fromConfigstr2Dict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_7chem_gm_4core_9gmtoolbox_12fromConfigstr2Dict};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_13fromConfigstr2Dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_configstr = 0;
  PyObject *__pyx_v_hidden = 0;
  PyObject *__pyx_v_target = 0;
  PyObject *__pyx_v_longkey = 0;
  PyObject *__pyx_v_grademax = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fromConfigstr2Dict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_configstr,&__pyx_n_s_hidden,&__pyx_n_s_target,&__pyx_n_s_longkey,&__pyx_n_s_grademax,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[1] = ((PyObject *)((PyObject *)__pyx_int_0));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_False));
    values[4] = ((PyObject *)((PyObject *)__pyx_int_0));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_configstr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hidden);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_longkey);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grademax);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fromConfigstr2Dict") < 0)) __PYX_ERR(0, 256, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_configstr = values[0];
    __pyx_v_hidden = values[1];
    __pyx_v_target = values[2];
    __pyx_v_longkey = values[3];
    __pyx_v_grademax = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fromConfigstr2Dict", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 256, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.fromConfigstr2Dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_12fromConfigstr2Dict(__pyx_self, __pyx_v_configstr, __pyx_v_hidden, __pyx_v_target, __pyx_v_longkey, __pyx_v_grademax);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_12fromConfigstr2Dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_configstr, PyObject *__pyx_v_hidden, PyObject *__pyx_v_target, PyObject *__pyx_v_longkey, PyObject *__pyx_v_grademax) {
  PyObject *__pyx_v_dico = NULL;
  PyObject *__pyx_v_lst = NULL;
  PyObject *__pyx_v_test = NULL;
  PyObject *__pyx_v_isHidden = NULL;
  PyObject *__pyx_v_ind = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_st = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_v_fval = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  int __pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  __Pyx_RefNannySetupContext("fromConfigstr2Dict", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":260
 *     connexion.
 *     """
 *     if target is None:             # <<<<<<<<<<<<<<
 *         dico = defaultConnect.copy()
 *     else:
 */
  __pyx_t_1 = (__pyx_v_target == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":261
 *     """
 *     if target is None:
 *         dico = defaultConnect.copy()             # <<<<<<<<<<<<<<
 *     else:
 *         dico = target
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultConnect); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 261, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 261, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_dico = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":260
 *     connexion.
 *     """
 *     if target is None:             # <<<<<<<<<<<<<<
 *         dico = defaultConnect.copy()
 *     else:
 */
    goto __pyx_L3;
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":263
 *         dico = defaultConnect.copy()
 *     else:
 *         dico = target             # <<<<<<<<<<<<<<
 *     if not configstr:
 *         return dico
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_v_target);
    __pyx_v_dico = __pyx_v_target;
  }
  __pyx_L3:;

  /* "metaphor/chem_gm/core/gmtoolbox.py":264
 *     else:
 *         dico = target
 *     if not configstr:             # <<<<<<<<<<<<<<
 *         return dico
 *     lst = configstr.split('_')
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_configstr); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 264, __pyx_L1_error)
  __pyx_t_1 = ((!__pyx_t_2) != 0);
  if (__pyx_t_1) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":265
 *         dico = target
 *     if not configstr:
 *         return dico             # <<<<<<<<<<<<<<
 *     lst = configstr.split('_')
 *     test = lst[-1]
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_dico);
    __pyx_r = __pyx_v_dico;
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":264
 *     else:
 *         dico = target
 *     if not configstr:             # <<<<<<<<<<<<<<
 *         return dico
 *     lst = configstr.split('_')
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":266
 *     if not configstr:
 *         return dico
 *     lst = configstr.split('_')             # <<<<<<<<<<<<<<
 *     test = lst[-1]
 *     isHidden = test[-1] == "N"
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_configstr, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_lst = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":267
 *         return dico
 *     lst = configstr.split('_')
 *     test = lst[-1]             # <<<<<<<<<<<<<<
 *     isHidden = test[-1] == "N"
 *     if isHidden:
 */
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_lst, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_test = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":268
 *     lst = configstr.split('_')
 *     test = lst[-1]
 *     isHidden = test[-1] == "N"             # <<<<<<<<<<<<<<
 *     if isHidden:
 *         try:
 */
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_test, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_n_u_N, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_isHidden = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":269
 *     test = lst[-1]
 *     isHidden = test[-1] == "N"
 *     if isHidden:             # <<<<<<<<<<<<<<
 *         try:
 *             dico['hidden'] = int(test[:-1])
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_isHidden); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 269, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":270
 *     isHidden = test[-1] == "N"
 *     if isHidden:
 *         try:             # <<<<<<<<<<<<<<
 *             dico['hidden'] = int(test[:-1])
 *             lst.pop(-1)
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      /*try:*/ {

        /* "metaphor/chem_gm/core/gmtoolbox.py":271
 *     if isHidden:
 *         try:
 *             dico['hidden'] = int(test[:-1])             # <<<<<<<<<<<<<<
 *             lst.pop(-1)
 *         except:
 */
        __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_test, 0, -1L, NULL, NULL, &__pyx_slice__10, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 271, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 271, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(PyObject_SetItem(__pyx_v_dico, __pyx_n_u_hidden, __pyx_t_5) < 0)) __PYX_ERR(0, 271, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":272
 *         try:
 *             dico['hidden'] = int(test[:-1])
 *             lst.pop(-1)             # <<<<<<<<<<<<<<
 *         except:
 *             dico['hidden'] = hidden
 */
        __pyx_t_5 = __Pyx_PyObject_PopIndex(__pyx_v_lst, __pyx_int_neg_1, -1L, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 272, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":270
 *     isHidden = test[-1] == "N"
 *     if isHidden:
 *         try:             # <<<<<<<<<<<<<<
 *             dico['hidden'] = int(test[:-1])
 *             lst.pop(-1)
 */
      }
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L11_try_end;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":273
 *             dico['hidden'] = int(test[:-1])
 *             lst.pop(-1)
 *         except:             # <<<<<<<<<<<<<<
 *             dico['hidden'] = hidden
 *             isHidden = False
 */
      /*except:*/ {
        __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.fromConfigstr2Dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(0, 273, __pyx_L8_except_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GOTREF(__pyx_t_4);

        /* "metaphor/chem_gm/core/gmtoolbox.py":274
 *             lst.pop(-1)
 *         except:
 *             dico['hidden'] = hidden             # <<<<<<<<<<<<<<
 *             isHidden = False
 *     for ind, value in enumerate(lst):
 */
        if (unlikely(PyObject_SetItem(__pyx_v_dico, __pyx_n_u_hidden, __pyx_v_hidden) < 0)) __PYX_ERR(0, 274, __pyx_L8_except_error)

        /* "metaphor/chem_gm/core/gmtoolbox.py":275
 *         except:
 *             dico['hidden'] = hidden
 *             isHidden = False             # <<<<<<<<<<<<<<
 *     for ind, value in enumerate(lst):
 *         if value[0] in Hydrogenes:
 */
        __Pyx_INCREF(Py_False);
        __Pyx_DECREF_SET(__pyx_v_isHidden, Py_False);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L7_exception_handled;
      }
      __pyx_L8_except_error:;

      /* "metaphor/chem_gm/core/gmtoolbox.py":270
 *     isHidden = test[-1] == "N"
 *     if isHidden:
 *         try:             # <<<<<<<<<<<<<<
 *             dico['hidden'] = int(test[:-1])
 *             lst.pop(-1)
 */
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      goto __pyx_L1_error;
      __pyx_L7_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      __pyx_L11_try_end:;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":269
 *     test = lst[-1]
 *     isHidden = test[-1] == "N"
 *     if isHidden:             # <<<<<<<<<<<<<<
 *         try:
 *             dico['hidden'] = int(test[:-1])
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":276
 *             dico['hidden'] = hidden
 *             isHidden = False
 *     for ind, value in enumerate(lst):             # <<<<<<<<<<<<<<
 *         if value[0] in Hydrogenes:
 *             st = value[1:]
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_4 = __pyx_int_0;
  if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
    __pyx_t_3 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_3); __pyx_t_9 = 0;
    __pyx_t_10 = NULL;
  } else {
    __pyx_t_9 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 276, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_10)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 276, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 276, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 276, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 276, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_10(__pyx_t_3);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 276, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_4);
    __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4);
    __pyx_t_4 = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":277
 *             isHidden = False
 *     for ind, value in enumerate(lst):
 *         if value[0] in Hydrogenes:             # <<<<<<<<<<<<<<
 *             st = value[1:]
 *             if st:
 */
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_Hydrogenes); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_5, __pyx_t_11, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 277, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":278
 *     for ind, value in enumerate(lst):
 *         if value[0] in Hydrogenes:
 *             st = value[1:]             # <<<<<<<<<<<<<<
 *             if st:
 *                 dico[value[0]] = int(st)
 */
      __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_value, 1, 0, NULL, NULL, &__pyx_slice__11, 1, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 278, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_XDECREF_SET(__pyx_v_st, __pyx_t_11);
      __pyx_t_11 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":279
 *         if value[0] in Hydrogenes:
 *             st = value[1:]
 *             if st:             # <<<<<<<<<<<<<<
 *                 dico[value[0]] = int(st)
 *             elif hidden:
 */
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_st); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 279, __pyx_L1_error)
      if (__pyx_t_2) {

        /* "metaphor/chem_gm/core/gmtoolbox.py":280
 *             st = value[1:]
 *             if st:
 *                 dico[value[0]] = int(st)             # <<<<<<<<<<<<<<
 *             elif hidden:
 *                 dico[value[0]] = hidden
 */
        __pyx_t_11 = __Pyx_PyNumber_Int(__pyx_v_st); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 280, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 280, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (unlikely(PyObject_SetItem(__pyx_v_dico, __pyx_t_5, __pyx_t_11) < 0)) __PYX_ERR(0, 280, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":279
 *         if value[0] in Hydrogenes:
 *             st = value[1:]
 *             if st:             # <<<<<<<<<<<<<<
 *                 dico[value[0]] = int(st)
 *             elif hidden:
 */
        goto __pyx_L17;
      }

      /* "metaphor/chem_gm/core/gmtoolbox.py":281
 *             if st:
 *                 dico[value[0]] = int(st)
 *             elif hidden:             # <<<<<<<<<<<<<<
 *                 dico[value[0]] = hidden
 *             else:
 */
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_hidden); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 281, __pyx_L1_error)
      if (__pyx_t_2) {

        /* "metaphor/chem_gm/core/gmtoolbox.py":282
 *                 dico[value[0]] = int(st)
 *             elif hidden:
 *                 dico[value[0]] = hidden             # <<<<<<<<<<<<<<
 *             else:
 *                 dico[value[0]] = -1
 */
        __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 282, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (unlikely(PyObject_SetItem(__pyx_v_dico, __pyx_t_11, __pyx_v_hidden) < 0)) __PYX_ERR(0, 282, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":281
 *             if st:
 *                 dico[value[0]] = int(st)
 *             elif hidden:             # <<<<<<<<<<<<<<
 *                 dico[value[0]] = hidden
 *             else:
 */
        goto __pyx_L17;
      }

      /* "metaphor/chem_gm/core/gmtoolbox.py":284
 *                 dico[value[0]] = hidden
 *             else:
 *                 dico[value[0]] = -1             # <<<<<<<<<<<<<<
 *             lst.pop(ind)
 *     for value in lst:
 */
      /*else*/ {
        __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 284, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (unlikely(PyObject_SetItem(__pyx_v_dico, __pyx_t_11, __pyx_int_neg_1) < 0)) __PYX_ERR(0, 284, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      __pyx_L17:;

      /* "metaphor/chem_gm/core/gmtoolbox.py":285
 *             else:
 *                 dico[value[0]] = -1
 *             lst.pop(ind)             # <<<<<<<<<<<<<<
 *     for value in lst:
 *         key = ""
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_lst, __pyx_n_s_pop); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 285, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_12 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_12)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      if (!__pyx_t_12) {
        __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_ind); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 285, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_ind};
          __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 285, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_GOTREF(__pyx_t_11);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_ind};
          __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 285, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_GOTREF(__pyx_t_11);
        } else
        #endif
        {
          __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 285, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL;
          __Pyx_INCREF(__pyx_v_ind);
          __Pyx_GIVEREF(__pyx_v_ind);
          PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_v_ind);
          __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_13, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 285, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":277
 *             isHidden = False
 *     for ind, value in enumerate(lst):
 *         if value[0] in Hydrogenes:             # <<<<<<<<<<<<<<
 *             st = value[1:]
 *             if st:
 */
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":276
 *             dico['hidden'] = hidden
 *             isHidden = False
 *     for ind, value in enumerate(lst):             # <<<<<<<<<<<<<<
 *         if value[0] in Hydrogenes:
 *             st = value[1:]
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":286
 *                 dico[value[0]] = -1
 *             lst.pop(ind)
 *     for value in lst:             # <<<<<<<<<<<<<<
 *         key = ""
 *         if value == 'Class':
 */
  if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
    __pyx_t_4 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0;
    __pyx_t_10 = NULL;
  } else {
    __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 286, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_10)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 286, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 286, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_10(__pyx_t_4);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 286, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":287
 *             lst.pop(ind)
 *     for value in lst:
 *         key = ""             # <<<<<<<<<<<<<<
 *         if value == 'Class':
 *             key = value
 */
    __Pyx_INCREF(__pyx_kp_u__4);
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_kp_u__4);

    /* "metaphor/chem_gm/core/gmtoolbox.py":288
 *     for value in lst:
 *         key = ""
 *         if value == 'Class':             # <<<<<<<<<<<<<<
 *             key = value
 *             val = True
 */
    __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_value, __pyx_n_u_Class, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 288, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":289
 *         key = ""
 *         if value == 'Class':
 *             key = value             # <<<<<<<<<<<<<<
 *             val = True
 *         elif isint(value):
 */
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_DECREF_SET(__pyx_v_key, __pyx_v_value);

      /* "metaphor/chem_gm/core/gmtoolbox.py":290
 *         if value == 'Class':
 *             key = value
 *             val = True             # <<<<<<<<<<<<<<
 *         elif isint(value):
 *             pass # heu ???
 */
      __Pyx_INCREF(Py_True);
      __Pyx_XDECREF_SET(__pyx_v_val, Py_True);

      /* "metaphor/chem_gm/core/gmtoolbox.py":288
 *     for value in lst:
 *         key = ""
 *         if value == 'Class':             # <<<<<<<<<<<<<<
 *             key = value
 *             val = True
 */
      goto __pyx_L20;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":291
 *             key = value
 *             val = True
 *         elif isint(value):             # <<<<<<<<<<<<<<
 *             pass # heu ???
 *         elif isint(value[1:]):
 */
    __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_isint); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_11);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_11, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_11)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_value};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_value};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      {
        __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 291, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_INCREF(__pyx_v_value);
        __Pyx_GIVEREF(__pyx_v_value);
        PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_v_value);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_13, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {
      goto __pyx_L20;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":293
 *         elif isint(value):
 *             pass # heu ???
 *         elif isint(value[1:]):             # <<<<<<<<<<<<<<
 *             val = int(value[1:])
 *             key = value[0]
 */
    __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_isint); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_13 = __Pyx_PyObject_GetSlice(__pyx_v_value, 1, 0, NULL, NULL, &__pyx_slice__12, 1, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_11);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_11, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 293, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_11)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_13};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 293, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_13};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 293, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 293, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_13);
        PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_13);
        __pyx_t_13 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 293, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 293, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":294
 *             pass # heu ???
 *         elif isint(value[1:]):
 *             val = int(value[1:])             # <<<<<<<<<<<<<<
 *             key = value[0]
 *         elif isint(value[2:]):
 */
      __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_value, 1, 0, NULL, NULL, &__pyx_slice__13, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_11);
      __pyx_t_11 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":295
 *         elif isint(value[1:]):
 *             val = int(value[1:])
 *             key = value[0]             # <<<<<<<<<<<<<<
 *         elif isint(value[2:]):
 *             key = value[:2]
 */
      __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 295, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_11);
      __pyx_t_11 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":293
 *         elif isint(value):
 *             pass # heu ???
 *         elif isint(value[1:]):             # <<<<<<<<<<<<<<
 *             val = int(value[1:])
 *             key = value[0]
 */
      goto __pyx_L20;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":296
 *             val = int(value[1:])
 *             key = value[0]
 *         elif isint(value[2:]):             # <<<<<<<<<<<<<<
 *             key = value[:2]
 *             val = int(value[2:])
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_isint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 296, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_v_value, 2, 0, NULL, NULL, &__pyx_slice__14, 1, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 296, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_13 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_13)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_13) {
      __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 296, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_GOTREF(__pyx_t_11);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_12};
        __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 296, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_12};
        __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 296, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 296, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_13); __pyx_t_13 = NULL;
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_12);
        __pyx_t_12 = 0;
        __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 296, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 296, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (__pyx_t_2) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":297
 *             key = value[0]
 *         elif isint(value[2:]):
 *             key = value[:2]             # <<<<<<<<<<<<<<
 *             val = int(value[2:])
 *         elif isint(value[3:]):
 */
      __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_value, 0, 2, NULL, NULL, &__pyx_slice__15, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 297, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_11);
      __pyx_t_11 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":298
 *         elif isint(value[2:]):
 *             key = value[:2]
 *             val = int(value[2:])             # <<<<<<<<<<<<<<
 *         elif isint(value[3:]):
 *             if (len(value) > 4) and (value[:4] in ['iso1', 'iso2', 'chi1', 'chi2']):
 */
      __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_value, 2, 0, NULL, NULL, &__pyx_slice__16, 1, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 298, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 298, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":296
 *             val = int(value[1:])
 *             key = value[0]
 *         elif isint(value[2:]):             # <<<<<<<<<<<<<<
 *             key = value[:2]
 *             val = int(value[2:])
 */
      goto __pyx_L20;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":299
 *             key = value[:2]
 *             val = int(value[2:])
 *         elif isint(value[3:]):             # <<<<<<<<<<<<<<
 *             if (len(value) > 4) and (value[:4] in ['iso1', 'iso2', 'chi1', 'chi2']):
 *                 key = value[:4]
 */
    __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_isint); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_value, 3, 0, NULL, NULL, &__pyx_slice__17, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_12 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
      if (likely(__pyx_t_12)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_11, function);
      }
    }
    if (!__pyx_t_12) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 299, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_11)) {
        PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_5};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 299, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
        PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_5};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 299, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      {
        __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 299, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL;
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_13, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 299, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 299, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":300
 *             val = int(value[2:])
 *         elif isint(value[3:]):
 *             if (len(value) > 4) and (value[:4] in ['iso1', 'iso2', 'chi1', 'chi2']):             # <<<<<<<<<<<<<<
 *                 key = value[:4]
 *                 val = int(value[4:])
 */
      __pyx_t_14 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 300, __pyx_L1_error)
      __pyx_t_1 = ((__pyx_t_14 > 4) != 0);
      if (__pyx_t_1) {
      } else {
        __pyx_t_2 = __pyx_t_1;
        goto __pyx_L22_bool_binop_done;
      }
      __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_value, 0, 4, NULL, NULL, &__pyx_slice__18, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_15 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_iso1, Py_EQ)); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 300, __pyx_L1_error)
      if (!__pyx_t_15) {
      } else {
        __pyx_t_1 = __pyx_t_15;
        goto __pyx_L24_bool_binop_done;
      }
      __pyx_t_15 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_iso2, Py_EQ)); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 300, __pyx_L1_error)
      if (!__pyx_t_15) {
      } else {
        __pyx_t_1 = __pyx_t_15;
        goto __pyx_L24_bool_binop_done;
      }
      __pyx_t_15 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_chi1, Py_EQ)); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 300, __pyx_L1_error)
      if (!__pyx_t_15) {
      } else {
        __pyx_t_1 = __pyx_t_15;
        goto __pyx_L24_bool_binop_done;
      }
      __pyx_t_15 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_chi2, Py_EQ)); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 300, __pyx_L1_error)
      __pyx_t_1 = __pyx_t_15;
      __pyx_L24_bool_binop_done:;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_15 = (__pyx_t_1 != 0);
      __pyx_t_2 = __pyx_t_15;
      __pyx_L22_bool_binop_done:;
      if (__pyx_t_2) {

        /* "metaphor/chem_gm/core/gmtoolbox.py":301
 *         elif isint(value[3:]):
 *             if (len(value) > 4) and (value[:4] in ['iso1', 'iso2', 'chi1', 'chi2']):
 *                 key = value[:4]             # <<<<<<<<<<<<<<
 *                 val = int(value[4:])
 *                 dico[key] = val
 */
        __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_value, 0, 4, NULL, NULL, &__pyx_slice__19, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":302
 *             if (len(value) > 4) and (value[:4] in ['iso1', 'iso2', 'chi1', 'chi2']):
 *                 key = value[:4]
 *                 val = int(value[4:])             # <<<<<<<<<<<<<<
 *                 dico[key] = val
 *             else:
 */
        __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_value, 4, 0, NULL, NULL, &__pyx_slice__20, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 302, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_11 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 302, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_11);
        __pyx_t_11 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":303
 *                 key = value[:4]
 *                 val = int(value[4:])
 *                 dico[key] = val             # <<<<<<<<<<<<<<
 *             else:
 *                 key = value[:3]
 */
        if (unlikely(PyObject_SetItem(__pyx_v_dico, __pyx_v_key, __pyx_v_val) < 0)) __PYX_ERR(0, 303, __pyx_L1_error)

        /* "metaphor/chem_gm/core/gmtoolbox.py":300
 *             val = int(value[2:])
 *         elif isint(value[3:]):
 *             if (len(value) > 4) and (value[:4] in ['iso1', 'iso2', 'chi1', 'chi2']):             # <<<<<<<<<<<<<<
 *                 key = value[:4]
 *                 val = int(value[4:])
 */
        goto __pyx_L21;
      }

      /* "metaphor/chem_gm/core/gmtoolbox.py":305
 *                 dico[key] = val
 *             else:
 *                 key = value[:3]             # <<<<<<<<<<<<<<
 *                 if key in ['grd', 'dgr']:
 *                     fval = value[3:]
 */
      /*else*/ {
        __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_value, 0, 3, NULL, NULL, &__pyx_slice__21, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 305, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_11);
        __pyx_t_11 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":306
 *             else:
 *                 key = value[:3]
 *                 if key in ['grd', 'dgr']:             # <<<<<<<<<<<<<<
 *                     fval = value[3:]
 *     #                 if len(fval) == 2:
 */
        __Pyx_INCREF(__pyx_v_key);
        __pyx_t_11 = __pyx_v_key;
        __pyx_t_15 = (__Pyx_PyUnicode_Equals(__pyx_t_11, __pyx_n_u_grd, Py_EQ)); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 306, __pyx_L1_error)
        if (!__pyx_t_15) {
        } else {
          __pyx_t_2 = __pyx_t_15;
          goto __pyx_L29_bool_binop_done;
        }
        __pyx_t_15 = (__Pyx_PyUnicode_Equals(__pyx_t_11, __pyx_n_u_dgr, Py_EQ)); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 306, __pyx_L1_error)
        __pyx_t_2 = __pyx_t_15;
        __pyx_L29_bool_binop_done:;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_15 = (__pyx_t_2 != 0);
        if (__pyx_t_15) {

          /* "metaphor/chem_gm/core/gmtoolbox.py":307
 *                 key = value[:3]
 *                 if key in ['grd', 'dgr']:
 *                     fval = value[3:]             # <<<<<<<<<<<<<<
 *     #                 if len(fval) == 2:
 *     #                     key = gradekey(int(fval[0]), longkey)
 */
          __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_value, 3, 0, NULL, NULL, &__pyx_slice__22, 1, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 307, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_XDECREF_SET(__pyx_v_fval, __pyx_t_11);
          __pyx_t_11 = 0;

          /* "metaphor/chem_gm/core/gmtoolbox.py":311
 *     #                     key = gradekey(int(fval[0]), longkey)
 *     #                     val = fval[1]
 *                     if len(fval) >= 2:             # <<<<<<<<<<<<<<
 *                         val = fval[-1]
 *                         for ind in range(len(fval) - 1):
 */
          __pyx_t_14 = PyObject_Length(__pyx_v_fval); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 311, __pyx_L1_error)
          __pyx_t_15 = ((__pyx_t_14 >= 2) != 0);
          if (__pyx_t_15) {

            /* "metaphor/chem_gm/core/gmtoolbox.py":312
 *     #                     val = fval[1]
 *                     if len(fval) >= 2:
 *                         val = fval[-1]             # <<<<<<<<<<<<<<
 *                         for ind in range(len(fval) - 1):
 *                             key = gradekey(int(fval[ind]), longkey)
 */
            __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_fval, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 312, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_11);
            __pyx_t_11 = 0;

            /* "metaphor/chem_gm/core/gmtoolbox.py":313
 *                     if len(fval) >= 2:
 *                         val = fval[-1]
 *                         for ind in range(len(fval) - 1):             # <<<<<<<<<<<<<<
 *                             key = gradekey(int(fval[ind]), longkey)
 *                             dico[key] = val
 */
            __pyx_t_14 = PyObject_Length(__pyx_v_fval); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 313, __pyx_L1_error)
            __pyx_t_11 = PyInt_FromSsize_t((__pyx_t_14 - 1)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 313, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 313, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
              __pyx_t_11 = __pyx_t_3; __Pyx_INCREF(__pyx_t_11); __pyx_t_14 = 0;
              __pyx_t_16 = NULL;
            } else {
              __pyx_t_14 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 313, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_11);
              __pyx_t_16 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 313, __pyx_L1_error)
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            for (;;) {
              if (likely(!__pyx_t_16)) {
                if (likely(PyList_CheckExact(__pyx_t_11))) {
                  if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_11)) break;
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_14); __Pyx_INCREF(__pyx_t_3); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 313, __pyx_L1_error)
                  #else
                  __pyx_t_3 = PySequence_ITEM(__pyx_t_11, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 313, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  #endif
                } else {
                  if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_11)) break;
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_14); __Pyx_INCREF(__pyx_t_3); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 313, __pyx_L1_error)
                  #else
                  __pyx_t_3 = PySequence_ITEM(__pyx_t_11, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 313, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  #endif
                }
              } else {
                __pyx_t_3 = __pyx_t_16(__pyx_t_11);
                if (unlikely(!__pyx_t_3)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 313, __pyx_L1_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_3);
              }
              __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "metaphor/chem_gm/core/gmtoolbox.py":314
 *                         val = fval[-1]
 *                         for ind in range(len(fval) - 1):
 *                             key = gradekey(int(fval[ind]), longkey)             # <<<<<<<<<<<<<<
 *                             dico[key] = val
 *                         key = ""
 */
              __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_gradekey); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 314, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_13);
              __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_fval, __pyx_v_ind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 314, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_12 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 314, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __pyx_t_5 = NULL;
              __pyx_t_17 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
                __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_13);
                if (likely(__pyx_t_5)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
                  __Pyx_INCREF(__pyx_t_5);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_13, function);
                  __pyx_t_17 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_13)) {
                PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_12, __pyx_v_longkey};
                __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 314, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
                PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_12, __pyx_v_longkey};
                __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 314, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              } else
              #endif
              {
                __pyx_t_18 = PyTuple_New(2+__pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 314, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_18);
                if (__pyx_t_5) {
                  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_5); __pyx_t_5 = NULL;
                }
                __Pyx_GIVEREF(__pyx_t_12);
                PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_17, __pyx_t_12);
                __Pyx_INCREF(__pyx_v_longkey);
                __Pyx_GIVEREF(__pyx_v_longkey);
                PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_17, __pyx_v_longkey);
                __pyx_t_12 = 0;
                __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_18, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 314, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
              }
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "metaphor/chem_gm/core/gmtoolbox.py":315
 *                         for ind in range(len(fval) - 1):
 *                             key = gradekey(int(fval[ind]), longkey)
 *                             dico[key] = val             # <<<<<<<<<<<<<<
 *                         key = ""
 *                 else:
 */
              if (unlikely(PyObject_SetItem(__pyx_v_dico, __pyx_v_key, __pyx_v_val) < 0)) __PYX_ERR(0, 315, __pyx_L1_error)

              /* "metaphor/chem_gm/core/gmtoolbox.py":313
 *                     if len(fval) >= 2:
 *                         val = fval[-1]
 *                         for ind in range(len(fval) - 1):             # <<<<<<<<<<<<<<
 *                             key = gradekey(int(fval[ind]), longkey)
 *                             dico[key] = val
 */
            }
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

            /* "metaphor/chem_gm/core/gmtoolbox.py":316
 *                             key = gradekey(int(fval[ind]), longkey)
 *                             dico[key] = val
 *                         key = ""             # <<<<<<<<<<<<<<
 *                 else:
 *                     val = int(value[3:])
 */
            __Pyx_INCREF(__pyx_kp_u__4);
            __Pyx_DECREF_SET(__pyx_v_key, __pyx_kp_u__4);

            /* "metaphor/chem_gm/core/gmtoolbox.py":311
 *     #                     key = gradekey(int(fval[0]), longkey)
 *     #                     val = fval[1]
 *                     if len(fval) >= 2:             # <<<<<<<<<<<<<<
 *                         val = fval[-1]
 *                         for ind in range(len(fval) - 1):
 */
          }

          /* "metaphor/chem_gm/core/gmtoolbox.py":306
 *             else:
 *                 key = value[:3]
 *                 if key in ['grd', 'dgr']:             # <<<<<<<<<<<<<<
 *                     fval = value[3:]
 *     #                 if len(fval) == 2:
 */
          goto __pyx_L28;
        }

        /* "metaphor/chem_gm/core/gmtoolbox.py":318
 *                         key = ""
 *                 else:
 *                     val = int(value[3:])             # <<<<<<<<<<<<<<
 *         elif len(value) > 3 and value[:3] in ['grd', 'dgr'] and value[-2:]=="-1":
 *             #key = value[:3]
 */
        /*else*/ {
          __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_value, 3, 0, NULL, NULL, &__pyx_slice__23, 1, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 318, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 318, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3);
          __pyx_t_3 = 0;
        }
        __pyx_L28:;
      }
      __pyx_L21:;

      /* "metaphor/chem_gm/core/gmtoolbox.py":299
 *             key = value[:2]
 *             val = int(value[2:])
 *         elif isint(value[3:]):             # <<<<<<<<<<<<<<
 *             if (len(value) > 4) and (value[:4] in ['iso1', 'iso2', 'chi1', 'chi2']):
 *                 key = value[:4]
 */
      goto __pyx_L20;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":319
 *                 else:
 *                     val = int(value[3:])
 *         elif len(value) > 3 and value[:3] in ['grd', 'dgr'] and value[-2:]=="-1":             # <<<<<<<<<<<<<<
 *             #key = value[:3]
 *             fval = value[3:-2]
 */
    __pyx_t_14 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 319, __pyx_L1_error)
    __pyx_t_2 = ((__pyx_t_14 > 3) != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_15 = __pyx_t_2;
      goto __pyx_L34_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_value, 0, 3, NULL, NULL, &__pyx_slice__24, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_grd, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 319, __pyx_L1_error)
    if (!__pyx_t_1) {
    } else {
      __pyx_t_2 = __pyx_t_1;
      goto __pyx_L37_bool_binop_done;
    }
    __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_dgr, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 319, __pyx_L1_error)
    __pyx_t_2 = __pyx_t_1;
    __pyx_L37_bool_binop_done:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {
    } else {
      __pyx_t_15 = __pyx_t_1;
      goto __pyx_L34_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_value, -2L, 0, NULL, NULL, &__pyx_slice__25, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_kp_u_1, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 319, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_15 = __pyx_t_1;
    __pyx_L34_bool_binop_done:;
    if (__pyx_t_15) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":321
 *         elif len(value) > 3 and value[:3] in ['grd', 'dgr'] and value[-2:]=="-1":
 *             #key = value[:3]
 *             fval = value[3:-2]             # <<<<<<<<<<<<<<
 *             for ind in range(len(fval)):
 *                 key = gradekey(int(fval[ind]), longkey)
 */
      __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_value, 3, -2L, NULL, NULL, &__pyx_slice__26, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 321, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_fval, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":322
 *             #key = value[:3]
 *             fval = value[3:-2]
 *             for ind in range(len(fval)):             # <<<<<<<<<<<<<<
 *                 key = gradekey(int(fval[ind]), longkey)
 *                 dico[key] = hidden
 */
      __pyx_t_14 = PyObject_Length(__pyx_v_fval); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 322, __pyx_L1_error)
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 322, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) {
        __pyx_t_3 = __pyx_t_11; __Pyx_INCREF(__pyx_t_3); __pyx_t_14 = 0;
        __pyx_t_16 = NULL;
      } else {
        __pyx_t_14 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_16 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 322, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      for (;;) {
        if (likely(!__pyx_t_16)) {
          if (likely(PyList_CheckExact(__pyx_t_3))) {
            if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_11 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_14); __Pyx_INCREF(__pyx_t_11); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 322, __pyx_L1_error)
            #else
            __pyx_t_11 = PySequence_ITEM(__pyx_t_3, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 322, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            #endif
          } else {
            if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_14); __Pyx_INCREF(__pyx_t_11); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 322, __pyx_L1_error)
            #else
            __pyx_t_11 = PySequence_ITEM(__pyx_t_3, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 322, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            #endif
          }
        } else {
          __pyx_t_11 = __pyx_t_16(__pyx_t_3);
          if (unlikely(!__pyx_t_11)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 322, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_11);
        }
        __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_11);
        __pyx_t_11 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":323
 *             fval = value[3:-2]
 *             for ind in range(len(fval)):
 *                 key = gradekey(int(fval[ind]), longkey)             # <<<<<<<<<<<<<<
 *                 dico[key] = hidden
 *             key = ""
 */
        __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_gradekey); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 323, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_18 = __Pyx_PyObject_GetItem(__pyx_v_fval, __pyx_v_ind); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 323, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        __pyx_t_12 = __Pyx_PyNumber_Int(__pyx_t_18); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 323, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __pyx_t_18 = NULL;
        __pyx_t_17 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_18)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_18);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
            __pyx_t_17 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_13)) {
          PyObject *__pyx_temp[3] = {__pyx_t_18, __pyx_t_12, __pyx_v_longkey};
          __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 323, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
          PyObject *__pyx_temp[3] = {__pyx_t_18, __pyx_t_12, __pyx_v_longkey};
          __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 323, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(2+__pyx_t_17); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 323, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          if (__pyx_t_18) {
            __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_18); __pyx_t_18 = NULL;
          }
          __Pyx_GIVEREF(__pyx_t_12);
          PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_17, __pyx_t_12);
          __Pyx_INCREF(__pyx_v_longkey);
          __Pyx_GIVEREF(__pyx_v_longkey);
          PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_17, __pyx_v_longkey);
          __pyx_t_12 = 0;
          __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_5, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 323, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_11);
        __pyx_t_11 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":324
 *             for ind in range(len(fval)):
 *                 key = gradekey(int(fval[ind]), longkey)
 *                 dico[key] = hidden             # <<<<<<<<<<<<<<
 *             key = ""
 *         elif value == 'mol':
 */
        if (unlikely(PyObject_SetItem(__pyx_v_dico, __pyx_v_key, __pyx_v_hidden) < 0)) __PYX_ERR(0, 324, __pyx_L1_error)

        /* "metaphor/chem_gm/core/gmtoolbox.py":322
 *             #key = value[:3]
 *             fval = value[3:-2]
 *             for ind in range(len(fval)):             # <<<<<<<<<<<<<<
 *                 key = gradekey(int(fval[ind]), longkey)
 *                 dico[key] = hidden
 */
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":325
 *                 key = gradekey(int(fval[ind]), longkey)
 *                 dico[key] = hidden
 *             key = ""             # <<<<<<<<<<<<<<
 *         elif value == 'mol':
 *             key = value
 */
      __Pyx_INCREF(__pyx_kp_u__4);
      __Pyx_DECREF_SET(__pyx_v_key, __pyx_kp_u__4);

      /* "metaphor/chem_gm/core/gmtoolbox.py":319
 *                 else:
 *                     val = int(value[3:])
 *         elif len(value) > 3 and value[:3] in ['grd', 'dgr'] and value[-2:]=="-1":             # <<<<<<<<<<<<<<
 *             #key = value[:3]
 *             fval = value[3:-2]
 */
      goto __pyx_L20;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":326
 *                 dico[key] = hidden
 *             key = ""
 *         elif value == 'mol':             # <<<<<<<<<<<<<<
 *             key = value
 *             val = True
 */
    __pyx_t_15 = (__Pyx_PyUnicode_Equals(__pyx_v_value, __pyx_n_u_mol, Py_EQ)); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 326, __pyx_L1_error)
    if (__pyx_t_15) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":327
 *             key = ""
 *         elif value == 'mol':
 *             key = value             # <<<<<<<<<<<<<<
 *             val = True
 *         elif value == "Cn":
 */
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_DECREF_SET(__pyx_v_key, __pyx_v_value);

      /* "metaphor/chem_gm/core/gmtoolbox.py":328
 *         elif value == 'mol':
 *             key = value
 *             val = True             # <<<<<<<<<<<<<<
 *         elif value == "Cn":
 *             key = "central"
 */
      __Pyx_INCREF(Py_True);
      __Pyx_XDECREF_SET(__pyx_v_val, Py_True);

      /* "metaphor/chem_gm/core/gmtoolbox.py":326
 *                 dico[key] = hidden
 *             key = ""
 *         elif value == 'mol':             # <<<<<<<<<<<<<<
 *             key = value
 *             val = True
 */
      goto __pyx_L20;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":329
 *             key = value
 *             val = True
 *         elif value == "Cn":             # <<<<<<<<<<<<<<
 *             key = "central"
 *         elif '|' in value:
 */
    __pyx_t_15 = (__Pyx_PyUnicode_Equals(__pyx_v_value, __pyx_n_u_Cn, Py_EQ)); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 329, __pyx_L1_error)
    if (__pyx_t_15) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":330
 *             val = True
 *         elif value == "Cn":
 *             key = "central"             # <<<<<<<<<<<<<<
 *         elif '|' in value:
 *             key = "central"
 */
      __Pyx_INCREF(__pyx_n_u_central);
      __Pyx_DECREF_SET(__pyx_v_key, __pyx_n_u_central);

      /* "metaphor/chem_gm/core/gmtoolbox.py":329
 *             key = value
 *             val = True
 *         elif value == "Cn":             # <<<<<<<<<<<<<<
 *             key = "central"
 *         elif '|' in value:
 */
      goto __pyx_L20;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":331
 *         elif value == "Cn":
 *             key = "central"
 *         elif '|' in value:             # <<<<<<<<<<<<<<
 *             key = "central"
 *             val = value.split('|')
 */
    __pyx_t_15 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__27, __pyx_v_value, Py_EQ)); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 331, __pyx_L1_error)
    __pyx_t_1 = (__pyx_t_15 != 0);
    if (__pyx_t_1) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":332
 *             key = "central"
 *         elif '|' in value:
 *             key = "central"             # <<<<<<<<<<<<<<
 *             val = value.split('|')
 *         elif grademax and (len(value) == 5) and (value[:4] in ["grds", "dgrs"]):
 */
      __Pyx_INCREF(__pyx_n_u_central);
      __Pyx_DECREF_SET(__pyx_v_key, __pyx_n_u_central);

      /* "metaphor/chem_gm/core/gmtoolbox.py":333
 *         elif '|' in value:
 *             key = "central"
 *             val = value.split('|')             # <<<<<<<<<<<<<<
 *         elif grademax and (len(value) == 5) and (value[:4] in ["grds", "dgrs"]):
 *             for ind in range(1, grademax + 1):
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 333, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 333, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_11);
      __pyx_t_11 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":331
 *         elif value == "Cn":
 *             key = "central"
 *         elif '|' in value:             # <<<<<<<<<<<<<<
 *             key = "central"
 *             val = value.split('|')
 */
      goto __pyx_L20;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":334
 *             key = "central"
 *             val = value.split('|')
 *         elif grademax and (len(value) == 5) and (value[:4] in ["grds", "dgrs"]):             # <<<<<<<<<<<<<<
 *             for ind in range(1, grademax + 1):
 *                 key = gradekey(ind, longkey)
 */
    __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_grademax); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 334, __pyx_L1_error)
    if (__pyx_t_15) {
    } else {
      __pyx_t_1 = __pyx_t_15;
      goto __pyx_L41_bool_binop_done;
    }
    __pyx_t_14 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 334, __pyx_L1_error)
    __pyx_t_15 = ((__pyx_t_14 == 5) != 0);
    if (__pyx_t_15) {
    } else {
      __pyx_t_1 = __pyx_t_15;
      goto __pyx_L41_bool_binop_done;
    }
    __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_value, 0, 4, NULL, NULL, &__pyx_slice__29, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_11, __pyx_n_u_grds, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 334, __pyx_L1_error)
    if (!__pyx_t_2) {
    } else {
      __pyx_t_15 = __pyx_t_2;
      goto __pyx_L44_bool_binop_done;
    }
    __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_11, __pyx_n_u_dgrs, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 334, __pyx_L1_error)
    __pyx_t_15 = __pyx_t_2;
    __pyx_L44_bool_binop_done:;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_2 = (__pyx_t_15 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L41_bool_binop_done:;
    if (__pyx_t_1) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":335
 *             val = value.split('|')
 *         elif grademax and (len(value) == 5) and (value[:4] in ["grds", "dgrs"]):
 *             for ind in range(1, grademax + 1):             # <<<<<<<<<<<<<<
 *                 key = gradekey(ind, longkey)
 *                 dico[key] = value[4:]
 */
      __pyx_t_11 = __Pyx_PyInt_AddObjC(__pyx_v_grademax, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 335, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 335, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_1);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_11);
      __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 335, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) {
        __pyx_t_3 = __pyx_t_11; __Pyx_INCREF(__pyx_t_3); __pyx_t_14 = 0;
        __pyx_t_16 = NULL;
      } else {
        __pyx_t_14 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 335, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_16 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 335, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      for (;;) {
        if (likely(!__pyx_t_16)) {
          if (likely(PyList_CheckExact(__pyx_t_3))) {
            if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_11 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_14); __Pyx_INCREF(__pyx_t_11); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 335, __pyx_L1_error)
            #else
            __pyx_t_11 = PySequence_ITEM(__pyx_t_3, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 335, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            #endif
          } else {
            if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_14); __Pyx_INCREF(__pyx_t_11); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 335, __pyx_L1_error)
            #else
            __pyx_t_11 = PySequence_ITEM(__pyx_t_3, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 335, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            #endif
          }
        } else {
          __pyx_t_11 = __pyx_t_16(__pyx_t_3);
          if (unlikely(!__pyx_t_11)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 335, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_11);
        }
        __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_11);
        __pyx_t_11 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":336
 *         elif grademax and (len(value) == 5) and (value[:4] in ["grds", "dgrs"]):
 *             for ind in range(1, grademax + 1):
 *                 key = gradekey(ind, longkey)             # <<<<<<<<<<<<<<
 *                 dico[key] = value[4:]
 *             key = ""
 */
        __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_gradekey); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 336, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_5 = NULL;
        __pyx_t_17 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
            __pyx_t_17 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_13)) {
          PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_ind, __pyx_v_longkey};
          __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 336, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_11);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
          PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_ind, __pyx_v_longkey};
          __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 336, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_11);
        } else
        #endif
        {
          __pyx_t_12 = PyTuple_New(2+__pyx_t_17); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 336, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          if (__pyx_t_5) {
            __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_5); __pyx_t_5 = NULL;
          }
          __Pyx_INCREF(__pyx_v_ind);
          __Pyx_GIVEREF(__pyx_v_ind);
          PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_17, __pyx_v_ind);
          __Pyx_INCREF(__pyx_v_longkey);
          __Pyx_GIVEREF(__pyx_v_longkey);
          PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_17, __pyx_v_longkey);
          __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_12, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 336, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        }
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_11);
        __pyx_t_11 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":337
 *             for ind in range(1, grademax + 1):
 *                 key = gradekey(ind, longkey)
 *                 dico[key] = value[4:]             # <<<<<<<<<<<<<<
 *             key = ""
 *         if key:
 */
        __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_value, 4, 0, NULL, NULL, &__pyx_slice__30, 1, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 337, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (unlikely(PyObject_SetItem(__pyx_v_dico, __pyx_v_key, __pyx_t_11) < 0)) __PYX_ERR(0, 337, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":335
 *             val = value.split('|')
 *         elif grademax and (len(value) == 5) and (value[:4] in ["grds", "dgrs"]):
 *             for ind in range(1, grademax + 1):             # <<<<<<<<<<<<<<
 *                 key = gradekey(ind, longkey)
 *                 dico[key] = value[4:]
 */
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":338
 *                 key = gradekey(ind, longkey)
 *                 dico[key] = value[4:]
 *             key = ""             # <<<<<<<<<<<<<<
 *         if key:
 *             dico[key] = val
 */
      __Pyx_INCREF(__pyx_kp_u__4);
      __Pyx_DECREF_SET(__pyx_v_key, __pyx_kp_u__4);

      /* "metaphor/chem_gm/core/gmtoolbox.py":334
 *             key = "central"
 *             val = value.split('|')
 *         elif grademax and (len(value) == 5) and (value[:4] in ["grds", "dgrs"]):             # <<<<<<<<<<<<<<
 *             for ind in range(1, grademax + 1):
 *                 key = gradekey(ind, longkey)
 */
    }
    __pyx_L20:;

    /* "metaphor/chem_gm/core/gmtoolbox.py":339
 *                 dico[key] = value[4:]
 *             key = ""
 *         if key:             # <<<<<<<<<<<<<<
 *             dico[key] = val
 *     return dico
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_key); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 339, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":340
 *             key = ""
 *         if key:
 *             dico[key] = val             # <<<<<<<<<<<<<<
 *     return dico
 * 
 */
      if (unlikely(!__pyx_v_val)) { __Pyx_RaiseUnboundLocalError("val"); __PYX_ERR(0, 340, __pyx_L1_error) }
      if (unlikely(PyObject_SetItem(__pyx_v_dico, __pyx_v_key, __pyx_v_val) < 0)) __PYX_ERR(0, 340, __pyx_L1_error)

      /* "metaphor/chem_gm/core/gmtoolbox.py":339
 *                 dico[key] = value[4:]
 *             key = ""
 *         if key:             # <<<<<<<<<<<<<<
 *             dico[key] = val
 *     return dico
 */
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":286
 *                 dico[value[0]] = -1
 *             lst.pop(ind)
 *     for value in lst:             # <<<<<<<<<<<<<<
 *         key = ""
 *         if value == 'Class':
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":341
 *         if key:
 *             dico[key] = val
 *     return dico             # <<<<<<<<<<<<<<
 * 
 * def updateConfigFromConfigstr(configstr, config):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_dico);
  __pyx_r = __pyx_v_dico;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":256
 *     return dico
 * 
 * def fromConfigstr2Dict(configstr, hidden=0, target=None, longkey=False, grademax=0):             # <<<<<<<<<<<<<<
 *     """Cration d'un dictionnaire de connexions  partir d'une chane de
 *     connexion.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.fromConfigstr2Dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dico);
  __Pyx_XDECREF(__pyx_v_lst);
  __Pyx_XDECREF(__pyx_v_test);
  __Pyx_XDECREF(__pyx_v_isHidden);
  __Pyx_XDECREF(__pyx_v_ind);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_st);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_fval);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":343
 *     return dico
 * 
 * def updateConfigFromConfigstr(configstr, config):             # <<<<<<<<<<<<<<
 *     dico = fromConfigstr2Dict(configstr)
 *     for key, val in dico.items():
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_15updateConfigFromConfigstr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_15updateConfigFromConfigstr = {"updateConfigFromConfigstr", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_15updateConfigFromConfigstr, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_15updateConfigFromConfigstr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_configstr = 0;
  PyObject *__pyx_v_config = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateConfigFromConfigstr (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_configstr,&__pyx_n_s_config,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_configstr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_config)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("updateConfigFromConfigstr", 1, 2, 2, 1); __PYX_ERR(0, 343, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateConfigFromConfigstr") < 0)) __PYX_ERR(0, 343, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_configstr = values[0];
    __pyx_v_config = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateConfigFromConfigstr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 343, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.updateConfigFromConfigstr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_14updateConfigFromConfigstr(__pyx_self, __pyx_v_configstr, __pyx_v_config);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_14updateConfigFromConfigstr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_configstr, PyObject *__pyx_v_config) {
  PyObject *__pyx_v_dico = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  __Pyx_RefNannySetupContext("updateConfigFromConfigstr", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":344
 * 
 * def updateConfigFromConfigstr(configstr, config):
 *     dico = fromConfigstr2Dict(configstr)             # <<<<<<<<<<<<<<
 *     for key, val in dico.items():
 *         if key in ["central", "hidden", "mol1"]:
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_fromConfigstr2Dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_configstr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_configstr};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_configstr};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_configstr);
      __Pyx_GIVEREF(__pyx_v_configstr);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_configstr);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_dico = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":345
 * def updateConfigFromConfigstr(configstr, config):
 *     dico = fromConfigstr2Dict(configstr)
 *     for key, val in dico.items():             # <<<<<<<<<<<<<<
 *         if key in ["central", "hidden", "mol1"]:
 *             config.set("model", key, str(val))
 */
  __pyx_t_5 = 0;
  if (unlikely(__pyx_v_dico == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 345, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_dico, 0, __pyx_n_s_items, (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_2;
  __pyx_t_2 = 0;
  while (1) {
    __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_6, &__pyx_t_5, &__pyx_t_2, &__pyx_t_4, NULL, __pyx_t_7);
    if (unlikely(__pyx_t_8 == 0)) break;
    if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":346
 *     dico = fromConfigstr2Dict(configstr)
 *     for key, val in dico.items():
 *         if key in ["central", "hidden", "mol1"]:             # <<<<<<<<<<<<<<
 *             config.set("model", key, str(val))
 *         else:  #if key in Atomes:
 */
    __Pyx_INCREF(__pyx_v_key);
    __pyx_t_4 = __pyx_v_key;
    __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_central, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 346, __pyx_L1_error)
    if (!__pyx_t_10) {
    } else {
      __pyx_t_9 = __pyx_t_10;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_hidden, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 346, __pyx_L1_error)
    if (!__pyx_t_10) {
    } else {
      __pyx_t_9 = __pyx_t_10;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_mol1, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 346, __pyx_L1_error)
    __pyx_t_9 = __pyx_t_10;
    __pyx_L6_bool_binop_done:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = (__pyx_t_9 != 0);
    if (__pyx_t_10) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":347
 *     for key, val in dico.items():
 *         if key in ["central", "hidden", "mol1"]:
 *             config.set("model", key, str(val))             # <<<<<<<<<<<<<<
 *         else:  #if key in Atomes:
 *             config.set("connectivity", key, str(val))
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 347, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_val); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 347, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_8 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_n_u_model, __pyx_v_key, __pyx_t_3};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_n_u_model, __pyx_v_key, __pyx_t_3};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 347, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__pyx_t_11) {
          __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL;
        }
        __Pyx_INCREF(__pyx_n_u_model);
        __Pyx_GIVEREF(__pyx_n_u_model);
        PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_8, __pyx_n_u_model);
        __Pyx_INCREF(__pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_8, __pyx_v_key);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_8, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":346
 *     dico = fromConfigstr2Dict(configstr)
 *     for key, val in dico.items():
 *         if key in ["central", "hidden", "mol1"]:             # <<<<<<<<<<<<<<
 *             config.set("model", key, str(val))
 *         else:  #if key in Atomes:
 */
      goto __pyx_L5;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":349
 *             config.set("model", key, str(val))
 *         else:  #if key in Atomes:
 *             config.set("connectivity", key, str(val))             # <<<<<<<<<<<<<<
 *     return config
 * 
 */
    /*else*/ {
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_12 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_val); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 349, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_3 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_8 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_n_u_connectivity, __pyx_v_key, __pyx_t_12};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 349, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_n_u_connectivity, __pyx_v_key, __pyx_t_12};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 349, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      } else
      #endif
      {
        __pyx_t_11 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 349, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (__pyx_t_3) {
          __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3); __pyx_t_3 = NULL;
        }
        __Pyx_INCREF(__pyx_n_u_connectivity);
        __Pyx_GIVEREF(__pyx_n_u_connectivity);
        PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_8, __pyx_n_u_connectivity);
        __Pyx_INCREF(__pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_8, __pyx_v_key);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_8, __pyx_t_12);
        __pyx_t_12 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 349, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_L5:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":350
 *         else:  #if key in Atomes:
 *             config.set("connectivity", key, str(val))
 *     return config             # <<<<<<<<<<<<<<
 * 
 * def hashFromDict(dict, hidden, fullconfig=False, withhidden=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_config);
  __pyx_r = __pyx_v_config;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":343
 *     return dico
 * 
 * def updateConfigFromConfigstr(configstr, config):             # <<<<<<<<<<<<<<
 *     dico = fromConfigstr2Dict(configstr)
 *     for key, val in dico.items():
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.updateConfigFromConfigstr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dico);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":352
 *     return config
 * 
 * def hashFromDict(dict, hidden, fullconfig=False, withhidden=False):             # <<<<<<<<<<<<<<
 *     resst = fromconfig2Str(dict, hidden, fullconfig=fullconfig, withhidden=withhidden)
 *     reslong = abs(ctypes.c_size_t(hash(resst)).value)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_17hashFromDict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_17hashFromDict = {"hashFromDict", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_17hashFromDict, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_17hashFromDict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dict = 0;
  PyObject *__pyx_v_hidden = 0;
  PyObject *__pyx_v_fullconfig = 0;
  PyObject *__pyx_v_withhidden = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hashFromDict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dict,&__pyx_n_s_hidden,&__pyx_n_s_fullconfig,&__pyx_n_s_withhidden,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_False));
    values[3] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dict)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hidden)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("hashFromDict", 0, 2, 4, 1); __PYX_ERR(0, 352, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fullconfig);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_withhidden);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hashFromDict") < 0)) __PYX_ERR(0, 352, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_dict = values[0];
    __pyx_v_hidden = values[1];
    __pyx_v_fullconfig = values[2];
    __pyx_v_withhidden = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("hashFromDict", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 352, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.hashFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_16hashFromDict(__pyx_self, __pyx_v_dict, __pyx_v_hidden, __pyx_v_fullconfig, __pyx_v_withhidden);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_16hashFromDict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dict, PyObject *__pyx_v_hidden, PyObject *__pyx_v_fullconfig, PyObject *__pyx_v_withhidden) {
  PyObject *__pyx_v_resst = NULL;
  PyObject *__pyx_v_reslong = NULL;
  PyObject *__pyx_v_reshash = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_hash_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("hashFromDict", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":353
 * 
 * def hashFromDict(dict, hidden, fullconfig=False, withhidden=False):
 *     resst = fromconfig2Str(dict, hidden, fullconfig=fullconfig, withhidden=withhidden)             # <<<<<<<<<<<<<<
 *     reslong = abs(ctypes.c_size_t(hash(resst)).value)
 *     reshash = str(reslong)
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_fromconfig2Str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_dict);
  __Pyx_GIVEREF(__pyx_v_dict);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_dict);
  __Pyx_INCREF(__pyx_v_hidden);
  __Pyx_GIVEREF(__pyx_v_hidden);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_hidden);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_fullconfig, __pyx_v_fullconfig) < 0) __PYX_ERR(0, 353, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_withhidden, __pyx_v_withhidden) < 0) __PYX_ERR(0, 353, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_resst = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":354
 * def hashFromDict(dict, hidden, fullconfig=False, withhidden=False):
 *     resst = fromconfig2Str(dict, hidden, fullconfig=fullconfig, withhidden=withhidden)
 *     reslong = abs(ctypes.c_size_t(hash(resst)).value)             # <<<<<<<<<<<<<<
 *     reshash = str(reslong)
 *     return reshash
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_c_size_t); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = PyObject_Hash(__pyx_v_resst); if (unlikely(__pyx_t_5 == ((Py_hash_t)-1))) __PYX_ERR(0, 354, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_FromHash_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_1) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 354, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 354, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 354, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 354, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 354, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyNumber_Absolute(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_reslong = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":355
 *     resst = fromconfig2Str(dict, hidden, fullconfig=fullconfig, withhidden=withhidden)
 *     reslong = abs(ctypes.c_size_t(hash(resst)).value)
 *     reshash = str(reslong)             # <<<<<<<<<<<<<<
 *     return reshash
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_reslong); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_reshash = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":356
 *     reslong = abs(ctypes.c_size_t(hash(resst)).value)
 *     reshash = str(reslong)
 *     return reshash             # <<<<<<<<<<<<<<
 * 
 * def hashFromConfig(config, hidden, fullconfig=False, withhidden=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_reshash);
  __pyx_r = __pyx_v_reshash;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":352
 *     return config
 * 
 * def hashFromDict(dict, hidden, fullconfig=False, withhidden=False):             # <<<<<<<<<<<<<<
 *     resst = fromconfig2Str(dict, hidden, fullconfig=fullconfig, withhidden=withhidden)
 *     reslong = abs(ctypes.c_size_t(hash(resst)).value)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.hashFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_resst);
  __Pyx_XDECREF(__pyx_v_reslong);
  __Pyx_XDECREF(__pyx_v_reshash);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":358
 *     return reshash
 * 
 * def hashFromConfig(config, hidden, fullconfig=False, withhidden=False):             # <<<<<<<<<<<<<<
 *     connectivity = OrderedDict()
 *     dict = config.getSectionDict("connectivity")
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_19hashFromConfig(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_19hashFromConfig = {"hashFromConfig", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_19hashFromConfig, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_19hashFromConfig(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_config = 0;
  PyObject *__pyx_v_hidden = 0;
  PyObject *__pyx_v_fullconfig = 0;
  PyObject *__pyx_v_withhidden = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hashFromConfig (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_config,&__pyx_n_s_hidden,&__pyx_n_s_fullconfig,&__pyx_n_s_withhidden,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_False));
    values[3] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_config)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hidden)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("hashFromConfig", 0, 2, 4, 1); __PYX_ERR(0, 358, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fullconfig);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_withhidden);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hashFromConfig") < 0)) __PYX_ERR(0, 358, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_config = values[0];
    __pyx_v_hidden = values[1];
    __pyx_v_fullconfig = values[2];
    __pyx_v_withhidden = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("hashFromConfig", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 358, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.hashFromConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_18hashFromConfig(__pyx_self, __pyx_v_config, __pyx_v_hidden, __pyx_v_fullconfig, __pyx_v_withhidden);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_18hashFromConfig(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_config, PyObject *__pyx_v_hidden, PyObject *__pyx_v_fullconfig, PyObject *__pyx_v_withhidden) {
  PyObject *__pyx_v_connectivity = NULL;
  PyObject *__pyx_v_dict = NULL;
  PyObject *__pyx_v_conkeys = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_v_resst = NULL;
  PyObject *__pyx_v_reslong = NULL;
  PyObject *__pyx_v_reshash = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_hash_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("hashFromConfig", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":359
 * 
 * def hashFromConfig(config, hidden, fullconfig=False, withhidden=False):
 *     connectivity = OrderedDict()             # <<<<<<<<<<<<<<
 *     dict = config.getSectionDict("connectivity")
 *     conkeys = dict.keys()
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_connectivity = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":360
 * def hashFromConfig(config, hidden, fullconfig=False, withhidden=False):
 *     connectivity = OrderedDict()
 *     dict = config.getSectionDict("connectivity")             # <<<<<<<<<<<<<<
 *     conkeys = dict.keys()
 *     conkeys.sort()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_getSectionDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":361
 *     connectivity = OrderedDict()
 *     dict = config.getSectionDict("connectivity")
 *     conkeys = dict.keys()             # <<<<<<<<<<<<<<
 *     conkeys.sort()
 *     for key in conkeys:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dict, __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 361, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 361, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_conkeys = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":362
 *     dict = config.getSectionDict("connectivity")
 *     conkeys = dict.keys()
 *     conkeys.sort()             # <<<<<<<<<<<<<<
 *     for key in conkeys:
 *     #for key, val in dict.items():
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_conkeys, __pyx_n_s_sort); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 362, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 362, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":363
 *     conkeys = dict.keys()
 *     conkeys.sort()
 *     for key in conkeys:             # <<<<<<<<<<<<<<
 *     #for key, val in dict.items():
 *         val = dict[key]
 */
  if (likely(PyList_CheckExact(__pyx_v_conkeys)) || PyTuple_CheckExact(__pyx_v_conkeys)) {
    __pyx_t_2 = __pyx_v_conkeys; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_conkeys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 363, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 363, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 363, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_5(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 363, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":365
 *     for key in conkeys:
 *     #for key, val in dict.items():
 *         val = dict[key]             # <<<<<<<<<<<<<<
 *         if val == "-1":
 *             val = str(hidden)
 */
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_dict, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":366
 *     #for key, val in dict.items():
 *         val = dict[key]
 *         if val == "-1":             # <<<<<<<<<<<<<<
 *             val = str(hidden)
 *         connectivity[key] = val
 */
    __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_val, __pyx_kp_u_1, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 366, __pyx_L1_error)
    if (__pyx_t_6) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":367
 *         val = dict[key]
 *         if val == "-1":
 *             val = str(hidden)             # <<<<<<<<<<<<<<
 *         connectivity[key] = val
 * #     dictoccurence = config.getSectionDict("occurence")
 */
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_hidden); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 367, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":366
 *     #for key, val in dict.items():
 *         val = dict[key]
 *         if val == "-1":             # <<<<<<<<<<<<<<
 *             val = str(hidden)
 *         connectivity[key] = val
 */
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":368
 *         if val == "-1":
 *             val = str(hidden)
 *         connectivity[key] = val             # <<<<<<<<<<<<<<
 * #     dictoccurence = config.getSectionDict("occurence")
 * #     for key, val in dictoccurence:
 */
    if (unlikely(PyObject_SetItem(__pyx_v_connectivity, __pyx_v_key, __pyx_v_val) < 0)) __PYX_ERR(0, 368, __pyx_L1_error)

    /* "metaphor/chem_gm/core/gmtoolbox.py":363
 *     conkeys = dict.keys()
 *     conkeys.sort()
 *     for key in conkeys:             # <<<<<<<<<<<<<<
 *     #for key, val in dict.items():
 *         val = dict[key]
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":378
 * #             pass
 * 
 *     resst = fromconfig2Str(connectivity, hidden, fullconfig=fullconfig, withhidden=withhidden)             # <<<<<<<<<<<<<<
 *     reslong = abs(ctypes.c_size_t(hash(resst)).value)
 *     reshash = str(reslong)
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_fromconfig2Str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_connectivity);
  __Pyx_GIVEREF(__pyx_v_connectivity);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_connectivity);
  __Pyx_INCREF(__pyx_v_hidden);
  __Pyx_GIVEREF(__pyx_v_hidden);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_hidden);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_fullconfig, __pyx_v_fullconfig) < 0) __PYX_ERR(0, 378, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_withhidden, __pyx_v_withhidden) < 0) __PYX_ERR(0, 378, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_resst = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":379
 * 
 *     resst = fromconfig2Str(connectivity, hidden, fullconfig=fullconfig, withhidden=withhidden)
 *     reslong = abs(ctypes.c_size_t(hash(resst)).value)             # <<<<<<<<<<<<<<
 *     reshash = str(reslong)
 *     return reshash
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_c_size_t); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_8 = PyObject_Hash(__pyx_v_resst); if (unlikely(__pyx_t_8 == ((Py_hash_t)-1))) __PYX_ERR(0, 379, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_FromHash_t(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 379, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_7);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 379, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 379, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 379, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 379, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_reslong = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":380
 *     resst = fromconfig2Str(connectivity, hidden, fullconfig=fullconfig, withhidden=withhidden)
 *     reslong = abs(ctypes.c_size_t(hash(resst)).value)
 *     reshash = str(reslong)             # <<<<<<<<<<<<<<
 *     return reshash
 * 
 */
  __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_reslong); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_v_reshash = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":381
 *     reslong = abs(ctypes.c_size_t(hash(resst)).value)
 *     reshash = str(reslong)
 *     return reshash             # <<<<<<<<<<<<<<
 * 
 * def fromconfig2Str(dict, hidden, fullconfig=False, withhidden=False, simplecentral=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_reshash);
  __pyx_r = __pyx_v_reshash;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":358
 *     return reshash
 * 
 * def hashFromConfig(config, hidden, fullconfig=False, withhidden=False):             # <<<<<<<<<<<<<<
 *     connectivity = OrderedDict()
 *     dict = config.getSectionDict("connectivity")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.hashFromConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_connectivity);
  __Pyx_XDECREF(__pyx_v_dict);
  __Pyx_XDECREF(__pyx_v_conkeys);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_resst);
  __Pyx_XDECREF(__pyx_v_reslong);
  __Pyx_XDECREF(__pyx_v_reshash);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":383
 *     return reshash
 * 
 * def fromconfig2Str(dict, hidden, fullconfig=False, withhidden=False, simplecentral=False):             # <<<<<<<<<<<<<<
 *     """Cration d'une chane de connexion de connexions  partir d'un dictionnaire.
 *     """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_21fromconfig2Str(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_7chem_gm_4core_9gmtoolbox_20fromconfig2Str[] = "Cr\303\251ation d'une cha\303\256ne de connexion de connexions \303\240 partir d'un dictionnaire.\n    ";
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_21fromconfig2Str = {"fromconfig2Str", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_21fromconfig2Str, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_7chem_gm_4core_9gmtoolbox_20fromconfig2Str};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_21fromconfig2Str(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dict = 0;
  PyObject *__pyx_v_hidden = 0;
  PyObject *__pyx_v_fullconfig = 0;
  PyObject *__pyx_v_withhidden = 0;
  PyObject *__pyx_v_simplecentral = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fromconfig2Str (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dict,&__pyx_n_s_hidden,&__pyx_n_s_fullconfig,&__pyx_n_s_withhidden,&__pyx_n_s_simplecentral,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_False));
    values[3] = ((PyObject *)((PyObject *)Py_False));
    values[4] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dict)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hidden)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("fromconfig2Str", 0, 2, 5, 1); __PYX_ERR(0, 383, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fullconfig);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_withhidden);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_simplecentral);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fromconfig2Str") < 0)) __PYX_ERR(0, 383, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_dict = values[0];
    __pyx_v_hidden = values[1];
    __pyx_v_fullconfig = values[2];
    __pyx_v_withhidden = values[3];
    __pyx_v_simplecentral = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fromconfig2Str", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 383, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.fromconfig2Str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_20fromconfig2Str(__pyx_self, __pyx_v_dict, __pyx_v_hidden, __pyx_v_fullconfig, __pyx_v_withhidden, __pyx_v_simplecentral);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":411
 *     structdict = {key: val for (key, val) in dict.items() if key.capitalize() not in Atomes and not key in ['candidatecount', 'central']}
 *     atomkeys = atomdict.keys()
 *     keyfct = lambda key: Atomes.index(key)             # <<<<<<<<<<<<<<
 *     atomkeys = sorted(atomkeys, key= keyfct)
 *     structkeysloc = structdict.keys()
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_14fromconfig2Str_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_key); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_14fromconfig2Str_lambda2 = {"lambda2", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_14fromconfig2Str_lambda2, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_14fromconfig2Str_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self, ((PyObject *)__pyx_v_key));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("lambda2", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Atomes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_key};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_key};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 411, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_key);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.fromconfig2Str.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":383
 *     return reshash
 * 
 * def fromconfig2Str(dict, hidden, fullconfig=False, withhidden=False, simplecentral=False):             # <<<<<<<<<<<<<<
 *     """Cration d'une chane de connexion de connexions  partir d'un dictionnaire.
 *     """
 */

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_20fromconfig2Str(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dict, PyObject *__pyx_v_hidden, PyObject *__pyx_v_fullconfig, PyObject *__pyx_v_withhidden, PyObject *__pyx_v_simplecentral) {
  int __pyx_v_has_hydrogen;
  PyObject *__pyx_v_to_add = NULL;
  PyObject *__pyx_v_chimax = NULL;
  PyObject *__pyx_v_isomax = NULL;
  PyObject *__pyx_v_ccllst = NULL;
  PyObject *__pyx_v_gradlst = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_v_keyshort = NULL;
  PyObject *__pyx_v_grdinputlist = NULL;
  PyObject *__pyx_v_cclinputlst = NULL;
  int __pyx_v_OKchi;
  int __pyx_v_OKiso;
  PyObject *__pyx_v_atomdict = NULL;
  PyObject *__pyx_v_structdict = NULL;
  PyObject *__pyx_v_atomkeys = NULL;
  PyObject *__pyx_v_keyfct = NULL;
  PyObject *__pyx_v_structkeysloc = NULL;
  PyObject *__pyx_v_ind = NULL;
  PyObject *__pyx_v_lst = NULL;
  PyObject *__pyx_v_valtest = NULL;
  int __pyx_v_isfull;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_st = NULL;
  PyObject *__pyx_v_cond = NULL;
  PyObject *__pyx_v_resultlist = NULL;
  PyObject *__pyx_v_cumulatom = NULL;
  PyObject *__pyx_v_opt = NULL;
  PyObject *__pyx_v_central = NULL;
  CYTHON_UNUSED PyObject *__pyx_8genexpr7__pyx_v__ = NULL;
  CYTHON_UNUSED PyObject *__pyx_8genexpr8__pyx_v__ = NULL;
  PyObject *__pyx_8genexpr9__pyx_v_key = NULL;
  PyObject *__pyx_8genexpr9__pyx_v_val = NULL;
  PyObject *__pyx_9genexpr10__pyx_v_key = NULL;
  PyObject *__pyx_9genexpr10__pyx_v_val = NULL;
  PyObject *__pyx_9genexpr11__pyx_v_item = NULL;
  PyObject *__pyx_9genexpr12__pyx_v_item = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  PyObject *(*__pyx_t_14)(PyObject *);
  PyObject *__pyx_t_15 = NULL;
  PyObject *(*__pyx_t_16)(PyObject *);
  PyObject *(*__pyx_t_17)(PyObject *);
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  __Pyx_RefNannySetupContext("fromconfig2Str", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":387
 *     """
 *     # fullconfig = False  # temporaire
 *     has_hydrogen = False             # <<<<<<<<<<<<<<
 *     to_add = []
 *     chimax = 0
 */
  __pyx_v_has_hydrogen = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":388
 *     # fullconfig = False  # temporaire
 *     has_hydrogen = False
 *     to_add = []             # <<<<<<<<<<<<<<
 *     chimax = 0
 *     isomax = 0
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_to_add = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":389
 *     has_hydrogen = False
 *     to_add = []
 *     chimax = 0             # <<<<<<<<<<<<<<
 *     isomax = 0
 *     ccllst = []
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_chimax = __pyx_int_0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":390
 *     to_add = []
 *     chimax = 0
 *     isomax = 0             # <<<<<<<<<<<<<<
 *     ccllst = []
 *     gradlst = []
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_isomax = __pyx_int_0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":391
 *     chimax = 0
 *     isomax = 0
 *     ccllst = []             # <<<<<<<<<<<<<<
 *     gradlst = []
 *     for (key, val) in dict.items():
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_ccllst = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":392
 *     isomax = 0
 *     ccllst = []
 *     gradlst = []             # <<<<<<<<<<<<<<
 *     for (key, val) in dict.items():
 *         if not isint(val):
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_gradlst = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":393
 *     ccllst = []
 *     gradlst = []
 *     for (key, val) in dict.items():             # <<<<<<<<<<<<<<
 *         if not isint(val):
 *             continue
 */
  __pyx_t_2 = 0;
  if (unlikely(__pyx_v_dict == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 393, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_dict, 0, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_5;
  __pyx_t_5 = 0;
  while (1) {
    __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4);
    if (unlikely(__pyx_t_7 == 0)) break;
    if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":394
 *     gradlst = []
 *     for (key, val) in dict.items():
 *         if not isint(val):             # <<<<<<<<<<<<<<
 *             continue
 *         val = int(val)
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_isint); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_val); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 394, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_val};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 394, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_val};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 394, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 394, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_INCREF(__pyx_v_val);
        __Pyx_GIVEREF(__pyx_v_val);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_val);
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 394, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 394, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_11 = ((!__pyx_t_10) != 0);
    if (__pyx_t_11) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":395
 *     for (key, val) in dict.items():
 *         if not isint(val):
 *             continue             # <<<<<<<<<<<<<<
 *         val = int(val)
 *         keyshort = key2short(key)
 */
      goto __pyx_L3_continue;

      /* "metaphor/chem_gm/core/gmtoolbox.py":394
 *     gradlst = []
 *     for (key, val) in dict.items():
 *         if not isint(val):             # <<<<<<<<<<<<<<
 *             continue
 *         val = int(val)
 */
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":396
 *         if not isint(val):
 *             continue
 *         val = int(val)             # <<<<<<<<<<<<<<
 *         keyshort = key2short(key)
 *         if keyshort.startswith("ccl"):
 */
    __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_v_val); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":397
 *             continue
 *         val = int(val)
 *         keyshort = key2short(key)             # <<<<<<<<<<<<<<
 *         if keyshort.startswith("ccl"):
 *             if not val in ccllst:
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_key2short); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_9) {
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_key); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 397, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_key};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 397, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_key};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 397, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 397, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __pyx_t_9 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_key);
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 397, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_keyshort, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":398
 *         val = int(val)
 *         keyshort = key2short(key)
 *         if keyshort.startswith("ccl"):             # <<<<<<<<<<<<<<
 *             if not val in ccllst:
 *                 ccllst.append(val)
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_keyshort, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 398, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_11) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":399
 *         keyshort = key2short(key)
 *         if keyshort.startswith("ccl"):
 *             if not val in ccllst:             # <<<<<<<<<<<<<<
 *                 ccllst.append(val)
 *         elif keyshort.startswith("dgr"):
 */
      __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_v_val, __pyx_v_ccllst, Py_NE)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 399, __pyx_L1_error)
      __pyx_t_10 = (__pyx_t_11 != 0);
      if (__pyx_t_10) {

        /* "metaphor/chem_gm/core/gmtoolbox.py":400
 *         if keyshort.startswith("ccl"):
 *             if not val in ccllst:
 *                 ccllst.append(val)             # <<<<<<<<<<<<<<
 *         elif keyshort.startswith("dgr"):
 *             if not val in gradlst:
 */
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_ccllst, __pyx_v_val); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 400, __pyx_L1_error)

        /* "metaphor/chem_gm/core/gmtoolbox.py":399
 *         keyshort = key2short(key)
 *         if keyshort.startswith("ccl"):
 *             if not val in ccllst:             # <<<<<<<<<<<<<<
 *                 ccllst.append(val)
 *         elif keyshort.startswith("dgr"):
 */
      }

      /* "metaphor/chem_gm/core/gmtoolbox.py":398
 *         val = int(val)
 *         keyshort = key2short(key)
 *         if keyshort.startswith("ccl"):             # <<<<<<<<<<<<<<
 *             if not val in ccllst:
 *                 ccllst.append(val)
 */
      goto __pyx_L6;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":401
 *             if not val in ccllst:
 *                 ccllst.append(val)
 *         elif keyshort.startswith("dgr"):             # <<<<<<<<<<<<<<
 *             if not val in gradlst:
 *                 gradlst.append(val)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_keyshort, __pyx_n_s_startswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 401, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_10) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":402
 *                 ccllst.append(val)
 *         elif keyshort.startswith("dgr"):
 *             if not val in gradlst:             # <<<<<<<<<<<<<<
 *                 gradlst.append(val)
 *     grdinputlist = [[] for _ in gradlst]
 */
      __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_val, __pyx_v_gradlst, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 402, __pyx_L1_error)
      __pyx_t_11 = (__pyx_t_10 != 0);
      if (__pyx_t_11) {

        /* "metaphor/chem_gm/core/gmtoolbox.py":403
 *         elif keyshort.startswith("dgr"):
 *             if not val in gradlst:
 *                 gradlst.append(val)             # <<<<<<<<<<<<<<
 *     grdinputlist = [[] for _ in gradlst]
 *     cclinputlst = [[] for _ in ccllst]
 */
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_gradlst, __pyx_v_val); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 403, __pyx_L1_error)

        /* "metaphor/chem_gm/core/gmtoolbox.py":402
 *                 ccllst.append(val)
 *         elif keyshort.startswith("dgr"):
 *             if not val in gradlst:             # <<<<<<<<<<<<<<
 *                 gradlst.append(val)
 *     grdinputlist = [[] for _ in gradlst]
 */
      }

      /* "metaphor/chem_gm/core/gmtoolbox.py":401
 *             if not val in ccllst:
 *                 ccllst.append(val)
 *         elif keyshort.startswith("dgr"):             # <<<<<<<<<<<<<<
 *             if not val in gradlst:
 *                 gradlst.append(val)
 */
    }
    __pyx_L6:;
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":404
 *             if not val in gradlst:
 *                 gradlst.append(val)
 *     grdinputlist = [[] for _ in gradlst]             # <<<<<<<<<<<<<<
 *     cclinputlst = [[] for _ in ccllst]
 *     OKchi = False
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 404, __pyx_L11_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __pyx_v_gradlst; __Pyx_INCREF(__pyx_t_6); __pyx_t_3 = 0;
    for (;;) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_6)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 404, __pyx_L11_error)
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 404, __pyx_L11_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_XDECREF_SET(__pyx_8genexpr7__pyx_v__, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 404, __pyx_L11_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 404, __pyx_L11_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_8genexpr7__pyx_v__); __pyx_8genexpr7__pyx_v__ = 0;
    goto __pyx_L14_exit_scope;
    __pyx_L11_error:;
    __Pyx_XDECREF(__pyx_8genexpr7__pyx_v__); __pyx_8genexpr7__pyx_v__ = 0;
    goto __pyx_L1_error;
    __pyx_L14_exit_scope:;
  } /* exit inner scope */
  __pyx_v_grdinputlist = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":405
 *                 gradlst.append(val)
 *     grdinputlist = [[] for _ in gradlst]
 *     cclinputlst = [[] for _ in ccllst]             # <<<<<<<<<<<<<<
 *     OKchi = False
 *     OKiso = False
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 405, __pyx_L17_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __pyx_v_ccllst; __Pyx_INCREF(__pyx_t_6); __pyx_t_3 = 0;
    for (;;) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_6)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 405, __pyx_L17_error)
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 405, __pyx_L17_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v__, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 405, __pyx_L17_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 405, __pyx_L17_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_8genexpr8__pyx_v__); __pyx_8genexpr8__pyx_v__ = 0;
    goto __pyx_L20_exit_scope;
    __pyx_L17_error:;
    __Pyx_XDECREF(__pyx_8genexpr8__pyx_v__); __pyx_8genexpr8__pyx_v__ = 0;
    goto __pyx_L1_error;
    __pyx_L20_exit_scope:;
  } /* exit inner scope */
  __pyx_v_cclinputlst = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":406
 *     grdinputlist = [[] for _ in gradlst]
 *     cclinputlst = [[] for _ in ccllst]
 *     OKchi = False             # <<<<<<<<<<<<<<
 *     OKiso = False
 *     atomdict = {key.capitalize(): val for (key, val) in dict.items() if key.capitalize() in Atomes}
 */
  __pyx_v_OKchi = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":407
 *     cclinputlst = [[] for _ in ccllst]
 *     OKchi = False
 *     OKiso = False             # <<<<<<<<<<<<<<
 *     atomdict = {key.capitalize(): val for (key, val) in dict.items() if key.capitalize() in Atomes}
 *     structdict = {key: val for (key, val) in dict.items() if key.capitalize() not in Atomes and not key in ['candidatecount', 'central']}
 */
  __pyx_v_OKiso = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":408
 *     OKchi = False
 *     OKiso = False
 *     atomdict = {key.capitalize(): val for (key, val) in dict.items() if key.capitalize() in Atomes}             # <<<<<<<<<<<<<<
 *     structdict = {key: val for (key, val) in dict.items() if key.capitalize() not in Atomes and not key in ['candidatecount', 'central']}
 *     atomkeys = atomdict.keys()
 */
  { /* enter inner scope */
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __pyx_L23_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = 0;
    if (unlikely(__pyx_v_dict == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
      __PYX_ERR(0, 408, __pyx_L23_error)
    }
    __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_dict, 0, __pyx_n_s_items, (&__pyx_t_2), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 408, __pyx_L23_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6);
    __pyx_t_6 = __pyx_t_5;
    __pyx_t_5 = 0;
    while (1) {
      __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_2, &__pyx_t_3, &__pyx_t_5, &__pyx_t_8, NULL, __pyx_t_4);
      if (unlikely(__pyx_t_7 == 0)) break;
      if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 408, __pyx_L23_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_XDECREF_SET(__pyx_8genexpr9__pyx_v_key, __pyx_t_5);
      __pyx_t_5 = 0;
      __Pyx_XDECREF_SET(__pyx_8genexpr9__pyx_v_val, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr9__pyx_v_key, __pyx_n_s_capitalize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 408, __pyx_L23_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      if (__pyx_t_9) {
        __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 408, __pyx_L23_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else {
        __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 408, __pyx_L23_error)
      }
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Atomes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 408, __pyx_L23_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_t_8, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 408, __pyx_L23_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_10 = (__pyx_t_11 != 0);
      if (__pyx_t_10) {
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr9__pyx_v_key, __pyx_n_s_capitalize); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 408, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
          }
        }
        if (__pyx_t_9) {
          __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 408, __pyx_L23_error)
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else {
          __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 408, __pyx_L23_error)
        }
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_t_5, (PyObject*)__pyx_8genexpr9__pyx_v_val))) __PYX_ERR(0, 408, __pyx_L23_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_key); __pyx_8genexpr9__pyx_v_key = 0;
    __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_val); __pyx_8genexpr9__pyx_v_val = 0;
    goto __pyx_L27_exit_scope;
    __pyx_L23_error:;
    __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_key); __pyx_8genexpr9__pyx_v_key = 0;
    __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_val); __pyx_8genexpr9__pyx_v_val = 0;
    goto __pyx_L1_error;
    __pyx_L27_exit_scope:;
  } /* exit inner scope */
  __pyx_v_atomdict = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":409
 *     OKiso = False
 *     atomdict = {key.capitalize(): val for (key, val) in dict.items() if key.capitalize() in Atomes}
 *     structdict = {key: val for (key, val) in dict.items() if key.capitalize() not in Atomes and not key in ['candidatecount', 'central']}             # <<<<<<<<<<<<<<
 *     atomkeys = atomdict.keys()
 *     keyfct = lambda key: Atomes.index(key)
 */
  { /* enter inner scope */
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __pyx_L30_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = 0;
    if (unlikely(__pyx_v_dict == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
      __PYX_ERR(0, 409, __pyx_L30_error)
    }
    __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_dict, 0, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 409, __pyx_L30_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6);
    __pyx_t_6 = __pyx_t_5;
    __pyx_t_5 = 0;
    while (1) {
      __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_8, NULL, __pyx_t_4);
      if (unlikely(__pyx_t_7 == 0)) break;
      if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 409, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_XDECREF_SET(__pyx_9genexpr10__pyx_v_key, __pyx_t_5);
      __pyx_t_5 = 0;
      __Pyx_XDECREF_SET(__pyx_9genexpr10__pyx_v_val, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr10__pyx_v_key, __pyx_n_s_capitalize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 409, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      if (__pyx_t_9) {
        __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 409, __pyx_L30_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else {
        __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 409, __pyx_L30_error)
      }
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Atomes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 409, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_t_8, __pyx_t_5, Py_NE)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 409, __pyx_L30_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_13 = (__pyx_t_11 != 0);
      if (__pyx_t_13) {
      } else {
        __pyx_t_10 = __pyx_t_13;
        goto __pyx_L34_bool_binop_done;
      }
      __Pyx_INCREF(__pyx_9genexpr10__pyx_v_key);
      __pyx_t_5 = __pyx_9genexpr10__pyx_v_key;
      __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_t_5, __pyx_n_u_candidatecount, Py_NE)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 409, __pyx_L30_error)
      if (__pyx_t_11) {
      } else {
        __pyx_t_13 = __pyx_t_11;
        goto __pyx_L36_bool_binop_done;
      }
      __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_t_5, __pyx_n_u_central, Py_NE)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 409, __pyx_L30_error)
      __pyx_t_13 = __pyx_t_11;
      __pyx_L36_bool_binop_done:;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_11 = (__pyx_t_13 != 0);
      __pyx_t_10 = __pyx_t_11;
      __pyx_L34_bool_binop_done:;
      if (__pyx_t_10) {
        if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_9genexpr10__pyx_v_key, (PyObject*)__pyx_9genexpr10__pyx_v_val))) __PYX_ERR(0, 409, __pyx_L30_error)
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_key); __pyx_9genexpr10__pyx_v_key = 0;
    __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_val); __pyx_9genexpr10__pyx_v_val = 0;
    goto __pyx_L38_exit_scope;
    __pyx_L30_error:;
    __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_key); __pyx_9genexpr10__pyx_v_key = 0;
    __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_val); __pyx_9genexpr10__pyx_v_val = 0;
    goto __pyx_L1_error;
    __pyx_L38_exit_scope:;
  } /* exit inner scope */
  __pyx_v_structdict = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":410
 *     atomdict = {key.capitalize(): val for (key, val) in dict.items() if key.capitalize() in Atomes}
 *     structdict = {key: val for (key, val) in dict.items() if key.capitalize() not in Atomes and not key in ['candidatecount', 'central']}
 *     atomkeys = atomdict.keys()             # <<<<<<<<<<<<<<
 *     keyfct = lambda key: Atomes.index(key)
 *     atomkeys = sorted(atomkeys, key= keyfct)
 */
  __pyx_t_1 = __Pyx_PyDict_Keys(__pyx_v_atomdict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_atomkeys = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":411
 *     structdict = {key: val for (key, val) in dict.items() if key.capitalize() not in Atomes and not key in ['candidatecount', 'central']}
 *     atomkeys = atomdict.keys()
 *     keyfct = lambda key: Atomes.index(key)             # <<<<<<<<<<<<<<
 *     atomkeys = sorted(atomkeys, key= keyfct)
 *     structkeysloc = structdict.keys()
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_14fromconfig2Str_lambda2, 0, __pyx_n_s_fromconfig2Str_locals_lambda, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_keyfct = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":412
 *     atomkeys = atomdict.keys()
 *     keyfct = lambda key: Atomes.index(key)
 *     atomkeys = sorted(atomkeys, key= keyfct)             # <<<<<<<<<<<<<<
 *     structkeysloc = structdict.keys()
 *     structkeysloc = sorted(structkeysloc)#, key=ke yfct
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_atomkeys);
  __Pyx_GIVEREF(__pyx_v_atomkeys);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_atomkeys);
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_key, __pyx_v_keyfct) < 0) __PYX_ERR(0, 412, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF_SET(__pyx_v_atomkeys, __pyx_t_5);
  __pyx_t_5 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":413
 *     keyfct = lambda key: Atomes.index(key)
 *     atomkeys = sorted(atomkeys, key= keyfct)
 *     structkeysloc = structdict.keys()             # <<<<<<<<<<<<<<
 *     structkeysloc = sorted(structkeysloc)#, key=ke yfct
 *     for key in atomkeys:
 */
  __pyx_t_5 = __Pyx_PyDict_Keys(__pyx_v_structdict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_structkeysloc = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":414
 *     atomkeys = sorted(atomkeys, key= keyfct)
 *     structkeysloc = structdict.keys()
 *     structkeysloc = sorted(structkeysloc)#, key=ke yfct             # <<<<<<<<<<<<<<
 *     for key in atomkeys:
 *         # ici, on a les atomes
 */
  __pyx_t_6 = PySequence_List(__pyx_v_structkeysloc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_12 = PyList_Sort(__pyx_t_5); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 414, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v_structkeysloc, __pyx_t_5);
  __pyx_t_5 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":415
 *     structkeysloc = structdict.keys()
 *     structkeysloc = sorted(structkeysloc)#, key=ke yfct
 *     for key in atomkeys:             # <<<<<<<<<<<<<<
 *         # ici, on a les atomes
 *         # la valeur par defaut est hidden (id -1)
 */
  if (likely(PyList_CheckExact(__pyx_v_atomkeys)) || PyTuple_CheckExact(__pyx_v_atomkeys)) {
    __pyx_t_5 = __pyx_v_atomkeys; __Pyx_INCREF(__pyx_t_5); __pyx_t_3 = 0;
    __pyx_t_14 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_atomkeys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_14 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 415, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_14)) {
      if (likely(PyList_CheckExact(__pyx_t_5))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 415, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 415, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 415, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 415, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_14(__pyx_t_5);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 415, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":418
 *         # ici, on a les atomes
 *         # la valeur par defaut est hidden (id -1)
 *         val = int(atomdict[key])             # <<<<<<<<<<<<<<
 *         key = key.capitalize()
 *         if (key in Hydrogenes) and val:
 */
    __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_atomdict, __pyx_v_key); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":419
 *         # la valeur par defaut est hidden (id -1)
 *         val = int(atomdict[key])
 *         key = key.capitalize()             # <<<<<<<<<<<<<<
 *         if (key in Hydrogenes) and val:
 *             has_hydrogen = True
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_capitalize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (__pyx_t_8) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 419, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 419, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":420
 *         val = int(atomdict[key])
 *         key = key.capitalize()
 *         if (key in Hydrogenes) and val:             # <<<<<<<<<<<<<<
 *             has_hydrogen = True
 *             if (val==-1) or (val==hidden):
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Hydrogenes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 420, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_13 = (__pyx_t_11 != 0);
    if (__pyx_t_13) {
    } else {
      __pyx_t_10 = __pyx_t_13;
      goto __pyx_L42_bool_binop_done;
    }
    __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 420, __pyx_L1_error)
    __pyx_t_10 = __pyx_t_13;
    __pyx_L42_bool_binop_done:;
    if (__pyx_t_10) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":421
 *         key = key.capitalize()
 *         if (key in Hydrogenes) and val:
 *             has_hydrogen = True             # <<<<<<<<<<<<<<
 *             if (val==-1) or (val==hidden):
 *                 to_add.append((key, "_"))# max(1, hidden)))   ici !!!!!!!!!!!!!
 */
      __pyx_v_has_hydrogen = 1;

      /* "metaphor/chem_gm/core/gmtoolbox.py":422
 *         if (key in Hydrogenes) and val:
 *             has_hydrogen = True
 *             if (val==-1) or (val==hidden):             # <<<<<<<<<<<<<<
 *                 to_add.append((key, "_"))# max(1, hidden)))   ici !!!!!!!!!!!!!
 *             else:
 */
      __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_val, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (!__pyx_t_13) {
      } else {
        __pyx_t_10 = __pyx_t_13;
        goto __pyx_L45_bool_binop_done;
      }
      __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_v_hidden, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error)
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_10 = __pyx_t_13;
      __pyx_L45_bool_binop_done:;
      if (__pyx_t_10) {

        /* "metaphor/chem_gm/core/gmtoolbox.py":423
 *             has_hydrogen = True
 *             if (val==-1) or (val==hidden):
 *                 to_add.append((key, "_"))# max(1, hidden)))   ici !!!!!!!!!!!!!             # <<<<<<<<<<<<<<
 *             else:
 *                 to_add.append((key, val))
 */
        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 423, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_key);
        __Pyx_INCREF(__pyx_n_u__5);
        __Pyx_GIVEREF(__pyx_n_u__5);
        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_u__5);
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_to_add, __pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 423, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":422
 *         if (key in Hydrogenes) and val:
 *             has_hydrogen = True
 *             if (val==-1) or (val==hidden):             # <<<<<<<<<<<<<<
 *                 to_add.append((key, "_"))# max(1, hidden)))   ici !!!!!!!!!!!!!
 *             else:
 */
        goto __pyx_L44;
      }

      /* "metaphor/chem_gm/core/gmtoolbox.py":425
 *                 to_add.append((key, "_"))# max(1, hidden)))   ici !!!!!!!!!!!!!
 *             else:
 *                 to_add.append((key, val))             # <<<<<<<<<<<<<<
 *         #elif not (hidden and (val in [-1, hidden])):
 *         elif (hidden==0) or not (val in [-1, 0, hidden]):  # fix 30/05/2016
 */
      /*else*/ {
        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_key);
        __Pyx_INCREF(__pyx_v_val);
        __Pyx_GIVEREF(__pyx_v_val);
        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_val);
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_to_add, __pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 425, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_L44:;

      /* "metaphor/chem_gm/core/gmtoolbox.py":420
 *         val = int(atomdict[key])
 *         key = key.capitalize()
 *         if (key in Hydrogenes) and val:             # <<<<<<<<<<<<<<
 *             has_hydrogen = True
 *             if (val==-1) or (val==hidden):
 */
      goto __pyx_L41;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":427
 *                 to_add.append((key, val))
 *         #elif not (hidden and (val in [-1, hidden])):
 *         elif (hidden==0) or not (val in [-1, 0, hidden]):  # fix 30/05/2016             # <<<<<<<<<<<<<<
 *             to_add.append((key, val))
 *     for key in structkeysloc:
 */
    __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_hidden, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 427, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!__pyx_t_13) {
    } else {
      __pyx_t_10 = __pyx_t_13;
      goto __pyx_L47_bool_binop_done;
    }
    __Pyx_INCREF(__pyx_v_val);
    __pyx_t_1 = __pyx_v_val;
    __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_int_neg_1, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 427, __pyx_L1_error)
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 427, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_11) {
    } else {
      __pyx_t_13 = __pyx_t_11;
      goto __pyx_L49_bool_binop_done;
    }
    __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 427, __pyx_L1_error)
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 427, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_11) {
    } else {
      __pyx_t_13 = __pyx_t_11;
      goto __pyx_L49_bool_binop_done;
    }
    __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_v_hidden, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 427, __pyx_L1_error)
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 427, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_13 = __pyx_t_11;
    __pyx_L49_bool_binop_done:;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_11 = (__pyx_t_13 != 0);
    __pyx_t_10 = __pyx_t_11;
    __pyx_L47_bool_binop_done:;
    if (__pyx_t_10) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":428
 *         #elif not (hidden and (val in [-1, hidden])):
 *         elif (hidden==0) or not (val in [-1, 0, hidden]):  # fix 30/05/2016
 *             to_add.append((key, val))             # <<<<<<<<<<<<<<
 *     for key in structkeysloc:
 *         # ici on a les elementts de structure
 */
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_key);
      __Pyx_INCREF(__pyx_v_val);
      __Pyx_GIVEREF(__pyx_v_val);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_val);
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_to_add, __pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 428, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":427
 *                 to_add.append((key, val))
 *         #elif not (hidden and (val in [-1, hidden])):
 *         elif (hidden==0) or not (val in [-1, 0, hidden]):  # fix 30/05/2016             # <<<<<<<<<<<<<<
 *             to_add.append((key, val))
 *     for key in structkeysloc:
 */
    }
    __pyx_L41:;

    /* "metaphor/chem_gm/core/gmtoolbox.py":415
 *     structkeysloc = structdict.keys()
 *     structkeysloc = sorted(structkeysloc)#, key=ke yfct
 *     for key in atomkeys:             # <<<<<<<<<<<<<<
 *         # ici, on a les atomes
 *         # la valeur par defaut est hidden (id -1)
 */
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":429
 *         elif (hidden==0) or not (val in [-1, 0, hidden]):  # fix 30/05/2016
 *             to_add.append((key, val))
 *     for key in structkeysloc:             # <<<<<<<<<<<<<<
 *         # ici on a les elementts de structure
 *         # la valeur par defaut est hidden (id -1) (0)
 */
  if (unlikely(__pyx_v_structkeysloc == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 429, __pyx_L1_error)
  }
  __pyx_t_5 = __pyx_v_structkeysloc; __Pyx_INCREF(__pyx_t_5); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_5)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 429, __pyx_L1_error)
    #else
    __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":432
 *         # ici on a les elementts de structure
 *         # la valeur par defaut est hidden (id -1) (0)
 *         if not isint(structdict[key]):             # <<<<<<<<<<<<<<
 *             continue
 *         val = int(structdict[key])
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_isint); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_structdict, __pyx_v_key); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_9) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else
      #endif
      {
        __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 432, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_9); __pyx_t_9 = NULL;
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_t_8);
        __pyx_t_8 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 432, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_11 = ((!__pyx_t_10) != 0);
    if (__pyx_t_11) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":433
 *         # la valeur par defaut est hidden (id -1) (0)
 *         if not isint(structdict[key]):
 *             continue             # <<<<<<<<<<<<<<
 *         val = int(structdict[key])
 *         keyshort = key2short(key)
 */
      goto __pyx_L52_continue;

      /* "metaphor/chem_gm/core/gmtoolbox.py":432
 *         # ici on a les elementts de structure
 *         # la valeur par defaut est hidden (id -1) (0)
 *         if not isint(structdict[key]):             # <<<<<<<<<<<<<<
 *             continue
 *         val = int(structdict[key])
 */
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":434
 *         if not isint(structdict[key]):
 *             continue
 *         val = int(structdict[key])             # <<<<<<<<<<<<<<
 *         keyshort = key2short(key)
 *         if keyshort.startswith("chi"):
 */
    __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_structdict, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":435
 *             continue
 *         val = int(structdict[key])
 *         keyshort = key2short(key)             # <<<<<<<<<<<<<<
 *         if keyshort.startswith("chi"):
 *             if (val != 0):  # or not hidden:
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_key2short); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_15 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_15)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_15);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    if (!__pyx_t_15) {
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_key); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 435, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_15, __pyx_v_key};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 435, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_15, __pyx_v_key};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 435, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 435, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_15); __pyx_t_15 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_key);
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 435, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_keyshort, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":436
 *         val = int(structdict[key])
 *         keyshort = key2short(key)
 *         if keyshort.startswith("chi"):             # <<<<<<<<<<<<<<
 *             if (val != 0):  # or not hidden:
 *                 OKchi = True
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_keyshort, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 436, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 436, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_11) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":437
 *         keyshort = key2short(key)
 *         if keyshort.startswith("chi"):
 *             if (val != 0):  # or not hidden:             # <<<<<<<<<<<<<<
 *                 OKchi = True
 *                 if not hidden:
 */
      __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 437, __pyx_L1_error)
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 437, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_11) {

        /* "metaphor/chem_gm/core/gmtoolbox.py":438
 *         if keyshort.startswith("chi"):
 *             if (val != 0):  # or not hidden:
 *                 OKchi = True             # <<<<<<<<<<<<<<
 *                 if not hidden:
 *                     chimax = 1
 */
        __pyx_v_OKchi = 1;

        /* "metaphor/chem_gm/core/gmtoolbox.py":439
 *             if (val != 0):  # or not hidden:
 *                 OKchi = True
 *                 if not hidden:             # <<<<<<<<<<<<<<
 *                     chimax = 1
 *                 elif val == -1:
 */
        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_hidden); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 439, __pyx_L1_error)
        __pyx_t_10 = ((!__pyx_t_11) != 0);
        if (__pyx_t_10) {

          /* "metaphor/chem_gm/core/gmtoolbox.py":440
 *                 OKchi = True
 *                 if not hidden:
 *                     chimax = 1             # <<<<<<<<<<<<<<
 *                 elif val == -1:
 *                     chimax = hidden
 */
          __Pyx_INCREF(__pyx_int_1);
          __Pyx_DECREF_SET(__pyx_v_chimax, __pyx_int_1);

          /* "metaphor/chem_gm/core/gmtoolbox.py":439
 *             if (val != 0):  # or not hidden:
 *                 OKchi = True
 *                 if not hidden:             # <<<<<<<<<<<<<<
 *                     chimax = 1
 *                 elif val == -1:
 */
          goto __pyx_L57;
        }

        /* "metaphor/chem_gm/core/gmtoolbox.py":441
 *                 if not hidden:
 *                     chimax = 1
 *                 elif val == -1:             # <<<<<<<<<<<<<<
 *                     chimax = hidden
 *                 else:
 */
        __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_val, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 441, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (__pyx_t_10) {

          /* "metaphor/chem_gm/core/gmtoolbox.py":442
 *                     chimax = 1
 *                 elif val == -1:
 *                     chimax = hidden             # <<<<<<<<<<<<<<
 *                 else:
 *                     chimax = min(hidden, val)
 */
          __Pyx_INCREF(__pyx_v_hidden);
          __Pyx_DECREF_SET(__pyx_v_chimax, __pyx_v_hidden);

          /* "metaphor/chem_gm/core/gmtoolbox.py":441
 *                 if not hidden:
 *                     chimax = 1
 *                 elif val == -1:             # <<<<<<<<<<<<<<
 *                     chimax = hidden
 *                 else:
 */
          goto __pyx_L57;
        }

        /* "metaphor/chem_gm/core/gmtoolbox.py":444
 *                     chimax = hidden
 *                 else:
 *                     chimax = min(hidden, val)             # <<<<<<<<<<<<<<
 *         elif keyshort.startswith("iso"):
 *             if (val != 0):  # or not hidden:
 */
        /*else*/ {
          __Pyx_INCREF(__pyx_v_val);
          __pyx_t_1 = __pyx_v_val;
          __Pyx_INCREF(__pyx_v_hidden);
          __pyx_t_6 = __pyx_v_hidden;
          __pyx_t_15 = PyObject_RichCompare(__pyx_t_1, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_15); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 444, __pyx_L1_error)
          __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 444, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (__pyx_t_10) {
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_8 = __pyx_t_1;
          } else {
            __Pyx_INCREF(__pyx_t_6);
            __pyx_t_8 = __pyx_t_6;
          }
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = __pyx_t_8;
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF_SET(__pyx_v_chimax, __pyx_t_1);
          __pyx_t_1 = 0;
        }
        __pyx_L57:;

        /* "metaphor/chem_gm/core/gmtoolbox.py":437
 *         keyshort = key2short(key)
 *         if keyshort.startswith("chi"):
 *             if (val != 0):  # or not hidden:             # <<<<<<<<<<<<<<
 *                 OKchi = True
 *                 if not hidden:
 */
      }

      /* "metaphor/chem_gm/core/gmtoolbox.py":436
 *         val = int(structdict[key])
 *         keyshort = key2short(key)
 *         if keyshort.startswith("chi"):             # <<<<<<<<<<<<<<
 *             if (val != 0):  # or not hidden:
 *                 OKchi = True
 */
      goto __pyx_L55;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":445
 *                 else:
 *                     chimax = min(hidden, val)
 *         elif keyshort.startswith("iso"):             # <<<<<<<<<<<<<<
 *             if (val != 0):  # or not hidden:
 *                 OKiso = True
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_keyshort, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 445, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_10) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":446
 *                     chimax = min(hidden, val)
 *         elif keyshort.startswith("iso"):
 *             if (val != 0):  # or not hidden:             # <<<<<<<<<<<<<<
 *                 OKiso = True
 *                 if not hidden:
 */
      __pyx_t_8 = PyObject_RichCompare(__pyx_v_val, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 446, __pyx_L1_error)
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 446, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (__pyx_t_10) {

        /* "metaphor/chem_gm/core/gmtoolbox.py":447
 *         elif keyshort.startswith("iso"):
 *             if (val != 0):  # or not hidden:
 *                 OKiso = True             # <<<<<<<<<<<<<<
 *                 if not hidden:
 *                     isomax = 1
 */
        __pyx_v_OKiso = 1;

        /* "metaphor/chem_gm/core/gmtoolbox.py":448
 *             if (val != 0):  # or not hidden:
 *                 OKiso = True
 *                 if not hidden:             # <<<<<<<<<<<<<<
 *                     isomax = 1
 *                 elif val == -1:
 */
        __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_hidden); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 448, __pyx_L1_error)
        __pyx_t_11 = ((!__pyx_t_10) != 0);
        if (__pyx_t_11) {

          /* "metaphor/chem_gm/core/gmtoolbox.py":449
 *                 OKiso = True
 *                 if not hidden:
 *                     isomax = 1             # <<<<<<<<<<<<<<
 *                 elif val == -1:
 *                     isomax = hidden
 */
          __Pyx_INCREF(__pyx_int_1);
          __Pyx_DECREF_SET(__pyx_v_isomax, __pyx_int_1);

          /* "metaphor/chem_gm/core/gmtoolbox.py":448
 *             if (val != 0):  # or not hidden:
 *                 OKiso = True
 *                 if not hidden:             # <<<<<<<<<<<<<<
 *                     isomax = 1
 *                 elif val == -1:
 */
          goto __pyx_L59;
        }

        /* "metaphor/chem_gm/core/gmtoolbox.py":450
 *                 if not hidden:
 *                     isomax = 1
 *                 elif val == -1:             # <<<<<<<<<<<<<<
 *                     isomax = hidden
 *                 else:
 */
        __pyx_t_8 = __Pyx_PyInt_EqObjC(__pyx_v_val, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 450, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 450, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (__pyx_t_11) {

          /* "metaphor/chem_gm/core/gmtoolbox.py":451
 *                     isomax = 1
 *                 elif val == -1:
 *                     isomax = hidden             # <<<<<<<<<<<<<<
 *                 else:
 *                     isomax = min(hidden, val)
 */
          __Pyx_INCREF(__pyx_v_hidden);
          __Pyx_DECREF_SET(__pyx_v_isomax, __pyx_v_hidden);

          /* "metaphor/chem_gm/core/gmtoolbox.py":450
 *                 if not hidden:
 *                     isomax = 1
 *                 elif val == -1:             # <<<<<<<<<<<<<<
 *                     isomax = hidden
 *                 else:
 */
          goto __pyx_L59;
        }

        /* "metaphor/chem_gm/core/gmtoolbox.py":453
 *                     isomax = hidden
 *                 else:
 *                     isomax = min(hidden, val)             # <<<<<<<<<<<<<<
 *         elif keyshort.startswith("ccl"):
 *             if val:
 */
        /*else*/ {
          __Pyx_INCREF(__pyx_v_val);
          __pyx_t_8 = __pyx_v_val;
          __Pyx_INCREF(__pyx_v_hidden);
          __pyx_t_1 = __pyx_v_hidden;
          __pyx_t_15 = PyObject_RichCompare(__pyx_t_8, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_15); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 453, __pyx_L1_error)
          __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 453, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (__pyx_t_11) {
            __Pyx_INCREF(__pyx_t_8);
            __pyx_t_6 = __pyx_t_8;
          } else {
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_6 = __pyx_t_1;
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __pyx_t_6;
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF_SET(__pyx_v_isomax, __pyx_t_8);
          __pyx_t_8 = 0;
        }
        __pyx_L59:;

        /* "metaphor/chem_gm/core/gmtoolbox.py":446
 *                     chimax = min(hidden, val)
 *         elif keyshort.startswith("iso"):
 *             if (val != 0):  # or not hidden:             # <<<<<<<<<<<<<<
 *                 OKiso = True
 *                 if not hidden:
 */
      }

      /* "metaphor/chem_gm/core/gmtoolbox.py":445
 *                 else:
 *                     chimax = min(hidden, val)
 *         elif keyshort.startswith("iso"):             # <<<<<<<<<<<<<<
 *             if (val != 0):  # or not hidden:
 *                 OKiso = True
 */
      goto __pyx_L55;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":454
 *                 else:
 *                     isomax = min(hidden, val)
 *         elif keyshort.startswith("ccl"):             # <<<<<<<<<<<<<<
 *             if val:
 *                 ind = ccllst.index(val)
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_keyshort, __pyx_n_s_startswith); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 454, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_11) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":455
 *                     isomax = min(hidden, val)
 *         elif keyshort.startswith("ccl"):
 *             if val:             # <<<<<<<<<<<<<<
 *                 ind = ccllst.index(val)
 *                 cclinputlst[ind].append(keyshort[3:])
 */
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 455, __pyx_L1_error)
      if (__pyx_t_11) {

        /* "metaphor/chem_gm/core/gmtoolbox.py":456
 *         elif keyshort.startswith("ccl"):
 *             if val:
 *                 ind = ccllst.index(val)             # <<<<<<<<<<<<<<
 *                 cclinputlst[ind].append(keyshort[3:])
 *         elif keyshort.startswith("dgr"):
 */
        __pyx_t_6 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyList_Type_index, __pyx_v_ccllst, __pyx_v_val); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 456, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":457
 *             if val:
 *                 ind = ccllst.index(val)
 *                 cclinputlst[ind].append(keyshort[3:])             # <<<<<<<<<<<<<<
 *         elif keyshort.startswith("dgr"):
 *             if val:
 */
        __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_cclinputlst, __pyx_v_ind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 457, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_keyshort, 3, 0, NULL, NULL, &__pyx_slice__37, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 457, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_t_8); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 457, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":455
 *                     isomax = min(hidden, val)
 *         elif keyshort.startswith("ccl"):
 *             if val:             # <<<<<<<<<<<<<<
 *                 ind = ccllst.index(val)
 *                 cclinputlst[ind].append(keyshort[3:])
 */
      }

      /* "metaphor/chem_gm/core/gmtoolbox.py":454
 *                 else:
 *                     isomax = min(hidden, val)
 *         elif keyshort.startswith("ccl"):             # <<<<<<<<<<<<<<
 *             if val:
 *                 ind = ccllst.index(val)
 */
      goto __pyx_L55;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":458
 *                 ind = ccllst.index(val)
 *                 cclinputlst[ind].append(keyshort[3:])
 *         elif keyshort.startswith("dgr"):             # <<<<<<<<<<<<<<
 *             if val:
 *                 ind = gradlst.index(val)
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_keyshort, __pyx_n_s_startswith); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 458, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_11) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":459
 *                 cclinputlst[ind].append(keyshort[3:])
 *         elif keyshort.startswith("dgr"):
 *             if val:             # <<<<<<<<<<<<<<
 *                 ind = gradlst.index(val)
 *                 grdinputlist[ind].append(keyshort[3:])
 */
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 459, __pyx_L1_error)
      if (__pyx_t_11) {

        /* "metaphor/chem_gm/core/gmtoolbox.py":460
 *         elif keyshort.startswith("dgr"):
 *             if val:
 *                 ind = gradlst.index(val)             # <<<<<<<<<<<<<<
 *                 grdinputlist[ind].append(keyshort[3:])
 *         elif val:
 */
        __pyx_t_6 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyList_Type_index, __pyx_v_gradlst, __pyx_v_val); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 460, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":461
 *             if val:
 *                 ind = gradlst.index(val)
 *                 grdinputlist[ind].append(keyshort[3:])             # <<<<<<<<<<<<<<
 *         elif val:
 *             to_add.append((keyshort, val))
 */
        __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_grdinputlist, __pyx_v_ind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 461, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_keyshort, 3, 0, NULL, NULL, &__pyx_slice__39, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 461, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_t_8); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 461, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":459
 *                 cclinputlst[ind].append(keyshort[3:])
 *         elif keyshort.startswith("dgr"):
 *             if val:             # <<<<<<<<<<<<<<
 *                 ind = gradlst.index(val)
 *                 grdinputlist[ind].append(keyshort[3:])
 */
      }

      /* "metaphor/chem_gm/core/gmtoolbox.py":458
 *                 ind = ccllst.index(val)
 *                 cclinputlst[ind].append(keyshort[3:])
 *         elif keyshort.startswith("dgr"):             # <<<<<<<<<<<<<<
 *             if val:
 *                 ind = gradlst.index(val)
 */
      goto __pyx_L55;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":462
 *                 ind = gradlst.index(val)
 *                 grdinputlist[ind].append(keyshort[3:])
 *         elif val:             # <<<<<<<<<<<<<<
 *             to_add.append((keyshort, val))
 * 
 */
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 462, __pyx_L1_error)
    if (__pyx_t_11) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":463
 *                 grdinputlist[ind].append(keyshort[3:])
 *         elif val:
 *             to_add.append((keyshort, val))             # <<<<<<<<<<<<<<
 * 
 *     if OKiso and ((isomax >= 0) or not hidden):
 */
      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 463, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_v_keyshort);
      __Pyx_GIVEREF(__pyx_v_keyshort);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_keyshort);
      __Pyx_INCREF(__pyx_v_val);
      __Pyx_GIVEREF(__pyx_v_val);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_val);
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_to_add, __pyx_t_8); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 463, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":462
 *                 ind = gradlst.index(val)
 *                 grdinputlist[ind].append(keyshort[3:])
 *         elif val:             # <<<<<<<<<<<<<<
 *             to_add.append((keyshort, val))
 * 
 */
    }
    __pyx_L55:;

    /* "metaphor/chem_gm/core/gmtoolbox.py":429
 *         elif (hidden==0) or not (val in [-1, 0, hidden]):  # fix 30/05/2016
 *             to_add.append((key, val))
 *     for key in structkeysloc:             # <<<<<<<<<<<<<<
 *         # ici on a les elementts de structure
 *         # la valeur par defaut est hidden (id -1) (0)
 */
    __pyx_L52_continue:;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":465
 *             to_add.append((keyshort, val))
 * 
 *     if OKiso and ((isomax >= 0) or not hidden):             # <<<<<<<<<<<<<<
 *         to_add.append(("iso", isomax))
 *     if OKchi and ((chimax >= 0) or not hidden):
 */
  __pyx_t_10 = (__pyx_v_OKiso != 0);
  if (__pyx_t_10) {
  } else {
    __pyx_t_11 = __pyx_t_10;
    goto __pyx_L63_bool_binop_done;
  }
  __pyx_t_5 = PyObject_RichCompare(__pyx_v_isomax, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 465, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 465, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!__pyx_t_10) {
  } else {
    __pyx_t_11 = __pyx_t_10;
    goto __pyx_L63_bool_binop_done;
  }
  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_hidden); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 465, __pyx_L1_error)
  __pyx_t_13 = ((!__pyx_t_10) != 0);
  __pyx_t_11 = __pyx_t_13;
  __pyx_L63_bool_binop_done:;
  if (__pyx_t_11) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":466
 * 
 *     if OKiso and ((isomax >= 0) or not hidden):
 *         to_add.append(("iso", isomax))             # <<<<<<<<<<<<<<
 *     if OKchi and ((chimax >= 0) or not hidden):
 *         to_add.append(("chi", chimax))
 */
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_n_u_iso);
    __Pyx_GIVEREF(__pyx_n_u_iso);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_u_iso);
    __Pyx_INCREF(__pyx_v_isomax);
    __Pyx_GIVEREF(__pyx_v_isomax);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_isomax);
    __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_to_add, __pyx_t_5); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 466, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":465
 *             to_add.append((keyshort, val))
 * 
 *     if OKiso and ((isomax >= 0) or not hidden):             # <<<<<<<<<<<<<<
 *         to_add.append(("iso", isomax))
 *     if OKchi and ((chimax >= 0) or not hidden):
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":467
 *     if OKiso and ((isomax >= 0) or not hidden):
 *         to_add.append(("iso", isomax))
 *     if OKchi and ((chimax >= 0) or not hidden):             # <<<<<<<<<<<<<<
 *         to_add.append(("chi", chimax))
 *     for val, lst in zip(ccllst, cclinputlst):
 */
  __pyx_t_13 = (__pyx_v_OKchi != 0);
  if (__pyx_t_13) {
  } else {
    __pyx_t_11 = __pyx_t_13;
    goto __pyx_L67_bool_binop_done;
  }
  __pyx_t_5 = PyObject_RichCompare(__pyx_v_chimax, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 467, __pyx_L1_error)
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 467, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!__pyx_t_13) {
  } else {
    __pyx_t_11 = __pyx_t_13;
    goto __pyx_L67_bool_binop_done;
  }
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_hidden); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 467, __pyx_L1_error)
  __pyx_t_10 = ((!__pyx_t_13) != 0);
  __pyx_t_11 = __pyx_t_10;
  __pyx_L67_bool_binop_done:;
  if (__pyx_t_11) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":468
 *         to_add.append(("iso", isomax))
 *     if OKchi and ((chimax >= 0) or not hidden):
 *         to_add.append(("chi", chimax))             # <<<<<<<<<<<<<<
 *     for val, lst in zip(ccllst, cclinputlst):
 *         valtest = [int(item) for item in lst]
 */
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_n_u_chi);
    __Pyx_GIVEREF(__pyx_n_u_chi);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_u_chi);
    __Pyx_INCREF(__pyx_v_chimax);
    __Pyx_GIVEREF(__pyx_v_chimax);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_chimax);
    __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_to_add, __pyx_t_5); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 468, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":467
 *     if OKiso and ((isomax >= 0) or not hidden):
 *         to_add.append(("iso", isomax))
 *     if OKchi and ((chimax >= 0) or not hidden):             # <<<<<<<<<<<<<<
 *         to_add.append(("chi", chimax))
 *     for val, lst in zip(ccllst, cclinputlst):
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":469
 *     if OKchi and ((chimax >= 0) or not hidden):
 *         to_add.append(("chi", chimax))
 *     for val, lst in zip(ccllst, cclinputlst):             # <<<<<<<<<<<<<<
 *         valtest = [int(item) for item in lst]
 *         isfull = True
 */
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_ccllst);
  __Pyx_GIVEREF(__pyx_v_ccllst);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ccllst);
  __Pyx_INCREF(__pyx_v_cclinputlst);
  __Pyx_GIVEREF(__pyx_v_cclinputlst);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_cclinputlst);
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
    __pyx_t_5 = __pyx_t_8; __Pyx_INCREF(__pyx_t_5); __pyx_t_3 = 0;
    __pyx_t_14 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_14 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 469, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  for (;;) {
    if (likely(!__pyx_t_14)) {
      if (likely(PyList_CheckExact(__pyx_t_5))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_8 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_8); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 469, __pyx_L1_error)
        #else
        __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 469, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_8); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 469, __pyx_L1_error)
        #else
        __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 469, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        #endif
      }
    } else {
      __pyx_t_8 = __pyx_t_14(__pyx_t_5);
      if (unlikely(!__pyx_t_8)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 469, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_8);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) {
      PyObject* sequence = __pyx_t_8;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 469, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_1);
      #else
      __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 469, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #endif
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_15 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 469, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_16 = Py_TYPE(__pyx_t_15)->tp_iternext;
      index = 0; __pyx_t_6 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_6)) goto __pyx_L72_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 1; __pyx_t_1 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_1)) goto __pyx_L72_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_15), 2) < 0) __PYX_ERR(0, 469, __pyx_L1_error)
      __pyx_t_16 = NULL;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      goto __pyx_L73_unpacking_done;
      __pyx_L72_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_t_16 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 469, __pyx_L1_error)
      __pyx_L73_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_lst, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":470
 *         to_add.append(("chi", chimax))
 *     for val, lst in zip(ccllst, cclinputlst):
 *         valtest = [int(item) for item in lst]             # <<<<<<<<<<<<<<
 *         isfull = True
 *         for n in range(1, len(lst)+1):
 */
    { /* enter inner scope */
      __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 470, __pyx_L76_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
        __pyx_t_1 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
        __pyx_t_17 = NULL;
      } else {
        __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L76_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 470, __pyx_L76_error)
      }
      for (;;) {
        if (likely(!__pyx_t_17)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 470, __pyx_L76_error)
            #else
            __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 470, __pyx_L76_error)
            __Pyx_GOTREF(__pyx_t_6);
            #endif
          } else {
            if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 470, __pyx_L76_error)
            #else
            __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 470, __pyx_L76_error)
            __Pyx_GOTREF(__pyx_t_6);
            #endif
          }
        } else {
          __pyx_t_6 = __pyx_t_17(__pyx_t_1);
          if (unlikely(!__pyx_t_6)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 470, __pyx_L76_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_6);
        }
        __Pyx_XDECREF_SET(__pyx_9genexpr11__pyx_v_item, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_9genexpr11__pyx_v_item); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 470, __pyx_L76_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_8, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 470, __pyx_L76_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_item); __pyx_9genexpr11__pyx_v_item = 0;
      goto __pyx_L79_exit_scope;
      __pyx_L76_error:;
      __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_item); __pyx_9genexpr11__pyx_v_item = 0;
      goto __pyx_L1_error;
      __pyx_L79_exit_scope:;
    } /* exit inner scope */
    __Pyx_XDECREF_SET(__pyx_v_valtest, ((PyObject*)__pyx_t_8));
    __pyx_t_8 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":471
 *     for val, lst in zip(ccllst, cclinputlst):
 *         valtest = [int(item) for item in lst]
 *         isfull = True             # <<<<<<<<<<<<<<
 *         for n in range(1, len(lst)+1):
 *             if not n in valtest:
 */
    __pyx_v_isfull = 1;

    /* "metaphor/chem_gm/core/gmtoolbox.py":472
 *         valtest = [int(item) for item in lst]
 *         isfull = True
 *         for n in range(1, len(lst)+1):             # <<<<<<<<<<<<<<
 *             if not n in valtest:
 *                 isfull = False
 */
    __pyx_t_2 = PyObject_Length(__pyx_v_lst); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 472, __pyx_L1_error)
    __pyx_t_18 = (__pyx_t_2 + 1);
    __pyx_t_2 = __pyx_t_18;
    for (__pyx_t_19 = 1; __pyx_t_19 < __pyx_t_2; __pyx_t_19+=1) {
      __pyx_v_n = __pyx_t_19;

      /* "metaphor/chem_gm/core/gmtoolbox.py":473
 *         isfull = True
 *         for n in range(1, len(lst)+1):
 *             if not n in valtest:             # <<<<<<<<<<<<<<
 *                 isfull = False
 *                 break
 */
      __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 473, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_t_8, __pyx_v_valtest, Py_NE)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 473, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_10 = (__pyx_t_11 != 0);
      if (__pyx_t_10) {

        /* "metaphor/chem_gm/core/gmtoolbox.py":474
 *         for n in range(1, len(lst)+1):
 *             if not n in valtest:
 *                 isfull = False             # <<<<<<<<<<<<<<
 *                 break
 *         if isfull:
 */
        __pyx_v_isfull = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":475
 *             if not n in valtest:
 *                 isfull = False
 *                 break             # <<<<<<<<<<<<<<
 *         if isfull:
 *             if val and ((val!=-1) or hidden):
 */
        goto __pyx_L81_break;

        /* "metaphor/chem_gm/core/gmtoolbox.py":473
 *         isfull = True
 *         for n in range(1, len(lst)+1):
 *             if not n in valtest:             # <<<<<<<<<<<<<<
 *                 isfull = False
 *                 break
 */
      }
    }
    __pyx_L81_break:;

    /* "metaphor/chem_gm/core/gmtoolbox.py":476
 *                 isfull = False
 *                 break
 *         if isfull:             # <<<<<<<<<<<<<<
 *             if val and ((val!=-1) or hidden):
 *                 to_add.append(("ccls", val))
 */
    __pyx_t_10 = (__pyx_v_isfull != 0);
    if (__pyx_t_10) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":477
 *                 break
 *         if isfull:
 *             if val and ((val!=-1) or hidden):             # <<<<<<<<<<<<<<
 *                 to_add.append(("ccls", val))
 *         else:
 */
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 477, __pyx_L1_error)
      if (__pyx_t_11) {
      } else {
        __pyx_t_10 = __pyx_t_11;
        goto __pyx_L85_bool_binop_done;
      }
      __pyx_t_8 = PyObject_RichCompare(__pyx_v_val, __pyx_int_neg_1, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 477, __pyx_L1_error)
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 477, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (!__pyx_t_11) {
      } else {
        __pyx_t_10 = __pyx_t_11;
        goto __pyx_L85_bool_binop_done;
      }
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_hidden); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 477, __pyx_L1_error)
      __pyx_t_10 = __pyx_t_11;
      __pyx_L85_bool_binop_done:;
      if (__pyx_t_10) {

        /* "metaphor/chem_gm/core/gmtoolbox.py":478
 *         if isfull:
 *             if val and ((val!=-1) or hidden):
 *                 to_add.append(("ccls", val))             # <<<<<<<<<<<<<<
 *         else:
 *             if val and ((val!=-1) or hidden):
 */
        __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 478, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_n_u_ccls);
        __Pyx_GIVEREF(__pyx_n_u_ccls);
        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_n_u_ccls);
        __Pyx_INCREF(__pyx_v_val);
        __Pyx_GIVEREF(__pyx_v_val);
        PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_val);
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_to_add, __pyx_t_8); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 478, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":477
 *                 break
 *         if isfull:
 *             if val and ((val!=-1) or hidden):             # <<<<<<<<<<<<<<
 *                 to_add.append(("ccls", val))
 *         else:
 */
      }

      /* "metaphor/chem_gm/core/gmtoolbox.py":476
 *                 isfull = False
 *                 break
 *         if isfull:             # <<<<<<<<<<<<<<
 *             if val and ((val!=-1) or hidden):
 *                 to_add.append(("ccls", val))
 */
      goto __pyx_L83;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":480
 *                 to_add.append(("ccls", val))
 *         else:
 *             if val and ((val!=-1) or hidden):             # <<<<<<<<<<<<<<
 *                 st = "%s%s"% ("ccl", "".join(lst))
 *                 to_add.append((st, val))
 */
    /*else*/ {
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 480, __pyx_L1_error)
      if (__pyx_t_11) {
      } else {
        __pyx_t_10 = __pyx_t_11;
        goto __pyx_L89_bool_binop_done;
      }
      __pyx_t_8 = PyObject_RichCompare(__pyx_v_val, __pyx_int_neg_1, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 480, __pyx_L1_error)
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 480, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (!__pyx_t_11) {
      } else {
        __pyx_t_10 = __pyx_t_11;
        goto __pyx_L89_bool_binop_done;
      }
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_hidden); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 480, __pyx_L1_error)
      __pyx_t_10 = __pyx_t_11;
      __pyx_L89_bool_binop_done:;
      if (__pyx_t_10) {

        /* "metaphor/chem_gm/core/gmtoolbox.py":481
 *         else:
 *             if val and ((val!=-1) or hidden):
 *                 st = "%s%s"% ("ccl", "".join(lst))             # <<<<<<<<<<<<<<
 *                 to_add.append((st, val))
 *     for val, lst in zip(gradlst, grdinputlist):  # les degres sont traites ici
 */
        __pyx_t_8 = PyUnicode_Join(__pyx_kp_u__4, __pyx_v_lst); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 481, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_n_u_ccl, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 481, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF_SET(__pyx_v_st, ((PyObject*)__pyx_t_1));
        __pyx_t_1 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":482
 *             if val and ((val!=-1) or hidden):
 *                 st = "%s%s"% ("ccl", "".join(lst))
 *                 to_add.append((st, val))             # <<<<<<<<<<<<<<
 *     for val, lst in zip(gradlst, grdinputlist):  # les degres sont traites ici
 *         valtest = [int(item) for item in lst]
 */
        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 482, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_v_st);
        __Pyx_GIVEREF(__pyx_v_st);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_st);
        __Pyx_INCREF(__pyx_v_val);
        __Pyx_GIVEREF(__pyx_v_val);
        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_val);
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_to_add, __pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 482, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":480
 *                 to_add.append(("ccls", val))
 *         else:
 *             if val and ((val!=-1) or hidden):             # <<<<<<<<<<<<<<
 *                 st = "%s%s"% ("ccl", "".join(lst))
 *                 to_add.append((st, val))
 */
      }
    }
    __pyx_L83:;

    /* "metaphor/chem_gm/core/gmtoolbox.py":469
 *     if OKchi and ((chimax >= 0) or not hidden):
 *         to_add.append(("chi", chimax))
 *     for val, lst in zip(ccllst, cclinputlst):             # <<<<<<<<<<<<<<
 *         valtest = [int(item) for item in lst]
 *         isfull = True
 */
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":483
 *                 st = "%s%s"% ("ccl", "".join(lst))
 *                 to_add.append((st, val))
 *     for val, lst in zip(gradlst, grdinputlist):  # les degres sont traites ici             # <<<<<<<<<<<<<<
 *         valtest = [int(item) for item in lst]
 *         isfull = True
 */
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_gradlst);
  __Pyx_GIVEREF(__pyx_v_gradlst);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_gradlst);
  __Pyx_INCREF(__pyx_v_grdinputlist);
  __Pyx_GIVEREF(__pyx_v_grdinputlist);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_grdinputlist);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_3 = 0;
    __pyx_t_14 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_14 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 483, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_14)) {
      if (likely(PyList_CheckExact(__pyx_t_5))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 483, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 483, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 483, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 483, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_14(__pyx_t_5);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 483, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 483, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 483, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 483, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_15 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 483, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_16 = Py_TYPE(__pyx_t_15)->tp_iternext;
      index = 0; __pyx_t_8 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_8)) goto __pyx_L94_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      index = 1; __pyx_t_6 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_6)) goto __pyx_L94_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_15), 2) < 0) __PYX_ERR(0, 483, __pyx_L1_error)
      __pyx_t_16 = NULL;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      goto __pyx_L95_unpacking_done;
      __pyx_L94_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_t_16 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 483, __pyx_L1_error)
      __pyx_L95_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_8);
    __pyx_t_8 = 0;
    __Pyx_XDECREF_SET(__pyx_v_lst, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":484
 *                 to_add.append((st, val))
 *     for val, lst in zip(gradlst, grdinputlist):  # les degres sont traites ici
 *         valtest = [int(item) for item in lst]             # <<<<<<<<<<<<<<
 *         isfull = True
 *         for n in range(1, len(lst)+1):
 */
    { /* enter inner scope */
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L98_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
        __pyx_t_6 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_6); __pyx_t_18 = 0;
        __pyx_t_17 = NULL;
      } else {
        __pyx_t_18 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 484, __pyx_L98_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_17 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 484, __pyx_L98_error)
      }
      for (;;) {
        if (likely(!__pyx_t_17)) {
          if (likely(PyList_CheckExact(__pyx_t_6))) {
            if (__pyx_t_18 >= PyList_GET_SIZE(__pyx_t_6)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_8 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_18); __Pyx_INCREF(__pyx_t_8); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 484, __pyx_L98_error)
            #else
            __pyx_t_8 = PySequence_ITEM(__pyx_t_6, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 484, __pyx_L98_error)
            __Pyx_GOTREF(__pyx_t_8);
            #endif
          } else {
            if (__pyx_t_18 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_18); __Pyx_INCREF(__pyx_t_8); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 484, __pyx_L98_error)
            #else
            __pyx_t_8 = PySequence_ITEM(__pyx_t_6, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 484, __pyx_L98_error)
            __Pyx_GOTREF(__pyx_t_8);
            #endif
          }
        } else {
          __pyx_t_8 = __pyx_t_17(__pyx_t_6);
          if (unlikely(!__pyx_t_8)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 484, __pyx_L98_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_8);
        }
        __Pyx_XDECREF_SET(__pyx_9genexpr12__pyx_v_item, __pyx_t_8);
        __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyNumber_Int(__pyx_9genexpr12__pyx_v_item); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 484, __pyx_L98_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 484, __pyx_L98_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_item); __pyx_9genexpr12__pyx_v_item = 0;
      goto __pyx_L101_exit_scope;
      __pyx_L98_error:;
      __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_item); __pyx_9genexpr12__pyx_v_item = 0;
      goto __pyx_L1_error;
      __pyx_L101_exit_scope:;
    } /* exit inner scope */
    __Pyx_XDECREF_SET(__pyx_v_valtest, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":485
 *     for val, lst in zip(gradlst, grdinputlist):  # les degres sont traites ici
 *         valtest = [int(item) for item in lst]
 *         isfull = True             # <<<<<<<<<<<<<<
 *         for n in range(1, len(lst)+1):
 *             if not n in valtest:
 */
    __pyx_v_isfull = 1;

    /* "metaphor/chem_gm/core/gmtoolbox.py":486
 *         valtest = [int(item) for item in lst]
 *         isfull = True
 *         for n in range(1, len(lst)+1):             # <<<<<<<<<<<<<<
 *             if not n in valtest:
 *                 isfull = False
 */
    __pyx_t_18 = PyObject_Length(__pyx_v_lst); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 486, __pyx_L1_error)
    __pyx_t_2 = (__pyx_t_18 + 1);
    __pyx_t_18 = __pyx_t_2;
    for (__pyx_t_19 = 1; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) {
      __pyx_v_n = __pyx_t_19;

      /* "metaphor/chem_gm/core/gmtoolbox.py":487
 *         isfull = True
 *         for n in range(1, len(lst)+1):
 *             if not n in valtest:             # <<<<<<<<<<<<<<
 *                 isfull = False
 *                 break
 */
      __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_v_valtest, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 487, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_11 = (__pyx_t_10 != 0);
      if (__pyx_t_11) {

        /* "metaphor/chem_gm/core/gmtoolbox.py":488
 *         for n in range(1, len(lst)+1):
 *             if not n in valtest:
 *                 isfull = False             # <<<<<<<<<<<<<<
 *                 break
 *         cond = hidden and (val != -1) and (val != hidden)
 */
        __pyx_v_isfull = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":489
 *             if not n in valtest:
 *                 isfull = False
 *                 break             # <<<<<<<<<<<<<<
 *         cond = hidden and (val != -1) and (val != hidden)
 *         if has_hydrogen:
 */
        goto __pyx_L103_break;

        /* "metaphor/chem_gm/core/gmtoolbox.py":487
 *         isfull = True
 *         for n in range(1, len(lst)+1):
 *             if not n in valtest:             # <<<<<<<<<<<<<<
 *                 isfull = False
 *                 break
 */
      }
    }
    __pyx_L103_break:;

    /* "metaphor/chem_gm/core/gmtoolbox.py":490
 *                 isfull = False
 *                 break
 *         cond = hidden and (val != -1) and (val != hidden)             # <<<<<<<<<<<<<<
 *         if has_hydrogen:
 *             cond = hidden and val
 */
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_hidden); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 490, __pyx_L1_error)
    if (__pyx_t_11) {
    } else {
      __Pyx_INCREF(__pyx_v_hidden);
      __pyx_t_1 = __pyx_v_hidden;
      goto __pyx_L105_bool_binop_done;
    }
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_val, __pyx_int_neg_1, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 490, __pyx_L1_error)
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 490, __pyx_L1_error)
    if (__pyx_t_11) {
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_1 = __pyx_t_6;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L105_bool_binop_done;
    }
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_val, __pyx_v_hidden, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 490, __pyx_L1_error)
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_1 = __pyx_t_6;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_L105_bool_binop_done:;
    __Pyx_XDECREF_SET(__pyx_v_cond, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":491
 *                 break
 *         cond = hidden and (val != -1) and (val != hidden)
 *         if has_hydrogen:             # <<<<<<<<<<<<<<
 *             cond = hidden and val
 *         if isfull:
 */
    __pyx_t_11 = (__pyx_v_has_hydrogen != 0);
    if (__pyx_t_11) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":492
 *         cond = hidden and (val != -1) and (val != hidden)
 *         if has_hydrogen:
 *             cond = hidden and val             # <<<<<<<<<<<<<<
 *         if isfull:
 *             if val and cond:
 */
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_hidden); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 492, __pyx_L1_error)
      if (__pyx_t_11) {
      } else {
        __Pyx_INCREF(__pyx_v_hidden);
        __pyx_t_1 = __pyx_v_hidden;
        goto __pyx_L109_bool_binop_done;
      }
      __Pyx_INCREF(__pyx_v_val);
      __pyx_t_1 = __pyx_v_val;
      __pyx_L109_bool_binop_done:;
      __Pyx_DECREF_SET(__pyx_v_cond, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":491
 *                 break
 *         cond = hidden and (val != -1) and (val != hidden)
 *         if has_hydrogen:             # <<<<<<<<<<<<<<
 *             cond = hidden and val
 *         if isfull:
 */
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":493
 *         if has_hydrogen:
 *             cond = hidden and val
 *         if isfull:             # <<<<<<<<<<<<<<
 *             if val and cond:
 *                 to_add.append(("grds", val))
 */
    __pyx_t_11 = (__pyx_v_isfull != 0);
    if (__pyx_t_11) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":494
 *             cond = hidden and val
 *         if isfull:
 *             if val and cond:             # <<<<<<<<<<<<<<
 *                 to_add.append(("grds", val))
 *             elif (val==-1) and not hidden:
 */
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 494, __pyx_L1_error)
      if (__pyx_t_10) {
      } else {
        __pyx_t_11 = __pyx_t_10;
        goto __pyx_L113_bool_binop_done;
      }
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_cond); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 494, __pyx_L1_error)
      __pyx_t_11 = __pyx_t_10;
      __pyx_L113_bool_binop_done:;
      if (__pyx_t_11) {

        /* "metaphor/chem_gm/core/gmtoolbox.py":495
 *         if isfull:
 *             if val and cond:
 *                 to_add.append(("grds", val))             # <<<<<<<<<<<<<<
 *             elif (val==-1) and not hidden:
 *                 to_add.append(("grds", 1))
 */
        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 495, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_n_u_grds);
        __Pyx_GIVEREF(__pyx_n_u_grds);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_grds);
        __Pyx_INCREF(__pyx_v_val);
        __Pyx_GIVEREF(__pyx_v_val);
        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_val);
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_to_add, __pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 495, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":494
 *             cond = hidden and val
 *         if isfull:
 *             if val and cond:             # <<<<<<<<<<<<<<
 *                 to_add.append(("grds", val))
 *             elif (val==-1) and not hidden:
 */
        goto __pyx_L112;
      }

      /* "metaphor/chem_gm/core/gmtoolbox.py":496
 *             if val and cond:
 *                 to_add.append(("grds", val))
 *             elif (val==-1) and not hidden:             # <<<<<<<<<<<<<<
 *                 to_add.append(("grds", 1))
 *         else:
 */
      __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_val, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 496, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_10) {
      } else {
        __pyx_t_11 = __pyx_t_10;
        goto __pyx_L115_bool_binop_done;
      }
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_hidden); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 496, __pyx_L1_error)
      __pyx_t_13 = ((!__pyx_t_10) != 0);
      __pyx_t_11 = __pyx_t_13;
      __pyx_L115_bool_binop_done:;
      if (__pyx_t_11) {

        /* "metaphor/chem_gm/core/gmtoolbox.py":497
 *                 to_add.append(("grds", val))
 *             elif (val==-1) and not hidden:
 *                 to_add.append(("grds", 1))             # <<<<<<<<<<<<<<
 *         else:
 *             if val and cond:
 */
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_to_add, __pyx_tuple__40); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 497, __pyx_L1_error)

        /* "metaphor/chem_gm/core/gmtoolbox.py":496
 *             if val and cond:
 *                 to_add.append(("grds", val))
 *             elif (val==-1) and not hidden:             # <<<<<<<<<<<<<<
 *                 to_add.append(("grds", 1))
 *         else:
 */
      }
      __pyx_L112:;

      /* "metaphor/chem_gm/core/gmtoolbox.py":493
 *         if has_hydrogen:
 *             cond = hidden and val
 *         if isfull:             # <<<<<<<<<<<<<<
 *             if val and cond:
 *                 to_add.append(("grds", val))
 */
      goto __pyx_L111;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":499
 *                 to_add.append(("grds", 1))
 *         else:
 *             if val and cond:             # <<<<<<<<<<<<<<
 *                 st = "%s%s"% ("grd", "".join(lst))
 *                 to_add.append((st, val))
 */
    /*else*/ {
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 499, __pyx_L1_error)
      if (__pyx_t_13) {
      } else {
        __pyx_t_11 = __pyx_t_13;
        goto __pyx_L118_bool_binop_done;
      }
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_cond); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 499, __pyx_L1_error)
      __pyx_t_11 = __pyx_t_13;
      __pyx_L118_bool_binop_done:;
      if (__pyx_t_11) {

        /* "metaphor/chem_gm/core/gmtoolbox.py":500
 *         else:
 *             if val and cond:
 *                 st = "%s%s"% ("grd", "".join(lst))             # <<<<<<<<<<<<<<
 *                 to_add.append((st, val))
 *             elif (val==-1) and not hidden:
 */
        __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__4, __pyx_v_lst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_n_u_grd, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 500, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF_SET(__pyx_v_st, ((PyObject*)__pyx_t_6));
        __pyx_t_6 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":501
 *             if val and cond:
 *                 st = "%s%s"% ("grd", "".join(lst))
 *                 to_add.append((st, val))             # <<<<<<<<<<<<<<
 *             elif (val==-1) and not hidden:
 *                 st = "%s%s"% ("grd", "".join(lst))
 */
        __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 501, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_v_st);
        __Pyx_GIVEREF(__pyx_v_st);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_st);
        __Pyx_INCREF(__pyx_v_val);
        __Pyx_GIVEREF(__pyx_v_val);
        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_val);
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_to_add, __pyx_t_6); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 501, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":499
 *                 to_add.append(("grds", 1))
 *         else:
 *             if val and cond:             # <<<<<<<<<<<<<<
 *                 st = "%s%s"% ("grd", "".join(lst))
 *                 to_add.append((st, val))
 */
        goto __pyx_L117;
      }

      /* "metaphor/chem_gm/core/gmtoolbox.py":502
 *                 st = "%s%s"% ("grd", "".join(lst))
 *                 to_add.append((st, val))
 *             elif (val==-1) and not hidden:             # <<<<<<<<<<<<<<
 *                 st = "%s%s"% ("grd", "".join(lst))
 *                 to_add.append((st, 1))
 */
      __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_val, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 502, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 502, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_13) {
      } else {
        __pyx_t_11 = __pyx_t_13;
        goto __pyx_L120_bool_binop_done;
      }
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_hidden); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 502, __pyx_L1_error)
      __pyx_t_10 = ((!__pyx_t_13) != 0);
      __pyx_t_11 = __pyx_t_10;
      __pyx_L120_bool_binop_done:;
      if (__pyx_t_11) {

        /* "metaphor/chem_gm/core/gmtoolbox.py":503
 *                 to_add.append((st, val))
 *             elif (val==-1) and not hidden:
 *                 st = "%s%s"% ("grd", "".join(lst))             # <<<<<<<<<<<<<<
 *                 to_add.append((st, 1))
 *     resultlist = []
 */
        __pyx_t_6 = PyUnicode_Join(__pyx_kp_u__4, __pyx_v_lst); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 503, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_n_u_grd, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF_SET(__pyx_v_st, ((PyObject*)__pyx_t_1));
        __pyx_t_1 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":504
 *             elif (val==-1) and not hidden:
 *                 st = "%s%s"% ("grd", "".join(lst))
 *                 to_add.append((st, 1))             # <<<<<<<<<<<<<<
 *     resultlist = []
 *     cumulatom = -1
 */
        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_v_st);
        __Pyx_GIVEREF(__pyx_v_st);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_st);
        __Pyx_INCREF(__pyx_int_1);
        __Pyx_GIVEREF(__pyx_int_1);
        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_1);
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_to_add, __pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 504, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":502
 *                 st = "%s%s"% ("grd", "".join(lst))
 *                 to_add.append((st, val))
 *             elif (val==-1) and not hidden:             # <<<<<<<<<<<<<<
 *                 st = "%s%s"% ("grd", "".join(lst))
 *                 to_add.append((st, 1))
 */
      }
      __pyx_L117:;
    }
    __pyx_L111:;

    /* "metaphor/chem_gm/core/gmtoolbox.py":483
 *                 st = "%s%s"% ("ccl", "".join(lst))
 *                 to_add.append((st, val))
 *     for val, lst in zip(gradlst, grdinputlist):  # les degres sont traites ici             # <<<<<<<<<<<<<<
 *         valtest = [int(item) for item in lst]
 *         isfull = True
 */
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":505
 *                 st = "%s%s"% ("grd", "".join(lst))
 *                 to_add.append((st, 1))
 *     resultlist = []             # <<<<<<<<<<<<<<
 *     cumulatom = -1
 *     for (opt, val) in to_add:
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_resultlist = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":506
 *                 to_add.append((st, 1))
 *     resultlist = []
 *     cumulatom = -1             # <<<<<<<<<<<<<<
 *     for (opt, val) in to_add:
 *         if opt in Atomes:
 */
  __Pyx_INCREF(__pyx_int_neg_1);
  __pyx_v_cumulatom = __pyx_int_neg_1;

  /* "metaphor/chem_gm/core/gmtoolbox.py":507
 *     resultlist = []
 *     cumulatom = -1
 *     for (opt, val) in to_add:             # <<<<<<<<<<<<<<
 *         if opt in Atomes:
 *             if (val == "_") or (val >= 0):
 */
  __pyx_t_5 = __pyx_v_to_add; __Pyx_INCREF(__pyx_t_5); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_5)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 507, __pyx_L1_error)
    #else
    __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    #endif
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 507, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      #else
      __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 507, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 507, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_15 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 507, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_16 = Py_TYPE(__pyx_t_15)->tp_iternext;
      index = 0; __pyx_t_6 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_6)) goto __pyx_L124_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 1; __pyx_t_8 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_8)) goto __pyx_L124_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_15), 2) < 0) __PYX_ERR(0, 507, __pyx_L1_error)
      __pyx_t_16 = NULL;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      goto __pyx_L125_unpacking_done;
      __pyx_L124_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_t_16 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 507, __pyx_L1_error)
      __pyx_L125_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_opt, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":508
 *     cumulatom = -1
 *     for (opt, val) in to_add:
 *         if opt in Atomes:             # <<<<<<<<<<<<<<
 *             if (val == "_") or (val >= 0):
 *                 cumulatom += 1
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Atomes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_v_opt, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 508, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_10 = (__pyx_t_11 != 0);
    if (__pyx_t_10) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":509
 *     for (opt, val) in to_add:
 *         if opt in Atomes:
 *             if (val == "_") or (val >= 0):             # <<<<<<<<<<<<<<
 *                 cumulatom += 1
 *                 if val == "_":
 */
      __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_val, __pyx_n_u__5, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 509, __pyx_L1_error)
      if (!__pyx_t_11) {
      } else {
        __pyx_t_10 = __pyx_t_11;
        goto __pyx_L128_bool_binop_done;
      }
      __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error)
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 509, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_10 = __pyx_t_11;
      __pyx_L128_bool_binop_done:;
      if (__pyx_t_10) {

        /* "metaphor/chem_gm/core/gmtoolbox.py":510
 *         if opt in Atomes:
 *             if (val == "_") or (val >= 0):
 *                 cumulatom += 1             # <<<<<<<<<<<<<<
 *                 if val == "_":
 *                     resultlist.append("%s"%(opt))
 */
        __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_cumulatom, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 510, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF_SET(__pyx_v_cumulatom, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":511
 *             if (val == "_") or (val >= 0):
 *                 cumulatom += 1
 *                 if val == "_":             # <<<<<<<<<<<<<<
 *                     resultlist.append("%s"%(opt))
 *                 else:
 */
        __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_v_val, __pyx_n_u__5, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 511, __pyx_L1_error)
        if (__pyx_t_10) {

          /* "metaphor/chem_gm/core/gmtoolbox.py":512
 *                 cumulatom += 1
 *                 if val == "_":
 *                     resultlist.append("%s"%(opt))             # <<<<<<<<<<<<<<
 *                 else:
 *                     resultlist.append("%s%s"%(opt, val))
 */
          __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_s, __pyx_v_opt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_resultlist, __pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 512, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "metaphor/chem_gm/core/gmtoolbox.py":511
 *             if (val == "_") or (val >= 0):
 *                 cumulatom += 1
 *                 if val == "_":             # <<<<<<<<<<<<<<
 *                     resultlist.append("%s"%(opt))
 *                 else:
 */
          goto __pyx_L130;
        }

        /* "metaphor/chem_gm/core/gmtoolbox.py":514
 *                     resultlist.append("%s"%(opt))
 *                 else:
 *                     resultlist.append("%s%s"%(opt, val))             # <<<<<<<<<<<<<<
 *         elif val == -1:
 *             resultlist.append("%s%d"%(opt, hidden))
 */
        /*else*/ {
          __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_opt), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_val), __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 514, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 514, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_resultlist, __pyx_t_6); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 514, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __pyx_L130:;

        /* "metaphor/chem_gm/core/gmtoolbox.py":509
 *     for (opt, val) in to_add:
 *         if opt in Atomes:
 *             if (val == "_") or (val >= 0):             # <<<<<<<<<<<<<<
 *                 cumulatom += 1
 *                 if val == "_":
 */
      }

      /* "metaphor/chem_gm/core/gmtoolbox.py":508
 *     cumulatom = -1
 *     for (opt, val) in to_add:
 *         if opt in Atomes:             # <<<<<<<<<<<<<<
 *             if (val == "_") or (val >= 0):
 *                 cumulatom += 1
 */
      goto __pyx_L126;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":515
 *                 else:
 *                     resultlist.append("%s%s"%(opt, val))
 *         elif val == -1:             # <<<<<<<<<<<<<<
 *             resultlist.append("%s%d"%(opt, hidden))
 *         else:
 */
    __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_val, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 515, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_10) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":516
 *                     resultlist.append("%s%s"%(opt, val))
 *         elif val == -1:
 *             resultlist.append("%s%d"%(opt, hidden))             # <<<<<<<<<<<<<<
 *         else:
 *             resultlist.append("%s%d"%(opt, val))
 */
      __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_opt), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 516, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyObject_Format(__pyx_v_hidden, __pyx_n_u_d); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 516, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_resultlist, __pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 516, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":515
 *                 else:
 *                     resultlist.append("%s%s"%(opt, val))
 *         elif val == -1:             # <<<<<<<<<<<<<<
 *             resultlist.append("%s%d"%(opt, hidden))
 *         else:
 */
      goto __pyx_L126;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":518
 *             resultlist.append("%s%d"%(opt, hidden))
 *         else:
 *             resultlist.append("%s%d"%(opt, val))             # <<<<<<<<<<<<<<
 *     #return "_".join(resultlist)
 * 
 */
    /*else*/ {
      __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_opt), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = __Pyx_PyObject_Format(__pyx_v_val, __pyx_n_u_d); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_resultlist, __pyx_t_6); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 518, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_L126:;

    /* "metaphor/chem_gm/core/gmtoolbox.py":507
 *     resultlist = []
 *     cumulatom = -1
 *     for (opt, val) in to_add:             # <<<<<<<<<<<<<<
 *         if opt in Atomes:
 *             if (val == "_") or (val >= 0):
 */
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":523
 * #     if withprefix:
 * #         resultlist = [prefix] + resultlist
 *     if fullconfig:             # <<<<<<<<<<<<<<
 *         if dict['central'] == "":
 *             central = 0
 */
  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_fullconfig); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 523, __pyx_L1_error)
  if (__pyx_t_10) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":524
 * #         resultlist = [prefix] + resultlist
 *     if fullconfig:
 *         if dict['central'] == "":             # <<<<<<<<<<<<<<
 *             central = 0
 *         else:
 */
    __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_dict, __pyx_n_u_central); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_5, __pyx_kp_u__4, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 524, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_10) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":525
 *     if fullconfig:
 *         if dict['central'] == "":
 *             central = 0             # <<<<<<<<<<<<<<
 *         else:
 *             try:
 */
      __Pyx_INCREF(__pyx_int_0);
      __pyx_v_central = __pyx_int_0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":524
 * #         resultlist = [prefix] + resultlist
 *     if fullconfig:
 *         if dict['central'] == "":             # <<<<<<<<<<<<<<
 *             central = 0
 *         else:
 */
      goto __pyx_L132;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":527
 *             central = 0
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 central = int(dict['central'])
 *             except:
 */
    /*else*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
        __Pyx_XGOTREF(__pyx_t_20);
        __Pyx_XGOTREF(__pyx_t_21);
        __Pyx_XGOTREF(__pyx_t_22);
        /*try:*/ {

          /* "metaphor/chem_gm/core/gmtoolbox.py":528
 *         else:
 *             try:
 *                 central = int(dict['central'])             # <<<<<<<<<<<<<<
 *             except:
 *                 central = len(dict['central'].split(','))
 */
          __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_dict, __pyx_n_u_central); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 528, __pyx_L133_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 528, __pyx_L133_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_v_central = __pyx_t_6;
          __pyx_t_6 = 0;

          /* "metaphor/chem_gm/core/gmtoolbox.py":527
 *             central = 0
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 central = int(dict['central'])
 *             except:
 */
        }
        __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
        __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
        __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
        goto __pyx_L138_try_end;
        __pyx_L133_error:;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":529
 *             try:
 *                 central = int(dict['central'])
 *             except:             # <<<<<<<<<<<<<<
 *                 central = len(dict['central'].split(','))
 *         if simplecentral:
 */
        /*except:*/ {
          __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.fromconfig2Str", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(0, 529, __pyx_L135_except_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GOTREF(__pyx_t_8);

          /* "metaphor/chem_gm/core/gmtoolbox.py":530
 *                 central = int(dict['central'])
 *             except:
 *                 central = len(dict['central'].split(','))             # <<<<<<<<<<<<<<
 *         if simplecentral:
 *             if central < dict['candidatecount']:
 */
          __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_dict, __pyx_n_u_central); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L135_except_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 530, __pyx_L135_except_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L135_except_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 530, __pyx_L135_except_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L135_except_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_XDECREF_SET(__pyx_v_central, __pyx_t_1);
          __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          goto __pyx_L134_exception_handled;
        }
        __pyx_L135_except_error:;

        /* "metaphor/chem_gm/core/gmtoolbox.py":527
 *             central = 0
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 central = int(dict['central'])
 *             except:
 */
        __Pyx_XGIVEREF(__pyx_t_20);
        __Pyx_XGIVEREF(__pyx_t_21);
        __Pyx_XGIVEREF(__pyx_t_22);
        __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
        goto __pyx_L1_error;
        __pyx_L134_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_20);
        __Pyx_XGIVEREF(__pyx_t_21);
        __Pyx_XGIVEREF(__pyx_t_22);
        __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
        __pyx_L138_try_end:;
      }
    }
    __pyx_L132:;

    /* "metaphor/chem_gm/core/gmtoolbox.py":531
 *             except:
 *                 central = len(dict['central'].split(','))
 *         if simplecentral:             # <<<<<<<<<<<<<<
 *             if central < dict['candidatecount']:
 *                 central = dict['candidatecount']
 */
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_simplecentral); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 531, __pyx_L1_error)
    if (__pyx_t_10) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":532
 *                 central = len(dict['central'].split(','))
 *         if simplecentral:
 *             if central < dict['candidatecount']:             # <<<<<<<<<<<<<<
 *                 central = dict['candidatecount']
 *             if central != 3:
 */
      __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_dict, __pyx_n_u_candidatecount); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 532, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_central, __pyx_t_8, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 532, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 532, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_10) {

        /* "metaphor/chem_gm/core/gmtoolbox.py":533
 *         if simplecentral:
 *             if central < dict['candidatecount']:
 *                 central = dict['candidatecount']             # <<<<<<<<<<<<<<
 *             if central != 3:
 *                 resultlist.append("Cn%s" % central)
 */
        __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_dict, __pyx_n_u_candidatecount); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 533, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_central, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":532
 *                 central = len(dict['central'].split(','))
 *         if simplecentral:
 *             if central < dict['candidatecount']:             # <<<<<<<<<<<<<<
 *                 central = dict['candidatecount']
 *             if central != 3:
 */
      }

      /* "metaphor/chem_gm/core/gmtoolbox.py":534
 *             if central < dict['candidatecount']:
 *                 central = dict['candidatecount']
 *             if central != 3:             # <<<<<<<<<<<<<<
 *                 resultlist.append("Cn%s" % central)
 * #             if (dict['candidatecount'] < 0) or (int(central) < dict['candidatecount']):
 */
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_central, __pyx_int_3, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 534, __pyx_L1_error)
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 534, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_10) {

        /* "metaphor/chem_gm/core/gmtoolbox.py":535
 *                 central = dict['candidatecount']
 *             if central != 3:
 *                 resultlist.append("Cn%s" % central)             # <<<<<<<<<<<<<<
 * #             if (dict['candidatecount'] < 0) or (int(central) < dict['candidatecount']):
 * #                 resultlist.append("Cn%s" % central)
 */
        __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_Cn_s, __pyx_v_central); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 535, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_resultlist, __pyx_t_5); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 535, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":534
 *             if central < dict['candidatecount']:
 *                 central = dict['candidatecount']
 *             if central != 3:             # <<<<<<<<<<<<<<
 *                 resultlist.append("Cn%s" % central)
 * #             if (dict['candidatecount'] < 0) or (int(central) < dict['candidatecount']):
 */
      }

      /* "metaphor/chem_gm/core/gmtoolbox.py":531
 *             except:
 *                 central = len(dict['central'].split(','))
 *         if simplecentral:             # <<<<<<<<<<<<<<
 *             if central < dict['candidatecount']:
 *                 central = dict['candidatecount']
 */
      goto __pyx_L141;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":539
 * #                 resultlist.append("Cn%s" % central)
 *         else:
 *             lst = dict['central'].split(',')             # <<<<<<<<<<<<<<
 *             st = "_".join(lst)
 *             resultlist.append("Cn%s" % st)
 */
    /*else*/ {
      __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_dict, __pyx_n_u_central); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 539, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 539, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 539, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF_SET(__pyx_v_lst, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":540
 *         else:
 *             lst = dict['central'].split(',')
 *             st = "_".join(lst)             # <<<<<<<<<<<<<<
 *             resultlist.append("Cn%s" % st)
 *         if 'mol1' in dict.keys() and not dict['mol1']:
 */
      __pyx_t_5 = PyUnicode_Join(__pyx_n_u__5, __pyx_v_lst); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 540, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_XDECREF_SET(__pyx_v_st, ((PyObject*)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":541
 *             lst = dict['central'].split(',')
 *             st = "_".join(lst)
 *             resultlist.append("Cn%s" % st)             # <<<<<<<<<<<<<<
 *         if 'mol1' in dict.keys() and not dict['mol1']:
 *             resultlist.append("mol0")
 */
      __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_Cn_s, __pyx_v_st); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 541, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_resultlist, __pyx_t_5); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 541, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_L141:;

    /* "metaphor/chem_gm/core/gmtoolbox.py":542
 *             st = "_".join(lst)
 *             resultlist.append("Cn%s" % st)
 *         if 'mol1' in dict.keys() and not dict['mol1']:             # <<<<<<<<<<<<<<
 *             resultlist.append("mol0")
 *         if 'classif' in dict.keys() and dict['classif']:
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_dict, __pyx_n_s_keys); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    if (__pyx_t_6) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 542, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 542, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_mol1, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 542, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_13 = (__pyx_t_11 != 0);
    if (__pyx_t_13) {
    } else {
      __pyx_t_10 = __pyx_t_13;
      goto __pyx_L145_bool_binop_done;
    }
    __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_dict, __pyx_n_u_mol1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 542, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_11 = ((!__pyx_t_13) != 0);
    __pyx_t_10 = __pyx_t_11;
    __pyx_L145_bool_binop_done:;
    if (__pyx_t_10) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":543
 *             resultlist.append("Cn%s" % st)
 *         if 'mol1' in dict.keys() and not dict['mol1']:
 *             resultlist.append("mol0")             # <<<<<<<<<<<<<<
 *         if 'classif' in dict.keys() and dict['classif']:
 *             resultlist.append("Class")
 */
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_resultlist, __pyx_n_u_mol0); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 543, __pyx_L1_error)

      /* "metaphor/chem_gm/core/gmtoolbox.py":542
 *             st = "_".join(lst)
 *             resultlist.append("Cn%s" % st)
 *         if 'mol1' in dict.keys() and not dict['mol1']:             # <<<<<<<<<<<<<<
 *             resultlist.append("mol0")
 *         if 'classif' in dict.keys() and dict['classif']:
 */
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":544
 *         if 'mol1' in dict.keys() and not dict['mol1']:
 *             resultlist.append("mol0")
 *         if 'classif' in dict.keys() and dict['classif']:             # <<<<<<<<<<<<<<
 *             resultlist.append("Class")
 *     if withhidden:
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_dict, __pyx_n_s_keys); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    if (__pyx_t_6) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 544, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 544, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_classif, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 544, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_13 = (__pyx_t_11 != 0);
    if (__pyx_t_13) {
    } else {
      __pyx_t_10 = __pyx_t_13;
      goto __pyx_L148_bool_binop_done;
    }
    __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_dict, __pyx_n_u_classif); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 544, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_10 = __pyx_t_13;
    __pyx_L148_bool_binop_done:;
    if (__pyx_t_10) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":545
 *             resultlist.append("mol0")
 *         if 'classif' in dict.keys() and dict['classif']:
 *             resultlist.append("Class")             # <<<<<<<<<<<<<<
 *     if withhidden:
 *         resultlist.append("%dN"% hidden)
 */
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_resultlist, __pyx_n_u_Class); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 545, __pyx_L1_error)

      /* "metaphor/chem_gm/core/gmtoolbox.py":544
 *         if 'mol1' in dict.keys() and not dict['mol1']:
 *             resultlist.append("mol0")
 *         if 'classif' in dict.keys() and dict['classif']:             # <<<<<<<<<<<<<<
 *             resultlist.append("Class")
 *     if withhidden:
 */
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":523
 * #     if withprefix:
 * #         resultlist = [prefix] + resultlist
 *     if fullconfig:             # <<<<<<<<<<<<<<
 *         if dict['central'] == "":
 *             central = 0
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":546
 *         if 'classif' in dict.keys() and dict['classif']:
 *             resultlist.append("Class")
 *     if withhidden:             # <<<<<<<<<<<<<<
 *         resultlist.append("%dN"% hidden)
 *     return "_".join(resultlist)
 */
  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_withhidden); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 546, __pyx_L1_error)
  if (__pyx_t_10) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":547
 *             resultlist.append("Class")
 *     if withhidden:
 *         resultlist.append("%dN"% hidden)             # <<<<<<<<<<<<<<
 *     return "_".join(resultlist)
 * 
 */
    __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_dN, __pyx_v_hidden); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_resultlist, __pyx_t_5); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 547, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":546
 *         if 'classif' in dict.keys() and dict['classif']:
 *             resultlist.append("Class")
 *     if withhidden:             # <<<<<<<<<<<<<<
 *         resultlist.append("%dN"% hidden)
 *     return "_".join(resultlist)
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":548
 *     if withhidden:
 *         resultlist.append("%dN"% hidden)
 *     return "_".join(resultlist)             # <<<<<<<<<<<<<<
 * 
 * def getModelBase(config=None, moddict=None, hidden=None, fullconfig=False,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = PyUnicode_Join(__pyx_n_u__5, __pyx_v_resultlist); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":383
 *     return reshash
 * 
 * def fromconfig2Str(dict, hidden, fullconfig=False, withhidden=False, simplecentral=False):             # <<<<<<<<<<<<<<
 *     """Cration d'une chane de connexion de connexions  partir d'un dictionnaire.
 *     """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.fromconfig2Str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_to_add);
  __Pyx_XDECREF(__pyx_v_chimax);
  __Pyx_XDECREF(__pyx_v_isomax);
  __Pyx_XDECREF(__pyx_v_ccllst);
  __Pyx_XDECREF(__pyx_v_gradlst);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_keyshort);
  __Pyx_XDECREF(__pyx_v_grdinputlist);
  __Pyx_XDECREF(__pyx_v_cclinputlst);
  __Pyx_XDECREF(__pyx_v_atomdict);
  __Pyx_XDECREF(__pyx_v_structdict);
  __Pyx_XDECREF(__pyx_v_atomkeys);
  __Pyx_XDECREF(__pyx_v_keyfct);
  __Pyx_XDECREF(__pyx_v_structkeysloc);
  __Pyx_XDECREF(__pyx_v_ind);
  __Pyx_XDECREF(__pyx_v_lst);
  __Pyx_XDECREF(__pyx_v_valtest);
  __Pyx_XDECREF(__pyx_v_st);
  __Pyx_XDECREF(__pyx_v_cond);
  __Pyx_XDECREF(__pyx_v_resultlist);
  __Pyx_XDECREF(__pyx_v_cumulatom);
  __Pyx_XDECREF(__pyx_v_opt);
  __Pyx_XDECREF(__pyx_v_central);
  __Pyx_XDECREF(__pyx_8genexpr7__pyx_v__);
  __Pyx_XDECREF(__pyx_8genexpr8__pyx_v__);
  __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_key);
  __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_val);
  __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_key);
  __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_val);
  __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_item);
  __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":550
 *     return "_".join(resultlist)
 * 
 * def getModelBase(config=None, moddict=None, hidden=None, fullconfig=False,             # <<<<<<<<<<<<<<
 *         withprefix=True, withhidden=True, simplecentral=True,
 *         candidatecount=-1, ext=""):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_23getModelBase(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_23getModelBase = {"getModelBase", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_23getModelBase, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_23getModelBase(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_config = 0;
  PyObject *__pyx_v_moddict = 0;
  PyObject *__pyx_v_hidden = 0;
  PyObject *__pyx_v_fullconfig = 0;
  PyObject *__pyx_v_withprefix = 0;
  PyObject *__pyx_v_withhidden = 0;
  PyObject *__pyx_v_simplecentral = 0;
  PyObject *__pyx_v_candidatecount = 0;
  PyObject *__pyx_v_ext = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getModelBase (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_config,&__pyx_n_s_moddict,&__pyx_n_s_hidden,&__pyx_n_s_fullconfig,&__pyx_n_s_withprefix,&__pyx_n_s_withhidden,&__pyx_n_s_simplecentral,&__pyx_n_s_candidatecount,&__pyx_n_s_ext,0};
    PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
    values[0] = ((PyObject *)((PyObject *)Py_None));
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_False));

    /* "metaphor/chem_gm/core/gmtoolbox.py":551
 * 
 * def getModelBase(config=None, moddict=None, hidden=None, fullconfig=False,
 *         withprefix=True, withhidden=True, simplecentral=True,             # <<<<<<<<<<<<<<
 *         candidatecount=-1, ext=""):
 *     prefix = ""
 */
    values[4] = ((PyObject *)((PyObject *)Py_True));
    values[5] = ((PyObject *)((PyObject *)Py_True));
    values[6] = ((PyObject *)((PyObject *)Py_True));
    values[7] = ((PyObject *)((PyObject *)__pyx_int_neg_1));
    values[8] = ((PyObject *)((PyObject*)__pyx_kp_u__4));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_config);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_moddict);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hidden);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fullconfig);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_withprefix);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_withhidden);
          if (value) { values[5] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_simplecentral);
          if (value) { values[6] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_candidatecount);
          if (value) { values[7] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ext);
          if (value) { values[8] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getModelBase") < 0)) __PYX_ERR(0, 550, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_config = values[0];
    __pyx_v_moddict = values[1];
    __pyx_v_hidden = values[2];
    __pyx_v_fullconfig = values[3];
    __pyx_v_withprefix = values[4];
    __pyx_v_withhidden = values[5];
    __pyx_v_simplecentral = values[6];
    __pyx_v_candidatecount = values[7];
    __pyx_v_ext = values[8];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getModelBase", 0, 0, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 550, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.getModelBase", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_22getModelBase(__pyx_self, __pyx_v_config, __pyx_v_moddict, __pyx_v_hidden, __pyx_v_fullconfig, __pyx_v_withprefix, __pyx_v_withhidden, __pyx_v_simplecentral, __pyx_v_candidatecount, __pyx_v_ext);

  /* "metaphor/chem_gm/core/gmtoolbox.py":550
 *     return "_".join(resultlist)
 * 
 * def getModelBase(config=None, moddict=None, hidden=None, fullconfig=False,             # <<<<<<<<<<<<<<
 *         withprefix=True, withhidden=True, simplecentral=True,
 *         candidatecount=-1, ext=""):
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_22getModelBase(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_config, PyObject *__pyx_v_moddict, PyObject *__pyx_v_hidden, PyObject *__pyx_v_fullconfig, PyObject *__pyx_v_withprefix, PyObject *__pyx_v_withhidden, PyObject *__pyx_v_simplecentral, PyObject *__pyx_v_candidatecount, PyObject *__pyx_v_ext) {
  PyObject *__pyx_v_prefix = NULL;
  PyObject *__pyx_v_dict = NULL;
  PyObject *__pyx_v_root = NULL;
  PyObject *__pyx_v_central = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_classif = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_mol1 = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_newprefix = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_UCS4 __pyx_t_9;
  __Pyx_RefNannySetupContext("getModelBase", 0);
  __Pyx_INCREF(__pyx_v_hidden);
  __Pyx_INCREF(__pyx_v_fullconfig);

  /* "metaphor/chem_gm/core/gmtoolbox.py":553
 *         withprefix=True, withhidden=True, simplecentral=True,
 *         candidatecount=-1, ext=""):
 *     prefix = ""             # <<<<<<<<<<<<<<
 *     fullconfig = fullconfig and (config is not None)
 *     if fullconfig:
 */
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_v_prefix = __pyx_kp_u__4;

  /* "metaphor/chem_gm/core/gmtoolbox.py":554
 *         candidatecount=-1, ext=""):
 *     prefix = ""
 *     fullconfig = fullconfig and (config is not None)             # <<<<<<<<<<<<<<
 *     if fullconfig:
 *         dict = config.getSectionDict("connectivity")
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_fullconfig); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 554, __pyx_L1_error)
  if (__pyx_t_2) {
  } else {
    __Pyx_INCREF(__pyx_v_fullconfig);
    __pyx_t_1 = __pyx_v_fullconfig;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_config != Py_None);
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __Pyx_DECREF_SET(__pyx_v_fullconfig, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":555
 *     prefix = ""
 *     fullconfig = fullconfig and (config is not None)
 *     if fullconfig:             # <<<<<<<<<<<<<<
 *         dict = config.getSectionDict("connectivity")
 *         hidden = config.getintdefault("model", "hidden", 0)
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_fullconfig); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 555, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":556
 *     fullconfig = fullconfig and (config is not None)
 *     if fullconfig:
 *         dict = config.getSectionDict("connectivity")             # <<<<<<<<<<<<<<
 *         hidden = config.getintdefault("model", "hidden", 0)
 *         if config.has_option("general", "root"):
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_getSectionDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_dict = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":557
 *     if fullconfig:
 *         dict = config.getSectionDict("connectivity")
 *         hidden = config.getintdefault("model", "hidden", 0)             # <<<<<<<<<<<<<<
 *         if config.has_option("general", "root"):
 *             root = config.get("general", "root")
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_getintdefault); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_hidden, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":558
 *         dict = config.getSectionDict("connectivity")
 *         hidden = config.getintdefault("model", "hidden", 0)
 *         if config.has_option("general", "root"):             # <<<<<<<<<<<<<<
 *             root = config.get("general", "root")
 *         else:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_has_option); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 558, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 558, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":559
 *         hidden = config.getintdefault("model", "hidden", 0)
 *         if config.has_option("general", "root"):
 *             root = config.get("general", "root")             # <<<<<<<<<<<<<<
 *         else:
 *             root = config.getdefault("projects", "0", "root")
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 559, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_root = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":558
 *         dict = config.getSectionDict("connectivity")
 *         hidden = config.getintdefault("model", "hidden", 0)
 *         if config.has_option("general", "root"):             # <<<<<<<<<<<<<<
 *             root = config.get("general", "root")
 *         else:
 */
      goto __pyx_L6;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":561
 *             root = config.get("general", "root")
 *         else:
 *             root = config.getdefault("projects", "0", "root")             # <<<<<<<<<<<<<<
 *         prefix = config.getdefault("model", "prefix", root)
 *         central = config.getdefault("model", "central", "0")
 */
    /*else*/ {
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_getdefault); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_root = __pyx_t_3;
      __pyx_t_3 = 0;
    }
    __pyx_L6:;

    /* "metaphor/chem_gm/core/gmtoolbox.py":562
 *         else:
 *             root = config.getdefault("projects", "0", "root")
 *         prefix = config.getdefault("model", "prefix", root)             # <<<<<<<<<<<<<<
 *         central = config.getdefault("model", "central", "0")
 *         classif = config.getbooleandefault("model", "classif", False)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_getdefault); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_5 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_n_u_model, __pyx_n_u_prefix, __pyx_v_root};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_n_u_model, __pyx_n_u_prefix, __pyx_v_root};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 562, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_n_u_model);
      __Pyx_GIVEREF(__pyx_n_u_model);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_n_u_model);
      __Pyx_INCREF(__pyx_n_u_prefix);
      __Pyx_GIVEREF(__pyx_n_u_prefix);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_n_u_prefix);
      __Pyx_INCREF(__pyx_v_root);
      __Pyx_GIVEREF(__pyx_v_root);
      PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_root);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":563
 *             root = config.getdefault("projects", "0", "root")
 *         prefix = config.getdefault("model", "prefix", root)
 *         central = config.getdefault("model", "central", "0")             # <<<<<<<<<<<<<<
 *         classif = config.getbooleandefault("model", "classif", False)
 *         mol1 = config.getbooleandefault("model", "mol1", True)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_getdefault); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_central = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":564
 *         prefix = config.getdefault("model", "prefix", root)
 *         central = config.getdefault("model", "central", "0")
 *         classif = config.getbooleandefault("model", "classif", False)             # <<<<<<<<<<<<<<
 *         mol1 = config.getbooleandefault("model", "mol1", True)
 *     else:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_getbooleandefault); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_classif = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":565
 *         central = config.getdefault("model", "central", "0")
 *         classif = config.getbooleandefault("model", "classif", False)
 *         mol1 = config.getbooleandefault("model", "mol1", True)             # <<<<<<<<<<<<<<
 *     else:
 *         if moddict:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_getbooleandefault); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_mol1 = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":555
 *     prefix = ""
 *     fullconfig = fullconfig and (config is not None)
 *     if fullconfig:             # <<<<<<<<<<<<<<
 *         dict = config.getSectionDict("connectivity")
 *         hidden = config.getintdefault("model", "hidden", 0)
 */
    goto __pyx_L5;
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":567
 *         mol1 = config.getbooleandefault("model", "mol1", True)
 *     else:
 *         if moddict:             # <<<<<<<<<<<<<<
 *             dict = moddict
 *         elif config:
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_moddict); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 567, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":568
 *     else:
 *         if moddict:
 *             dict = moddict             # <<<<<<<<<<<<<<
 *         elif config:
 *             dict = config.getSectionDict("connectivity")
 */
      __Pyx_INCREF(__pyx_v_moddict);
      __pyx_v_dict = __pyx_v_moddict;

      /* "metaphor/chem_gm/core/gmtoolbox.py":567
 *         mol1 = config.getbooleandefault("model", "mol1", True)
 *     else:
 *         if moddict:             # <<<<<<<<<<<<<<
 *             dict = moddict
 *         elif config:
 */
      goto __pyx_L7;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":569
 *         if moddict:
 *             dict = moddict
 *         elif config:             # <<<<<<<<<<<<<<
 *             dict = config.getSectionDict("connectivity")
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_config); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 569, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":570
 *             dict = moddict
 *         elif config:
 *             dict = config.getSectionDict("connectivity")             # <<<<<<<<<<<<<<
 *         else:
 *             dict ={}
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_getSectionDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_dict = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":569
 *         if moddict:
 *             dict = moddict
 *         elif config:             # <<<<<<<<<<<<<<
 *             dict = config.getSectionDict("connectivity")
 *         else:
 */
      goto __pyx_L7;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":572
 *             dict = config.getSectionDict("connectivity")
 *         else:
 *             dict ={}             # <<<<<<<<<<<<<<
 *         hidden = hidden if (hidden is not None) else config.getintdefault(
 *                                                         "model", "hidden", 0)
 */
    /*else*/ {
      __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 572, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_dict = __pyx_t_3;
      __pyx_t_3 = 0;
    }
    __pyx_L7:;

    /* "metaphor/chem_gm/core/gmtoolbox.py":573
 *         else:
 *             dict ={}
 *         hidden = hidden if (hidden is not None) else config.getintdefault(             # <<<<<<<<<<<<<<
 *                                                         "model", "hidden", 0)
 *     if dict is None:
 */
    __pyx_t_2 = (__pyx_v_hidden != Py_None);
    if ((__pyx_t_2 != 0)) {
      __Pyx_INCREF(__pyx_v_hidden);
      __pyx_t_3 = __pyx_v_hidden;
    } else {
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_getintdefault); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 573, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_3 = __pyx_t_6;
      __pyx_t_6 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_hidden, __pyx_t_3);
    __pyx_t_3 = 0;
  }
  __pyx_L5:;

  /* "metaphor/chem_gm/core/gmtoolbox.py":575
 *         hidden = hidden if (hidden is not None) else config.getintdefault(
 *                                                         "model", "hidden", 0)
 *     if dict is None:             # <<<<<<<<<<<<<<
 *         return ""
 *     dict['central'] = central
 */
  __pyx_t_2 = (__pyx_v_dict == Py_None);
  __pyx_t_7 = (__pyx_t_2 != 0);
  if (__pyx_t_7) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":576
 *                                                         "model", "hidden", 0)
 *     if dict is None:
 *         return ""             # <<<<<<<<<<<<<<
 *     dict['central'] = central
 *     dict['candidatecount'] = candidatecount
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__4);
    __pyx_r = __pyx_kp_u__4;
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":575
 *         hidden = hidden if (hidden is not None) else config.getintdefault(
 *                                                         "model", "hidden", 0)
 *     if dict is None:             # <<<<<<<<<<<<<<
 *         return ""
 *     dict['central'] = central
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":577
 *     if dict is None:
 *         return ""
 *     dict['central'] = central             # <<<<<<<<<<<<<<
 *     dict['candidatecount'] = candidatecount
 * 
 */
  if (unlikely(!__pyx_v_central)) { __Pyx_RaiseUnboundLocalError("central"); __PYX_ERR(0, 577, __pyx_L1_error) }
  if (unlikely(PyObject_SetItem(__pyx_v_dict, __pyx_n_u_central, __pyx_v_central) < 0)) __PYX_ERR(0, 577, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":578
 *         return ""
 *     dict['central'] = central
 *     dict['candidatecount'] = candidatecount             # <<<<<<<<<<<<<<
 * 
 *     result = fromconfig2Str(dict, hidden, fullconfig=fullconfig,
 */
  if (unlikely(PyObject_SetItem(__pyx_v_dict, __pyx_n_u_candidatecount, __pyx_v_candidatecount) < 0)) __PYX_ERR(0, 578, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":580
 *     dict['candidatecount'] = candidatecount
 * 
 *     result = fromconfig2Str(dict, hidden, fullconfig=fullconfig,             # <<<<<<<<<<<<<<
 *         withhidden=withhidden, simplecentral=simplecentral)
 * 
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_fromconfig2Str); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_dict);
  __Pyx_GIVEREF(__pyx_v_dict);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_dict);
  __Pyx_INCREF(__pyx_v_hidden);
  __Pyx_GIVEREF(__pyx_v_hidden);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_hidden);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fullconfig, __pyx_v_fullconfig) < 0) __PYX_ERR(0, 580, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":581
 * 
 *     result = fromconfig2Str(dict, hidden, fullconfig=fullconfig,
 *         withhidden=withhidden, simplecentral=simplecentral)             # <<<<<<<<<<<<<<
 * 
 *     if withprefix:
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_withhidden, __pyx_v_withhidden) < 0) __PYX_ERR(0, 580, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_simplecentral, __pyx_v_simplecentral) < 0) __PYX_ERR(0, 580, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":580
 *     dict['candidatecount'] = candidatecount
 * 
 *     result = fromconfig2Str(dict, hidden, fullconfig=fullconfig,             # <<<<<<<<<<<<<<
 *         withhidden=withhidden, simplecentral=simplecentral)
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":583
 *         withhidden=withhidden, simplecentral=simplecentral)
 * 
 *     if withprefix:             # <<<<<<<<<<<<<<
 *         newprefix = CCharOnlys(prefix, extended=True)
 *         result = "%s_%s"% (newprefix, result)
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_withprefix); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 583, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":584
 * 
 *     if withprefix:
 *         newprefix = CCharOnlys(prefix, extended=True)             # <<<<<<<<<<<<<<
 *         result = "%s_%s"% (newprefix, result)
 *     if ext:
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_CCharOnlys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_prefix);
    __Pyx_GIVEREF(__pyx_v_prefix);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_prefix);
    __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_extended, Py_True) < 0) __PYX_ERR(0, 584, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_newprefix = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":585
 *     if withprefix:
 *         newprefix = CCharOnlys(prefix, extended=True)
 *         result = "%s_%s"% (newprefix, result)             # <<<<<<<<<<<<<<
 *     if ext:
 *         result = result + ext
 */
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = 0;
    __pyx_t_9 = 127;
    __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_newprefix), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_9;
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_n_u__5);
    __pyx_t_8 += 1;
    __Pyx_GIVEREF(__pyx_n_u__5);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_u__5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_result), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_9;
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":583
 *         withhidden=withhidden, simplecentral=simplecentral)
 * 
 *     if withprefix:             # <<<<<<<<<<<<<<
 *         newprefix = CCharOnlys(prefix, extended=True)
 *         result = "%s_%s"% (newprefix, result)
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":586
 *         newprefix = CCharOnlys(prefix, extended=True)
 *         result = "%s_%s"% (newprefix, result)
 *     if ext:             # <<<<<<<<<<<<<<
 *         result = result + ext
 *     return result
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_ext); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 586, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":587
 *         result = "%s_%s"% (newprefix, result)
 *     if ext:
 *         result = result + ext             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
    __pyx_t_6 = PyNumber_Add(__pyx_v_result, __pyx_v_ext); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":586
 *         newprefix = CCharOnlys(prefix, extended=True)
 *         result = "%s_%s"% (newprefix, result)
 *     if ext:             # <<<<<<<<<<<<<<
 *         result = result + ext
 *     return result
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":588
 *     if ext:
 *         result = result + ext
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def getModelKeyFromConf(config, doHash=0):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":550
 *     return "_".join(resultlist)
 * 
 * def getModelBase(config=None, moddict=None, hidden=None, fullconfig=False,             # <<<<<<<<<<<<<<
 *         withprefix=True, withhidden=True, simplecentral=True,
 *         candidatecount=-1, ext=""):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.getModelBase", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_prefix);
  __Pyx_XDECREF(__pyx_v_dict);
  __Pyx_XDECREF(__pyx_v_root);
  __Pyx_XDECREF(__pyx_v_central);
  __Pyx_XDECREF(__pyx_v_classif);
  __Pyx_XDECREF(__pyx_v_mol1);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_newprefix);
  __Pyx_XDECREF(__pyx_v_hidden);
  __Pyx_XDECREF(__pyx_v_fullconfig);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":590
 *     return result
 * 
 * def getModelKeyFromConf(config, doHash=0):             # <<<<<<<<<<<<<<
 *     if doHash == 2:
 *         root = config.getdefault("general", "root", "")
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_25getModelKeyFromConf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_25getModelKeyFromConf = {"getModelKeyFromConf", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_25getModelKeyFromConf, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_25getModelKeyFromConf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_config = 0;
  PyObject *__pyx_v_doHash = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getModelKeyFromConf (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_config,&__pyx_n_s_doHash,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject *)__pyx_int_0));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_config)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_doHash);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getModelKeyFromConf") < 0)) __PYX_ERR(0, 590, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_config = values[0];
    __pyx_v_doHash = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getModelKeyFromConf", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 590, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.getModelKeyFromConf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_24getModelKeyFromConf(__pyx_self, __pyx_v_config, __pyx_v_doHash);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_24getModelKeyFromConf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_config, PyObject *__pyx_v_doHash) {
  PyObject *__pyx_v_root = NULL;
  PyObject *__pyx_v_st = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("getModelKeyFromConf", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":591
 * 
 * def getModelKeyFromConf(config, doHash=0):
 *     if doHash == 2:             # <<<<<<<<<<<<<<
 *         root = config.getdefault("general", "root", "")
 *         return "%s-%s"% (root, getConfigHash(config))
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_doHash, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 591, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":592
 * def getModelKeyFromConf(config, doHash=0):
 *     if doHash == 2:
 *         root = config.getdefault("general", "root", "")             # <<<<<<<<<<<<<<
 *         return "%s-%s"% (root, getConfigHash(config))
 *     if doHash == 1:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_getdefault); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 592, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 592, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_root = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":593
 *     if doHash == 2:
 *         root = config.getdefault("general", "root", "")
 *         return "%s-%s"% (root, getConfigHash(config))             # <<<<<<<<<<<<<<
 *     if doHash == 1:
 *         st = getModelBase(config, fullconfig=True)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = 0;
    __pyx_t_5 = 127;
    __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_root), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_5;
    __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_kp_u__55);
    __pyx_t_4 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__55);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_u__55);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_getConfigHash); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_config); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_config};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_config};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 593, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_INCREF(__pyx_v_config);
        __Pyx_GIVEREF(__pyx_v_config);
        PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_config);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_1), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5;
    __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":591
 * 
 * def getModelKeyFromConf(config, doHash=0):
 *     if doHash == 2:             # <<<<<<<<<<<<<<
 *         root = config.getdefault("general", "root", "")
 *         return "%s-%s"% (root, getConfigHash(config))
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":594
 *         root = config.getdefault("general", "root", "")
 *         return "%s-%s"% (root, getConfigHash(config))
 *     if doHash == 1:             # <<<<<<<<<<<<<<
 *         st = getModelBase(config, fullconfig=True)
 *         return "%s_%s"% (st, getConfigHash(config))
 */
  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_doHash, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_2) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":595
 *         return "%s-%s"% (root, getConfigHash(config))
 *     if doHash == 1:
 *         st = getModelBase(config, fullconfig=True)             # <<<<<<<<<<<<<<
 *         return "%s_%s"% (st, getConfigHash(config))
 *     return getModelBase(config, fullconfig=True)
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_getModelBase); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_config);
    __Pyx_GIVEREF(__pyx_v_config);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_config);
    __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fullconfig, Py_True) < 0) __PYX_ERR(0, 595, __pyx_L1_error)
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_st = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":596
 *     if doHash == 1:
 *         st = getModelBase(config, fullconfig=True)
 *         return "%s_%s"% (st, getConfigHash(config))             # <<<<<<<<<<<<<<
 *     return getModelBase(config, fullconfig=True)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_4 = 0;
    __pyx_t_5 = 127;
    __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_st), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_5;
    __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_n_u__5);
    __pyx_t_4 += 1;
    __Pyx_GIVEREF(__pyx_n_u__5);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_n_u__5);
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_getConfigHash); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_config); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 596, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_config};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 596, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_config};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 596, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_v_config);
        __Pyx_GIVEREF(__pyx_v_config);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_config);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_1), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_5;
    __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":594
 *         root = config.getdefault("general", "root", "")
 *         return "%s-%s"% (root, getConfigHash(config))
 *     if doHash == 1:             # <<<<<<<<<<<<<<
 *         st = getModelBase(config, fullconfig=True)
 *         return "%s_%s"% (st, getConfigHash(config))
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":597
 *         st = getModelBase(config, fullconfig=True)
 *         return "%s_%s"% (st, getConfigHash(config))
 *     return getModelBase(config, fullconfig=True)             # <<<<<<<<<<<<<<
 * 
 * class GMEngine( object):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_getModelBase); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_v_config);
  __Pyx_GIVEREF(__pyx_v_config);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_config);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fullconfig, Py_True) < 0) __PYX_ERR(0, 597, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":590
 *     return result
 * 
 * def getModelKeyFromConf(config, doHash=0):             # <<<<<<<<<<<<<<
 *     if doHash == 2:
 *         root = config.getdefault("general", "root", "")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.getModelKeyFromConf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_root);
  __Pyx_XDECREF(__pyx_v_st);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":605
 *     """
 * 
 *     def __init__(self, projectDir, defaultcfg="", debug=False):             # <<<<<<<<<<<<<<
 *         global defaultConf
 *         super(GMEngine, self).__init__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_1__init__ = {"__init__", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_projectDir = 0;
  PyObject *__pyx_v_defaultcfg = 0;
  PyObject *__pyx_v_debug = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_projectDir,&__pyx_n_s_defaultcfg,&__pyx_n_s_debug,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)((PyObject*)__pyx_kp_u__4));
    values[3] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_projectDir)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, 1); __PYX_ERR(0, 605, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_defaultcfg);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_debug);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 605, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_projectDir = values[1];
    __pyx_v_defaultcfg = values[2];
    __pyx_v_debug = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 605, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine___init__(__pyx_self, __pyx_v_self, __pyx_v_projectDir, __pyx_v_defaultcfg, __pyx_v_debug);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":618
 *             #self.defaultConf
 *         defaultConf = self.defaultConf
 *         self._modeldict = defaultdict(lambda: None)             # <<<<<<<<<<<<<<
 *         self._projectConf = defaultedConfigParser()
 *         self._configFile = ""
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_8__init___lambda3(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_8__init___lambda3 = {"lambda3", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_8__init___lambda3, METH_NOARGS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_8__init___lambda3(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda3 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda3(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda3(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda3", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":621
 *         self._projectConf = defaultedConfigParser()
 *         self._configFile = ""
 *         self._modelconfdict = defaultdict(lambda: None)             # <<<<<<<<<<<<<<
 *         self._modelConfFile = defaultdict(lambda: "")
 *         self.tempDirs = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_8__init___1lambda4(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_8__init___1lambda4 = {"lambda4", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_8__init___1lambda4, METH_NOARGS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_8__init___1lambda4(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda4 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda4(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda4(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda4", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":622
 *         self._configFile = ""
 *         self._modelconfdict = defaultdict(lambda: None)
 *         self._modelConfFile = defaultdict(lambda: "")             # <<<<<<<<<<<<<<
 *         self.tempDirs = []
 *         self.lastGMM = ""
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_8__init___2lambda5(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_8__init___2lambda5 = {"lambda5", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_8__init___2lambda5, METH_NOARGS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_8__init___2lambda5(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda5 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda5(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda5(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda5", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_r = __pyx_kp_u__4;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":605
 *     """
 * 
 *     def __init__(self, projectDir, defaultcfg="", debug=False):             # <<<<<<<<<<<<<<
 *         global defaultConf
 *         super(GMEngine, self).__init__()
 */

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_projectDir, PyObject *__pyx_v_defaultcfg, PyObject *__pyx_v_debug) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_defaultcfg);

  /* "metaphor/chem_gm/core/gmtoolbox.py":607
 *     def __init__(self, projectDir, defaultcfg="", debug=False):
 *         global defaultConf
 *         super(GMEngine, self).__init__()             # <<<<<<<<<<<<<<
 *         if defaultcfg:
 *             defaultcfg = os.path.abspath(defaultcfg)
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_iso885915_GMEngine); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":608
 *         global defaultConf
 *         super(GMEngine, self).__init__()
 *         if defaultcfg:             # <<<<<<<<<<<<<<
 *             defaultcfg = os.path.abspath(defaultcfg)
 *         self.root = projectDir
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_defaultcfg); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 608, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":609
 *         super(GMEngine, self).__init__()
 *         if defaultcfg:
 *             defaultcfg = os.path.abspath(defaultcfg)             # <<<<<<<<<<<<<<
 *         self.root = projectDir
 *         self.projectDir = projectDir
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_abspath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_2) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_defaultcfg); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_defaultcfg};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_defaultcfg};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 609, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
        __Pyx_INCREF(__pyx_v_defaultcfg);
        __Pyx_GIVEREF(__pyx_v_defaultcfg);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_defaultcfg);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_defaultcfg, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":608
 *         global defaultConf
 *         super(GMEngine, self).__init__()
 *         if defaultcfg:             # <<<<<<<<<<<<<<
 *             defaultcfg = os.path.abspath(defaultcfg)
 *         self.root = projectDir
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":610
 *         if defaultcfg:
 *             defaultcfg = os.path.abspath(defaultcfg)
 *         self.root = projectDir             # <<<<<<<<<<<<<<
 *         self.projectDir = projectDir
 *         self.defaultConfigFile = defaultcfg
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_root, __pyx_v_projectDir) < 0) __PYX_ERR(0, 610, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":611
 *             defaultcfg = os.path.abspath(defaultcfg)
 *         self.root = projectDir
 *         self.projectDir = projectDir             # <<<<<<<<<<<<<<
 *         self.defaultConfigFile = defaultcfg
 *         self.defaultConf = defaultedConfigParser(defaultcfg)
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_projectDir, __pyx_v_projectDir) < 0) __PYX_ERR(0, 611, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":612
 *         self.root = projectDir
 *         self.projectDir = projectDir
 *         self.defaultConfigFile = defaultcfg             # <<<<<<<<<<<<<<
 *         self.defaultConf = defaultedConfigParser(defaultcfg)
 * #         self.defaultConf.read(defaultcfg)
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_defaultConfigFile, __pyx_v_defaultcfg) < 0) __PYX_ERR(0, 612, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":613
 *         self.projectDir = projectDir
 *         self.defaultConfigFile = defaultcfg
 *         self.defaultConf = defaultedConfigParser(defaultcfg)             # <<<<<<<<<<<<<<
 * #         self.defaultConf.read(defaultcfg)
 *         self.checkconnect(self.defaultConf, True)
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultedConfigParser); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_defaultcfg); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 613, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_defaultcfg};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 613, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_defaultcfg};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 613, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 613, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_v_defaultcfg);
      __Pyx_GIVEREF(__pyx_v_defaultcfg);
      PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_defaultcfg);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 613, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_defaultConf, __pyx_t_1) < 0) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":615
 *         self.defaultConf = defaultedConfigParser(defaultcfg)
 * #         self.defaultConf.read(defaultcfg)
 *         self.checkconnect(self.defaultConf, True)             # <<<<<<<<<<<<<<
 *             #self.defaultConf
 *         defaultConf = self.defaultConf
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_checkconnect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_defaultConf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_2, Py_True};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_2, Py_True};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_2);
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_True);
    __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":617
 *         self.checkconnect(self.defaultConf, True)
 *             #self.defaultConf
 *         defaultConf = self.defaultConf             # <<<<<<<<<<<<<<
 *         self._modeldict = defaultdict(lambda: None)
 *         self._projectConf = defaultedConfigParser()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_defaultConf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_defaultConf, __pyx_t_1) < 0) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":618
 *             #self.defaultConf
 *         defaultConf = self.defaultConf
 *         self._modeldict = defaultdict(lambda: None)             # <<<<<<<<<<<<<<
 *         self._projectConf = defaultedConfigParser()
 *         self._configFile = ""
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_8__init___lambda3, 0, __pyx_n_s_GMEngine___init___locals_lambda, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 618, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_modeldict, __pyx_t_1) < 0) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":619
 *         defaultConf = self.defaultConf
 *         self._modeldict = defaultdict(lambda: None)
 *         self._projectConf = defaultedConfigParser()             # <<<<<<<<<<<<<<
 *         self._configFile = ""
 *         self._modelconfdict = defaultdict(lambda: None)
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultedConfigParser); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_projectConf, __pyx_t_1) < 0) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":620
 *         self._modeldict = defaultdict(lambda: None)
 *         self._projectConf = defaultedConfigParser()
 *         self._configFile = ""             # <<<<<<<<<<<<<<
 *         self._modelconfdict = defaultdict(lambda: None)
 *         self._modelConfFile = defaultdict(lambda: "")
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_configFile, __pyx_kp_u__4) < 0) __PYX_ERR(0, 620, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":621
 *         self._projectConf = defaultedConfigParser()
 *         self._configFile = ""
 *         self._modelconfdict = defaultdict(lambda: None)             # <<<<<<<<<<<<<<
 *         self._modelConfFile = defaultdict(lambda: "")
 *         self.tempDirs = []
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_8__init___1lambda4, 0, __pyx_n_s_GMEngine___init___locals_lambda, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_modelconfdict, __pyx_t_1) < 0) __PYX_ERR(0, 621, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":622
 *         self._configFile = ""
 *         self._modelconfdict = defaultdict(lambda: None)
 *         self._modelConfFile = defaultdict(lambda: "")             # <<<<<<<<<<<<<<
 *         self.tempDirs = []
 *         self.lastGMM = ""
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_8__init___2lambda5, 0, __pyx_n_s_GMEngine___init___locals_lambda, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 622, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 622, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 622, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 622, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 622, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_modelConfFile, __pyx_t_1) < 0) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":623
 *         self._modelconfdict = defaultdict(lambda: None)
 *         self._modelConfFile = defaultdict(lambda: "")
 *         self.tempDirs = []             # <<<<<<<<<<<<<<
 *         self.lastGMM = ""
 *         self._baselen = 0
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tempDirs, __pyx_t_1) < 0) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":624
 *         self._modelConfFile = defaultdict(lambda: "")
 *         self.tempDirs = []
 *         self.lastGMM = ""             # <<<<<<<<<<<<<<
 *         self._baselen = 0
 *         self.curproperty = ""
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lastGMM, __pyx_kp_u__4) < 0) __PYX_ERR(0, 624, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":625
 *         self.tempDirs = []
 *         self.lastGMM = ""
 *         self._baselen = 0             # <<<<<<<<<<<<<<
 *         self.curproperty = ""
 *         self.curalgo = "LM"
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_baselen, __pyx_int_0) < 0) __PYX_ERR(0, 625, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":626
 *         self.lastGMM = ""
 *         self._baselen = 0
 *         self.curproperty = ""             # <<<<<<<<<<<<<<
 *         self.curalgo = "LM"
 *         self.datasource = None
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_curproperty, __pyx_kp_u__4) < 0) __PYX_ERR(0, 626, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":627
 *         self._baselen = 0
 *         self.curproperty = ""
 *         self.curalgo = "LM"             # <<<<<<<<<<<<<<
 *         self.datasource = None
 *         self.writer = sys.stdout
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_curalgo, __pyx_n_u_LM) < 0) __PYX_ERR(0, 627, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":628
 *         self.curproperty = ""
 *         self.curalgo = "LM"
 *         self.datasource = None             # <<<<<<<<<<<<<<
 *         self.writer = sys.stdout
 *         self.debug = debug
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_datasource, Py_None) < 0) __PYX_ERR(0, 628, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":629
 *         self.curalgo = "LM"
 *         self.datasource = None
 *         self.writer = sys.stdout             # <<<<<<<<<<<<<<
 *         self.debug = debug
 *         #self.dataiterator = None
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stdout); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_writer, __pyx_t_3) < 0) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":630
 *         self.datasource = None
 *         self.writer = sys.stdout
 *         self.debug = debug             # <<<<<<<<<<<<<<
 *         #self.dataiterator = None
 *         self.defaultModified = False
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_debug, __pyx_v_debug) < 0) __PYX_ERR(0, 630, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":632
 *         self.debug = debug
 *         #self.dataiterator = None
 *         self.defaultModified = False             # <<<<<<<<<<<<<<
 * 
 *     def checkconnect(self, conf, islong):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_defaultModified, Py_False) < 0) __PYX_ERR(0, 632, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":605
 *     """
 * 
 *     def __init__(self, projectDir, defaultcfg="", debug=False):             # <<<<<<<<<<<<<<
 *         global defaultConf
 *         super(GMEngine, self).__init__()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_defaultcfg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":634
 *         self.defaultModified = False
 * 
 *     def checkconnect(self, conf, islong):             # <<<<<<<<<<<<<<
 *         stconnect = "connectivity"
 *         connectlist = conf.options(stconnect)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_3checkconnect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_3checkconnect = {"checkconnect", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_3checkconnect, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_3checkconnect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_conf = 0;
  PyObject *__pyx_v_islong = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("checkconnect (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_conf,&__pyx_n_s_islong,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_conf)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("checkconnect", 1, 3, 3, 1); __PYX_ERR(0, 634, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_islong)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("checkconnect", 1, 3, 3, 2); __PYX_ERR(0, 634, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "checkconnect") < 0)) __PYX_ERR(0, 634, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_conf = values[1];
    __pyx_v_islong = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("checkconnect", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 634, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.checkconnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_2checkconnect(__pyx_self, __pyx_v_self, __pyx_v_conf, __pyx_v_islong);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_2checkconnect(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_conf, PyObject *__pyx_v_islong) {
  PyObject *__pyx_v_stconnect = NULL;
  PyObject *__pyx_v_connectlist = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  long __pyx_t_10;
  __Pyx_RefNannySetupContext("checkconnect", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":635
 * 
 *     def checkconnect(self, conf, islong):
 *         stconnect = "connectivity"             # <<<<<<<<<<<<<<
 *         connectlist = conf.options(stconnect)
 *         #islong = True
 */
  __Pyx_INCREF(__pyx_n_u_connectivity);
  __pyx_v_stconnect = __pyx_n_u_connectivity;

  /* "metaphor/chem_gm/core/gmtoolbox.py":636
 *     def checkconnect(self, conf, islong):
 *         stconnect = "connectivity"
 *         connectlist = conf.options(stconnect)             # <<<<<<<<<<<<<<
 *         #islong = True
 *         for i in (1, 2):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_conf, __pyx_n_s_options); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_stconnect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_stconnect};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 636, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_stconnect};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 636, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 636, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_stconnect);
      __Pyx_GIVEREF(__pyx_v_stconnect);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_stconnect);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 636, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_connectlist = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":638
 *         connectlist = conf.options(stconnect)
 *         #islong = True
 *         for i in (1, 2):             # <<<<<<<<<<<<<<
 *             key = isokey(i, islong)
 *             if not key in connectlist:
 */
  __pyx_t_1 = __pyx_tuple__56; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
  for (;;) {
    if (__pyx_t_5 >= 2) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 638, __pyx_L1_error)
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":639
 *         #islong = True
 *         for i in (1, 2):
 *             key = isokey(i, islong)             # <<<<<<<<<<<<<<
 *             if not key in connectlist:
 *                 conf.set(stconnect, key, "0")
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_isokey); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_i, __pyx_v_islong};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_i, __pyx_v_islong};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 639, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_INCREF(__pyx_v_i);
      __Pyx_GIVEREF(__pyx_v_i);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_i);
      __Pyx_INCREF(__pyx_v_islong);
      __Pyx_GIVEREF(__pyx_v_islong);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_islong);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":640
 *         for i in (1, 2):
 *             key = isokey(i, islong)
 *             if not key in connectlist:             # <<<<<<<<<<<<<<
 *                 conf.set(stconnect, key, "0")
 *             key = chikey(i, islong)
 */
    __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_v_connectlist, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 640, __pyx_L1_error)
    __pyx_t_9 = (__pyx_t_8 != 0);
    if (__pyx_t_9) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":641
 *             key = isokey(i, islong)
 *             if not key in connectlist:
 *                 conf.set(stconnect, key, "0")             # <<<<<<<<<<<<<<
 *             key = chikey(i, islong)
 *             if not key in connectlist:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_conf, __pyx_n_s_set); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 641, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_6 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_stconnect, __pyx_v_key, __pyx_kp_u_0};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_stconnect, __pyx_v_key, __pyx_kp_u_0};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_3 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 641, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (__pyx_t_7) {
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL;
        }
        __Pyx_INCREF(__pyx_v_stconnect);
        __Pyx_GIVEREF(__pyx_v_stconnect);
        PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_v_stconnect);
        __Pyx_INCREF(__pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_v_key);
        __Pyx_INCREF(__pyx_kp_u_0);
        __Pyx_GIVEREF(__pyx_kp_u_0);
        PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_6, __pyx_kp_u_0);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":640
 *         for i in (1, 2):
 *             key = isokey(i, islong)
 *             if not key in connectlist:             # <<<<<<<<<<<<<<
 *                 conf.set(stconnect, key, "0")
 *             key = chikey(i, islong)
 */
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":642
 *             if not key in connectlist:
 *                 conf.set(stconnect, key, "0")
 *             key = chikey(i, islong)             # <<<<<<<<<<<<<<
 *             if not key in connectlist:
 *                 conf.set(stconnect, key, "0")
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_chikey); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_i, __pyx_v_islong};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_i, __pyx_v_islong};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 642, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_INCREF(__pyx_v_i);
      __Pyx_GIVEREF(__pyx_v_i);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_i);
      __Pyx_INCREF(__pyx_v_islong);
      __Pyx_GIVEREF(__pyx_v_islong);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_islong);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":643
 *                 conf.set(stconnect, key, "0")
 *             key = chikey(i, islong)
 *             if not key in connectlist:             # <<<<<<<<<<<<<<
 *                 conf.set(stconnect, key, "0")
 *         for i in range(1, 13):
 */
    __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_v_connectlist, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 643, __pyx_L1_error)
    __pyx_t_8 = (__pyx_t_9 != 0);
    if (__pyx_t_8) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":644
 *             key = chikey(i, islong)
 *             if not key in connectlist:
 *                 conf.set(stconnect, key, "0")             # <<<<<<<<<<<<<<
 *         for i in range(1, 13):
 *             key = cyclekey(i, islong)
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_conf, __pyx_n_s_set); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 644, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_6 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_stconnect, __pyx_v_key, __pyx_kp_u_0};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 644, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_stconnect, __pyx_v_key, __pyx_kp_u_0};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 644, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_3 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 644, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (__pyx_t_7) {
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL;
        }
        __Pyx_INCREF(__pyx_v_stconnect);
        __Pyx_GIVEREF(__pyx_v_stconnect);
        PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_v_stconnect);
        __Pyx_INCREF(__pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_v_key);
        __Pyx_INCREF(__pyx_kp_u_0);
        __Pyx_GIVEREF(__pyx_kp_u_0);
        PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_6, __pyx_kp_u_0);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 644, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":643
 *                 conf.set(stconnect, key, "0")
 *             key = chikey(i, islong)
 *             if not key in connectlist:             # <<<<<<<<<<<<<<
 *                 conf.set(stconnect, key, "0")
 *         for i in range(1, 13):
 */
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":638
 *         connectlist = conf.options(stconnect)
 *         #islong = True
 *         for i in (1, 2):             # <<<<<<<<<<<<<<
 *             key = isokey(i, islong)
 *             if not key in connectlist:
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":645
 *             if not key in connectlist:
 *                 conf.set(stconnect, key, "0")
 *         for i in range(1, 13):             # <<<<<<<<<<<<<<
 *             key = cyclekey(i, islong)
 *             if not key in connectlist:
 */
  for (__pyx_t_10 = 1; __pyx_t_10 < 13; __pyx_t_10+=1) {
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":646
 *                 conf.set(stconnect, key, "0")
 *         for i in range(1, 13):
 *             key = cyclekey(i, islong)             # <<<<<<<<<<<<<<
 *             if not key in connectlist:
 *                 conf.set(stconnect, key, "0")
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cyclekey); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 646, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_i, __pyx_v_islong};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_i, __pyx_v_islong};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_i);
      __Pyx_GIVEREF(__pyx_v_i);
      PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_v_i);
      __Pyx_INCREF(__pyx_v_islong);
      __Pyx_GIVEREF(__pyx_v_islong);
      PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_v_islong);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":647
 *         for i in range(1, 13):
 *             key = cyclekey(i, islong)
 *             if not key in connectlist:             # <<<<<<<<<<<<<<
 *                 conf.set(stconnect, key, "0")
 *         for i in range(1, 5):
 */
    __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_v_connectlist, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 647, __pyx_L1_error)
    __pyx_t_9 = (__pyx_t_8 != 0);
    if (__pyx_t_9) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":648
 *             key = cyclekey(i, islong)
 *             if not key in connectlist:
 *                 conf.set(stconnect, key, "0")             # <<<<<<<<<<<<<<
 *         for i in range(1, 5):
 *             key = chargekey(i, islong)
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_conf, __pyx_n_s_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 648, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_6 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_stconnect, __pyx_v_key, __pyx_kp_u_0};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_stconnect, __pyx_v_key, __pyx_kp_u_0};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      {
        __pyx_t_4 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 648, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (__pyx_t_3) {
          __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
        }
        __Pyx_INCREF(__pyx_v_stconnect);
        __Pyx_GIVEREF(__pyx_v_stconnect);
        PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_v_stconnect);
        __Pyx_INCREF(__pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_v_key);
        __Pyx_INCREF(__pyx_kp_u_0);
        __Pyx_GIVEREF(__pyx_kp_u_0);
        PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_6, __pyx_kp_u_0);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":647
 *         for i in range(1, 13):
 *             key = cyclekey(i, islong)
 *             if not key in connectlist:             # <<<<<<<<<<<<<<
 *                 conf.set(stconnect, key, "0")
 *         for i in range(1, 5):
 */
    }
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":649
 *             if not key in connectlist:
 *                 conf.set(stconnect, key, "0")
 *         for i in range(1, 5):             # <<<<<<<<<<<<<<
 *             key = chargekey(i, islong)
 *             if not key in connectlist:
 */
  for (__pyx_t_10 = 1; __pyx_t_10 < 5; __pyx_t_10+=1) {
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":650
 *                 conf.set(stconnect, key, "0")
 *         for i in range(1, 5):
 *             key = chargekey(i, islong)             # <<<<<<<<<<<<<<
 *             if not key in connectlist:
 *                 conf.set(stconnect, key, "0")
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_chargekey); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_i, __pyx_v_islong};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_i, __pyx_v_islong};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 650, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_i);
      __Pyx_GIVEREF(__pyx_v_i);
      PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_v_i);
      __Pyx_INCREF(__pyx_v_islong);
      __Pyx_GIVEREF(__pyx_v_islong);
      PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_v_islong);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":651
 *         for i in range(1, 5):
 *             key = chargekey(i, islong)
 *             if not key in connectlist:             # <<<<<<<<<<<<<<
 *                 conf.set(stconnect, key, "0")
 *             key = chargekey(-i, islong)
 */
    __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_v_connectlist, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 651, __pyx_L1_error)
    __pyx_t_8 = (__pyx_t_9 != 0);
    if (__pyx_t_8) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":652
 *             key = chargekey(i, islong)
 *             if not key in connectlist:
 *                 conf.set(stconnect, key, "0")             # <<<<<<<<<<<<<<
 *             key = chargekey(-i, islong)
 *             if not key in connectlist:
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_conf, __pyx_n_s_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 652, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_6 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_stconnect, __pyx_v_key, __pyx_kp_u_0};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_stconnect, __pyx_v_key, __pyx_kp_u_0};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      {
        __pyx_t_4 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 652, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (__pyx_t_3) {
          __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
        }
        __Pyx_INCREF(__pyx_v_stconnect);
        __Pyx_GIVEREF(__pyx_v_stconnect);
        PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_v_stconnect);
        __Pyx_INCREF(__pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_v_key);
        __Pyx_INCREF(__pyx_kp_u_0);
        __Pyx_GIVEREF(__pyx_kp_u_0);
        PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_6, __pyx_kp_u_0);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":651
 *         for i in range(1, 5):
 *             key = chargekey(i, islong)
 *             if not key in connectlist:             # <<<<<<<<<<<<<<
 *                 conf.set(stconnect, key, "0")
 *             key = chargekey(-i, islong)
 */
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":653
 *             if not key in connectlist:
 *                 conf.set(stconnect, key, "0")
 *             key = chargekey(-i, islong)             # <<<<<<<<<<<<<<
 *             if not key in connectlist:
 *                 conf.set(stconnect, key, "0")
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_chargekey); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyNumber_Negative(__pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_v_islong};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_v_islong};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 653, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
      __Pyx_INCREF(__pyx_v_islong);
      __Pyx_GIVEREF(__pyx_v_islong);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_islong);
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":654
 *                 conf.set(stconnect, key, "0")
 *             key = chargekey(-i, islong)
 *             if not key in connectlist:             # <<<<<<<<<<<<<<
 *                 conf.set(stconnect, key, "0")
 * 
 */
    __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_v_connectlist, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 654, __pyx_L1_error)
    __pyx_t_9 = (__pyx_t_8 != 0);
    if (__pyx_t_9) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":655
 *             key = chargekey(-i, islong)
 *             if not key in connectlist:
 *                 conf.set(stconnect, key, "0")             # <<<<<<<<<<<<<<
 * 
 *     def setDefaultConf(self, conffile=""):
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_conf, __pyx_n_s_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 655, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_6 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_stconnect, __pyx_v_key, __pyx_kp_u_0};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_stconnect, __pyx_v_key, __pyx_kp_u_0};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      {
        __pyx_t_4 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 655, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (__pyx_t_7) {
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); __pyx_t_7 = NULL;
        }
        __Pyx_INCREF(__pyx_v_stconnect);
        __Pyx_GIVEREF(__pyx_v_stconnect);
        PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_v_stconnect);
        __Pyx_INCREF(__pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_v_key);
        __Pyx_INCREF(__pyx_kp_u_0);
        __Pyx_GIVEREF(__pyx_kp_u_0);
        PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_6, __pyx_kp_u_0);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":654
 *                 conf.set(stconnect, key, "0")
 *             key = chargekey(-i, islong)
 *             if not key in connectlist:             # <<<<<<<<<<<<<<
 *                 conf.set(stconnect, key, "0")
 * 
 */
    }
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":634
 *         self.defaultModified = False
 * 
 *     def checkconnect(self, conf, islong):             # <<<<<<<<<<<<<<
 *         stconnect = "connectivity"
 *         connectlist = conf.options(stconnect)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.checkconnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_stconnect);
  __Pyx_XDECREF(__pyx_v_connectlist);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":657
 *                 conf.set(stconnect, key, "0")
 * 
 *     def setDefaultConf(self, conffile=""):             # <<<<<<<<<<<<<<
 *         if conffile:
 *             self.defaultConfigFile = conffile
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_5setDefaultConf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_5setDefaultConf = {"setDefaultConf", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_5setDefaultConf, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_5setDefaultConf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_conffile = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setDefaultConf (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_conffile,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_kp_u__4));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_conffile);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setDefaultConf") < 0)) __PYX_ERR(0, 657, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_conffile = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setDefaultConf", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 657, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.setDefaultConf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_4setDefaultConf(__pyx_self, __pyx_v_self, __pyx_v_conffile);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_4setDefaultConf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_conffile) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("setDefaultConf", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":658
 * 
 *     def setDefaultConf(self, conffile=""):
 *         if conffile:             # <<<<<<<<<<<<<<
 *             self.defaultConfigFile = conffile
 *         self.defaultConf.read(self.defaultConfigFile)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_conffile); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 658, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":659
 *     def setDefaultConf(self, conffile=""):
 *         if conffile:
 *             self.defaultConfigFile = conffile             # <<<<<<<<<<<<<<
 *         self.defaultConf.read(self.defaultConfigFile)
 *         self.defaultModified = False
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_defaultConfigFile, __pyx_v_conffile) < 0) __PYX_ERR(0, 659, __pyx_L1_error)

    /* "metaphor/chem_gm/core/gmtoolbox.py":658
 * 
 *     def setDefaultConf(self, conffile=""):
 *         if conffile:             # <<<<<<<<<<<<<<
 *             self.defaultConfigFile = conffile
 *         self.defaultConf.read(self.defaultConfigFile)
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":660
 *         if conffile:
 *             self.defaultConfigFile = conffile
 *         self.defaultConf.read(self.defaultConfigFile)             # <<<<<<<<<<<<<<
 *         self.defaultModified = False
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_defaultConf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_read); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_defaultConfigFile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 660, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":661
 *             self.defaultConfigFile = conffile
 *         self.defaultConf.read(self.defaultConfigFile)
 *         self.defaultModified = False             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_defaultModified, Py_False) < 0) __PYX_ERR(0, 661, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":657
 *                 conf.set(stconnect, key, "0")
 * 
 *     def setDefaultConf(self, conffile=""):             # <<<<<<<<<<<<<<
 *         if conffile:
 *             self.defaultConfigFile = conffile
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.setDefaultConf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":664
 * 
 *     @Property
 *     def dataiterator(self):             # <<<<<<<<<<<<<<
 *         if self.datasource:
 *             return self.datasource.iterData(True)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_7dataiterator(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_7dataiterator = {"dataiterator", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_7dataiterator, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_7dataiterator(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dataiterator (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_6dataiterator(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_6dataiterator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("dataiterator", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":665
 *     @Property
 *     def dataiterator(self):
 *         if self.datasource:             # <<<<<<<<<<<<<<
 *             return self.datasource.iterData(True)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_datasource); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":666
 *     def dataiterator(self):
 *         if self.datasource:
 *             return self.datasource.iterData(True)             # <<<<<<<<<<<<<<
 * 
 *     def onDestroy(self):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_datasource); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_iterData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":665
 *     @Property
 *     def dataiterator(self):
 *         if self.datasource:             # <<<<<<<<<<<<<<
 *             return self.datasource.iterData(True)
 * 
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":664
 * 
 *     @Property
 *     def dataiterator(self):             # <<<<<<<<<<<<<<
 *         if self.datasource:
 *             return self.datasource.iterData(True)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.dataiterator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":668
 *             return self.datasource.iterData(True)
 * 
 *     def onDestroy(self):             # <<<<<<<<<<<<<<
 *         for ppath in self.tempDirs[-1::-1]:
 *             pass
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_9onDestroy(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_9onDestroy = {"onDestroy", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_9onDestroy, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_9onDestroy(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("onDestroy (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_8onDestroy(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_8onDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *__pyx_v_ppath = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  __Pyx_RefNannySetupContext("onDestroy", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":669
 * 
 *     def onDestroy(self):
 *         for ppath in self.tempDirs[-1::-1]:             # <<<<<<<<<<<<<<
 *             pass
 *             # effacer tout
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tempDirs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_slice__58); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 669, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 669, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 669, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 669, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 669, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 669, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_ppath, __pyx_t_2);
    __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":668
 *             return self.datasource.iterData(True)
 * 
 *     def onDestroy(self):             # <<<<<<<<<<<<<<
 *         for ppath in self.tempDirs[-1::-1]:
 *             pass
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.onDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ppath);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":674
 * 
 *     @Property
 *     def baselen(self):             # <<<<<<<<<<<<<<
 *         return self._baselen
 *     @baselen.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_11baselen(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_11baselen = {"baselen", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_11baselen, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_11baselen(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("baselen (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_10baselen(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_10baselen(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("baselen", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":675
 *     @Property
 *     def baselen(self):
 *         return self._baselen             # <<<<<<<<<<<<<<
 *     @baselen.setter
 *     def sbaselen(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_baselen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":674
 * 
 *     @Property
 *     def baselen(self):             # <<<<<<<<<<<<<<
 *         return self._baselen
 *     @baselen.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.baselen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":677
 *         return self._baselen
 *     @baselen.setter
 *     def sbaselen(self, value):             # <<<<<<<<<<<<<<
 *         self._baselen = value
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_13sbaselen(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_13sbaselen = {"sbaselen", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_13sbaselen, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_13sbaselen(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sbaselen (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("sbaselen", 1, 2, 2, 1); __PYX_ERR(0, 677, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sbaselen") < 0)) __PYX_ERR(0, 677, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sbaselen", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 677, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.sbaselen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_12sbaselen(__pyx_self, __pyx_v_self, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_12sbaselen(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sbaselen", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":678
 *     @baselen.setter
 *     def sbaselen(self, value):
 *         self._baselen = value             # <<<<<<<<<<<<<<
 * 
 *     def getTempDir(self, index = -1):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_baselen, __pyx_v_value) < 0) __PYX_ERR(0, 678, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":677
 *         return self._baselen
 *     @baselen.setter
 *     def sbaselen(self, value):             # <<<<<<<<<<<<<<
 *         self._baselen = value
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.sbaselen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":680
 *         self._baselen = value
 * 
 *     def getTempDir(self, index = -1):             # <<<<<<<<<<<<<<
 *         if index < 0:
 *             self.tempDirs.append(mkdtemp())
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_15getTempDir(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_15getTempDir = {"getTempDir", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_15getTempDir, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_15getTempDir(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTempDir (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject *)__pyx_int_neg_1));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getTempDir") < 0)) __PYX_ERR(0, 680, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getTempDir", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 680, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.getTempDir", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_14getTempDir(__pyx_self, __pyx_v_self, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_14getTempDir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  __Pyx_RefNannySetupContext("getTempDir", 0);
  __Pyx_INCREF(__pyx_v_index);

  /* "metaphor/chem_gm/core/gmtoolbox.py":681
 * 
 *     def getTempDir(self, index = -1):
 *         if index < 0:             # <<<<<<<<<<<<<<
 *             self.tempDirs.append(mkdtemp())
 *             index = len(self.tempDirs) - 1
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_index, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 681, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":682
 *     def getTempDir(self, index = -1):
 *         if index < 0:
 *             self.tempDirs.append(mkdtemp())             # <<<<<<<<<<<<<<
 *             index = len(self.tempDirs) - 1
 *         return self.tempDirs[index]
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tempDirs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_mkdtemp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 682, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 682, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_t_3); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 682, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":683
 *         if index < 0:
 *             self.tempDirs.append(mkdtemp())
 *             index = len(self.tempDirs) - 1             # <<<<<<<<<<<<<<
 *         return self.tempDirs[index]
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tempDirs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 683, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyInt_FromSsize_t((__pyx_t_7 - 1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":681
 * 
 *     def getTempDir(self, index = -1):
 *         if index < 0:             # <<<<<<<<<<<<<<
 *             self.tempDirs.append(mkdtemp())
 *             index = len(self.tempDirs) - 1
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":684
 *             self.tempDirs.append(mkdtemp())
 *             index = len(self.tempDirs) - 1
 *         return self.tempDirs[index]             # <<<<<<<<<<<<<<
 * 
 *     def setmodelconf(self, key, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tempDirs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":680
 *         self._baselen = value
 * 
 *     def getTempDir(self, index = -1):             # <<<<<<<<<<<<<<
 *         if index < 0:
 *             self.tempDirs.append(mkdtemp())
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.getTempDir", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":686
 *         return self.tempDirs[index]
 * 
 *     def setmodelconf(self, key, value):             # <<<<<<<<<<<<<<
 *         self._modelconfdict[key] = value
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_17setmodelconf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_17setmodelconf = {"setmodelconf", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_17setmodelconf, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_17setmodelconf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setmodelconf (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_key,&__pyx_n_s_value,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setmodelconf", 1, 3, 3, 1); __PYX_ERR(0, 686, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setmodelconf", 1, 3, 3, 2); __PYX_ERR(0, 686, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setmodelconf") < 0)) __PYX_ERR(0, 686, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_key = values[1];
    __pyx_v_value = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setmodelconf", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 686, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.setmodelconf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_16setmodelconf(__pyx_self, __pyx_v_self, __pyx_v_key, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_16setmodelconf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("setmodelconf", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":687
 * 
 *     def setmodelconf(self, key, value):
 *         self._modelconfdict[key] = value             # <<<<<<<<<<<<<<
 * 
 *     def modelconf(self, key, origin=None):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_modelconfdict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_key, __pyx_v_value) < 0)) __PYX_ERR(0, 687, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":686
 *         return self.tempDirs[index]
 * 
 *     def setmodelconf(self, key, value):             # <<<<<<<<<<<<<<
 *         self._modelconfdict[key] = value
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.setmodelconf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":689
 *         self._modelconfdict[key] = value
 * 
 *     def modelconf(self, key, origin=None):             # <<<<<<<<<<<<<<
 *         res = self._modelconfdict[key]
 *         if not res:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_19modelconf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_19modelconf = {"modelconf", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_19modelconf, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_19modelconf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_origin = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("modelconf (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_key,&__pyx_n_s_origin,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("modelconf", 0, 2, 3, 1); __PYX_ERR(0, 689, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_origin);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "modelconf") < 0)) __PYX_ERR(0, 689, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_key = values[1];
    __pyx_v_origin = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("modelconf", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 689, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.modelconf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_18modelconf(__pyx_self, __pyx_v_self, __pyx_v_key, __pyx_v_origin);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_18modelconf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_origin) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_cfgfile = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("modelconf", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":690
 * 
 *     def modelconf(self, key, origin=None):
 *         res = self._modelconfdict[key]             # <<<<<<<<<<<<<<
 *         if not res:
 *             cfgfile = self.fullProjectIniFile(key)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_modelconfdict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_res = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":691
 *     def modelconf(self, key, origin=None):
 *         res = self._modelconfdict[key]
 *         if not res:             # <<<<<<<<<<<<<<
 *             cfgfile = self.fullProjectIniFile(key)
 *             self._modelConfFile[key] = cfgfile
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_res); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 691, __pyx_L1_error)
  __pyx_t_4 = ((!__pyx_t_3) != 0);
  if (__pyx_t_4) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":692
 *         res = self._modelconfdict[key]
 *         if not res:
 *             cfgfile = self.fullProjectIniFile(key)             # <<<<<<<<<<<<<<
 *             self._modelConfFile[key] = cfgfile
 *             res = defaultedConfigParser()
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fullProjectIniFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_key};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 692, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_key};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 692, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 692, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 692, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_cfgfile = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":693
 *         if not res:
 *             cfgfile = self.fullProjectIniFile(key)
 *             self._modelConfFile[key] = cfgfile             # <<<<<<<<<<<<<<
 *             res = defaultedConfigParser()
 *             if origin:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_modelConfFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_key, __pyx_v_cfgfile) < 0)) __PYX_ERR(0, 693, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":694
 *             cfgfile = self.fullProjectIniFile(key)
 *             self._modelConfFile[key] = cfgfile
 *             res = defaultedConfigParser()             # <<<<<<<<<<<<<<
 *             if origin:
 *                 res.read(origin)
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultedConfigParser); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    if (__pyx_t_6) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 694, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 694, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":695
 *             self._modelConfFile[key] = cfgfile
 *             res = defaultedConfigParser()
 *             if origin:             # <<<<<<<<<<<<<<
 *                 res.read(origin)
 *             else:
 */
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_origin); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 695, __pyx_L1_error)
    if (__pyx_t_4) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":696
 *             res = defaultedConfigParser()
 *             if origin:
 *                 res.read(origin)             # <<<<<<<<<<<<<<
 *             else:
 *                 res.read(cfgfile)
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      if (!__pyx_t_6) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_origin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_origin};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_origin};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 696, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
          __Pyx_INCREF(__pyx_v_origin);
          __Pyx_GIVEREF(__pyx_v_origin);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_origin);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":695
 *             self._modelConfFile[key] = cfgfile
 *             res = defaultedConfigParser()
 *             if origin:             # <<<<<<<<<<<<<<
 *                 res.read(origin)
 *             else:
 */
      goto __pyx_L4;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":698
 *                 res.read(origin)
 *             else:
 *                 res.read(cfgfile)             # <<<<<<<<<<<<<<
 *             self._modelconfdict[key] = res
 *         return res
 */
    /*else*/ {
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_cfgfile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 698, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_cfgfile};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 698, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_cfgfile};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 698, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 698, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
          __Pyx_INCREF(__pyx_v_cfgfile);
          __Pyx_GIVEREF(__pyx_v_cfgfile);
          PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_cfgfile);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 698, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_L4:;

    /* "metaphor/chem_gm/core/gmtoolbox.py":699
 *             else:
 *                 res.read(cfgfile)
 *             self._modelconfdict[key] = res             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_modelconfdict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 699, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_key, __pyx_v_res) < 0)) __PYX_ERR(0, 699, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":691
 *     def modelconf(self, key, origin=None):
 *         res = self._modelconfdict[key]
 *         if not res:             # <<<<<<<<<<<<<<
 *             cfgfile = self.fullProjectIniFile(key)
 *             self._modelConfFile[key] = cfgfile
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":700
 *                 res.read(cfgfile)
 *             self._modelconfdict[key] = res
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     def saveModelConf(self, key):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":689
 *         self._modelconfdict[key] = value
 * 
 *     def modelconf(self, key, origin=None):             # <<<<<<<<<<<<<<
 *         res = self._modelconfdict[key]
 *         if not res:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.modelconf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_cfgfile);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":702
 *         return res
 * 
 *     def saveModelConf(self, key):             # <<<<<<<<<<<<<<
 *         ff = open(self._modelConfFile[key], "w")
 *         try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_21saveModelConf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_21saveModelConf = {"saveModelConf", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_21saveModelConf, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_21saveModelConf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("saveModelConf (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_key,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("saveModelConf", 1, 2, 2, 1); __PYX_ERR(0, 702, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "saveModelConf") < 0)) __PYX_ERR(0, 702, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_key = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("saveModelConf", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 702, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.saveModelConf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_20saveModelConf(__pyx_self, __pyx_v_self, __pyx_v_key);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_20saveModelConf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_v_ff = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  char const *__pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_RefNannySetupContext("saveModelConf", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":703
 * 
 *     def saveModelConf(self, key):
 *         ff = open(self._modelConfFile[key], "w")             # <<<<<<<<<<<<<<
 *         try:
 *             self._modelconfdict[key].write(ff)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_modelConfFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_n_u_w);
  __Pyx_GIVEREF(__pyx_n_u_w);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_w);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ff = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":704
 *     def saveModelConf(self, key):
 *         ff = open(self._modelConfFile[key], "w")
 *         try:             # <<<<<<<<<<<<<<
 *             self._modelconfdict[key].write(ff)
 *         finally:
 */
  /*try:*/ {

    /* "metaphor/chem_gm/core/gmtoolbox.py":705
 *         ff = open(self._modelConfFile[key], "w")
 *         try:
 *             self._modelconfdict[key].write(ff)             # <<<<<<<<<<<<<<
 *         finally:
 *             ff.close()
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_modelconfdict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 705, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_ff); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_ff};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L4_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_ff};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L4_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 705, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_v_ff);
        __Pyx_GIVEREF(__pyx_v_ff);
        PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_ff);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":707
 *             self._modelconfdict[key].write(ff)
 *         finally:
 *             ff.close()             # <<<<<<<<<<<<<<
 * 
 *     def saveDefaultConf(self, filename=""):
 */
  /*finally:*/ {
    /*normal exit:*/{
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 707, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 707, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 707, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L5;
    }
    __pyx_L4_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10) < 0)) __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __pyx_t_5 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_7 = __pyx_filename;
      {
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 707, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        if (__pyx_t_4) {
          __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 707, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 707, __pyx_L7_error)
        }
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ErrRestore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0;
      __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_7;
      goto __pyx_L1_error;
      __pyx_L7_error:;
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0;
      goto __pyx_L1_error;
    }
    __pyx_L5:;
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":702
 *         return res
 * 
 *     def saveModelConf(self, key):             # <<<<<<<<<<<<<<
 *         ff = open(self._modelConfFile[key], "w")
 *         try:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.saveModelConf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ff);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":709
 *             ff.close()
 * 
 *     def saveDefaultConf(self, filename=""):             # <<<<<<<<<<<<<<
 *         filename = filename if filename else self.defaultConfigFile
 *         ff = open(filename, "w")
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_23saveDefaultConf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_23saveDefaultConf = {"saveDefaultConf", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_23saveDefaultConf, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_23saveDefaultConf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_filename = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("saveDefaultConf (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_filename,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_kp_u__4));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filename);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "saveDefaultConf") < 0)) __PYX_ERR(0, 709, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_filename = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("saveDefaultConf", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 709, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.saveDefaultConf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_22saveDefaultConf(__pyx_self, __pyx_v_self, __pyx_v_filename);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_22saveDefaultConf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename) {
  PyObject *__pyx_v_ff = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  char const *__pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  __Pyx_RefNannySetupContext("saveDefaultConf", 0);
  __Pyx_INCREF(__pyx_v_filename);

  /* "metaphor/chem_gm/core/gmtoolbox.py":710
 * 
 *     def saveDefaultConf(self, filename=""):
 *         filename = filename if filename else self.defaultConfigFile             # <<<<<<<<<<<<<<
 *         ff = open(filename, "w")
 *         try:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 710, __pyx_L1_error)
  if (__pyx_t_2) {
    __Pyx_INCREF(__pyx_v_filename);
    __pyx_t_1 = __pyx_v_filename;
  } else {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_defaultConfigFile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":711
 *     def saveDefaultConf(self, filename=""):
 *         filename = filename if filename else self.defaultConfigFile
 *         ff = open(filename, "w")             # <<<<<<<<<<<<<<
 *         try:
 *             self.defaultConf.write(ff)
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_filename);
  __Pyx_GIVEREF(__pyx_v_filename);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filename);
  __Pyx_INCREF(__pyx_n_u_w);
  __Pyx_GIVEREF(__pyx_n_u_w);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_w);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ff = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":712
 *         filename = filename if filename else self.defaultConfigFile
 *         ff = open(filename, "w")
 *         try:             # <<<<<<<<<<<<<<
 *             self.defaultConf.write(ff)
 *             self.defaultModified = False
 */
  /*try:*/ {

    /* "metaphor/chem_gm/core/gmtoolbox.py":713
 *         ff = open(filename, "w")
 *         try:
 *             self.defaultConf.write(ff)             # <<<<<<<<<<<<<<
 *             self.defaultModified = False
 *         finally:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_defaultConf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 713, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 713, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_1) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_ff); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 713, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_ff};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 713, __pyx_L4_error)
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_ff};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 713, __pyx_L4_error)
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 713, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL;
        __Pyx_INCREF(__pyx_v_ff);
        __Pyx_GIVEREF(__pyx_v_ff);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_ff);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 713, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":714
 *         try:
 *             self.defaultConf.write(ff)
 *             self.defaultModified = False             # <<<<<<<<<<<<<<
 *         finally:
 *             ff.close()
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_defaultModified, Py_False) < 0) __PYX_ERR(0, 714, __pyx_L4_error)
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":716
 *             self.defaultModified = False
 *         finally:
 *             ff.close()             # <<<<<<<<<<<<<<
 * 
 *     def modelSelected(self, key, ppty):
 */
  /*finally:*/ {
    /*normal exit:*/{
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 716, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (__pyx_t_5) {
        __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 716, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else {
        __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 716, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L5;
    }
    __pyx_L4_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
      {
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ff, __pyx_n_s_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 716, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        if (__pyx_t_5) {
          __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 716, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        } else {
          __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 716, __pyx_L7_error)
        }
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_XGIVEREF(__pyx_t_14);
        __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
      }
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
      __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
      goto __pyx_L1_error;
      __pyx_L7_error:;
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_XGIVEREF(__pyx_t_14);
        __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
      }
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
      goto __pyx_L1_error;
    }
    __pyx_L5:;
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":709
 *             ff.close()
 * 
 *     def saveDefaultConf(self, filename=""):             # <<<<<<<<<<<<<<
 *         filename = filename if filename else self.defaultConfigFile
 *         ff = open(filename, "w")
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.saveDefaultConf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ff);
  __Pyx_XDECREF(__pyx_v_filename);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":718
 *             ff.close()
 * 
 *     def modelSelected(self, key, ppty):             # <<<<<<<<<<<<<<
 *         if ppty:
 *             trainlabel = "training_%s"% ppty
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_25modelSelected(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_25modelSelected = {"modelSelected", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_25modelSelected, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_25modelSelected(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_ppty = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("modelSelected (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_key,&__pyx_n_s_ppty,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("modelSelected", 1, 3, 3, 1); __PYX_ERR(0, 718, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ppty)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("modelSelected", 1, 3, 3, 2); __PYX_ERR(0, 718, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "modelSelected") < 0)) __PYX_ERR(0, 718, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_key = values[1];
    __pyx_v_ppty = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("modelSelected", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 718, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.modelSelected", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_24modelSelected(__pyx_self, __pyx_v_self, __pyx_v_key, __pyx_v_ppty);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_24modelSelected(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_ppty) {
  PyObject *__pyx_v_trainlabel = NULL;
  PyObject *__pyx_v_st = NULL;
  PyObject *__pyx_9genexpr13__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_RefNannySetupContext("modelSelected", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":719
 * 
 *     def modelSelected(self, key, ppty):
 *         if ppty:             # <<<<<<<<<<<<<<
 *             trainlabel = "training_%s"% ppty
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ppty); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 719, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":720
 *     def modelSelected(self, key, ppty):
 *         if ppty:
 *             trainlabel = "training_%s"% ppty             # <<<<<<<<<<<<<<
 *         else:
 *             trainlabel = "training"
 */
    __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_training__s, __pyx_v_ppty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 720, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_trainlabel = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":719
 * 
 *     def modelSelected(self, key, ppty):
 *         if ppty:             # <<<<<<<<<<<<<<
 *             trainlabel = "training_%s"% ppty
 *         else:
 */
    goto __pyx_L3;
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":722
 *             trainlabel = "training_%s"% ppty
 *         else:
 *             trainlabel = "training"             # <<<<<<<<<<<<<<
 *         st = self.modelconf(key).getdefault(trainlabel, "selected", "")
 *         if st:
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_n_u_training);
    __pyx_v_trainlabel = __pyx_n_u_training;
  }
  __pyx_L3:;

  /* "metaphor/chem_gm/core/gmtoolbox.py":723
 *         else:
 *             trainlabel = "training"
 *         st = self.modelconf(key).getdefault(trainlabel, "selected", "")             # <<<<<<<<<<<<<<
 *         if st:
 *             return [int(val) for val in st.split(',')]
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_modelconf); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 723, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_key};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 723, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_key};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 723, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 723, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_key);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 723, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getdefault); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_trainlabel, __pyx_n_u_selected, __pyx_kp_u__4};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 723, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_trainlabel, __pyx_n_u_selected, __pyx_kp_u__4};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 723, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 723, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_trainlabel);
    __Pyx_GIVEREF(__pyx_v_trainlabel);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_v_trainlabel);
    __Pyx_INCREF(__pyx_n_u_selected);
    __Pyx_GIVEREF(__pyx_n_u_selected);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_n_u_selected);
    __Pyx_INCREF(__pyx_kp_u__4);
    __Pyx_GIVEREF(__pyx_kp_u__4);
    PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_7, __pyx_kp_u__4);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 723, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_st = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":724
 *             trainlabel = "training"
 *         st = self.modelconf(key).getdefault(trainlabel, "selected", "")
 *         if st:             # <<<<<<<<<<<<<<
 *             return [int(val) for val in st.split(',')]
 *         return []
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_st); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 724, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":725
 *         st = self.modelconf(key).getdefault(trainlabel, "selected", "")
 *         if st:
 *             return [int(val) for val in st.split(',')]             # <<<<<<<<<<<<<<
 *         return []
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 725, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_st, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 725, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 725, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
        __pyx_t_4 = __pyx_t_6; __Pyx_INCREF(__pyx_t_4); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
      } else {
        __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 725, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 725, __pyx_L7_error)
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      for (;;) {
        if (likely(!__pyx_t_9)) {
          if (likely(PyList_CheckExact(__pyx_t_4))) {
            if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 725, __pyx_L7_error)
            #else
            __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 725, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_6);
            #endif
          } else {
            if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 725, __pyx_L7_error)
            #else
            __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 725, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_6);
            #endif
          }
        } else {
          __pyx_t_6 = __pyx_t_9(__pyx_t_4);
          if (unlikely(!__pyx_t_6)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 725, __pyx_L7_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_6);
        }
        __Pyx_XDECREF_SET(__pyx_9genexpr13__pyx_v_val, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_9genexpr13__pyx_v_val); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 725, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 725, __pyx_L7_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_val); __pyx_9genexpr13__pyx_v_val = 0;
      goto __pyx_L10_exit_scope;
      __pyx_L7_error:;
      __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_val); __pyx_9genexpr13__pyx_v_val = 0;
      goto __pyx_L1_error;
      __pyx_L10_exit_scope:;
    } /* exit inner scope */
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":724
 *             trainlabel = "training"
 *         st = self.modelconf(key).getdefault(trainlabel, "selected", "")
 *         if st:             # <<<<<<<<<<<<<<
 *             return [int(val) for val in st.split(',')]
 *         return []
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":726
 *         if st:
 *             return [int(val) for val in st.split(',')]
 *         return []             # <<<<<<<<<<<<<<
 * 
 *     def getTargetsFromFile(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":718
 *             ff.close()
 * 
 *     def modelSelected(self, key, ppty):             # <<<<<<<<<<<<<<
 *         if ppty:
 *             trainlabel = "training_%s"% ppty
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.modelSelected", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_trainlabel);
  __Pyx_XDECREF(__pyx_v_st);
  __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":728
 *         return []
 * 
 *     def getTargetsFromFile(self):             # <<<<<<<<<<<<<<
 *         pathname = self.getProjectConf("general", "workingdir", "")
 *         filename = os.path.join(pathname, "properties", self.curproperty)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_27getTargetsFromFile(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_27getTargetsFromFile = {"getTargetsFromFile", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_27getTargetsFromFile, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_27getTargetsFromFile(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTargetsFromFile (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_26getTargetsFromFile(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_26getTargetsFromFile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_pathname = NULL;
  PyObject *__pyx_v_filename = NULL;
  PyObject *__pyx_v_targets = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("getTargetsFromFile", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":729
 * 
 *     def getTargetsFromFile(self):
 *         pathname = self.getProjectConf("general", "workingdir", "")             # <<<<<<<<<<<<<<
 *         filename = os.path.join(pathname, "properties", self.curproperty)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getProjectConf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_pathname = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":730
 *     def getTargetsFromFile(self):
 *         pathname = self.getProjectConf("general", "workingdir", "")
 *         filename = os.path.join(pathname, "properties", self.curproperty)             # <<<<<<<<<<<<<<
 * 
 *         targets = np.loadtxt(filename)
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_join); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_curproperty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_pathname, __pyx_n_u_properties, __pyx_t_3};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 730, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_pathname, __pyx_n_u_properties, __pyx_t_3};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 730, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 730, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_v_pathname);
    __Pyx_GIVEREF(__pyx_v_pathname);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_pathname);
    __Pyx_INCREF(__pyx_n_u_properties);
    __Pyx_GIVEREF(__pyx_n_u_properties);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_n_u_properties);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 730, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_filename = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":732
 *         filename = os.path.join(pathname, "properties", self.curproperty)
 * 
 *         targets = np.loadtxt(filename)             # <<<<<<<<<<<<<<
 *         return targets
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_loadtxt); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_1) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_filename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_filename};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 732, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_filename};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 732, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 732, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = NULL;
      __Pyx_INCREF(__pyx_v_filename);
      __Pyx_GIVEREF(__pyx_v_filename);
      PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_filename);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 732, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_targets = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":733
 * 
 *         targets = np.loadtxt(filename)
 *         return targets             # <<<<<<<<<<<<<<
 * 
 *     def ModelCfgItems(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_targets);
  __pyx_r = __pyx_v_targets;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":728
 *         return []
 * 
 *     def getTargetsFromFile(self):             # <<<<<<<<<<<<<<
 *         pathname = self.getProjectConf("general", "workingdir", "")
 *         filename = os.path.join(pathname, "properties", self.curproperty)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.getTargetsFromFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pathname);
  __Pyx_XDECREF(__pyx_v_filename);
  __Pyx_XDECREF(__pyx_v_targets);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":735
 *         return targets
 * 
 *     def ModelCfgItems(self):             # <<<<<<<<<<<<<<
 *         return [(key, self.getProjectConf("projects", key, "")) for key in self.getProjectConfOptions("projects")]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_29ModelCfgItems(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_29ModelCfgItems = {"ModelCfgItems", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_29ModelCfgItems, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_29ModelCfgItems(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ModelCfgItems (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_28ModelCfgItems(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_28ModelCfgItems(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_9genexpr14__pyx_v_key = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("ModelCfgItems", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":736
 * 
 *     def ModelCfgItems(self):
 *         return [(key, self.getProjectConf("projects", key, "")) for key in self.getProjectConfOptions("projects")]             # <<<<<<<<<<<<<<
 * 
 *     def save(self, index=3):
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getProjectConfOptions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 736, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 736, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 736, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 736, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 736, __pyx_L5_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 736, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 736, __pyx_L5_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 736, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_5(__pyx_t_2);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 736, __pyx_L5_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr14__pyx_v_key, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getProjectConf); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 736, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_8 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_n_u_projects, __pyx_9genexpr14__pyx_v_key, __pyx_kp_u__4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 736, __pyx_L5_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_n_u_projects, __pyx_9genexpr14__pyx_v_key, __pyx_kp_u__4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 736, __pyx_L5_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 736, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__pyx_t_7) {
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
        }
        __Pyx_INCREF(__pyx_n_u_projects);
        __Pyx_GIVEREF(__pyx_n_u_projects);
        PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_n_u_projects);
        __Pyx_INCREF(__pyx_9genexpr14__pyx_v_key);
        __Pyx_GIVEREF(__pyx_9genexpr14__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_9genexpr14__pyx_v_key);
        __Pyx_INCREF(__pyx_kp_u__4);
        __Pyx_GIVEREF(__pyx_kp_u__4);
        PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u__4);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 736, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 736, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_9genexpr14__pyx_v_key);
      __Pyx_GIVEREF(__pyx_9genexpr14__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_9genexpr14__pyx_v_key);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
      __pyx_t_3 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 736, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_9genexpr14__pyx_v_key); __pyx_9genexpr14__pyx_v_key = 0;
    goto __pyx_L8_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_9genexpr14__pyx_v_key); __pyx_9genexpr14__pyx_v_key = 0;
    goto __pyx_L1_error;
    __pyx_L8_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":735
 *         return targets
 * 
 *     def ModelCfgItems(self):             # <<<<<<<<<<<<<<
 *         return [(key, self.getProjectConf("projects", key, "")) for key in self.getProjectConfOptions("projects")]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.ModelCfgItems", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_9genexpr14__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":738
 *         return [(key, self.getProjectConf("projects", key, "")) for key in self.getProjectConfOptions("projects")]
 * 
 *     def save(self, index=3):             # <<<<<<<<<<<<<<
 *         if index & 2:
 *             if not os.path.exists(self.configFile):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_31save(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_31save = {"save", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_31save, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_31save(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("save (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject *)__pyx_int_3));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "save") < 0)) __PYX_ERR(0, 738, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("save", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 738, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.save", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_30save(__pyx_self, __pyx_v_self, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_30save(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_v_path = NULL;
  PyObject *__pyx_v_base = NULL;
  PyObject *__pyx_v_lst = NULL;
  PyObject *__pyx_v_files = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  __Pyx_RefNannySetupContext("save", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":739
 * 
 *     def save(self, index=3):
 *         if index & 2:             # <<<<<<<<<<<<<<
 *             if not os.path.exists(self.configFile):
 *                 path, base = os.path.split(self.configFile)
 */
  __pyx_t_1 = __Pyx_PyInt_AndObjC(__pyx_v_index, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 739, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":740
 *     def save(self, index=3):
 *         if index & 2:
 *             if not os.path.exists(self.configFile):             # <<<<<<<<<<<<<<
 *                 path, base = os.path.split(self.configFile)
 *                 lst = []
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 740, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 740, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_exists); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 740, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_configFile_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 740, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 740, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 740, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = ((!__pyx_t_2) != 0);
    if (__pyx_t_7) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":741
 *         if index & 2:
 *             if not os.path.exists(self.configFile):
 *                 path, base = os.path.split(self.configFile)             # <<<<<<<<<<<<<<
 *                 lst = []
 *                 while not os.path.exists(path):
 */
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 741, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 741, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 741, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_configFile_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 741, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_6};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_6};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 741, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_GIVEREF(__pyx_t_6);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_6);
          __pyx_t_6 = 0;
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
        PyObject* sequence = __pyx_t_1;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 741, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        #else
        __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 741, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 741, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 741, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext;
        index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_3);
        index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_5);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_6), 2) < 0) __PYX_ERR(0, 741, __pyx_L1_error)
        __pyx_t_8 = NULL;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L6_unpacking_done;
        __pyx_L5_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_8 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 741, __pyx_L1_error)
        __pyx_L6_unpacking_done:;
      }
      __pyx_v_path = __pyx_t_3;
      __pyx_t_3 = 0;
      __pyx_v_base = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":742
 *             if not os.path.exists(self.configFile):
 *                 path, base = os.path.split(self.configFile)
 *                 lst = []             # <<<<<<<<<<<<<<
 *                 while not os.path.exists(path):
 *                     path, base = os.path.split(path)
 */
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_lst = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":743
 *                 path, base = os.path.split(self.configFile)
 *                 lst = []
 *                 while not os.path.exists(path):             # <<<<<<<<<<<<<<
 *                     path, base = os.path.split(path)
 *                     lst.append(base)
 */
      while (1) {
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 743, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 743, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_exists); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 743, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
          }
        }
        if (!__pyx_t_3) {
          __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 743, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_path};
            __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 743, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_GOTREF(__pyx_t_1);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_path};
            __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 743, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_GOTREF(__pyx_t_1);
          } else
          #endif
          {
            __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 743, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_v_path);
            __Pyx_GIVEREF(__pyx_v_path);
            PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_path);
            __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 743, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 743, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_2 = ((!__pyx_t_7) != 0);
        if (!__pyx_t_2) break;

        /* "metaphor/chem_gm/core/gmtoolbox.py":744
 *                 lst = []
 *                 while not os.path.exists(path):
 *                     path, base = os.path.split(path)             # <<<<<<<<<<<<<<
 *                     lst.append(base)
 *                 while len(lst):
 */
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 744, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 744, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 744, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
          }
        }
        if (!__pyx_t_6) {
          __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_path};
            __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_GOTREF(__pyx_t_1);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_path};
            __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_GOTREF(__pyx_t_1);
          } else
          #endif
          {
            __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 744, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL;
            __Pyx_INCREF(__pyx_v_path);
            __Pyx_GIVEREF(__pyx_v_path);
            PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_path);
            __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
          PyObject* sequence = __pyx_t_1;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(0, 744, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_3);
          #else
          __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 744, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 744, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 744, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext;
          index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L9_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_5);
          index = 1; __pyx_t_3 = __pyx_t_8(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L9_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_3);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_6), 2) < 0) __PYX_ERR(0, 744, __pyx_L1_error)
          __pyx_t_8 = NULL;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          goto __pyx_L10_unpacking_done;
          __pyx_L9_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_8 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 744, __pyx_L1_error)
          __pyx_L10_unpacking_done:;
        }
        __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_base, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":745
 *                 while not os.path.exists(path):
 *                     path, base = os.path.split(path)
 *                     lst.append(base)             # <<<<<<<<<<<<<<
 *                 while len(lst):
 *                     base = lst.pop(-1)
 */
        __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_lst, __pyx_v_base); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 745, __pyx_L1_error)
      }

      /* "metaphor/chem_gm/core/gmtoolbox.py":746
 *                     path, base = os.path.split(path)
 *                     lst.append(base)
 *                 while len(lst):             # <<<<<<<<<<<<<<
 *                     base = lst.pop(-1)
 *                     path = os.path.join(path, base)
 */
      while (1) {
        __pyx_t_10 = PyList_GET_SIZE(__pyx_v_lst); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 746, __pyx_L1_error)
        __pyx_t_2 = (__pyx_t_10 != 0);
        if (!__pyx_t_2) break;

        /* "metaphor/chem_gm/core/gmtoolbox.py":747
 *                     lst.append(base)
 *                 while len(lst):
 *                     base = lst.pop(-1)             # <<<<<<<<<<<<<<
 *                     path = os.path.join(path, base)
 *                     make_dir(path, True, self.writer)
 */
        __pyx_t_1 = __Pyx_PyList_PopIndex(__pyx_v_lst, __pyx_int_neg_1, -1L, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 747, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF_SET(__pyx_v_base, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":748
 *                 while len(lst):
 *                     base = lst.pop(-1)
 *                     path = os.path.join(path, base)             # <<<<<<<<<<<<<<
 *                     make_dir(path, True, self.writer)
 * 
 */
        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 748, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 748, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_join); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 748, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = NULL;
        __pyx_t_11 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_11 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_path, __pyx_v_base};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_path, __pyx_v_base};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 748, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_5) {
            __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
          }
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_11, __pyx_v_path);
          __Pyx_INCREF(__pyx_v_base);
          __Pyx_GIVEREF(__pyx_v_base);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_11, __pyx_v_base);
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":749
 *                     base = lst.pop(-1)
 *                     path = os.path.join(path, base)
 *                     make_dir(path, True, self.writer)             # <<<<<<<<<<<<<<
 * 
 *             files = open(self.configFile, 'w+')
 */
        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_dir); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 749, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_writer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 749, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_5 = NULL;
        __pyx_t_11 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_11 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_path, Py_True, __pyx_t_6};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_path, Py_True, __pyx_t_6};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        } else
        #endif
        {
          __pyx_t_4 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 749, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (__pyx_t_5) {
            __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
          }
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_11, __pyx_v_path);
          __Pyx_INCREF(Py_True);
          __Pyx_GIVEREF(Py_True);
          PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_11, Py_True);
          __Pyx_GIVEREF(__pyx_t_6);
          PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_11, __pyx_t_6);
          __pyx_t_6 = 0;
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }

      /* "metaphor/chem_gm/core/gmtoolbox.py":740
 *     def save(self, index=3):
 *         if index & 2:
 *             if not os.path.exists(self.configFile):             # <<<<<<<<<<<<<<
 *                 path, base = os.path.split(self.configFile)
 *                 lst = []
 */
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":751
 *                     make_dir(path, True, self.writer)
 * 
 *             files = open(self.configFile, 'w+')             # <<<<<<<<<<<<<<
 *             self._projectConf.write(files)
 *             files.close()
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_configFile_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
    __Pyx_INCREF(__pyx_kp_u_w_2);
    __Pyx_GIVEREF(__pyx_kp_u_w_2);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_u_w_2);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_files = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":752
 * 
 *             files = open(self.configFile, 'w+')
 *             self._projectConf.write(files)             # <<<<<<<<<<<<<<
 *             files.close()
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 752, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 752, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_files); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 752, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_files};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 752, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_files};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 752, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 752, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_v_files);
        __Pyx_GIVEREF(__pyx_v_files);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_files);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 752, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":753
 *             files = open(self.configFile, 'w+')
 *             self._projectConf.write(files)
 *             files.close()             # <<<<<<<<<<<<<<
 * 
 *     def getDefault(self, section, option, default, docreate=False):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_files, __pyx_n_s_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 753, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_6) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 753, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 753, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":739
 * 
 *     def save(self, index=3):
 *         if index & 2:             # <<<<<<<<<<<<<<
 *             if not os.path.exists(self.configFile):
 *                 path, base = os.path.split(self.configFile)
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":738
 *         return [(key, self.getProjectConf("projects", key, "")) for key in self.getProjectConfOptions("projects")]
 * 
 *     def save(self, index=3):             # <<<<<<<<<<<<<<
 *         if index & 2:
 *             if not os.path.exists(self.configFile):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.save", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_path);
  __Pyx_XDECREF(__pyx_v_base);
  __Pyx_XDECREF(__pyx_v_lst);
  __Pyx_XDECREF(__pyx_v_files);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":755
 *             files.close()
 * 
 *     def getDefault(self, section, option, default, docreate=False):             # <<<<<<<<<<<<<<
 *         return self._getFromConf(self.defaultConf, section, option, default, docreate)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_33getDefault(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_33getDefault = {"getDefault", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_33getDefault, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_33getDefault(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_section = 0;
  PyObject *__pyx_v_option = 0;
  PyObject *__pyx_v_default = 0;
  PyObject *__pyx_v_docreate = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getDefault (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_section,&__pyx_n_s_option,&__pyx_n_s_default,&__pyx_n_s_docreate,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[4] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_section)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getDefault", 0, 4, 5, 1); __PYX_ERR(0, 755, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_option)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getDefault", 0, 4, 5, 2); __PYX_ERR(0, 755, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getDefault", 0, 4, 5, 3); __PYX_ERR(0, 755, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_docreate);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getDefault") < 0)) __PYX_ERR(0, 755, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_section = values[1];
    __pyx_v_option = values[2];
    __pyx_v_default = values[3];
    __pyx_v_docreate = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getDefault", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 755, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.getDefault", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_32getDefault(__pyx_self, __pyx_v_self, __pyx_v_section, __pyx_v_option, __pyx_v_default, __pyx_v_docreate);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_32getDefault(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_section, PyObject *__pyx_v_option, PyObject *__pyx_v_default, PyObject *__pyx_v_docreate) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("getDefault", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":756
 * 
 *     def getDefault(self, section, option, default, docreate=False):
 *         return self._getFromConf(self.defaultConf, section, option, default, docreate)             # <<<<<<<<<<<<<<
 * 
 *     def getProjectConf(self, section, option, default, docreate=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getFromConf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_defaultConf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_4, __pyx_t_3, __pyx_v_section, __pyx_v_option, __pyx_v_default, __pyx_v_docreate};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 5+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 756, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_4, __pyx_t_3, __pyx_v_section, __pyx_v_option, __pyx_v_default, __pyx_v_docreate};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 5+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 756, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(5+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 756, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_section);
    __Pyx_GIVEREF(__pyx_v_section);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_section);
    __Pyx_INCREF(__pyx_v_option);
    __Pyx_GIVEREF(__pyx_v_option);
    PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_option);
    __Pyx_INCREF(__pyx_v_default);
    __Pyx_GIVEREF(__pyx_v_default);
    PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_v_default);
    __Pyx_INCREF(__pyx_v_docreate);
    __Pyx_GIVEREF(__pyx_v_docreate);
    PyTuple_SET_ITEM(__pyx_t_6, 4+__pyx_t_5, __pyx_v_docreate);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 756, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":755
 *             files.close()
 * 
 *     def getDefault(self, section, option, default, docreate=False):             # <<<<<<<<<<<<<<
 *         return self._getFromConf(self.defaultConf, section, option, default, docreate)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.getDefault", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":758
 *         return self._getFromConf(self.defaultConf, section, option, default, docreate)
 * 
 *     def getProjectConf(self, section, option, default, docreate=False):             # <<<<<<<<<<<<<<
 *         return self._getFromConf(self.projectConf, section, option, default, docreate)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_35getProjectConf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_35getProjectConf = {"getProjectConf", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_35getProjectConf, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_35getProjectConf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_section = 0;
  PyObject *__pyx_v_option = 0;
  PyObject *__pyx_v_default = 0;
  PyObject *__pyx_v_docreate = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getProjectConf (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_section,&__pyx_n_s_option,&__pyx_n_s_default,&__pyx_n_s_docreate,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[4] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_section)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getProjectConf", 0, 4, 5, 1); __PYX_ERR(0, 758, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_option)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getProjectConf", 0, 4, 5, 2); __PYX_ERR(0, 758, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getProjectConf", 0, 4, 5, 3); __PYX_ERR(0, 758, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_docreate);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getProjectConf") < 0)) __PYX_ERR(0, 758, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_section = values[1];
    __pyx_v_option = values[2];
    __pyx_v_default = values[3];
    __pyx_v_docreate = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getProjectConf", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 758, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.getProjectConf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_34getProjectConf(__pyx_self, __pyx_v_self, __pyx_v_section, __pyx_v_option, __pyx_v_default, __pyx_v_docreate);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_34getProjectConf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_section, PyObject *__pyx_v_option, PyObject *__pyx_v_default, PyObject *__pyx_v_docreate) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("getProjectConf", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":759
 * 
 *     def getProjectConf(self, section, option, default, docreate=False):
 *         return self._getFromConf(self.projectConf, section, option, default, docreate)             # <<<<<<<<<<<<<<
 * 
 *     def _getFromConf(self, conf, section, option, default, docreate=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getFromConf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_4, __pyx_t_3, __pyx_v_section, __pyx_v_option, __pyx_v_default, __pyx_v_docreate};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 5+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 759, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_4, __pyx_t_3, __pyx_v_section, __pyx_v_option, __pyx_v_default, __pyx_v_docreate};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 5+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 759, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(5+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_section);
    __Pyx_GIVEREF(__pyx_v_section);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_section);
    __Pyx_INCREF(__pyx_v_option);
    __Pyx_GIVEREF(__pyx_v_option);
    PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_option);
    __Pyx_INCREF(__pyx_v_default);
    __Pyx_GIVEREF(__pyx_v_default);
    PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_v_default);
    __Pyx_INCREF(__pyx_v_docreate);
    __Pyx_GIVEREF(__pyx_v_docreate);
    PyTuple_SET_ITEM(__pyx_t_6, 4+__pyx_t_5, __pyx_v_docreate);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":758
 *         return self._getFromConf(self.defaultConf, section, option, default, docreate)
 * 
 *     def getProjectConf(self, section, option, default, docreate=False):             # <<<<<<<<<<<<<<
 *         return self._getFromConf(self.projectConf, section, option, default, docreate)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.getProjectConf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":761
 *         return self._getFromConf(self.projectConf, section, option, default, docreate)
 * 
 *     def _getFromConf(self, conf, section, option, default, docreate=False):             # <<<<<<<<<<<<<<
 *         if conf.has_section(section) and conf.has_option(section, option):
 *             try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_37_getFromConf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_37_getFromConf = {"_getFromConf", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_37_getFromConf, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_37_getFromConf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_conf = 0;
  PyObject *__pyx_v_section = 0;
  PyObject *__pyx_v_option = 0;
  PyObject *__pyx_v_default = 0;
  PyObject *__pyx_v_docreate = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getFromConf (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_conf,&__pyx_n_s_section,&__pyx_n_s_option,&__pyx_n_s_default,&__pyx_n_s_docreate,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    values[5] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_conf)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_getFromConf", 0, 5, 6, 1); __PYX_ERR(0, 761, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_section)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_getFromConf", 0, 5, 6, 2); __PYX_ERR(0, 761, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_option)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_getFromConf", 0, 5, 6, 3); __PYX_ERR(0, 761, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_getFromConf", 0, 5, 6, 4); __PYX_ERR(0, 761, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_docreate);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_getFromConf") < 0)) __PYX_ERR(0, 761, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_conf = values[1];
    __pyx_v_section = values[2];
    __pyx_v_option = values[3];
    __pyx_v_default = values[4];
    __pyx_v_docreate = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_getFromConf", 0, 5, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 761, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine._getFromConf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_36_getFromConf(__pyx_self, __pyx_v_self, __pyx_v_conf, __pyx_v_section, __pyx_v_option, __pyx_v_default, __pyx_v_docreate);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_36_getFromConf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_conf, PyObject *__pyx_v_section, PyObject *__pyx_v_option, PyObject *__pyx_v_default, PyObject *__pyx_v_docreate) {
  PyObject *__pyx_v_st = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  __Pyx_RefNannySetupContext("_getFromConf", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":762
 * 
 *     def _getFromConf(self, conf, section, option, default, docreate=False):
 *         if conf.has_section(section) and conf.has_option(section, option):             # <<<<<<<<<<<<<<
 *             try:
 *                 if isinstance(default, bool):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_conf, __pyx_n_s_has_section); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_section); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_section};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_section};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 762, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_v_section);
      __Pyx_GIVEREF(__pyx_v_section);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_section);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_conf, __pyx_n_s_has_option); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_section, __pyx_v_option};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_section, __pyx_v_option};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_INCREF(__pyx_v_section);
    __Pyx_GIVEREF(__pyx_v_section);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_7, __pyx_v_section);
    __Pyx_INCREF(__pyx_v_option);
    __Pyx_GIVEREF(__pyx_v_option);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_v_option);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":763
 *     def _getFromConf(self, conf, section, option, default, docreate=False):
 *         if conf.has_section(section) and conf.has_option(section, option):
 *             try:             # <<<<<<<<<<<<<<
 *                 if isinstance(default, bool):
 *                     try:
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      /*try:*/ {

        /* "metaphor/chem_gm/core/gmtoolbox.py":764
 *         if conf.has_section(section) and conf.has_option(section, option):
 *             try:
 *                 if isinstance(default, bool):             # <<<<<<<<<<<<<<
 *                     try:
 *                         return bool(conf.getint(section, option))
 */
        __pyx_t_2 = ((PyObject*)&PyBool_Type);
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_1 = PyObject_IsInstance(__pyx_v_default, __pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 764, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_6 = (__pyx_t_1 != 0);
        if (__pyx_t_6) {

          /* "metaphor/chem_gm/core/gmtoolbox.py":765
 *             try:
 *                 if isinstance(default, bool):
 *                     try:             # <<<<<<<<<<<<<<
 *                         return bool(conf.getint(section, option))
 *                     except:
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
            __Pyx_XGOTREF(__pyx_t_11);
            __Pyx_XGOTREF(__pyx_t_12);
            __Pyx_XGOTREF(__pyx_t_13);
            /*try:*/ {

              /* "metaphor/chem_gm/core/gmtoolbox.py":766
 *                 if isinstance(default, bool):
 *                     try:
 *                         return bool(conf.getint(section, option))             # <<<<<<<<<<<<<<
 *                     except:
 *                         st = conf.get(section, option)
 */
              __Pyx_XDECREF(__pyx_r);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_conf, __pyx_n_s_getint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 766, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_4 = NULL;
              __pyx_t_7 = 0;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_4)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_4);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_7 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_section, __pyx_v_option};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 766, __pyx_L13_error)
                __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_GOTREF(__pyx_t_2);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_section, __pyx_v_option};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 766, __pyx_L13_error)
                __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_GOTREF(__pyx_t_2);
              } else
              #endif
              {
                __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 766, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_5);
                if (__pyx_t_4) {
                  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
                }
                __Pyx_INCREF(__pyx_v_section);
                __Pyx_GIVEREF(__pyx_v_section);
                PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_v_section);
                __Pyx_INCREF(__pyx_v_option);
                __Pyx_GIVEREF(__pyx_v_option);
                PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_v_option);
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 766, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 766, __pyx_L13_error)
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 766, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_r = __pyx_t_2;
              __pyx_t_2 = 0;
              goto __pyx_L17_try_return;

              /* "metaphor/chem_gm/core/gmtoolbox.py":765
 *             try:
 *                 if isinstance(default, bool):
 *                     try:             # <<<<<<<<<<<<<<
 *                         return bool(conf.getint(section, option))
 *                     except:
 */
            }
            __pyx_L13_error:;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "metaphor/chem_gm/core/gmtoolbox.py":767
 *                     try:
 *                         return bool(conf.getint(section, option))
 *                     except:             # <<<<<<<<<<<<<<
 *                         st = conf.get(section, option)
 *                         return st.lower() == 'true'
 */
            /*except:*/ {
              __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine._getFromConf", __pyx_clineno, __pyx_lineno, __pyx_filename);
              if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(0, 767, __pyx_L15_except_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_GOTREF(__pyx_t_5);

              /* "metaphor/chem_gm/core/gmtoolbox.py":768
 *                         return bool(conf.getint(section, option))
 *                     except:
 *                         st = conf.get(section, option)             # <<<<<<<<<<<<<<
 *                         return st.lower() == 'true'
 *                     #return default
 */
              __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 768, __pyx_L15_except_error)
              __Pyx_GOTREF(__pyx_t_14);
              __pyx_t_15 = NULL;
              __pyx_t_7 = 0;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
                __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14);
                if (likely(__pyx_t_15)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
                  __Pyx_INCREF(__pyx_t_15);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_14, function);
                  __pyx_t_7 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_14)) {
                PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_v_section, __pyx_v_option};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 768, __pyx_L15_except_error)
                __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
                PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_v_section, __pyx_v_option};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 768, __pyx_L15_except_error)
                __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_16 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 768, __pyx_L15_except_error)
                __Pyx_GOTREF(__pyx_t_16);
                if (__pyx_t_15) {
                  __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15); __pyx_t_15 = NULL;
                }
                __Pyx_INCREF(__pyx_v_section);
                __Pyx_GIVEREF(__pyx_v_section);
                PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_7, __pyx_v_section);
                __Pyx_INCREF(__pyx_v_option);
                __Pyx_GIVEREF(__pyx_v_option);
                PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_7, __pyx_v_option);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_16, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 768, __pyx_L15_except_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
              }
              __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
              __pyx_v_st = __pyx_t_4;
              __pyx_t_4 = 0;

              /* "metaphor/chem_gm/core/gmtoolbox.py":769
 *                     except:
 *                         st = conf.get(section, option)
 *                         return st.lower() == 'true'             # <<<<<<<<<<<<<<
 *                     #return default
 *                 if isinstance(default, int):
 */
              __Pyx_XDECREF(__pyx_r);
              __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_st, __pyx_n_s_lower); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 769, __pyx_L15_except_error)
              __Pyx_GOTREF(__pyx_t_14);
              __pyx_t_16 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
                __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_14);
                if (likely(__pyx_t_16)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
                  __Pyx_INCREF(__pyx_t_16);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_14, function);
                }
              }
              if (__pyx_t_16) {
                __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 769, __pyx_L15_except_error)
                __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
              } else {
                __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 769, __pyx_L15_except_error)
              }
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
              __pyx_t_14 = PyObject_RichCompare(__pyx_t_4, __pyx_n_u_true, Py_EQ); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 769, __pyx_L15_except_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_r = __pyx_t_14;
              __pyx_t_14 = 0;
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              goto __pyx_L16_except_return;
            }
            __pyx_L15_except_error:;

            /* "metaphor/chem_gm/core/gmtoolbox.py":765
 *             try:
 *                 if isinstance(default, bool):
 *                     try:             # <<<<<<<<<<<<<<
 *                         return bool(conf.getint(section, option))
 *                     except:
 */
            __Pyx_XGIVEREF(__pyx_t_11);
            __Pyx_XGIVEREF(__pyx_t_12);
            __Pyx_XGIVEREF(__pyx_t_13);
            __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
            goto __pyx_L6_error;
            __pyx_L17_try_return:;
            __Pyx_XGIVEREF(__pyx_t_11);
            __Pyx_XGIVEREF(__pyx_t_12);
            __Pyx_XGIVEREF(__pyx_t_13);
            __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
            goto __pyx_L10_try_return;
            __pyx_L16_except_return:;
            __Pyx_XGIVEREF(__pyx_t_11);
            __Pyx_XGIVEREF(__pyx_t_12);
            __Pyx_XGIVEREF(__pyx_t_13);
            __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
            goto __pyx_L10_try_return;
          }

          /* "metaphor/chem_gm/core/gmtoolbox.py":764
 *         if conf.has_section(section) and conf.has_option(section, option):
 *             try:
 *                 if isinstance(default, bool):             # <<<<<<<<<<<<<<
 *                     try:
 *                         return bool(conf.getint(section, option))
 */
        }

        /* "metaphor/chem_gm/core/gmtoolbox.py":771
 *                         return st.lower() == 'true'
 *                     #return default
 *                 if isinstance(default, int):             # <<<<<<<<<<<<<<
 *                     return conf.getint(section, option)
 *                 if isinstance(default, float):
 */
        __pyx_t_6 = PyInt_Check(__pyx_v_default); 
        __pyx_t_1 = (__pyx_t_6 != 0);
        if (__pyx_t_1) {

          /* "metaphor/chem_gm/core/gmtoolbox.py":772
 *                     #return default
 *                 if isinstance(default, int):
 *                     return conf.getint(section, option)             # <<<<<<<<<<<<<<
 *                 if isinstance(default, float):
 *                     return conf.getfloat(section, option)
 */
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_conf, __pyx_n_s_getint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 772, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = NULL;
          __pyx_t_7 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_2)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
              __pyx_t_7 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_3)) {
            PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_section, __pyx_v_option};
            __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 772, __pyx_L6_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_5);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
            PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_section, __pyx_v_option};
            __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 772, __pyx_L6_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_5);
          } else
          #endif
          {
            __pyx_t_14 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 772, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_14);
            if (__pyx_t_2) {
              __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_2); __pyx_t_2 = NULL;
            }
            __Pyx_INCREF(__pyx_v_section);
            __Pyx_GIVEREF(__pyx_v_section);
            PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_7, __pyx_v_section);
            __Pyx_INCREF(__pyx_v_option);
            __Pyx_GIVEREF(__pyx_v_option);
            PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_7, __pyx_v_option);
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_14, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 772, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_r = __pyx_t_5;
          __pyx_t_5 = 0;
          goto __pyx_L10_try_return;

          /* "metaphor/chem_gm/core/gmtoolbox.py":771
 *                         return st.lower() == 'true'
 *                     #return default
 *                 if isinstance(default, int):             # <<<<<<<<<<<<<<
 *                     return conf.getint(section, option)
 *                 if isinstance(default, float):
 */
        }

        /* "metaphor/chem_gm/core/gmtoolbox.py":773
 *                 if isinstance(default, int):
 *                     return conf.getint(section, option)
 *                 if isinstance(default, float):             # <<<<<<<<<<<<<<
 *                     return conf.getfloat(section, option)
 *                 st = conf.get(section, option)
 */
        __pyx_t_1 = PyFloat_Check(__pyx_v_default); 
        __pyx_t_6 = (__pyx_t_1 != 0);
        if (__pyx_t_6) {

          /* "metaphor/chem_gm/core/gmtoolbox.py":774
 *                     return conf.getint(section, option)
 *                 if isinstance(default, float):
 *                     return conf.getfloat(section, option)             # <<<<<<<<<<<<<<
 *                 st = conf.get(section, option)
 *                 if docreate and default and not st:
 */
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_conf, __pyx_n_s_getfloat); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 774, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_14 = NULL;
          __pyx_t_7 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_14)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_14);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
              __pyx_t_7 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_3)) {
            PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_v_section, __pyx_v_option};
            __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 774, __pyx_L6_error)
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_GOTREF(__pyx_t_5);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
            PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_v_section, __pyx_v_option};
            __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 774, __pyx_L6_error)
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_GOTREF(__pyx_t_5);
          } else
          #endif
          {
            __pyx_t_2 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 774, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (__pyx_t_14) {
              __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_14); __pyx_t_14 = NULL;
            }
            __Pyx_INCREF(__pyx_v_section);
            __Pyx_GIVEREF(__pyx_v_section);
            PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_7, __pyx_v_section);
            __Pyx_INCREF(__pyx_v_option);
            __Pyx_GIVEREF(__pyx_v_option);
            PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_7, __pyx_v_option);
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 774, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_r = __pyx_t_5;
          __pyx_t_5 = 0;
          goto __pyx_L10_try_return;

          /* "metaphor/chem_gm/core/gmtoolbox.py":773
 *                 if isinstance(default, int):
 *                     return conf.getint(section, option)
 *                 if isinstance(default, float):             # <<<<<<<<<<<<<<
 *                     return conf.getfloat(section, option)
 *                 st = conf.get(section, option)
 */
        }

        /* "metaphor/chem_gm/core/gmtoolbox.py":775
 *                 if isinstance(default, float):
 *                     return conf.getfloat(section, option)
 *                 st = conf.get(section, option)             # <<<<<<<<<<<<<<
 *                 if docreate and default and not st:
 *                     if conf == self.defaultConf:
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_conf, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 775, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_7 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_section, __pyx_v_option};
          __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 775, __pyx_L6_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_5);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_section, __pyx_v_option};
          __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 775, __pyx_L6_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_5);
        } else
        #endif
        {
          __pyx_t_14 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 775, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_14);
          if (__pyx_t_2) {
            __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_2); __pyx_t_2 = NULL;
          }
          __Pyx_INCREF(__pyx_v_section);
          __Pyx_GIVEREF(__pyx_v_section);
          PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_7, __pyx_v_section);
          __Pyx_INCREF(__pyx_v_option);
          __Pyx_GIVEREF(__pyx_v_option);
          PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_7, __pyx_v_option);
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_14, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 775, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_v_st = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":776
 *                     return conf.getfloat(section, option)
 *                 st = conf.get(section, option)
 *                 if docreate and default and not st:             # <<<<<<<<<<<<<<
 *                     if conf == self.defaultConf:
 *                         self.defaultModified= True
 */
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_docreate); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 776, __pyx_L6_error)
        if (__pyx_t_1) {
        } else {
          __pyx_t_6 = __pyx_t_1;
          goto __pyx_L24_bool_binop_done;
        }
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_default); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 776, __pyx_L6_error)
        if (__pyx_t_1) {
        } else {
          __pyx_t_6 = __pyx_t_1;
          goto __pyx_L24_bool_binop_done;
        }
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_st); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 776, __pyx_L6_error)
        __pyx_t_17 = ((!__pyx_t_1) != 0);
        __pyx_t_6 = __pyx_t_17;
        __pyx_L24_bool_binop_done:;
        if (__pyx_t_6) {

          /* "metaphor/chem_gm/core/gmtoolbox.py":777
 *                 st = conf.get(section, option)
 *                 if docreate and default and not st:
 *                     if conf == self.defaultConf:             # <<<<<<<<<<<<<<
 *                         self.defaultModified= True
 *                     conf.set(section, option, default)
 */
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_defaultConf); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 777, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_3 = PyObject_RichCompare(__pyx_v_conf, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 777, __pyx_L6_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 777, __pyx_L6_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (__pyx_t_6) {

            /* "metaphor/chem_gm/core/gmtoolbox.py":778
 *                 if docreate and default and not st:
 *                     if conf == self.defaultConf:
 *                         self.defaultModified= True             # <<<<<<<<<<<<<<
 *                     conf.set(section, option, default)
 *                 return st if st else default
 */
            if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_defaultModified, Py_True) < 0) __PYX_ERR(0, 778, __pyx_L6_error)

            /* "metaphor/chem_gm/core/gmtoolbox.py":777
 *                 st = conf.get(section, option)
 *                 if docreate and default and not st:
 *                     if conf == self.defaultConf:             # <<<<<<<<<<<<<<
 *                         self.defaultModified= True
 *                     conf.set(section, option, default)
 */
          }

          /* "metaphor/chem_gm/core/gmtoolbox.py":779
 *                     if conf == self.defaultConf:
 *                         self.defaultModified= True
 *                     conf.set(section, option, default)             # <<<<<<<<<<<<<<
 *                 return st if st else default
 *             except ValueError:  #, NoOptionError:
 */
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_conf, __pyx_n_s_set); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 779, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_14 = NULL;
          __pyx_t_7 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
            __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_5);
            if (likely(__pyx_t_14)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_14);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_5, function);
              __pyx_t_7 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[4] = {__pyx_t_14, __pyx_v_section, __pyx_v_option, __pyx_v_default};
            __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 779, __pyx_L6_error)
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_GOTREF(__pyx_t_3);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[4] = {__pyx_t_14, __pyx_v_section, __pyx_v_option, __pyx_v_default};
            __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 779, __pyx_L6_error)
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_GOTREF(__pyx_t_3);
          } else
          #endif
          {
            __pyx_t_2 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 779, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (__pyx_t_14) {
              __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_14); __pyx_t_14 = NULL;
            }
            __Pyx_INCREF(__pyx_v_section);
            __Pyx_GIVEREF(__pyx_v_section);
            PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_7, __pyx_v_section);
            __Pyx_INCREF(__pyx_v_option);
            __Pyx_GIVEREF(__pyx_v_option);
            PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_7, __pyx_v_option);
            __Pyx_INCREF(__pyx_v_default);
            __Pyx_GIVEREF(__pyx_v_default);
            PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_7, __pyx_v_default);
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 779, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          }
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "metaphor/chem_gm/core/gmtoolbox.py":776
 *                     return conf.getfloat(section, option)
 *                 st = conf.get(section, option)
 *                 if docreate and default and not st:             # <<<<<<<<<<<<<<
 *                     if conf == self.defaultConf:
 *                         self.defaultModified= True
 */
        }

        /* "metaphor/chem_gm/core/gmtoolbox.py":780
 *                         self.defaultModified= True
 *                     conf.set(section, option, default)
 *                 return st if st else default             # <<<<<<<<<<<<<<
 *             except ValueError:  #, NoOptionError:
 *                 return default
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_st); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 780, __pyx_L6_error)
        if (__pyx_t_6) {
          __Pyx_INCREF(__pyx_v_st);
          __pyx_t_3 = __pyx_v_st;
        } else {
          __Pyx_INCREF(__pyx_v_default);
          __pyx_t_3 = __pyx_v_default;
        }
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L10_try_return;

        /* "metaphor/chem_gm/core/gmtoolbox.py":763
 *     def _getFromConf(self, conf, section, option, default, docreate=False):
 *         if conf.has_section(section) and conf.has_option(section, option):
 *             try:             # <<<<<<<<<<<<<<
 *                 if isinstance(default, bool):
 *                     try:
 */
      }
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":781
 *                     conf.set(section, option, default)
 *                 return st if st else default
 *             except ValueError:  #, NoOptionError:             # <<<<<<<<<<<<<<
 *                 return default
 *         elif docreate:
 */
      __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
      if (__pyx_t_7) {
        __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine._getFromConf", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_5, &__pyx_t_2) < 0) __PYX_ERR(0, 781, __pyx_L8_except_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_t_2);

        /* "metaphor/chem_gm/core/gmtoolbox.py":782
 *                 return st if st else default
 *             except ValueError:  #, NoOptionError:
 *                 return default             # <<<<<<<<<<<<<<
 *         elif docreate:
 *             if conf == self.defaultConf:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_default);
        __pyx_r = __pyx_v_default;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        goto __pyx_L9_except_return;
      }
      goto __pyx_L8_except_error;
      __pyx_L8_except_error:;

      /* "metaphor/chem_gm/core/gmtoolbox.py":763
 *     def _getFromConf(self, conf, section, option, default, docreate=False):
 *         if conf.has_section(section) and conf.has_option(section, option):
 *             try:             # <<<<<<<<<<<<<<
 *                 if isinstance(default, bool):
 *                     try:
 */
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      goto __pyx_L1_error;
      __pyx_L10_try_return:;
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      goto __pyx_L0;
      __pyx_L9_except_return:;
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      goto __pyx_L0;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":762
 * 
 *     def _getFromConf(self, conf, section, option, default, docreate=False):
 *         if conf.has_section(section) and conf.has_option(section, option):             # <<<<<<<<<<<<<<
 *             try:
 *                 if isinstance(default, bool):
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":783
 *             except ValueError:  #, NoOptionError:
 *                 return default
 *         elif docreate:             # <<<<<<<<<<<<<<
 *             if conf == self.defaultConf:
 *                 self.defaultModified= True
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_docreate); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 783, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":784
 *                 return default
 *         elif docreate:
 *             if conf == self.defaultConf:             # <<<<<<<<<<<<<<
 *                 self.defaultModified= True
 *             if not conf.has_section(section):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_defaultConf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_conf, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 784, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 784, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_6) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":785
 *         elif docreate:
 *             if conf == self.defaultConf:
 *                 self.defaultModified= True             # <<<<<<<<<<<<<<
 *             if not conf.has_section(section):
 *                 conf.add_section(section)
 */
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_defaultModified, Py_True) < 0) __PYX_ERR(0, 785, __pyx_L1_error)

      /* "metaphor/chem_gm/core/gmtoolbox.py":784
 *                 return default
 *         elif docreate:
 *             if conf == self.defaultConf:             # <<<<<<<<<<<<<<
 *                 self.defaultModified= True
 *             if not conf.has_section(section):
 */
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":786
 *             if conf == self.defaultConf:
 *                 self.defaultModified= True
 *             if not conf.has_section(section):             # <<<<<<<<<<<<<<
 *                 conf.add_section(section)
 *             conf.set(section, option, str(default))
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_conf, __pyx_n_s_has_section); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_section); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 786, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_section};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 786, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_section};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 786, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else
      #endif
      {
        __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 786, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_v_section);
        __Pyx_GIVEREF(__pyx_v_section);
        PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_v_section);
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_14, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 786, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 786, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_17 = ((!__pyx_t_6) != 0);
    if (__pyx_t_17) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":787
 *                 self.defaultModified= True
 *             if not conf.has_section(section):
 *                 conf.add_section(section)             # <<<<<<<<<<<<<<
 *             conf.set(section, option, str(default))
 *             conf.ismodif = True
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_conf, __pyx_n_s_add_section); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 787, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_14 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_14)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      if (!__pyx_t_14) {
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_section); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 787, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_v_section};
          __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 787, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_GOTREF(__pyx_t_5);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_v_section};
          __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 787, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_GOTREF(__pyx_t_5);
        } else
        #endif
        {
          __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 787, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_14); __pyx_t_14 = NULL;
          __Pyx_INCREF(__pyx_v_section);
          __Pyx_GIVEREF(__pyx_v_section);
          PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_section);
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 787, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":786
 *             if conf == self.defaultConf:
 *                 self.defaultModified= True
 *             if not conf.has_section(section):             # <<<<<<<<<<<<<<
 *                 conf.add_section(section)
 *             conf.set(section, option, str(default))
 */
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":788
 *             if not conf.has_section(section):
 *                 conf.add_section(section)
 *             conf.set(section, option, str(default))             # <<<<<<<<<<<<<<
 *             conf.ismodif = True
 *         return default
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_conf, __pyx_n_s_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_14 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_14)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_14);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[4] = {__pyx_t_14, __pyx_v_section, __pyx_v_option, __pyx_t_3};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 788, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[4] = {__pyx_t_14, __pyx_v_section, __pyx_v_option, __pyx_t_3};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 788, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 788, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__pyx_t_14) {
        __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_14); __pyx_t_14 = NULL;
      }
      __Pyx_INCREF(__pyx_v_section);
      __Pyx_GIVEREF(__pyx_v_section);
      PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_7, __pyx_v_section);
      __Pyx_INCREF(__pyx_v_option);
      __Pyx_GIVEREF(__pyx_v_option);
      PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_v_option);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_7, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 788, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":789
 *                 conf.add_section(section)
 *             conf.set(section, option, str(default))
 *             conf.ismodif = True             # <<<<<<<<<<<<<<
 *         return default
 * 
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_conf, __pyx_n_s_ismodif, Py_True) < 0) __PYX_ERR(0, 789, __pyx_L1_error)

    /* "metaphor/chem_gm/core/gmtoolbox.py":783
 *             except ValueError:  #, NoOptionError:
 *                 return default
 *         elif docreate:             # <<<<<<<<<<<<<<
 *             if conf == self.defaultConf:
 *                 self.defaultModified= True
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":790
 *             conf.set(section, option, str(default))
 *             conf.ismodif = True
 *         return default             # <<<<<<<<<<<<<<
 * 
 *     def setProjectConf(self, section, option, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_default);
  __pyx_r = __pyx_v_default;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":761
 *         return self._getFromConf(self.projectConf, section, option, default, docreate)
 * 
 *     def _getFromConf(self, conf, section, option, default, docreate=False):             # <<<<<<<<<<<<<<
 *         if conf.has_section(section) and conf.has_option(section, option):
 *             try:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine._getFromConf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_st);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":792
 *         return default
 * 
 *     def setProjectConf(self, section, option, value):             # <<<<<<<<<<<<<<
 *         if not self.projectConf.has_section(section):
 *             self.projectConf.add_section(section)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_39setProjectConf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_39setProjectConf = {"setProjectConf", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_39setProjectConf, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_39setProjectConf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_section = 0;
  PyObject *__pyx_v_option = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setProjectConf (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_section,&__pyx_n_s_option,&__pyx_n_s_value,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_section)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setProjectConf", 1, 4, 4, 1); __PYX_ERR(0, 792, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_option)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setProjectConf", 1, 4, 4, 2); __PYX_ERR(0, 792, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setProjectConf", 1, 4, 4, 3); __PYX_ERR(0, 792, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setProjectConf") < 0)) __PYX_ERR(0, 792, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_self = values[0];
    __pyx_v_section = values[1];
    __pyx_v_option = values[2];
    __pyx_v_value = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setProjectConf", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 792, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.setProjectConf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_38setProjectConf(__pyx_self, __pyx_v_self, __pyx_v_section, __pyx_v_option, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_38setProjectConf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_section, PyObject *__pyx_v_option, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("setProjectConf", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":793
 * 
 *     def setProjectConf(self, section, option, value):
 *         if not self.projectConf.has_section(section):             # <<<<<<<<<<<<<<
 *             self.projectConf.add_section(section)
 *         self.projectConf.set(section, option, str(value))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_has_section); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_section); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 793, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_section};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 793, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_section};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 793, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 793, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_section);
      __Pyx_GIVEREF(__pyx_v_section);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_section);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 793, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = ((!__pyx_t_5) != 0);
  if (__pyx_t_6) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":794
 *     def setProjectConf(self, section, option, value):
 *         if not self.projectConf.has_section(section):
 *             self.projectConf.add_section(section)             # <<<<<<<<<<<<<<
 *         self.projectConf.set(section, option, str(value))
 *         self.projectConf.ismodif = True
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_add_section); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_section); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 794, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_section};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 794, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_section};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 794, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      {
        __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 794, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_v_section);
        __Pyx_GIVEREF(__pyx_v_section);
        PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_section);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 794, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":793
 * 
 *     def setProjectConf(self, section, option, value):
 *         if not self.projectConf.has_section(section):             # <<<<<<<<<<<<<<
 *             self.projectConf.add_section(section)
 *         self.projectConf.set(section, option, str(value))
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":795
 *         if not self.projectConf.has_section(section):
 *             self.projectConf.add_section(section)
 *         self.projectConf.set(section, option, str(value))             # <<<<<<<<<<<<<<
 *         self.projectConf.ismodif = True
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_section, __pyx_v_option, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 795, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_section, __pyx_v_option, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 795, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 795, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_section);
    __Pyx_GIVEREF(__pyx_v_section);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_section);
    __Pyx_INCREF(__pyx_v_option);
    __Pyx_GIVEREF(__pyx_v_option);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_option);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 795, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":796
 *             self.projectConf.add_section(section)
 *         self.projectConf.set(section, option, str(value))
 *         self.projectConf.ismodif = True             # <<<<<<<<<<<<<<
 * 
 *     def getDefaultOptions(self, section):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_ismodif, Py_True) < 0) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":792
 *         return default
 * 
 *     def setProjectConf(self, section, option, value):             # <<<<<<<<<<<<<<
 *         if not self.projectConf.has_section(section):
 *             self.projectConf.add_section(section)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.setProjectConf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":798
 *         self.projectConf.ismodif = True
 * 
 *     def getDefaultOptions(self, section):             # <<<<<<<<<<<<<<
 *         return self._getOptionsFromConf(self.defaultConf, section)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_41getDefaultOptions(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_41getDefaultOptions = {"getDefaultOptions", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_41getDefaultOptions, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_41getDefaultOptions(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_section = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getDefaultOptions (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_section,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_section)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getDefaultOptions", 1, 2, 2, 1); __PYX_ERR(0, 798, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getDefaultOptions") < 0)) __PYX_ERR(0, 798, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_section = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getDefaultOptions", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 798, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.getDefaultOptions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_40getDefaultOptions(__pyx_self, __pyx_v_self, __pyx_v_section);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_40getDefaultOptions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_section) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("getDefaultOptions", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":799
 * 
 *     def getDefaultOptions(self, section):
 *         return self._getOptionsFromConf(self.defaultConf, section)             # <<<<<<<<<<<<<<
 * 
 *     def getDefaultItems(self, section):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getOptionsFromConf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_defaultConf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_section};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 799, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_section};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 799, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 799, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_section);
    __Pyx_GIVEREF(__pyx_v_section);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_section);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 799, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":798
 *         self.projectConf.ismodif = True
 * 
 *     def getDefaultOptions(self, section):             # <<<<<<<<<<<<<<
 *         return self._getOptionsFromConf(self.defaultConf, section)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.getDefaultOptions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":801
 *         return self._getOptionsFromConf(self.defaultConf, section)
 * 
 *     def getDefaultItems(self, section):             # <<<<<<<<<<<<<<
 *         return self._getItemsFromConf(self.defaultConf, section)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_43getDefaultItems(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_43getDefaultItems = {"getDefaultItems", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_43getDefaultItems, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_43getDefaultItems(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_section = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getDefaultItems (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_section,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_section)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getDefaultItems", 1, 2, 2, 1); __PYX_ERR(0, 801, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getDefaultItems") < 0)) __PYX_ERR(0, 801, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_section = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getDefaultItems", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 801, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.getDefaultItems", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_42getDefaultItems(__pyx_self, __pyx_v_self, __pyx_v_section);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_42getDefaultItems(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_section) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("getDefaultItems", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":802
 * 
 *     def getDefaultItems(self, section):
 *         return self._getItemsFromConf(self.defaultConf, section)             # <<<<<<<<<<<<<<
 * 
 *     def getProjectConfOptions(self, section):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getItemsFromConf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_defaultConf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_section};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 802, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_section};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 802, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_section);
    __Pyx_GIVEREF(__pyx_v_section);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_section);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":801
 *         return self._getOptionsFromConf(self.defaultConf, section)
 * 
 *     def getDefaultItems(self, section):             # <<<<<<<<<<<<<<
 *         return self._getItemsFromConf(self.defaultConf, section)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.getDefaultItems", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":804
 *         return self._getItemsFromConf(self.defaultConf, section)
 * 
 *     def getProjectConfOptions(self, section):             # <<<<<<<<<<<<<<
 *         return self._getOptionsFromConf(self.projectConf, section)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_45getProjectConfOptions(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_45getProjectConfOptions = {"getProjectConfOptions", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_45getProjectConfOptions, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_45getProjectConfOptions(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_section = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getProjectConfOptions (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_section,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_section)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getProjectConfOptions", 1, 2, 2, 1); __PYX_ERR(0, 804, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getProjectConfOptions") < 0)) __PYX_ERR(0, 804, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_section = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getProjectConfOptions", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 804, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.getProjectConfOptions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_44getProjectConfOptions(__pyx_self, __pyx_v_self, __pyx_v_section);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_44getProjectConfOptions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_section) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("getProjectConfOptions", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":805
 * 
 *     def getProjectConfOptions(self, section):
 *         return self._getOptionsFromConf(self.projectConf, section)             # <<<<<<<<<<<<<<
 * 
 *     def getProjectConfItems(self, section):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getOptionsFromConf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_section};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_section};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 805, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_section);
    __Pyx_GIVEREF(__pyx_v_section);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_section);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":804
 *         return self._getItemsFromConf(self.defaultConf, section)
 * 
 *     def getProjectConfOptions(self, section):             # <<<<<<<<<<<<<<
 *         return self._getOptionsFromConf(self.projectConf, section)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.getProjectConfOptions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":807
 *         return self._getOptionsFromConf(self.projectConf, section)
 * 
 *     def getProjectConfItems(self, section):             # <<<<<<<<<<<<<<
 *         return self._getItemsFromConf(self.projectConf, section)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_47getProjectConfItems(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_47getProjectConfItems = {"getProjectConfItems", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_47getProjectConfItems, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_47getProjectConfItems(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_section = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getProjectConfItems (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_section,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_section)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getProjectConfItems", 1, 2, 2, 1); __PYX_ERR(0, 807, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getProjectConfItems") < 0)) __PYX_ERR(0, 807, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_section = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getProjectConfItems", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 807, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.getProjectConfItems", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_46getProjectConfItems(__pyx_self, __pyx_v_self, __pyx_v_section);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_46getProjectConfItems(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_section) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("getProjectConfItems", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":808
 * 
 *     def getProjectConfItems(self, section):
 *         return self._getItemsFromConf(self.projectConf, section)             # <<<<<<<<<<<<<<
 * 
 *     def _getOptionsFromConf(self, conf, section):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getItemsFromConf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_section};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_section};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_section);
    __Pyx_GIVEREF(__pyx_v_section);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_section);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":807
 *         return self._getOptionsFromConf(self.projectConf, section)
 * 
 *     def getProjectConfItems(self, section):             # <<<<<<<<<<<<<<
 *         return self._getItemsFromConf(self.projectConf, section)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.getProjectConfItems", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":810
 *         return self._getItemsFromConf(self.projectConf, section)
 * 
 *     def _getOptionsFromConf(self, conf, section):             # <<<<<<<<<<<<<<
 *         if conf.has_section(section):
 *             return conf.options(section)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_49_getOptionsFromConf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_49_getOptionsFromConf = {"_getOptionsFromConf", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_49_getOptionsFromConf, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_49_getOptionsFromConf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_conf = 0;
  PyObject *__pyx_v_section = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getOptionsFromConf (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_conf,&__pyx_n_s_section,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_conf)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_getOptionsFromConf", 1, 3, 3, 1); __PYX_ERR(0, 810, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_section)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_getOptionsFromConf", 1, 3, 3, 2); __PYX_ERR(0, 810, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_getOptionsFromConf") < 0)) __PYX_ERR(0, 810, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_conf = values[1];
    __pyx_v_section = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_getOptionsFromConf", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 810, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine._getOptionsFromConf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_48_getOptionsFromConf(__pyx_self, __pyx_v_self, __pyx_v_conf, __pyx_v_section);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_48_getOptionsFromConf(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_conf, PyObject *__pyx_v_section) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("_getOptionsFromConf", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":811
 * 
 *     def _getOptionsFromConf(self, conf, section):
 *         if conf.has_section(section):             # <<<<<<<<<<<<<<
 *             return conf.options(section)
 *         return []
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_conf, __pyx_n_s_has_section); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_section); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_section};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 811, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_section};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 811, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 811, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_section);
      __Pyx_GIVEREF(__pyx_v_section);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_section);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 811, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 811, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":812
 *     def _getOptionsFromConf(self, conf, section):
 *         if conf.has_section(section):
 *             return conf.options(section)             # <<<<<<<<<<<<<<
 *         return []
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_conf, __pyx_n_s_options); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_section); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 812, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_section};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 812, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_section};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 812, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      {
        __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 812, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_section);
        __Pyx_GIVEREF(__pyx_v_section);
        PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_section);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 812, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":811
 * 
 *     def _getOptionsFromConf(self, conf, section):
 *         if conf.has_section(section):             # <<<<<<<<<<<<<<
 *             return conf.options(section)
 *         return []
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":813
 *         if conf.has_section(section):
 *             return conf.options(section)
 *         return []             # <<<<<<<<<<<<<<
 * 
 *     def _getItemsFromConf(self, conf, section):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":810
 *         return self._getItemsFromConf(self.projectConf, section)
 * 
 *     def _getOptionsFromConf(self, conf, section):             # <<<<<<<<<<<<<<
 *         if conf.has_section(section):
 *             return conf.options(section)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine._getOptionsFromConf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":815
 *         return []
 * 
 *     def _getItemsFromConf(self, conf, section):             # <<<<<<<<<<<<<<
 *         if conf.has_section(section):
 *             return conf.items(section)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_51_getItemsFromConf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_51_getItemsFromConf = {"_getItemsFromConf", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_51_getItemsFromConf, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_51_getItemsFromConf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_conf = 0;
  PyObject *__pyx_v_section = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getItemsFromConf (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_conf,&__pyx_n_s_section,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_conf)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_getItemsFromConf", 1, 3, 3, 1); __PYX_ERR(0, 815, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_section)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_getItemsFromConf", 1, 3, 3, 2); __PYX_ERR(0, 815, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_getItemsFromConf") < 0)) __PYX_ERR(0, 815, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_conf = values[1];
    __pyx_v_section = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_getItemsFromConf", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 815, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine._getItemsFromConf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_50_getItemsFromConf(__pyx_self, __pyx_v_self, __pyx_v_conf, __pyx_v_section);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_50_getItemsFromConf(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_conf, PyObject *__pyx_v_section) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("_getItemsFromConf", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":816
 * 
 *     def _getItemsFromConf(self, conf, section):
 *         if conf.has_section(section):             # <<<<<<<<<<<<<<
 *             return conf.items(section)
 *         return []
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_conf, __pyx_n_s_has_section); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_section); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_section};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_section};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 816, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_section);
      __Pyx_GIVEREF(__pyx_v_section);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_section);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 816, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":817
 *     def _getItemsFromConf(self, conf, section):
 *         if conf.has_section(section):
 *             return conf.items(section)             # <<<<<<<<<<<<<<
 *         return []
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_conf, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 817, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_section); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_section};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_section};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      {
        __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 817, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_section);
        __Pyx_GIVEREF(__pyx_v_section);
        PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_section);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":816
 * 
 *     def _getItemsFromConf(self, conf, section):
 *         if conf.has_section(section):             # <<<<<<<<<<<<<<
 *             return conf.items(section)
 *         return []
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":818
 *         if conf.has_section(section):
 *             return conf.items(section)
 *         return []             # <<<<<<<<<<<<<<
 * 
 *     def clearProjectConfOptions(self, section, optionlist=None, doremovemodule=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":815
 *         return []
 * 
 *     def _getItemsFromConf(self, conf, section):             # <<<<<<<<<<<<<<
 *         if conf.has_section(section):
 *             return conf.items(section)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine._getItemsFromConf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":820
 *         return []
 * 
 *     def clearProjectConfOptions(self, section, optionlist=None, doremovemodule=False):             # <<<<<<<<<<<<<<
 *         if optionlist is None:
 *             optionlist = self.getProjectConfOptions(section)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_53clearProjectConfOptions(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_53clearProjectConfOptions = {"clearProjectConfOptions", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_53clearProjectConfOptions, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_53clearProjectConfOptions(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_section = 0;
  PyObject *__pyx_v_optionlist = 0;
  PyObject *__pyx_v_doremovemodule = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clearProjectConfOptions (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_section,&__pyx_n_s_optionlist,&__pyx_n_s_doremovemodule,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_section)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("clearProjectConfOptions", 0, 2, 4, 1); __PYX_ERR(0, 820, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_optionlist);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_doremovemodule);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "clearProjectConfOptions") < 0)) __PYX_ERR(0, 820, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_section = values[1];
    __pyx_v_optionlist = values[2];
    __pyx_v_doremovemodule = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("clearProjectConfOptions", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 820, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.clearProjectConfOptions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_52clearProjectConfOptions(__pyx_self, __pyx_v_self, __pyx_v_section, __pyx_v_optionlist, __pyx_v_doremovemodule);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_52clearProjectConfOptions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_section, PyObject *__pyx_v_optionlist, PyObject *__pyx_v_doremovemodule) {
  PyObject *__pyx_v_modulestoremove = NULL;
  PyObject *__pyx_v_opt = NULL;
  PyObject *__pyx_v_cfg = NULL;
  PyObject *__pyx_v_module = NULL;
  PyObject *__pyx_v_modconf = NULL;
  PyObject *__pyx_v_workingdir = NULL;
  PyObject *__pyx_v_prop = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  __Pyx_RefNannySetupContext("clearProjectConfOptions", 0);
  __Pyx_INCREF(__pyx_v_optionlist);

  /* "metaphor/chem_gm/core/gmtoolbox.py":821
 * 
 *     def clearProjectConfOptions(self, section, optionlist=None, doremovemodule=False):
 *         if optionlist is None:             # <<<<<<<<<<<<<<
 *             optionlist = self.getProjectConfOptions(section)
 *         modulestoremove = []
 */
  __pyx_t_1 = (__pyx_v_optionlist == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":822
 *     def clearProjectConfOptions(self, section, optionlist=None, doremovemodule=False):
 *         if optionlist is None:
 *             optionlist = self.getProjectConfOptions(section)             # <<<<<<<<<<<<<<
 *         modulestoremove = []
 *         for opt in optionlist:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getProjectConfOptions); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_section); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_section};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 822, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_section};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 822, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 822, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_INCREF(__pyx_v_section);
        __Pyx_GIVEREF(__pyx_v_section);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_section);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 822, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_optionlist, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":821
 * 
 *     def clearProjectConfOptions(self, section, optionlist=None, doremovemodule=False):
 *         if optionlist is None:             # <<<<<<<<<<<<<<
 *             optionlist = self.getProjectConfOptions(section)
 *         modulestoremove = []
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":823
 *         if optionlist is None:
 *             optionlist = self.getProjectConfOptions(section)
 *         modulestoremove = []             # <<<<<<<<<<<<<<
 *         for opt in optionlist:
 *             if doremovemodule:
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_modulestoremove = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":824
 *             optionlist = self.getProjectConfOptions(section)
 *         modulestoremove = []
 *         for opt in optionlist:             # <<<<<<<<<<<<<<
 *             if doremovemodule:
 *                 if self.projectConf.has_option(section, opt):
 */
  if (likely(PyList_CheckExact(__pyx_v_optionlist)) || PyTuple_CheckExact(__pyx_v_optionlist)) {
    __pyx_t_3 = __pyx_v_optionlist; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_optionlist); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 824, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 824, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 824, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 824, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 824, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 824, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_8(__pyx_t_3);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 824, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_opt, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":825
 *         modulestoremove = []
 *         for opt in optionlist:
 *             if doremovemodule:             # <<<<<<<<<<<<<<
 *                 if self.projectConf.has_option(section, opt):
 *                     modulestoremove.append((opt, self.projectConf.get(section, opt)))
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_doremovemodule); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 825, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":826
 *         for opt in optionlist:
 *             if doremovemodule:
 *                 if self.projectConf.has_option(section, opt):             # <<<<<<<<<<<<<<
 *                     modulestoremove.append((opt, self.projectConf.get(section, opt)))
 *             self.projectConf.remove_option(section, opt)
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 826, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_has_option); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 826, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_9 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_9 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_section, __pyx_v_opt};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 826, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_section, __pyx_v_opt};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 826, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 826, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (__pyx_t_6) {
          __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); __pyx_t_6 = NULL;
        }
        __Pyx_INCREF(__pyx_v_section);
        __Pyx_GIVEREF(__pyx_v_section);
        PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_section);
        __Pyx_INCREF(__pyx_v_opt);
        __Pyx_GIVEREF(__pyx_v_opt);
        PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_opt);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 826, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 826, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_2) {

        /* "metaphor/chem_gm/core/gmtoolbox.py":827
 *             if doremovemodule:
 *                 if self.projectConf.has_option(section, opt):
 *                     modulestoremove.append((opt, self.projectConf.get(section, opt)))             # <<<<<<<<<<<<<<
 *             self.projectConf.remove_option(section, opt)
 *         cfg = defaultedConfigParser()
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 827, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_get); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 827, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = NULL;
        __pyx_t_9 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
            __pyx_t_9 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_10)) {
          PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_section, __pyx_v_opt};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 827, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
          PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_section, __pyx_v_opt};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 827, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 827, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_5) {
            __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
          }
          __Pyx_INCREF(__pyx_v_section);
          __Pyx_GIVEREF(__pyx_v_section);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_9, __pyx_v_section);
          __Pyx_INCREF(__pyx_v_opt);
          __Pyx_GIVEREF(__pyx_v_opt);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_9, __pyx_v_opt);
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 827, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 827, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_INCREF(__pyx_v_opt);
        __Pyx_GIVEREF(__pyx_v_opt);
        PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_opt);
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_modulestoremove, __pyx_t_10); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 827, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":826
 *         for opt in optionlist:
 *             if doremovemodule:
 *                 if self.projectConf.has_option(section, opt):             # <<<<<<<<<<<<<<
 *                     modulestoremove.append((opt, self.projectConf.get(section, opt)))
 *             self.projectConf.remove_option(section, opt)
 */
      }

      /* "metaphor/chem_gm/core/gmtoolbox.py":825
 *         modulestoremove = []
 *         for opt in optionlist:
 *             if doremovemodule:             # <<<<<<<<<<<<<<
 *                 if self.projectConf.has_option(section, opt):
 *                     modulestoremove.append((opt, self.projectConf.get(section, opt)))
 */
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":828
 *                 if self.projectConf.has_option(section, opt):
 *                     modulestoremove.append((opt, self.projectConf.get(section, opt)))
 *             self.projectConf.remove_option(section, opt)             # <<<<<<<<<<<<<<
 *         cfg = defaultedConfigParser()
 *         for module, modconf in modulestoremove:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 828, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_remove_option); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 828, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_section, __pyx_v_opt};
      __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 828, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_10);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_section, __pyx_v_opt};
      __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 828, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_10);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 828, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_section);
      __Pyx_GIVEREF(__pyx_v_section);
      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_9, __pyx_v_section);
      __Pyx_INCREF(__pyx_v_opt);
      __Pyx_GIVEREF(__pyx_v_opt);
      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_9, __pyx_v_opt);
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 828, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":824
 *             optionlist = self.getProjectConfOptions(section)
 *         modulestoremove = []
 *         for opt in optionlist:             # <<<<<<<<<<<<<<
 *             if doremovemodule:
 *                 if self.projectConf.has_option(section, opt):
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":829
 *                     modulestoremove.append((opt, self.projectConf.get(section, opt)))
 *             self.projectConf.remove_option(section, opt)
 *         cfg = defaultedConfigParser()             # <<<<<<<<<<<<<<
 *         for module, modconf in modulestoremove:
 *             cfg.read(modconf)
 */
  __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultedConfigParser); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_10, function);
    }
  }
  if (__pyx_t_6) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 829, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else {
    __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 829, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_v_cfg = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":830
 *             self.projectConf.remove_option(section, opt)
 *         cfg = defaultedConfigParser()
 *         for module, modconf in modulestoremove:             # <<<<<<<<<<<<<<
 *             cfg.read(modconf)
 *             workingdir = cfg.get("general", "workingdir")
 */
  __pyx_t_3 = __pyx_v_modulestoremove; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
  for (;;) {
    if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_10 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_10); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 830, __pyx_L1_error)
    #else
    __pyx_t_10 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 830, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    #endif
    if ((likely(PyTuple_CheckExact(__pyx_t_10))) || (PyList_CheckExact(__pyx_t_10))) {
      PyObject* sequence = __pyx_t_10;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 830, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      #else
      __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 830, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 830, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_4 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 830, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_12 = Py_TYPE(__pyx_t_4)->tp_iternext;
      index = 0; __pyx_t_6 = __pyx_t_12(__pyx_t_4); if (unlikely(!__pyx_t_6)) goto __pyx_L10_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 1; __pyx_t_5 = __pyx_t_12(__pyx_t_4); if (unlikely(!__pyx_t_5)) goto __pyx_L10_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_4), 2) < 0) __PYX_ERR(0, 830, __pyx_L1_error)
      __pyx_t_12 = NULL;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L11_unpacking_done;
      __pyx_L10_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_12 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 830, __pyx_L1_error)
      __pyx_L11_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_module, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_modconf, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":831
 *         cfg = defaultedConfigParser()
 *         for module, modconf in modulestoremove:
 *             cfg.read(modconf)             # <<<<<<<<<<<<<<
 *             workingdir = cfg.get("general", "workingdir")
 *             prop = cfg.get("general", "property")
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cfg, __pyx_n_s_read); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 831, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_modconf); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 831, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_modconf};
        __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 831, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_10);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_modconf};
        __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 831, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_10);
      } else
      #endif
      {
        __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 831, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_v_modconf);
        __Pyx_GIVEREF(__pyx_v_modconf);
        PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_modconf);
        __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 831, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":832
 *         for module, modconf in modulestoremove:
 *             cfg.read(modconf)
 *             workingdir = cfg.get("general", "workingdir")             # <<<<<<<<<<<<<<
 *             prop = cfg.get("general", "property")
 *             workingdir = os.path.join(workingdir, prop)
 */
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_cfg, __pyx_n_s_get); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 832, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 832, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF_SET(__pyx_v_workingdir, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":833
 *             cfg.read(modconf)
 *             workingdir = cfg.get("general", "workingdir")
 *             prop = cfg.get("general", "property")             # <<<<<<<<<<<<<<
 *             workingdir = os.path.join(workingdir, prop)
 *             if module.endswith("lib"):
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cfg, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 833, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 833, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_prop, __pyx_t_10);
    __pyx_t_10 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":834
 *             workingdir = cfg.get("general", "workingdir")
 *             prop = cfg.get("general", "property")
 *             workingdir = os.path.join(workingdir, prop)             # <<<<<<<<<<<<<<
 *             if module.endswith("lib"):
 *                 module = module[:-3]
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_join); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_workingdir, __pyx_v_prop};
      __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 834, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_10);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_workingdir, __pyx_v_prop};
      __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 834, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_10);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 834, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_workingdir);
      __Pyx_GIVEREF(__pyx_v_workingdir);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_9, __pyx_v_workingdir);
      __Pyx_INCREF(__pyx_v_prop);
      __Pyx_GIVEREF(__pyx_v_prop);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_9, __pyx_v_prop);
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 834, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_workingdir, __pyx_t_10);
    __pyx_t_10 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":835
 *             prop = cfg.get("general", "property")
 *             workingdir = os.path.join(workingdir, prop)
 *             if module.endswith("lib"):             # <<<<<<<<<<<<<<
 *                 module = module[:-3]
 *             module = module + ".pyd"
 */
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_module, __pyx_n_s_endswith); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 835, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":836
 *             workingdir = os.path.join(workingdir, prop)
 *             if module.endswith("lib"):
 *                 module = module[:-3]             # <<<<<<<<<<<<<<
 *             module = module + ".pyd"
 *             removemodule(module, workingdir)
 */
      __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_module, 0, -3L, NULL, NULL, &__pyx_slice__65, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 836, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF_SET(__pyx_v_module, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":835
 *             prop = cfg.get("general", "property")
 *             workingdir = os.path.join(workingdir, prop)
 *             if module.endswith("lib"):             # <<<<<<<<<<<<<<
 *                 module = module[:-3]
 *             module = module + ".pyd"
 */
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":837
 *             if module.endswith("lib"):
 *                 module = module[:-3]
 *             module = module + ".pyd"             # <<<<<<<<<<<<<<
 *             removemodule(module, workingdir)
 * 
 */
    __pyx_t_5 = PyNumber_Add(__pyx_v_module, __pyx_kp_u_pyd); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 837, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF_SET(__pyx_v_module, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":838
 *                 module = module[:-3]
 *             module = module + ".pyd"
 *             removemodule(module, workingdir)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_removemodule); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 838, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_6 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_10, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_10)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_module, __pyx_v_workingdir};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 838, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_module, __pyx_v_workingdir};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 838, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 838, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_INCREF(__pyx_v_module);
      __Pyx_GIVEREF(__pyx_v_module);
      PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_9, __pyx_v_module);
      __Pyx_INCREF(__pyx_v_workingdir);
      __Pyx_GIVEREF(__pyx_v_workingdir);
      PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_9, __pyx_v_workingdir);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 838, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":830
 *             self.projectConf.remove_option(section, opt)
 *         cfg = defaultedConfigParser()
 *         for module, modconf in modulestoremove:             # <<<<<<<<<<<<<<
 *             cfg.read(modconf)
 *             workingdir = cfg.get("general", "workingdir")
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":820
 *         return []
 * 
 *     def clearProjectConfOptions(self, section, optionlist=None, doremovemodule=False):             # <<<<<<<<<<<<<<
 *         if optionlist is None:
 *             optionlist = self.getProjectConfOptions(section)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.clearProjectConfOptions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_modulestoremove);
  __Pyx_XDECREF(__pyx_v_opt);
  __Pyx_XDECREF(__pyx_v_cfg);
  __Pyx_XDECREF(__pyx_v_module);
  __Pyx_XDECREF(__pyx_v_modconf);
  __Pyx_XDECREF(__pyx_v_workingdir);
  __Pyx_XDECREF(__pyx_v_prop);
  __Pyx_XDECREF(__pyx_v_optionlist);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":841
 * 
 * 
 *     def getModelDict(self, cfgfile):             # <<<<<<<<<<<<<<
 *         locconf = defaultedConfigParser()
 *         locconf.read(cfgfile)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_55getModelDict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_55getModelDict = {"getModelDict", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_55getModelDict, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_55getModelDict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_cfgfile = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getModelDict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_cfgfile,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfgfile)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getModelDict", 1, 2, 2, 1); __PYX_ERR(0, 841, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getModelDict") < 0)) __PYX_ERR(0, 841, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_cfgfile = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getModelDict", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 841, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.getModelDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_54getModelDict(__pyx_self, __pyx_v_self, __pyx_v_cfgfile);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_54getModelDict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_cfgfile) {
  PyObject *__pyx_v_locconf = NULL;
  PyObject *__pyx_v_oplst = NULL;
  PyObject *__pyx_v_dictt = NULL;
  PyObject *__pyx_v_opt = NULL;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("getModelDict", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":842
 * 
 *     def getModelDict(self, cfgfile):
 *         locconf = defaultedConfigParser()             # <<<<<<<<<<<<<<
 *         locconf.read(cfgfile)
 *         oplst = self._getOptionsFromConf(locconf, "connectivity")
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultedConfigParser); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_locconf = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":843
 *     def getModelDict(self, cfgfile):
 *         locconf = defaultedConfigParser()
 *         locconf.read(cfgfile)             # <<<<<<<<<<<<<<
 *         oplst = self._getOptionsFromConf(locconf, "connectivity")
 *         dictt = {}
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_locconf, __pyx_n_s_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_cfgfile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_cfgfile};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 843, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_cfgfile};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 843, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 843, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_cfgfile);
      __Pyx_GIVEREF(__pyx_v_cfgfile);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_cfgfile);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 843, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":844
 *         locconf = defaultedConfigParser()
 *         locconf.read(cfgfile)
 *         oplst = self._getOptionsFromConf(locconf, "connectivity")             # <<<<<<<<<<<<<<
 *         dictt = {}
 *         for opt in oplst:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getOptionsFromConf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_locconf, __pyx_n_u_connectivity};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 844, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_locconf, __pyx_n_u_connectivity};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 844, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_3 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_v_locconf);
    __Pyx_GIVEREF(__pyx_v_locconf);
    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_5, __pyx_v_locconf);
    __Pyx_INCREF(__pyx_n_u_connectivity);
    __Pyx_GIVEREF(__pyx_n_u_connectivity);
    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_5, __pyx_n_u_connectivity);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_oplst = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":845
 *         locconf.read(cfgfile)
 *         oplst = self._getOptionsFromConf(locconf, "connectivity")
 *         dictt = {}             # <<<<<<<<<<<<<<
 *         for opt in oplst:
 *             val = int(locconf.get("connectivity", opt))
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_dictt = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":846
 *         oplst = self._getOptionsFromConf(locconf, "connectivity")
 *         dictt = {}
 *         for opt in oplst:             # <<<<<<<<<<<<<<
 *             val = int(locconf.get("connectivity", opt))
 *             dictt[opt] = val  #.lower()
 */
  if (likely(PyList_CheckExact(__pyx_v_oplst)) || PyTuple_CheckExact(__pyx_v_oplst)) {
    __pyx_t_1 = __pyx_v_oplst; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_oplst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 846, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 846, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 846, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 846, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 846, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_7(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 846, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_opt, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":847
 *         dictt = {}
 *         for opt in oplst:
 *             val = int(locconf.get("connectivity", opt))             # <<<<<<<<<<<<<<
 *             dictt[opt] = val  #.lower()
 *         return dictt
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_locconf, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_connectivity, __pyx_v_opt};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_u_connectivity, __pyx_v_opt};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 847, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_n_u_connectivity);
      __Pyx_GIVEREF(__pyx_n_u_connectivity);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_5, __pyx_n_u_connectivity);
      __Pyx_INCREF(__pyx_v_opt);
      __Pyx_GIVEREF(__pyx_v_opt);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_5, __pyx_v_opt);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":848
 *         for opt in oplst:
 *             val = int(locconf.get("connectivity", opt))
 *             dictt[opt] = val  #.lower()             # <<<<<<<<<<<<<<
 *         return dictt
 * 
 */
    if (unlikely(PyDict_SetItem(__pyx_v_dictt, __pyx_v_opt, __pyx_v_val) < 0)) __PYX_ERR(0, 848, __pyx_L1_error)

    /* "metaphor/chem_gm/core/gmtoolbox.py":846
 *         oplst = self._getOptionsFromConf(locconf, "connectivity")
 *         dictt = {}
 *         for opt in oplst:             # <<<<<<<<<<<<<<
 *             val = int(locconf.get("connectivity", opt))
 *             dictt[opt] = val  #.lower()
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":849
 *             val = int(locconf.get("connectivity", opt))
 *             dictt[opt] = val  #.lower()
 *         return dictt             # <<<<<<<<<<<<<<
 * 
 *     def getModel(self, config):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_dictt);
  __pyx_r = __pyx_v_dictt;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":841
 * 
 * 
 *     def getModelDict(self, cfgfile):             # <<<<<<<<<<<<<<
 *         locconf = defaultedConfigParser()
 *         locconf.read(cfgfile)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.getModelDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_locconf);
  __Pyx_XDECREF(__pyx_v_oplst);
  __Pyx_XDECREF(__pyx_v_dictt);
  __Pyx_XDECREF(__pyx_v_opt);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":851
 *         return dictt
 * 
 *     def getModel(self, config):             # <<<<<<<<<<<<<<
 *         return self._modeldict[config]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_57getModel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_57getModel = {"getModel", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_57getModel, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_57getModel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_config = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getModel (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_config,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_config)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getModel", 1, 2, 2, 1); __PYX_ERR(0, 851, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getModel") < 0)) __PYX_ERR(0, 851, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_config = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getModel", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 851, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.getModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_56getModel(__pyx_self, __pyx_v_self, __pyx_v_config);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_56getModel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_config) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getModel", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":852
 * 
 *     def getModel(self, config):
 *         return self._modeldict[config]             # <<<<<<<<<<<<<<
 * 
 *     def setModel(self, config, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_modeldict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_config); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":851
 *         return dictt
 * 
 *     def getModel(self, config):             # <<<<<<<<<<<<<<
 *         return self._modeldict[config]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.getModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":854
 *         return self._modeldict[config]
 * 
 *     def setModel(self, config, value):             # <<<<<<<<<<<<<<
 *         self._modeldict[config] = value
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_59setModel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_59setModel = {"setModel", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_59setModel, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_59setModel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_config = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setModel (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_config,&__pyx_n_s_value,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_config)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setModel", 1, 3, 3, 1); __PYX_ERR(0, 854, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setModel", 1, 3, 3, 2); __PYX_ERR(0, 854, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setModel") < 0)) __PYX_ERR(0, 854, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_config = values[1];
    __pyx_v_value = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setModel", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 854, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.setModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_58setModel(__pyx_self, __pyx_v_self, __pyx_v_config, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_58setModel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_config, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("setModel", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":855
 * 
 *     def setModel(self, config, value):
 *         self._modeldict[config] = value             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_modeldict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_config, __pyx_v_value) < 0)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":854
 *         return self._modeldict[config]
 * 
 *     def setModel(self, config, value):             # <<<<<<<<<<<<<<
 *         self._modeldict[config] = value
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.setModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":858
 * 
 *     @Property
 *     def workingDir(self):             # <<<<<<<<<<<<<<
 *         try:
 *             res = self.projectConf.get("general", "workingdir")
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_61workingDir(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_61workingDir = {"workingDir", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_61workingDir, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_61workingDir(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("workingDir (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_60workingDir(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_60workingDir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("workingDir", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":859
 *     @Property
 *     def workingDir(self):
 *         try:             # <<<<<<<<<<<<<<
 *             res = self.projectConf.get("general", "workingdir")
 * #         except NoSectionError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "metaphor/chem_gm/core/gmtoolbox.py":860
 *     def workingDir(self):
 *         try:
 *             res = self.projectConf.get("general", "workingdir")             # <<<<<<<<<<<<<<
 * #         except NoSectionError:
 *         except:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 860, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 860, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 860, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_res = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":859
 *     @Property
 *     def workingDir(self):
 *         try:             # <<<<<<<<<<<<<<
 *             res = self.projectConf.get("general", "workingdir")
 * #         except NoSectionError:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":862
 *             res = self.projectConf.get("general", "workingdir")
 * #         except NoSectionError:
 *         except:             # <<<<<<<<<<<<<<
 *             res = os.getcwd()
 *         return res
 */
    /*except:*/ {
      __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.workingDir", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 862, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);

      /* "metaphor/chem_gm/core/gmtoolbox.py":863
 * #         except NoSectionError:
 *         except:
 *             res = os.getcwd()             # <<<<<<<<<<<<<<
 *         return res
 *     @workingDir.setter
 */
      __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 863, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_getcwd); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 863, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      if (__pyx_t_8) {
        __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 863, __pyx_L5_except_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else {
        __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 863, __pyx_L5_except_error)
      }
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF_SET(__pyx_v_res, __pyx_t_7);
      __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;

    /* "metaphor/chem_gm/core/gmtoolbox.py":859
 *     @Property
 *     def workingDir(self):
 *         try:             # <<<<<<<<<<<<<<
 *             res = self.projectConf.get("general", "workingdir")
 * #         except NoSectionError:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":864
 *         except:
 *             res = os.getcwd()
 *         return res             # <<<<<<<<<<<<<<
 *     @workingDir.setter
 *     def sworkingDir(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":858
 * 
 *     @Property
 *     def workingDir(self):             # <<<<<<<<<<<<<<
 *         try:
 *             res = self.projectConf.get("general", "workingdir")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.workingDir", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":866
 *         return res
 *     @workingDir.setter
 *     def sworkingDir(self, value):             # <<<<<<<<<<<<<<
 *         self.setProjectConf("general", "workingdir", value)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_63sworkingDir(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_63sworkingDir = {"sworkingDir", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_63sworkingDir, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_63sworkingDir(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sworkingDir (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("sworkingDir", 1, 2, 2, 1); __PYX_ERR(0, 866, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sworkingDir") < 0)) __PYX_ERR(0, 866, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sworkingDir", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 866, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.sworkingDir", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_62sworkingDir(__pyx_self, __pyx_v_self, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_62sworkingDir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("sworkingDir", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":867
 *     @workingDir.setter
 *     def sworkingDir(self, value):
 *         self.setProjectConf("general", "workingdir", value)             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_setProjectConf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_n_u_general, __pyx_n_u_workingdir, __pyx_v_value};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_n_u_general, __pyx_n_u_workingdir, __pyx_v_value};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 867, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_n_u_general);
    __Pyx_GIVEREF(__pyx_n_u_general);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_n_u_general);
    __Pyx_INCREF(__pyx_n_u_workingdir);
    __Pyx_GIVEREF(__pyx_n_u_workingdir);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_workingdir);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_value);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":866
 *         return res
 *     @workingDir.setter
 *     def sworkingDir(self, value):             # <<<<<<<<<<<<<<
 *         self.setProjectConf("general", "workingdir", value)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.sworkingDir", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":870
 * 
 *     @Property
 *     def dataRoot(self):             # <<<<<<<<<<<<<<
 *         try:
 *             return os.path.basename(self.projectConf.get("general", "workingdir"))
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_65dataRoot(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_65dataRoot = {"dataRoot", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_65dataRoot, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_65dataRoot(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dataRoot (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_64dataRoot(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_64dataRoot(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("dataRoot", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":871
 *     @Property
 *     def dataRoot(self):
 *         try:             # <<<<<<<<<<<<<<
 *             return os.path.basename(self.projectConf.get("general", "workingdir"))
 *         except:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "metaphor/chem_gm/core/gmtoolbox.py":872
 *     def dataRoot(self):
 *         try:
 *             return os.path.basename(self.projectConf.get("general", "workingdir"))             # <<<<<<<<<<<<<<
 *         except:
 * #         except NoSectionError:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 872, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 872, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_basename); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 872, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 872, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_get); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 872, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 872, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      if (!__pyx_t_7) {
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 872, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 872, __pyx_L3_error)
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 872, __pyx_L3_error)
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        } else
        #endif
        {
          __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 872, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
          __Pyx_GIVEREF(__pyx_t_6);
          PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6);
          __pyx_t_6 = 0;
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 872, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "metaphor/chem_gm/core/gmtoolbox.py":871
 *     @Property
 *     def dataRoot(self):
 *         try:             # <<<<<<<<<<<<<<
 *             return os.path.basename(self.projectConf.get("general", "workingdir"))
 *         except:
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":873
 *         try:
 *             return os.path.basename(self.projectConf.get("general", "workingdir"))
 *         except:             # <<<<<<<<<<<<<<
 * #         except NoSectionError:
 *             return ""
 */
    /*except:*/ {
      __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.dataRoot", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(0, 873, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_8);

      /* "metaphor/chem_gm/core/gmtoolbox.py":875
 *         except:
 * #         except NoSectionError:
 *             return ""             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_kp_u__4);
      __pyx_r = __pyx_kp_u__4;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_except_return;
    }
    __pyx_L5_except_error:;

    /* "metaphor/chem_gm/core/gmtoolbox.py":871
 *     @Property
 *     def dataRoot(self):
 *         try:             # <<<<<<<<<<<<<<
 *             return os.path.basename(self.projectConf.get("general", "workingdir"))
 *         except:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":870
 * 
 *     @Property
 *     def dataRoot(self):             # <<<<<<<<<<<<<<
 *         try:
 *             return os.path.basename(self.projectConf.get("general", "workingdir"))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.dataRoot", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":878
 * 
 *     @Property
 *     def projectConf(self):             # <<<<<<<<<<<<<<
 *         return self._projectConf
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_67projectConf(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_67projectConf = {"projectConf", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_67projectConf, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_67projectConf(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("projectConf (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_66projectConf(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_66projectConf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("projectConf", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":879
 *     @Property
 *     def projectConf(self):
 *         return self._projectConf             # <<<<<<<<<<<<<<
 * 
 *     @Property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":878
 * 
 *     @Property
 *     def projectConf(self):             # <<<<<<<<<<<<<<
 *         return self._projectConf
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.projectConf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":882
 * 
 *     @Property
 *     def configFile(self):             # <<<<<<<<<<<<<<
 *         return self._configFile
 *     @configFile.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_69configFile(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_69configFile = {"configFile", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_69configFile, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_69configFile(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("configFile (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_68configFile(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_68configFile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("configFile", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":883
 *     @Property
 *     def configFile(self):
 *         return self._configFile             # <<<<<<<<<<<<<<
 *     @configFile.setter
 *     def sconfigFile(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_configFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":882
 * 
 *     @Property
 *     def configFile(self):             # <<<<<<<<<<<<<<
 *         return self._configFile
 *     @configFile.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.configFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":885
 *         return self._configFile
 *     @configFile.setter
 *     def sconfigFile(self, value):             # <<<<<<<<<<<<<<
 *         if self._configFile == value:
 *             return
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_71sconfigFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_71sconfigFile = {"sconfigFile", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_71sconfigFile, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_71sconfigFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sconfigFile (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("sconfigFile", 1, 2, 2, 1); __PYX_ERR(0, 885, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sconfigFile") < 0)) __PYX_ERR(0, 885, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sconfigFile", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 885, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.sconfigFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_70sconfigFile(__pyx_self, __pyx_v_self, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_70sconfigFile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_sec = NULL;
  PyObject *__pyx_v_opt = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_RefNannySetupContext("sconfigFile", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":886
 *     @configFile.setter
 *     def sconfigFile(self, value):
 *         if self._configFile == value:             # <<<<<<<<<<<<<<
 *             return
 *         if self._configFile:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_configFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_value, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 886, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 886, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":887
 *     def sconfigFile(self, value):
 *         if self._configFile == value:
 *             return             # <<<<<<<<<<<<<<
 *         if self._configFile:
 *             if  not os.path.isdir(self._configFile):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":886
 *     @configFile.setter
 *     def sconfigFile(self, value):
 *         if self._configFile == value:             # <<<<<<<<<<<<<<
 *             return
 *         if self._configFile:
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":888
 *         if self._configFile == value:
 *             return
 *         if self._configFile:             # <<<<<<<<<<<<<<
 *             if  not os.path.isdir(self._configFile):
 *                 self._projectConf.write(open(self._configFile, "w"))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_configFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 888, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":889
 *             return
 *         if self._configFile:
 *             if  not os.path.isdir(self._configFile):             # <<<<<<<<<<<<<<
 *                 self._projectConf.write(open(self._configFile, "w"))
 *             for sec in self._projectConf.sections():
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 889, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 889, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_isdir); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 889, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_configFile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 889, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 889, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 889, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 889, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 889, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 889, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 889, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = ((!__pyx_t_3) != 0);
    if (__pyx_t_7) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":890
 *         if self._configFile:
 *             if  not os.path.isdir(self._configFile):
 *                 self._projectConf.write(open(self._configFile, "w"))             # <<<<<<<<<<<<<<
 *             for sec in self._projectConf.sections():
 *                 for opt in self._projectConf.options(sec):
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 890, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_write); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 890, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_configFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 890, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 890, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
      __Pyx_INCREF(__pyx_n_u_w);
      __Pyx_GIVEREF(__pyx_n_u_w);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_u_w);
      __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 890, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 890, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_1};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 890, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_1};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 890, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 890, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_GIVEREF(__pyx_t_1);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_1);
          __pyx_t_1 = 0;
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 890, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":889
 *             return
 *         if self._configFile:
 *             if  not os.path.isdir(self._configFile):             # <<<<<<<<<<<<<<
 *                 self._projectConf.write(open(self._configFile, "w"))
 *             for sec in self._projectConf.sections():
 */
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":891
 *             if  not os.path.isdir(self._configFile):
 *                 self._projectConf.write(open(self._configFile, "w"))
 *             for sec in self._projectConf.sections():             # <<<<<<<<<<<<<<
 *                 for opt in self._projectConf.options(sec):
 *                     self._projectConf.remove_option(sec, opt)
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sections); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (__pyx_t_6) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 891, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 891, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 891, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 891, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 891, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 891, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 891, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 891, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_9(__pyx_t_5);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 891, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_sec, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":892
 *                 self._projectConf.write(open(self._configFile, "w"))
 *             for sec in self._projectConf.sections():
 *                 for opt in self._projectConf.options(sec):             # <<<<<<<<<<<<<<
 *                     self._projectConf.remove_option(sec, opt)
 *                 self._projectConf.remove_section(sec)
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 892, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      if (!__pyx_t_6) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_sec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 892, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_sec};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 892, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_sec};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 892, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 892, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
          __Pyx_INCREF(__pyx_v_sec);
          __Pyx_GIVEREF(__pyx_v_sec);
          PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_sec);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 892, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
        __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_10 = 0;
        __pyx_t_11 = NULL;
      } else {
        __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_11 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 892, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      for (;;) {
        if (likely(!__pyx_t_11)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 892, __pyx_L1_error)
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 892, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          } else {
            if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 892, __pyx_L1_error)
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 892, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          }
        } else {
          __pyx_t_2 = __pyx_t_11(__pyx_t_1);
          if (unlikely(!__pyx_t_2)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 892, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_XDECREF_SET(__pyx_v_opt, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":893
 *             for sec in self._projectConf.sections():
 *                 for opt in self._projectConf.options(sec):
 *                     self._projectConf.remove_option(sec, opt)             # <<<<<<<<<<<<<<
 *                 self._projectConf.remove_section(sec)
 *         if value:
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 893, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_remove_option); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 893, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = NULL;
        __pyx_t_12 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
            __pyx_t_12 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_sec, __pyx_v_opt};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 893, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_sec, __pyx_v_opt};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 893, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_13 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 893, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_sec);
          __Pyx_GIVEREF(__pyx_v_sec);
          PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_12, __pyx_v_sec);
          __Pyx_INCREF(__pyx_v_opt);
          __Pyx_GIVEREF(__pyx_v_opt);
          PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_12, __pyx_v_opt);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_13, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 893, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":892
 *                 self._projectConf.write(open(self._configFile, "w"))
 *             for sec in self._projectConf.sections():
 *                 for opt in self._projectConf.options(sec):             # <<<<<<<<<<<<<<
 *                     self._projectConf.remove_option(sec, opt)
 *                 self._projectConf.remove_section(sec)
 */
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":894
 *                 for opt in self._projectConf.options(sec):
 *                     self._projectConf.remove_option(sec, opt)
 *                 self._projectConf.remove_section(sec)             # <<<<<<<<<<<<<<
 *         if value:
 *             self.readConfig(value)
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 894, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_remove_section); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 894, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      if (!__pyx_t_2) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_sec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 894, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_sec};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 894, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_sec};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 894, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        {
          __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 894, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_2); __pyx_t_2 = NULL;
          __Pyx_INCREF(__pyx_v_sec);
          __Pyx_GIVEREF(__pyx_v_sec);
          PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_v_sec);
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 894, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":891
 *             if  not os.path.isdir(self._configFile):
 *                 self._projectConf.write(open(self._configFile, "w"))
 *             for sec in self._projectConf.sections():             # <<<<<<<<<<<<<<
 *                 for opt in self._projectConf.options(sec):
 *                     self._projectConf.remove_option(sec, opt)
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":888
 *         if self._configFile == value:
 *             return
 *         if self._configFile:             # <<<<<<<<<<<<<<
 *             if  not os.path.isdir(self._configFile):
 *                 self._projectConf.write(open(self._configFile, "w"))
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":895
 *                     self._projectConf.remove_option(sec, opt)
 *                 self._projectConf.remove_section(sec)
 *         if value:             # <<<<<<<<<<<<<<
 *             self.readConfig(value)
 * 
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 895, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":896
 *                 self._projectConf.remove_section(sec)
 *         if value:
 *             self.readConfig(value)             # <<<<<<<<<<<<<<
 * 
 *     def readConfig(self, filename=""):
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_readConfig); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 896, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_value};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 896, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_value};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 896, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else
      #endif
      {
        __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 896, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_v_value);
        __Pyx_GIVEREF(__pyx_v_value);
        PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_v_value);
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_13, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 896, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":895
 *                     self._projectConf.remove_option(sec, opt)
 *                 self._projectConf.remove_section(sec)
 *         if value:             # <<<<<<<<<<<<<<
 *             self.readConfig(value)
 * 
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":885
 *         return self._configFile
 *     @configFile.setter
 *     def sconfigFile(self, value):             # <<<<<<<<<<<<<<
 *         if self._configFile == value:
 *             return
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.sconfigFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sec);
  __Pyx_XDECREF(__pyx_v_opt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":898
 *             self.readConfig(value)
 * 
 *     def readConfig(self, filename=""):             # <<<<<<<<<<<<<<
 *         if filename:
 *             self._configFile = filename
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_73readConfig(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_73readConfig = {"readConfig", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_73readConfig, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_73readConfig(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_filename = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("readConfig (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_filename,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_kp_u__4));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filename);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "readConfig") < 0)) __PYX_ERR(0, 898, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_filename = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("readConfig", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 898, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.readConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_72readConfig(__pyx_self, __pyx_v_self, __pyx_v_filename);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_72readConfig(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename) {
  PyObject *__pyx_v_sec = NULL;
  PyObject *__pyx_v_opt = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  __Pyx_RefNannySetupContext("readConfig", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":899
 * 
 *     def readConfig(self, filename=""):
 *         if filename:             # <<<<<<<<<<<<<<
 *             self._configFile = filename
 *         if self._configFile:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 899, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":900
 *     def readConfig(self, filename=""):
 *         if filename:
 *             self._configFile = filename             # <<<<<<<<<<<<<<
 *         if self._configFile:
 *             for sec in self._projectConf.sections():
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_configFile, __pyx_v_filename) < 0) __PYX_ERR(0, 900, __pyx_L1_error)

    /* "metaphor/chem_gm/core/gmtoolbox.py":899
 * 
 *     def readConfig(self, filename=""):
 *         if filename:             # <<<<<<<<<<<<<<
 *             self._configFile = filename
 *         if self._configFile:
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":901
 *         if filename:
 *             self._configFile = filename
 *         if self._configFile:             # <<<<<<<<<<<<<<
 *             for sec in self._projectConf.sections():
 *                 for opt in self._projectConf.options(sec):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_configFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":902
 *             self._configFile = filename
 *         if self._configFile:
 *             for sec in self._projectConf.sections():             # <<<<<<<<<<<<<<
 *                 for opt in self._projectConf.options(sec):
 *                     self._projectConf.remove_option(sec, opt)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 902, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sections); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 902, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 902, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 902, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 902, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 902, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 902, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 902, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 902, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 902, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_6(__pyx_t_4);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 902, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_sec, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":903
 *         if self._configFile:
 *             for sec in self._projectConf.sections():
 *                 for opt in self._projectConf.options(sec):             # <<<<<<<<<<<<<<
 *                     self._projectConf.remove_option(sec, opt)
 *                 self._projectConf.remove_section(sec)
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 903, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_options); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 903, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      if (!__pyx_t_3) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_sec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 903, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_sec};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 903, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_sec};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 903, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 903, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __pyx_t_3 = NULL;
          __Pyx_INCREF(__pyx_v_sec);
          __Pyx_GIVEREF(__pyx_v_sec);
          PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_sec);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 903, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
        __pyx_t_7 = __pyx_t_2; __Pyx_INCREF(__pyx_t_7); __pyx_t_9 = 0;
        __pyx_t_10 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 903, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_10 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 903, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      for (;;) {
        if (likely(!__pyx_t_10)) {
          if (likely(PyList_CheckExact(__pyx_t_7))) {
            if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_7)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 903, __pyx_L1_error)
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 903, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          } else {
            if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 903, __pyx_L1_error)
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 903, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          }
        } else {
          __pyx_t_2 = __pyx_t_10(__pyx_t_7);
          if (unlikely(!__pyx_t_2)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 903, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_XDECREF_SET(__pyx_v_opt, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":904
 *             for sec in self._projectConf.sections():
 *                 for opt in self._projectConf.options(sec):
 *                     self._projectConf.remove_option(sec, opt)             # <<<<<<<<<<<<<<
 *                 self._projectConf.remove_section(sec)
 *             self._projectConf.read(self._configFile)
 */
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 904, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_remove_option); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 904, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = NULL;
        __pyx_t_11 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_11 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_sec, __pyx_v_opt};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 904, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_sec, __pyx_v_opt};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 904, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 904, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          if (__pyx_t_8) {
            __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_8); __pyx_t_8 = NULL;
          }
          __Pyx_INCREF(__pyx_v_sec);
          __Pyx_GIVEREF(__pyx_v_sec);
          PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_v_sec);
          __Pyx_INCREF(__pyx_v_opt);
          __Pyx_GIVEREF(__pyx_v_opt);
          PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_v_opt);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 904, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "metaphor/chem_gm/core/gmtoolbox.py":903
 *         if self._configFile:
 *             for sec in self._projectConf.sections():
 *                 for opt in self._projectConf.options(sec):             # <<<<<<<<<<<<<<
 *                     self._projectConf.remove_option(sec, opt)
 *                 self._projectConf.remove_section(sec)
 */
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":905
 *                 for opt in self._projectConf.options(sec):
 *                     self._projectConf.remove_option(sec, opt)
 *                 self._projectConf.remove_section(sec)             # <<<<<<<<<<<<<<
 *             self._projectConf.read(self._configFile)
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 905, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_remove_section); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 905, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_2) {
        __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_sec); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 905, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_sec};
          __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 905, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_7);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_sec};
          __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 905, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_7);
        } else
        #endif
        {
          __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 905, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2); __pyx_t_2 = NULL;
          __Pyx_INCREF(__pyx_v_sec);
          __Pyx_GIVEREF(__pyx_v_sec);
          PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_sec);
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 905, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":902
 *             self._configFile = filename
 *         if self._configFile:
 *             for sec in self._projectConf.sections():             # <<<<<<<<<<<<<<
 *                 for opt in self._projectConf.options(sec):
 *                     self._projectConf.remove_option(sec, opt)
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":906
 *                     self._projectConf.remove_option(sec, opt)
 *                 self._projectConf.remove_section(sec)
 *             self._projectConf.read(self._configFile)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 906, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_read); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 906, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_configFile); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 906, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_12 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_12)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_12) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 906, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_7};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 906, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_7};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 906, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      {
        __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 906, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_12); __pyx_t_12 = NULL;
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_7);
        __pyx_t_7 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 906, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":901
 *         if filename:
 *             self._configFile = filename
 *         if self._configFile:             # <<<<<<<<<<<<<<
 *             for sec in self._projectConf.sections():
 *                 for opt in self._projectConf.options(sec):
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":898
 *             self.readConfig(value)
 * 
 *     def readConfig(self, filename=""):             # <<<<<<<<<<<<<<
 *         if filename:
 *             self._configFile = filename
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.readConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sec);
  __Pyx_XDECREF(__pyx_v_opt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":909
 * 
 * 
 *     def fullProjectIniFile(self, key):             # <<<<<<<<<<<<<<
 *         st = os.path.join(self.projectDir, key, key + ".cfg")
 *         #st = os.path.join(self.projectDir, self.projectIniFile)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_75fullProjectIniFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_75fullProjectIniFile = {"fullProjectIniFile", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_75fullProjectIniFile, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_75fullProjectIniFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fullProjectIniFile (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_key,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("fullProjectIniFile", 1, 2, 2, 1); __PYX_ERR(0, 909, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fullProjectIniFile") < 0)) __PYX_ERR(0, 909, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_key = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fullProjectIniFile", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 909, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.fullProjectIniFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_74fullProjectIniFile(__pyx_self, __pyx_v_self, __pyx_v_key);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_74fullProjectIniFile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_v_st = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("fullProjectIniFile", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":910
 * 
 *     def fullProjectIniFile(self, key):
 *         st = os.path.join(self.projectDir, key, key + ".cfg")             # <<<<<<<<<<<<<<
 *         #st = os.path.join(self.projectDir, self.projectIniFile)
 *         return self.getProjectConf("projects", key, st)
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_join); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectDir); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyNumber_Add(__pyx_v_key, __pyx_kp_u_cfg); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_3, __pyx_v_key, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_3, __pyx_v_key, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 910, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_key);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_t_4);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_st = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":912
 *         st = os.path.join(self.projectDir, key, key + ".cfg")
 *         #st = os.path.join(self.projectDir, self.projectIniFile)
 *         return self.getProjectConf("projects", key, st)             # <<<<<<<<<<<<<<
 * 
 *     def updateConfig(self, section, items):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getProjectConf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_n_u_projects, __pyx_v_key, __pyx_v_st};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 912, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_n_u_projects, __pyx_v_key, __pyx_v_st};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 912, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_4 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 912, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_INCREF(__pyx_n_u_projects);
    __Pyx_GIVEREF(__pyx_n_u_projects);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_n_u_projects);
    __Pyx_INCREF(__pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_v_key);
    __Pyx_INCREF(__pyx_v_st);
    __Pyx_GIVEREF(__pyx_v_st);
    PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_6, __pyx_v_st);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 912, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":909
 * 
 * 
 *     def fullProjectIniFile(self, key):             # <<<<<<<<<<<<<<
 *         st = os.path.join(self.projectDir, key, key + ".cfg")
 *         #st = os.path.join(self.projectDir, self.projectIniFile)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.fullProjectIniFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_st);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":914
 *         return self.getProjectConf("projects", key, st)
 * 
 *     def updateConfig(self, section, items):             # <<<<<<<<<<<<<<
 *         if not self._projectConf.has_section(section):
 *             self._projectConf.add_section(section)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_77updateConfig(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_77updateConfig = {"updateConfig", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_77updateConfig, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_77updateConfig(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_section = 0;
  PyObject *__pyx_v_items = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateConfig (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_section,&__pyx_n_s_items,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_section)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("updateConfig", 1, 3, 3, 1); __PYX_ERR(0, 914, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_items)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("updateConfig", 1, 3, 3, 2); __PYX_ERR(0, 914, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateConfig") < 0)) __PYX_ERR(0, 914, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_section = values[1];
    __pyx_v_items = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateConfig", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 914, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.updateConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_76updateConfig(__pyx_self, __pyx_v_self, __pyx_v_section, __pyx_v_items);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_76updateConfig(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_section, PyObject *__pyx_v_items) {
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_t_11;
  __Pyx_RefNannySetupContext("updateConfig", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":915
 * 
 *     def updateConfig(self, section, items):
 *         if not self._projectConf.has_section(section):             # <<<<<<<<<<<<<<
 *             self._projectConf.add_section(section)
 *         for key, value in items:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_has_section); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_section); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_section};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 915, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_section};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 915, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 915, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_section);
      __Pyx_GIVEREF(__pyx_v_section);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_section);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 915, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 915, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = ((!__pyx_t_5) != 0);
  if (__pyx_t_6) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":916
 *     def updateConfig(self, section, items):
 *         if not self._projectConf.has_section(section):
 *             self._projectConf.add_section(section)             # <<<<<<<<<<<<<<
 *         for key, value in items:
 *             self._projectConf.set(section, key, value)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 916, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_add_section); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 916, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_section); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 916, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_section};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 916, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_section};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 916, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      {
        __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 916, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_v_section);
        __Pyx_GIVEREF(__pyx_v_section);
        PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_section);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 916, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":915
 * 
 *     def updateConfig(self, section, items):
 *         if not self._projectConf.has_section(section):             # <<<<<<<<<<<<<<
 *             self._projectConf.add_section(section)
 *         for key, value in items:
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":917
 *         if not self._projectConf.has_section(section):
 *             self._projectConf.add_section(section)
 *         for key, value in items:             # <<<<<<<<<<<<<<
 *             self._projectConf.set(section, key, value)
 * 
 */
  if (likely(PyList_CheckExact(__pyx_v_items)) || PyTuple_CheckExact(__pyx_v_items)) {
    __pyx_t_1 = __pyx_v_items; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 917, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 917, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 917, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 917, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 917, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_8(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 917, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
      PyObject* sequence = __pyx_t_4;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 917, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      #else
      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 917, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 917, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 917, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
      index = 0; __pyx_t_2 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_3 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 917, __pyx_L1_error)
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 917, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":918
 *             self._projectConf.add_section(section)
 *         for key, value in items:
 *             self._projectConf.set(section, key, value)             # <<<<<<<<<<<<<<
 * 
 *     def connect(self, config):
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_projectConf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 918, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 918, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_11 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_11 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_section, __pyx_v_key, __pyx_v_value};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 918, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_section, __pyx_v_key, __pyx_v_value};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 918, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 918, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_INCREF(__pyx_v_section);
      __Pyx_GIVEREF(__pyx_v_section);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_11, __pyx_v_section);
      __Pyx_INCREF(__pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_11, __pyx_v_key);
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_11, __pyx_v_value);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 918, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":917
 *         if not self._projectConf.has_section(section):
 *             self._projectConf.add_section(section)
 *         for key, value in items:             # <<<<<<<<<<<<<<
 *             self._projectConf.set(section, key, value)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":914
 *         return self.getProjectConf("projects", key, st)
 * 
 *     def updateConfig(self, section, items):             # <<<<<<<<<<<<<<
 *         if not self._projectConf.has_section(section):
 *             self._projectConf.add_section(section)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.updateConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":920
 *             self._projectConf.set(section, key, value)
 * 
 *     def connect(self, config):             # <<<<<<<<<<<<<<
 *         res = defaultdict(lambda:0)
 *         options = config.options("connectivity")
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_79connect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_79connect = {"connect", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_79connect, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_79connect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_config = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("connect (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_config,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_config)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("connect", 1, 2, 2, 1); __PYX_ERR(0, 920, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "connect") < 0)) __PYX_ERR(0, 920, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_config = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("connect", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 920, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_78connect(__pyx_self, __pyx_v_self, __pyx_v_config);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":921
 * 
 *     def connect(self, config):
 *         res = defaultdict(lambda:0)             # <<<<<<<<<<<<<<
 *         options = config.options("connectivity")
 *         optionoccur = config.options("occurence")
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_7connect_lambda6(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_7connect_lambda6 = {"lambda6", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_7connect_lambda6, METH_NOARGS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_7connect_lambda6(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda6 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda6(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda6(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda6", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_0);
  __pyx_r = __pyx_int_0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":920
 *             self._projectConf.set(section, key, value)
 * 
 *     def connect(self, config):             # <<<<<<<<<<<<<<
 *         res = defaultdict(lambda:0)
 *         options = config.options("connectivity")
 */

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_78connect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_config) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_options = NULL;
  PyObject *__pyx_v_optionoccur = NULL;
  PyObject *__pyx_v_extraopts = NULL;
  PyObject *__pyx_v_extraoptslow = NULL;
  PyObject *__pyx_v_opt = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_ind = NULL;
  PyObject *__pyx_9genexpr15__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("connect", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":921
 * 
 *     def connect(self, config):
 *         res = defaultdict(lambda:0)             # <<<<<<<<<<<<<<
 *         options = config.options("connectivity")
 *         optionoccur = config.options("occurence")
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_7connect_lambda6, 0, __pyx_n_s_GMEngine_connect_locals_lambda, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 921, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 921, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 921, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 921, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 921, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_res = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":922
 *     def connect(self, config):
 *         res = defaultdict(lambda:0)
 *         options = config.options("connectivity")             # <<<<<<<<<<<<<<
 *         optionoccur = config.options("occurence")
 *         extraopts = self.extras(config)  #.values()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_options = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":923
 *         res = defaultdict(lambda:0)
 *         options = config.options("connectivity")
 *         optionoccur = config.options("occurence")             # <<<<<<<<<<<<<<
 *         extraopts = self.extras(config)  #.values()
 *         extraoptslow = [val.lower() for val in extraopts]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_options); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_optionoccur = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":924
 *         options = config.options("connectivity")
 *         optionoccur = config.options("occurence")
 *         extraopts = self.extras(config)  #.values()             # <<<<<<<<<<<<<<
 *         extraoptslow = [val.lower() for val in extraopts]
 *         for opt in options:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extras); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_config); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_config};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_config};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 924, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_v_config);
      __Pyx_GIVEREF(__pyx_v_config);
      PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_config);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_extraopts = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":925
 *         optionoccur = config.options("occurence")
 *         extraopts = self.extras(config)  #.values()
 *         extraoptslow = [val.lower() for val in extraopts]             # <<<<<<<<<<<<<<
 *         for opt in options:
 *             n = config.getint("connectivity", opt)
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 925, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_v_extraopts)) || PyTuple_CheckExact(__pyx_v_extraopts)) {
      __pyx_t_2 = __pyx_v_extraopts; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_extraopts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 925, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 925, __pyx_L5_error)
    }
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 925, __pyx_L5_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 925, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 925, __pyx_L5_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 925, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_7(__pyx_t_2);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 925, __pyx_L5_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr15__pyx_v_val, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr15__pyx_v_val, __pyx_n_s_lower); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 925, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 925, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 925, __pyx_L5_error)
      }
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 925, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_val); __pyx_9genexpr15__pyx_v_val = 0;
    goto __pyx_L8_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_val); __pyx_9genexpr15__pyx_v_val = 0;
    goto __pyx_L1_error;
    __pyx_L8_exit_scope:;
  } /* exit inner scope */
  __pyx_v_extraoptslow = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":926
 *         extraopts = self.extras(config)  #.values()
 *         extraoptslow = [val.lower() for val in extraopts]
 *         for opt in options:             # <<<<<<<<<<<<<<
 *             n = config.getint("connectivity", opt)
 *             if opt in optionoccur:
 */
  if (likely(PyList_CheckExact(__pyx_v_options)) || PyTuple_CheckExact(__pyx_v_options)) {
    __pyx_t_1 = __pyx_v_options; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 926, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 926, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 926, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 926, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 926, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_7(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 926, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_opt, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":927
 *         extraoptslow = [val.lower() for val in extraopts]
 *         for opt in options:
 *             n = config.getint("connectivity", opt)             # <<<<<<<<<<<<<<
 *             if opt in optionoccur:
 *                 res[opt.capitalize()] = n  #
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_getint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 927, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_u_connectivity, __pyx_v_opt};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 927, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_u_connectivity, __pyx_v_opt};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 927, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 927, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_n_u_connectivity);
      __Pyx_GIVEREF(__pyx_n_u_connectivity);
      PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_8, __pyx_n_u_connectivity);
      __Pyx_INCREF(__pyx_v_opt);
      __Pyx_GIVEREF(__pyx_v_opt);
      PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_8, __pyx_v_opt);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 927, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":928
 *         for opt in options:
 *             n = config.getint("connectivity", opt)
 *             if opt in optionoccur:             # <<<<<<<<<<<<<<
 *                 res[opt.capitalize()] = n  #
 *             elif opt in extraoptslow:
 */
    __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_opt, __pyx_v_optionoccur, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 928, __pyx_L1_error)
    __pyx_t_10 = (__pyx_t_9 != 0);
    if (__pyx_t_10) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":929
 *             n = config.getint("connectivity", opt)
 *             if opt in optionoccur:
 *                 res[opt.capitalize()] = n  #             # <<<<<<<<<<<<<<
 *             elif opt in extraoptslow:
 *                 ind = extraoptslow.index(opt)
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_opt, __pyx_n_s_capitalize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 929, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 929, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 929, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(PyObject_SetItem(__pyx_v_res, __pyx_t_2, __pyx_v_n) < 0)) __PYX_ERR(0, 929, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":928
 *         for opt in options:
 *             n = config.getint("connectivity", opt)
 *             if opt in optionoccur:             # <<<<<<<<<<<<<<
 *                 res[opt.capitalize()] = n  #
 *             elif opt in extraoptslow:
 */
      goto __pyx_L11;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":930
 *             if opt in optionoccur:
 *                 res[opt.capitalize()] = n  #
 *             elif opt in extraoptslow:             # <<<<<<<<<<<<<<
 *                 ind = extraoptslow.index(opt)
 *                 res[extraopts[ind]] = n
 */
    __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_opt, __pyx_v_extraoptslow, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 930, __pyx_L1_error)
    __pyx_t_9 = (__pyx_t_10 != 0);
    if (__pyx_t_9) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":931
 *                 res[opt.capitalize()] = n  #
 *             elif opt in extraoptslow:
 *                 ind = extraoptslow.index(opt)             # <<<<<<<<<<<<<<
 *                 res[extraopts[ind]] = n
 *             else:
 */
      __pyx_t_2 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyList_Type_index, __pyx_v_extraoptslow, __pyx_v_opt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 931, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":932
 *             elif opt in extraoptslow:
 *                 ind = extraoptslow.index(opt)
 *                 res[extraopts[ind]] = n             # <<<<<<<<<<<<<<
 *             else:
 *                 res[key2short(opt)] = n
 */
      __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_extraopts, __pyx_v_ind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 932, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(PyObject_SetItem(__pyx_v_res, __pyx_t_2, __pyx_v_n) < 0)) __PYX_ERR(0, 932, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":930
 *             if opt in optionoccur:
 *                 res[opt.capitalize()] = n  #
 *             elif opt in extraoptslow:             # <<<<<<<<<<<<<<
 *                 ind = extraoptslow.index(opt)
 *                 res[extraopts[ind]] = n
 */
      goto __pyx_L11;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":934
 *                 res[extraopts[ind]] = n
 *             else:
 *                 res[key2short(opt)] = n             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
    /*else*/ {
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_key2short); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 934, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_opt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 934, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_opt};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 934, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_opt};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 934, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 934, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_opt);
          __Pyx_GIVEREF(__pyx_v_opt);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_opt);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 934, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(PyObject_SetItem(__pyx_v_res, __pyx_t_2, __pyx_v_n) < 0)) __PYX_ERR(0, 934, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_L11:;

    /* "metaphor/chem_gm/core/gmtoolbox.py":926
 *         extraopts = self.extras(config)  #.values()
 *         extraoptslow = [val.lower() for val in extraopts]
 *         for opt in options:             # <<<<<<<<<<<<<<
 *             n = config.getint("connectivity", opt)
 *             if opt in optionoccur:
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":935
 *             else:
 *                 res[key2short(opt)] = n
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     def extras(self, config):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":920
 *             self._projectConf.set(section, key, value)
 * 
 *     def connect(self, config):             # <<<<<<<<<<<<<<
 *         res = defaultdict(lambda:0)
 *         options = config.options("connectivity")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_options);
  __Pyx_XDECREF(__pyx_v_optionoccur);
  __Pyx_XDECREF(__pyx_v_extraopts);
  __Pyx_XDECREF(__pyx_v_extraoptslow);
  __Pyx_XDECREF(__pyx_v_opt);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_ind);
  __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":937
 *         return res
 * 
 *     def extras(self, config):             # <<<<<<<<<<<<<<
 *         if not config.has_section("general"):
 *             return []
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_81extras(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_81extras = {"extras", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_81extras, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_81extras(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_config = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extras (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_config,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_config)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("extras", 1, 2, 2, 1); __PYX_ERR(0, 937, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "extras") < 0)) __PYX_ERR(0, 937, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_config = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("extras", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 937, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.extras", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_80extras(__pyx_self, __pyx_v_self, __pyx_v_config);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_80extras(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_config) {
  PyObject *__pyx_v_st = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_lst = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_9genexpr16__pyx_v_option = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  __Pyx_RefNannySetupContext("extras", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":938
 * 
 *     def extras(self, config):
 *         if not config.has_section("general"):             # <<<<<<<<<<<<<<
 *             return []
 *         st = config.getdefault("general", "extras", "")
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_has_section); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = ((!__pyx_t_3) != 0);
  if (__pyx_t_4) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":939
 *     def extras(self, config):
 *         if not config.has_section("general"):
 *             return []             # <<<<<<<<<<<<<<
 *         st = config.getdefault("general", "extras", "")
 *         if st:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 939, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":938
 * 
 *     def extras(self, config):
 *         if not config.has_section("general"):             # <<<<<<<<<<<<<<
 *             return []
 *         st = config.getdefault("general", "extras", "")
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":940
 *         if not config.has_section("general"):
 *             return []
 *         st = config.getdefault("general", "extras", "")             # <<<<<<<<<<<<<<
 *         if st:
 *             return st.split(',')
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_getdefault); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_st = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":941
 *             return []
 *         st = config.getdefault("general", "extras", "")
 *         if st:             # <<<<<<<<<<<<<<
 *             return st.split(',')
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_st); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 941, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":942
 *         st = config.getdefault("general", "extras", "")
 *         if st:
 *             return st.split(',')             # <<<<<<<<<<<<<<
 * 
 *         res= []
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_st, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":941
 *             return []
 *         st = config.getdefault("general", "extras", "")
 *         if st:             # <<<<<<<<<<<<<<
 *             return st.split(',')
 * 
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":944
 *             return st.split(',')
 * 
 *         res= []             # <<<<<<<<<<<<<<
 *         lst = [option for option in config.options("general") if option.startswith("extra") and (option != "extras")]
 *         for i in range(len(lst)):
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_res = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":945
 * 
 *         res= []
 *         lst = [option for option in config.options("general") if option.startswith("extra") and (option != "extras")]             # <<<<<<<<<<<<<<
 *         for i in range(len(lst)):
 *             st = config.get("general", "extra(%d)"% i)
 */
  { /* enter inner scope */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 945, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
      __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 945, __pyx_L7_error)
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 945, __pyx_L7_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 945, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 945, __pyx_L7_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 945, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_7(__pyx_t_1);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 945, __pyx_L7_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr16__pyx_v_option, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr16__pyx_v_option, __pyx_n_s_startswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 945, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 945, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 945, __pyx_L7_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (__pyx_t_3) {
      } else {
        __pyx_t_4 = __pyx_t_3;
        goto __pyx_L11_bool_binop_done;
      }
      __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_9genexpr16__pyx_v_option, __pyx_n_u_extras, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 945, __pyx_L7_error)
      __pyx_t_4 = __pyx_t_3;
      __pyx_L11_bool_binop_done:;
      if (__pyx_t_4) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_9genexpr16__pyx_v_option))) __PYX_ERR(0, 945, __pyx_L7_error)
      }
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_option); __pyx_9genexpr16__pyx_v_option = 0;
    goto __pyx_L13_exit_scope;
    __pyx_L7_error:;
    __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_option); __pyx_9genexpr16__pyx_v_option = 0;
    goto __pyx_L1_error;
    __pyx_L13_exit_scope:;
  } /* exit inner scope */
  __pyx_v_lst = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":946
 *         res= []
 *         lst = [option for option in config.options("general") if option.startswith("extra") and (option != "extras")]
 *         for i in range(len(lst)):             # <<<<<<<<<<<<<<
 *             st = config.get("general", "extra(%d)"% i)
 *             res.append(st)
 */
  __pyx_t_6 = PyList_GET_SIZE(__pyx_v_lst); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 946, __pyx_L1_error)
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 946, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 946, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 946, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 946, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 946, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 946, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_7(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 946, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":947
 *         lst = [option for option in config.options("general") if option.startswith("extra") and (option != "extras")]
 *         for i in range(len(lst)):
 *             st = config.get("general", "extra(%d)"% i)             # <<<<<<<<<<<<<<
 *             res.append(st)
 *         return res
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 947, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_extra_d, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 947, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_n_u_general, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_n_u_general, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 947, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      if (__pyx_t_9) {
        __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
      }
      __Pyx_INCREF(__pyx_n_u_general);
      __Pyx_GIVEREF(__pyx_n_u_general);
      PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_n_u_general);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF_SET(__pyx_v_st, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":948
 *         for i in range(len(lst)):
 *             st = config.get("general", "extra(%d)"% i)
 *             res.append(st)             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
    __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_res, __pyx_v_st); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 948, __pyx_L1_error)

    /* "metaphor/chem_gm/core/gmtoolbox.py":946
 *         res= []
 *         lst = [option for option in config.options("general") if option.startswith("extra") and (option != "extras")]
 *         for i in range(len(lst)):             # <<<<<<<<<<<<<<
 *             st = config.get("general", "extra(%d)"% i)
 *             res.append(st)
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":949
 *             st = config.get("general", "extra(%d)"% i)
 *             res.append(st)
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     def getResults(self, reseau, quotechar="", withtitles=True, pptyname=""):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":937
 *         return res
 * 
 *     def extras(self, config):             # <<<<<<<<<<<<<<
 *         if not config.has_section("general"):
 *             return []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.extras", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_st);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_lst);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_option);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmtoolbox.py":951
 *         return res
 * 
 *     def getResults(self, reseau, quotechar="", withtitles=True, pptyname=""):             # <<<<<<<<<<<<<<
 *         try:
 *             ni = reseau.inputCount
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_83getResults(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_83getResults = {"getResults", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_83getResults, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_83getResults(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_reseau = 0;
  PyObject *__pyx_v_quotechar = 0;
  PyObject *__pyx_v_withtitles = 0;
  PyObject *__pyx_v_pptyname = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getResults (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_reseau,&__pyx_n_s_quotechar,&__pyx_n_s_withtitles,&__pyx_n_s_pptyname,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[2] = ((PyObject *)((PyObject*)__pyx_kp_u__4));
    values[3] = ((PyObject *)((PyObject *)Py_True));
    values[4] = ((PyObject *)((PyObject*)__pyx_kp_u__4));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reseau)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getResults", 0, 2, 5, 1); __PYX_ERR(0, 951, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_quotechar);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_withtitles);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pptyname);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getResults") < 0)) __PYX_ERR(0, 951, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_reseau = values[1];
    __pyx_v_quotechar = values[2];
    __pyx_v_withtitles = values[3];
    __pyx_v_pptyname = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getResults", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 951, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.getResults", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_82getResults(__pyx_self, __pyx_v_self, __pyx_v_reseau, __pyx_v_quotechar, __pyx_v_withtitles, __pyx_v_pptyname);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_82getResults(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_reseau, PyObject *__pyx_v_quotechar, PyObject *__pyx_v_withtitles, PyObject *__pyx_v_pptyname) {
  PyObject *__pyx_v_ni = NULL;
  PyObject *__pyx_v_no = NULL;
  PyObject *__pyx_v_fullres = NULL;
  PyObject *__pyx_v_jacobian = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_vec = NULL;
  PyObject *__pyx_v_ii = NULL;
  PyObject *__pyx_v_target = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_computed = NULL;
  PyObject *__pyx_v_leverage = NULL;
  PyObject *__pyx_v_residual = NULL;
  PyObject *__pyx_v_prevLOO = NULL;
  PyObject *__pyx_v_l1 = NULL;
  PyObject *__pyx_v_ppty = NULL;
  PyObject *__pyx_v_titles = NULL;
  PyObject *__pyx_9genexpr17__pyx_v_val = NULL;
  PyObject *__pyx_9genexpr18__pyx_v_val = NULL;
  PyObject *__pyx_9genexpr19__pyx_v_val = NULL;
  PyObject *__pyx_9genexpr20__pyx_v_val = NULL;
  PyObject *__pyx_9genexpr21__pyx_v_val = NULL;
  PyObject *__pyx_9genexpr22__pyx_v_val = NULL;
  PyObject *__pyx_9genexpr23__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  PyObject *(*__pyx_t_15)(PyObject *);
  Py_ssize_t __pyx_t_16;
  PyObject *(*__pyx_t_17)(PyObject *);
  int __pyx_t_18;
  int __pyx_t_19;
  __Pyx_RefNannySetupContext("getResults", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":952
 * 
 *     def getResults(self, reseau, quotechar="", withtitles=True, pptyname=""):
 *         try:             # <<<<<<<<<<<<<<
 *             ni = reseau.inputCount
 *             no = reseau.outputCount
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "metaphor/chem_gm/core/gmtoolbox.py":953
 *     def getResults(self, reseau, quotechar="", withtitles=True, pptyname=""):
 *         try:
 *             ni = reseau.inputCount             # <<<<<<<<<<<<<<
 *             no = reseau.outputCount
 *             fullres, jacobian = reseau.getTransferResults()
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_reseau, __pyx_n_s_inputCount); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 953, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_ni = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":954
 *         try:
 *             ni = reseau.inputCount
 *             no = reseau.outputCount             # <<<<<<<<<<<<<<
 *             fullres, jacobian = reseau.getTransferResults()
 *         except AttributeError:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_reseau, __pyx_n_s_outputCount); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 954, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_no = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":955
 *             ni = reseau.inputCount
 *             no = reseau.outputCount
 *             fullres, jacobian = reseau.getTransferResults()             # <<<<<<<<<<<<<<
 *         except AttributeError:
 *             ni = reseau.info[C.INPUT_COUNT]
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_reseau, __pyx_n_s_getTransferResults); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 955, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      if (__pyx_t_6) {
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 955, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else {
        __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 955, __pyx_L3_error)
      }
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
        PyObject* sequence = __pyx_t_4;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 955, __pyx_L3_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        #else
        __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 955, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 955, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 955, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
        index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L9_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_5);
        index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L9_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 955, __pyx_L3_error)
        __pyx_t_8 = NULL;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L10_unpacking_done;
        __pyx_L9_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_8 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 955, __pyx_L3_error)
        __pyx_L10_unpacking_done:;
      }
      __pyx_v_fullres = __pyx_t_5;
      __pyx_t_5 = 0;
      __pyx_v_jacobian = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":952
 * 
 *     def getResults(self, reseau, quotechar="", withtitles=True, pptyname=""):
 *         try:             # <<<<<<<<<<<<<<
 *             ni = reseau.inputCount
 *             no = reseau.outputCount
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":956
 *             no = reseau.outputCount
 *             fullres, jacobian = reseau.getTransferResults()
 *         except AttributeError:             # <<<<<<<<<<<<<<
 *             ni = reseau.info[C.INPUT_COUNT]
 *             no = reseau.info[C.OUTPUT_COUNT]
 */
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_9) {
      __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.getResults", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 956, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_5);

      /* "metaphor/chem_gm/core/gmtoolbox.py":957
 *             fullres, jacobian = reseau.getTransferResults()
 *         except AttributeError:
 *             ni = reseau.info[C.INPUT_COUNT]             # <<<<<<<<<<<<<<
 *             no = reseau.info[C.OUTPUT_COUNT]
 *             fullres = reseau.getArray(-1, C.VE_TRAINING_DATA_LONG)
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_reseau, __pyx_n_s_info); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 957, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 957, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_INPUT_COUNT); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 957, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 957, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF_SET(__pyx_v_ni, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":958
 *         except AttributeError:
 *             ni = reseau.info[C.INPUT_COUNT]
 *             no = reseau.info[C.OUTPUT_COUNT]             # <<<<<<<<<<<<<<
 *             fullres = reseau.getArray(-1, C.VE_TRAINING_DATA_LONG)
 *             jacobian = reseau.getArray(0, C.VE_JACOBIAN)
 */
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_reseau, __pyx_n_s_info); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 958, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 958, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_OUTPUT_COUNT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 958, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_t_10, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 958, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF_SET(__pyx_v_no, __pyx_t_11);
      __pyx_t_11 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":959
 *             ni = reseau.info[C.INPUT_COUNT]
 *             no = reseau.info[C.OUTPUT_COUNT]
 *             fullres = reseau.getArray(-1, C.VE_TRAINING_DATA_LONG)             # <<<<<<<<<<<<<<
 *             jacobian = reseau.getArray(0, C.VE_JACOBIAN)
 * 
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_reseau, __pyx_n_s_getArray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 959, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 959, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_VE_TRAINING_DATA_LONG); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 959, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      __pyx_t_9 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_9 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_int_neg_1, __pyx_t_12};
        __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 959, __pyx_L5_except_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_int_neg_1, __pyx_t_12};
        __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 959, __pyx_L5_except_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      } else
      #endif
      {
        __pyx_t_13 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 959, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_13);
        if (__pyx_t_10) {
          __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_10); __pyx_t_10 = NULL;
        }
        __Pyx_INCREF(__pyx_int_neg_1);
        __Pyx_GIVEREF(__pyx_int_neg_1);
        PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_9, __pyx_int_neg_1);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_9, __pyx_t_12);
        __pyx_t_12 = 0;
        __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_13, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 959, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF_SET(__pyx_v_fullres, __pyx_t_11);
      __pyx_t_11 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":960
 *             no = reseau.info[C.OUTPUT_COUNT]
 *             fullres = reseau.getArray(-1, C.VE_TRAINING_DATA_LONG)
 *             jacobian = reseau.getArray(0, C.VE_JACOBIAN)             # <<<<<<<<<<<<<<
 * 
 *         res = np.zeros((fullres.shape[0], fullres.shape[1]+jacobian.shape[1] + 1))
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_reseau, __pyx_n_s_getArray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 960, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_C); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 960, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_VE_JACOBIAN); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 960, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = NULL;
      __pyx_t_9 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_13)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_9 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_int_0, __pyx_t_12};
        __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 960, __pyx_L5_except_error)
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_int_0, __pyx_t_12};
        __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 960, __pyx_L5_except_error)
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      } else
      #endif
      {
        __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 960, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (__pyx_t_13) {
          __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_13); __pyx_t_13 = NULL;
        }
        __Pyx_INCREF(__pyx_int_0);
        __Pyx_GIVEREF(__pyx_int_0);
        PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_int_0);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_12);
        __pyx_t_12 = 0;
        __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 960, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF_SET(__pyx_v_jacobian, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "metaphor/chem_gm/core/gmtoolbox.py":952
 * 
 *     def getResults(self, reseau, quotechar="", withtitles=True, pptyname=""):
 *         try:             # <<<<<<<<<<<<<<
 *             ni = reseau.inputCount
 *             no = reseau.outputCount
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":962
 *             jacobian = reseau.getArray(0, C.VE_JACOBIAN)
 * 
 *         res = np.zeros((fullres.shape[0], fullres.shape[1]+jacobian.shape[1] + 1))             # <<<<<<<<<<<<<<
 *         for i in range(fullres.shape[0]):
 *             vec = fullres[i]
 */
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_fullres, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_fullres, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_6, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_jacobian, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_6, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyNumber_Add(__pyx_t_7, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = __Pyx_PyInt_AddObjC(__pyx_t_6, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_10);
  __pyx_t_11 = 0;
  __pyx_t_10 = 0;
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_10) {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 962, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_5);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_6};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 962, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_6};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 962, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 962, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 962, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_res = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":963
 * 
 *         res = np.zeros((fullres.shape[0], fullres.shape[1]+jacobian.shape[1] + 1))
 *         for i in range(fullres.shape[0]):             # <<<<<<<<<<<<<<
 *             vec = fullres[i]
 *             res[i][:fullres.shape[1]] = vec
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fullres, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
    __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_14 = 0;
    __pyx_t_15 = NULL;
  } else {
    __pyx_t_14 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 963, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_15 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 963, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  for (;;) {
    if (likely(!__pyx_t_15)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_14); __Pyx_INCREF(__pyx_t_5); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 963, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 963, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_14); __Pyx_INCREF(__pyx_t_5); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 963, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 963, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_15(__pyx_t_4);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 963, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":964
 *         res = np.zeros((fullres.shape[0], fullres.shape[1]+jacobian.shape[1] + 1))
 *         for i in range(fullres.shape[0]):
 *             vec = fullres[i]             # <<<<<<<<<<<<<<
 *             res[i][:fullres.shape[1]] = vec
 *             for ii in range(no):
 */
    __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_fullres, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XDECREF_SET(__pyx_v_vec, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":965
 *         for i in range(fullres.shape[0]):
 *             vec = fullres[i]
 *             res[i][:fullres.shape[1]] = vec             # <<<<<<<<<<<<<<
 *             for ii in range(no):
 *                 target = vec[ii]
 */
    __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_res, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 965, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_fullres, __pyx_n_s_shape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 965, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_11, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 965, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (__Pyx_PyObject_SetSlice(__pyx_t_5, __pyx_v_vec, 0, 0, NULL, &__pyx_t_6, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 965, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":966
 *             vec = fullres[i]
 *             res[i][:fullres.shape[1]] = vec
 *             for ii in range(no):             # <<<<<<<<<<<<<<
 *                 target = vec[ii]
 *                 computed = vec[ii + no]
 */
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_no); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_5 = __pyx_t_6; __Pyx_INCREF(__pyx_t_5); __pyx_t_16 = 0;
      __pyx_t_17 = NULL;
    } else {
      __pyx_t_16 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 966, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_17 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 966, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_17)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          if (__pyx_t_16 >= PyList_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_16); __Pyx_INCREF(__pyx_t_6); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 966, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 966, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_16 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_16); __Pyx_INCREF(__pyx_t_6); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 966, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 966, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_17(__pyx_t_5);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 966, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_ii, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":967
 *             res[i][:fullres.shape[1]] = vec
 *             for ii in range(no):
 *                 target = vec[ii]             # <<<<<<<<<<<<<<
 *                 computed = vec[ii + no]
 *                 leverage = vec[ii + 2*no]
 */
      __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_vec, __pyx_v_ii); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 967, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_XDECREF_SET(__pyx_v_target, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":968
 *             for ii in range(no):
 *                 target = vec[ii]
 *                 computed = vec[ii + no]             # <<<<<<<<<<<<<<
 *                 leverage = vec[ii + 2*no]
 *                 residual = vec[ii + 3*no]
 */
      __pyx_t_6 = PyNumber_Add(__pyx_v_ii, __pyx_v_no); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 968, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_vec, __pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 968, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_computed, __pyx_t_11);
      __pyx_t_11 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":969
 *                 target = vec[ii]
 *                 computed = vec[ii + no]
 *                 leverage = vec[ii + 2*no]             # <<<<<<<<<<<<<<
 *                 residual = vec[ii + 3*no]
 *                 prevLOO = target + residual/(1 - leverage)  # correction du 3/2/15: signe de la correction
 */
      __pyx_t_11 = PyNumber_Multiply(__pyx_int_2, __pyx_v_no); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 969, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_6 = PyNumber_Add(__pyx_v_ii, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 969, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_vec, __pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 969, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_leverage, __pyx_t_11);
      __pyx_t_11 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":970
 *                 computed = vec[ii + no]
 *                 leverage = vec[ii + 2*no]
 *                 residual = vec[ii + 3*no]             # <<<<<<<<<<<<<<
 *                 prevLOO = target + residual/(1 - leverage)  # correction du 3/2/15: signe de la correction
 *                 res[i][fullres.shape[1] + ii] = prevLOO
 */
      __pyx_t_11 = PyNumber_Multiply(__pyx_int_3, __pyx_v_no); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 970, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_6 = PyNumber_Add(__pyx_v_ii, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 970, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_vec, __pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 970, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_residual, __pyx_t_11);
      __pyx_t_11 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":971
 *                 leverage = vec[ii + 2*no]
 *                 residual = vec[ii + 3*no]
 *                 prevLOO = target + residual/(1 - leverage)  # correction du 3/2/15: signe de la correction             # <<<<<<<<<<<<<<
 *                 res[i][fullres.shape[1] + ii] = prevLOO
 *             res[i][fullres.shape[1] + no:] = jacobian[i]
 */
      __pyx_t_11 = __Pyx_PyInt_SubtractCObj(__pyx_int_1, __pyx_v_leverage, 1, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 971, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_v_residual, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 971, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = PyNumber_Add(__pyx_v_target, __pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 971, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_prevLOO, __pyx_t_11);
      __pyx_t_11 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":972
 *                 residual = vec[ii + 3*no]
 *                 prevLOO = target + residual/(1 - leverage)  # correction du 3/2/15: signe de la correction
 *                 res[i][fullres.shape[1] + ii] = prevLOO             # <<<<<<<<<<<<<<
 *             res[i][fullres.shape[1] + no:] = jacobian[i]
 * 
 */
      __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_res, __pyx_v_i); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 972, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_fullres, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 972, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_6, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 972, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyNumber_Add(__pyx_t_10, __pyx_v_ii); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 972, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_t_6, __pyx_v_prevLOO) < 0)) __PYX_ERR(0, 972, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":966
 *             vec = fullres[i]
 *             res[i][:fullres.shape[1]] = vec
 *             for ii in range(no):             # <<<<<<<<<<<<<<
 *                 target = vec[ii]
 *                 computed = vec[ii + no]
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":973
 *                 prevLOO = target + residual/(1 - leverage)  # correction du 3/2/15: signe de la correction
 *                 res[i][fullres.shape[1] + ii] = prevLOO
 *             res[i][fullres.shape[1] + no:] = jacobian[i]             # <<<<<<<<<<<<<<
 * 
 *         if withtitles:
 */
    __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_jacobian, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_res, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_fullres, __pyx_n_s_shape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_11, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = PyNumber_Add(__pyx_t_10, __pyx_v_no); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (__Pyx_PyObject_SetSlice(__pyx_t_6, __pyx_t_5, 0, 0, &__pyx_t_11, NULL, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 973, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":963
 * 
 *         res = np.zeros((fullres.shape[0], fullres.shape[1]+jacobian.shape[1] + 1))
 *         for i in range(fullres.shape[0]):             # <<<<<<<<<<<<<<
 *             vec = fullres[i]
 *             res[i][:fullres.shape[1]] = vec
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":975
 *             res[i][fullres.shape[1] + no:] = jacobian[i]
 * 
 *         if withtitles:             # <<<<<<<<<<<<<<
 *             l1 = list(reseau.inputNames) if ni else []
 *             if (no == 1):
 */
  __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_v_withtitles); if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(0, 975, __pyx_L1_error)
  if (__pyx_t_18) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":976
 * 
 *         if withtitles:
 *             l1 = list(reseau.inputNames) if ni else []             # <<<<<<<<<<<<<<
 *             if (no == 1):
 *                 ppty = pptyname if pptyname else reseau.outputNames[0]
 */
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_v_ni); if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(0, 976, __pyx_L1_error)
    if (__pyx_t_18) {
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_reseau, __pyx_n_s_inputNames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 976, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_11 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 976, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_4 = __pyx_t_11;
      __pyx_t_11 = 0;
    } else {
      __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 976, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_4 = __pyx_t_11;
      __pyx_t_11 = 0;
    }
    __pyx_v_l1 = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":977
 *         if withtitles:
 *             l1 = list(reseau.inputNames) if ni else []
 *             if (no == 1):             # <<<<<<<<<<<<<<
 *                 ppty = pptyname if pptyname else reseau.outputNames[0]
 *                 l1 = [ppty, "Computed %s"% ppty, "Leverage", "Residual", "cost",
 */
    __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_v_no, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 977, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(0, 977, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_18) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":978
 *             l1 = list(reseau.inputNames) if ni else []
 *             if (no == 1):
 *                 ppty = pptyname if pptyname else reseau.outputNames[0]             # <<<<<<<<<<<<<<
 *                 l1 = [ppty, "Computed %s"% ppty, "Leverage", "Residual", "cost",
 *                       "LOO %s"% ppty]
 */
      __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_v_pptyname); if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(0, 978, __pyx_L1_error)
      if (__pyx_t_18) {
        __Pyx_INCREF(__pyx_v_pptyname);
        __pyx_t_4 = __pyx_v_pptyname;
      } else {
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_reseau, __pyx_n_s_outputNames); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 978, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 978, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_4 = __pyx_t_5;
        __pyx_t_5 = 0;
      }
      __pyx_v_ppty = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":979
 *             if (no == 1):
 *                 ppty = pptyname if pptyname else reseau.outputNames[0]
 *                 l1 = [ppty, "Computed %s"% ppty, "Leverage", "Residual", "cost",             # <<<<<<<<<<<<<<
 *                       "LOO %s"% ppty]
 *             else:
 */
      __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_Computed_s, __pyx_v_ppty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 979, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

      /* "metaphor/chem_gm/core/gmtoolbox.py":980
 *                 ppty = pptyname if pptyname else reseau.outputNames[0]
 *                 l1 = [ppty, "Computed %s"% ppty, "Leverage", "Residual", "cost",
 *                       "LOO %s"% ppty]             # <<<<<<<<<<<<<<
 *             else:
 *                 l1 += [val for val in reseau.outputNames]
 */
      __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_LOO_s, __pyx_v_ppty); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 980, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

      /* "metaphor/chem_gm/core/gmtoolbox.py":979
 *             if (no == 1):
 *                 ppty = pptyname if pptyname else reseau.outputNames[0]
 *                 l1 = [ppty, "Computed %s"% ppty, "Leverage", "Residual", "cost",             # <<<<<<<<<<<<<<
 *                       "LOO %s"% ppty]
 *             else:
 */
      __pyx_t_11 = PyList_New(6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 979, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_INCREF(__pyx_v_ppty);
      __Pyx_GIVEREF(__pyx_v_ppty);
      PyList_SET_ITEM(__pyx_t_11, 0, __pyx_v_ppty);
      __Pyx_GIVEREF(__pyx_t_4);
      PyList_SET_ITEM(__pyx_t_11, 1, __pyx_t_4);
      __Pyx_INCREF(__pyx_n_u_Leverage);
      __Pyx_GIVEREF(__pyx_n_u_Leverage);
      PyList_SET_ITEM(__pyx_t_11, 2, __pyx_n_u_Leverage);
      __Pyx_INCREF(__pyx_n_u_Residual);
      __Pyx_GIVEREF(__pyx_n_u_Residual);
      PyList_SET_ITEM(__pyx_t_11, 3, __pyx_n_u_Residual);
      __Pyx_INCREF(__pyx_n_u_cost);
      __Pyx_GIVEREF(__pyx_n_u_cost);
      PyList_SET_ITEM(__pyx_t_11, 4, __pyx_n_u_cost);
      __Pyx_GIVEREF(__pyx_t_5);
      PyList_SET_ITEM(__pyx_t_11, 5, __pyx_t_5);
      __pyx_t_4 = 0;
      __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_l1, ((PyObject*)__pyx_t_11));
      __pyx_t_11 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":977
 *         if withtitles:
 *             l1 = list(reseau.inputNames) if ni else []
 *             if (no == 1):             # <<<<<<<<<<<<<<
 *                 ppty = pptyname if pptyname else reseau.outputNames[0]
 *                 l1 = [ppty, "Computed %s"% ppty, "Leverage", "Residual", "cost",
 */
      goto __pyx_L18;
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":982
 *                       "LOO %s"% ppty]
 *             else:
 *                 l1 += [val for val in reseau.outputNames]             # <<<<<<<<<<<<<<
 *                 l1 += ["Computed %s"% val for val in reseau.outputNames]
 *                 l1 += ["Leverage(%s)"% val for val in reseau.outputNames]
 */
    /*else*/ {
      { /* enter inner scope */
        __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 982, __pyx_L21_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_reseau, __pyx_n_s_outputNames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 982, __pyx_L21_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
          __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_14 = 0;
          __pyx_t_15 = NULL;
        } else {
          __pyx_t_14 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 982, __pyx_L21_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_15 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 982, __pyx_L21_error)
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        for (;;) {
          if (likely(!__pyx_t_15)) {
            if (likely(PyList_CheckExact(__pyx_t_4))) {
              if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_4)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_14); __Pyx_INCREF(__pyx_t_5); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 982, __pyx_L21_error)
              #else
              __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 982, __pyx_L21_error)
              __Pyx_GOTREF(__pyx_t_5);
              #endif
            } else {
              if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_14); __Pyx_INCREF(__pyx_t_5); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 982, __pyx_L21_error)
              #else
              __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 982, __pyx_L21_error)
              __Pyx_GOTREF(__pyx_t_5);
              #endif
            }
          } else {
            __pyx_t_5 = __pyx_t_15(__pyx_t_4);
            if (unlikely(!__pyx_t_5)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 982, __pyx_L21_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_5);
          }
          __Pyx_XDECREF_SET(__pyx_9genexpr17__pyx_v_val, __pyx_t_5);
          __pyx_t_5 = 0;
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_11, (PyObject*)__pyx_9genexpr17__pyx_v_val))) __PYX_ERR(0, 982, __pyx_L21_error)
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_9genexpr17__pyx_v_val); __pyx_9genexpr17__pyx_v_val = 0;
        goto __pyx_L24_exit_scope;
        __pyx_L21_error:;
        __Pyx_XDECREF(__pyx_9genexpr17__pyx_v_val); __pyx_9genexpr17__pyx_v_val = 0;
        goto __pyx_L1_error;
        __pyx_L24_exit_scope:;
      } /* exit inner scope */
      __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_l1, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 982, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF_SET(__pyx_v_l1, ((PyObject*)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":983
 *             else:
 *                 l1 += [val for val in reseau.outputNames]
 *                 l1 += ["Computed %s"% val for val in reseau.outputNames]             # <<<<<<<<<<<<<<
 *                 l1 += ["Leverage(%s)"% val for val in reseau.outputNames]
 *                 l1 += ["Residual(%s)"% val for val in reseau.outputNames]
 */
      { /* enter inner scope */
        __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 983, __pyx_L27_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_reseau, __pyx_n_s_outputNames); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 983, __pyx_L27_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) {
          __pyx_t_5 = __pyx_t_11; __Pyx_INCREF(__pyx_t_5); __pyx_t_14 = 0;
          __pyx_t_15 = NULL;
        } else {
          __pyx_t_14 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 983, __pyx_L27_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_15 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 983, __pyx_L27_error)
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        for (;;) {
          if (likely(!__pyx_t_15)) {
            if (likely(PyList_CheckExact(__pyx_t_5))) {
              if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_5)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_11 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_14); __Pyx_INCREF(__pyx_t_11); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 983, __pyx_L27_error)
              #else
              __pyx_t_11 = PySequence_ITEM(__pyx_t_5, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 983, __pyx_L27_error)
              __Pyx_GOTREF(__pyx_t_11);
              #endif
            } else {
              if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_14); __Pyx_INCREF(__pyx_t_11); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 983, __pyx_L27_error)
              #else
              __pyx_t_11 = PySequence_ITEM(__pyx_t_5, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 983, __pyx_L27_error)
              __Pyx_GOTREF(__pyx_t_11);
              #endif
            }
          } else {
            __pyx_t_11 = __pyx_t_15(__pyx_t_5);
            if (unlikely(!__pyx_t_11)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 983, __pyx_L27_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_11);
          }
          __Pyx_XDECREF_SET(__pyx_9genexpr18__pyx_v_val, __pyx_t_11);
          __pyx_t_11 = 0;
          __pyx_t_11 = PyUnicode_Format(__pyx_kp_u_Computed_s, __pyx_9genexpr18__pyx_v_val); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 983, __pyx_L27_error)
          __Pyx_GOTREF(__pyx_t_11);
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 983, __pyx_L27_error)
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_val); __pyx_9genexpr18__pyx_v_val = 0;
        goto __pyx_L30_exit_scope;
        __pyx_L27_error:;
        __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_val); __pyx_9genexpr18__pyx_v_val = 0;
        goto __pyx_L1_error;
        __pyx_L30_exit_scope:;
      } /* exit inner scope */
      __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_l1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 983, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_l1, ((PyObject*)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":984
 *                 l1 += [val for val in reseau.outputNames]
 *                 l1 += ["Computed %s"% val for val in reseau.outputNames]
 *                 l1 += ["Leverage(%s)"% val for val in reseau.outputNames]             # <<<<<<<<<<<<<<
 *                 l1 += ["Residual(%s)"% val for val in reseau.outputNames]
 *                 l1 += ["cost(%s)"% val for val in reseau.outputNames]
 */
      { /* enter inner scope */
        __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 984, __pyx_L33_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_reseau, __pyx_n_s_outputNames); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 984, __pyx_L33_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
          __pyx_t_11 = __pyx_t_4; __Pyx_INCREF(__pyx_t_11); __pyx_t_14 = 0;
          __pyx_t_15 = NULL;
        } else {
          __pyx_t_14 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 984, __pyx_L33_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_15 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 984, __pyx_L33_error)
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        for (;;) {
          if (likely(!__pyx_t_15)) {
            if (likely(PyList_CheckExact(__pyx_t_11))) {
              if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_11)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_4 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_14); __Pyx_INCREF(__pyx_t_4); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 984, __pyx_L33_error)
              #else
              __pyx_t_4 = PySequence_ITEM(__pyx_t_11, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 984, __pyx_L33_error)
              __Pyx_GOTREF(__pyx_t_4);
              #endif
            } else {
              if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_11)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_14); __Pyx_INCREF(__pyx_t_4); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 984, __pyx_L33_error)
              #else
              __pyx_t_4 = PySequence_ITEM(__pyx_t_11, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 984, __pyx_L33_error)
              __Pyx_GOTREF(__pyx_t_4);
              #endif
            }
          } else {
            __pyx_t_4 = __pyx_t_15(__pyx_t_11);
            if (unlikely(!__pyx_t_4)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 984, __pyx_L33_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_4);
          }
          __Pyx_XDECREF_SET(__pyx_9genexpr19__pyx_v_val, __pyx_t_4);
          __pyx_t_4 = 0;
          __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_Leverage_s, __pyx_9genexpr19__pyx_v_val); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 984, __pyx_L33_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 984, __pyx_L33_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_9genexpr19__pyx_v_val); __pyx_9genexpr19__pyx_v_val = 0;
        goto __pyx_L36_exit_scope;
        __pyx_L33_error:;
        __Pyx_XDECREF(__pyx_9genexpr19__pyx_v_val); __pyx_9genexpr19__pyx_v_val = 0;
        goto __pyx_L1_error;
        __pyx_L36_exit_scope:;
      } /* exit inner scope */
      __pyx_t_11 = PyNumber_InPlaceAdd(__pyx_v_l1, __pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 984, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_l1, ((PyObject*)__pyx_t_11));
      __pyx_t_11 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":985
 *                 l1 += ["Computed %s"% val for val in reseau.outputNames]
 *                 l1 += ["Leverage(%s)"% val for val in reseau.outputNames]
 *                 l1 += ["Residual(%s)"% val for val in reseau.outputNames]             # <<<<<<<<<<<<<<
 *                 l1 += ["cost(%s)"% val for val in reseau.outputNames]
 *                 l1 += ["LOO %s"% val for val in reseau.outputNames]
 */
      { /* enter inner scope */
        __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 985, __pyx_L39_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_reseau, __pyx_n_s_outputNames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 985, __pyx_L39_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
          __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_14 = 0;
          __pyx_t_15 = NULL;
        } else {
          __pyx_t_14 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 985, __pyx_L39_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_15 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 985, __pyx_L39_error)
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        for (;;) {
          if (likely(!__pyx_t_15)) {
            if (likely(PyList_CheckExact(__pyx_t_4))) {
              if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_4)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_14); __Pyx_INCREF(__pyx_t_5); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 985, __pyx_L39_error)
              #else
              __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 985, __pyx_L39_error)
              __Pyx_GOTREF(__pyx_t_5);
              #endif
            } else {
              if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_14); __Pyx_INCREF(__pyx_t_5); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 985, __pyx_L39_error)
              #else
              __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 985, __pyx_L39_error)
              __Pyx_GOTREF(__pyx_t_5);
              #endif
            }
          } else {
            __pyx_t_5 = __pyx_t_15(__pyx_t_4);
            if (unlikely(!__pyx_t_5)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 985, __pyx_L39_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_5);
          }
          __Pyx_XDECREF_SET(__pyx_9genexpr20__pyx_v_val, __pyx_t_5);
          __pyx_t_5 = 0;
          __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_Residual_s, __pyx_9genexpr20__pyx_v_val); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 985, __pyx_L39_error)
          __Pyx_GOTREF(__pyx_t_5);
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_11, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 985, __pyx_L39_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_9genexpr20__pyx_v_val); __pyx_9genexpr20__pyx_v_val = 0;
        goto __pyx_L42_exit_scope;
        __pyx_L39_error:;
        __Pyx_XDECREF(__pyx_9genexpr20__pyx_v_val); __pyx_9genexpr20__pyx_v_val = 0;
        goto __pyx_L1_error;
        __pyx_L42_exit_scope:;
      } /* exit inner scope */
      __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_l1, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 985, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF_SET(__pyx_v_l1, ((PyObject*)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":986
 *                 l1 += ["Leverage(%s)"% val for val in reseau.outputNames]
 *                 l1 += ["Residual(%s)"% val for val in reseau.outputNames]
 *                 l1 += ["cost(%s)"% val for val in reseau.outputNames]             # <<<<<<<<<<<<<<
 *                 l1 += ["LOO %s"% val for val in reseau.outputNames]
 *             l1.extend(list(reseau.parameterNames))
 */
      { /* enter inner scope */
        __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 986, __pyx_L45_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_reseau, __pyx_n_s_outputNames); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 986, __pyx_L45_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) {
          __pyx_t_5 = __pyx_t_11; __Pyx_INCREF(__pyx_t_5); __pyx_t_14 = 0;
          __pyx_t_15 = NULL;
        } else {
          __pyx_t_14 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 986, __pyx_L45_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_15 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 986, __pyx_L45_error)
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        for (;;) {
          if (likely(!__pyx_t_15)) {
            if (likely(PyList_CheckExact(__pyx_t_5))) {
              if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_5)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_11 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_14); __Pyx_INCREF(__pyx_t_11); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 986, __pyx_L45_error)
              #else
              __pyx_t_11 = PySequence_ITEM(__pyx_t_5, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 986, __pyx_L45_error)
              __Pyx_GOTREF(__pyx_t_11);
              #endif
            } else {
              if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_14); __Pyx_INCREF(__pyx_t_11); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 986, __pyx_L45_error)
              #else
              __pyx_t_11 = PySequence_ITEM(__pyx_t_5, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 986, __pyx_L45_error)
              __Pyx_GOTREF(__pyx_t_11);
              #endif
            }
          } else {
            __pyx_t_11 = __pyx_t_15(__pyx_t_5);
            if (unlikely(!__pyx_t_11)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 986, __pyx_L45_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_11);
          }
          __Pyx_XDECREF_SET(__pyx_9genexpr21__pyx_v_val, __pyx_t_11);
          __pyx_t_11 = 0;
          __pyx_t_11 = PyUnicode_Format(__pyx_kp_u_cost_s, __pyx_9genexpr21__pyx_v_val); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 986, __pyx_L45_error)
          __Pyx_GOTREF(__pyx_t_11);
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 986, __pyx_L45_error)
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_9genexpr21__pyx_v_val); __pyx_9genexpr21__pyx_v_val = 0;
        goto __pyx_L48_exit_scope;
        __pyx_L45_error:;
        __Pyx_XDECREF(__pyx_9genexpr21__pyx_v_val); __pyx_9genexpr21__pyx_v_val = 0;
        goto __pyx_L1_error;
        __pyx_L48_exit_scope:;
      } /* exit inner scope */
      __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_l1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 986, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_l1, ((PyObject*)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":987
 *                 l1 += ["Residual(%s)"% val for val in reseau.outputNames]
 *                 l1 += ["cost(%s)"% val for val in reseau.outputNames]
 *                 l1 += ["LOO %s"% val for val in reseau.outputNames]             # <<<<<<<<<<<<<<
 *             l1.extend(list(reseau.parameterNames))
 *             titles = [quotechar+val+quotechar for val in l1]
 */
      { /* enter inner scope */
        __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 987, __pyx_L51_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_reseau, __pyx_n_s_outputNames); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 987, __pyx_L51_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
          __pyx_t_11 = __pyx_t_4; __Pyx_INCREF(__pyx_t_11); __pyx_t_14 = 0;
          __pyx_t_15 = NULL;
        } else {
          __pyx_t_14 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 987, __pyx_L51_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_15 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 987, __pyx_L51_error)
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        for (;;) {
          if (likely(!__pyx_t_15)) {
            if (likely(PyList_CheckExact(__pyx_t_11))) {
              if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_11)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_4 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_14); __Pyx_INCREF(__pyx_t_4); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 987, __pyx_L51_error)
              #else
              __pyx_t_4 = PySequence_ITEM(__pyx_t_11, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 987, __pyx_L51_error)
              __Pyx_GOTREF(__pyx_t_4);
              #endif
            } else {
              if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_11)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_14); __Pyx_INCREF(__pyx_t_4); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 987, __pyx_L51_error)
              #else
              __pyx_t_4 = PySequence_ITEM(__pyx_t_11, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 987, __pyx_L51_error)
              __Pyx_GOTREF(__pyx_t_4);
              #endif
            }
          } else {
            __pyx_t_4 = __pyx_t_15(__pyx_t_11);
            if (unlikely(!__pyx_t_4)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 987, __pyx_L51_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_4);
          }
          __Pyx_XDECREF_SET(__pyx_9genexpr22__pyx_v_val, __pyx_t_4);
          __pyx_t_4 = 0;
          __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_LOO_s, __pyx_9genexpr22__pyx_v_val); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 987, __pyx_L51_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 987, __pyx_L51_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_9genexpr22__pyx_v_val); __pyx_9genexpr22__pyx_v_val = 0;
        goto __pyx_L54_exit_scope;
        __pyx_L51_error:;
        __Pyx_XDECREF(__pyx_9genexpr22__pyx_v_val); __pyx_9genexpr22__pyx_v_val = 0;
        goto __pyx_L1_error;
        __pyx_L54_exit_scope:;
      } /* exit inner scope */
      __pyx_t_11 = PyNumber_InPlaceAdd(__pyx_v_l1, __pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 987, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_l1, ((PyObject*)__pyx_t_11));
      __pyx_t_11 = 0;
    }
    __pyx_L18:;

    /* "metaphor/chem_gm/core/gmtoolbox.py":988
 *                 l1 += ["cost(%s)"% val for val in reseau.outputNames]
 *                 l1 += ["LOO %s"% val for val in reseau.outputNames]
 *             l1.extend(list(reseau.parameterNames))             # <<<<<<<<<<<<<<
 *             titles = [quotechar+val+quotechar for val in l1]
 *             if pptyname:
 */
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_reseau, __pyx_n_s_parameterNames); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 988, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_5 = PySequence_List(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 988, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_l1, __pyx_t_5); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 988, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":989
 *                 l1 += ["LOO %s"% val for val in reseau.outputNames]
 *             l1.extend(list(reseau.parameterNames))
 *             titles = [quotechar+val+quotechar for val in l1]             # <<<<<<<<<<<<<<
 *             if pptyname:
 *                 titles[0] = pptyname
 */
    { /* enter inner scope */
      __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 989, __pyx_L57_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_11 = __pyx_v_l1; __Pyx_INCREF(__pyx_t_11); __pyx_t_14 = 0;
      for (;;) {
        if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_11)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_14); __Pyx_INCREF(__pyx_t_4); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 989, __pyx_L57_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_11, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 989, __pyx_L57_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr23__pyx_v_val, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = PyNumber_Add(__pyx_v_quotechar, __pyx_9genexpr23__pyx_v_val); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 989, __pyx_L57_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_v_quotechar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 989, __pyx_L57_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 989, __pyx_L57_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_9genexpr23__pyx_v_val); __pyx_9genexpr23__pyx_v_val = 0;
      goto __pyx_L60_exit_scope;
      __pyx_L57_error:;
      __Pyx_XDECREF(__pyx_9genexpr23__pyx_v_val); __pyx_9genexpr23__pyx_v_val = 0;
      goto __pyx_L1_error;
      __pyx_L60_exit_scope:;
    } /* exit inner scope */
    __pyx_v_titles = ((PyObject*)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":990
 *             l1.extend(list(reseau.parameterNames))
 *             titles = [quotechar+val+quotechar for val in l1]
 *             if pptyname:             # <<<<<<<<<<<<<<
 *                 titles[0] = pptyname
 *                 titles[1] = "Computed %s" % pptyname
 */
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_v_pptyname); if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(0, 990, __pyx_L1_error)
    if (__pyx_t_18) {

      /* "metaphor/chem_gm/core/gmtoolbox.py":991
 *             titles = [quotechar+val+quotechar for val in l1]
 *             if pptyname:
 *                 titles[0] = pptyname             # <<<<<<<<<<<<<<
 *                 titles[1] = "Computed %s" % pptyname
 *             return res, reseau.correlMatrix, reseau.projectionMatrix, titles
 */
      if (unlikely(__Pyx_SetItemInt(__pyx_v_titles, 0, __pyx_v_pptyname, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 991, __pyx_L1_error)

      /* "metaphor/chem_gm/core/gmtoolbox.py":992
 *             if pptyname:
 *                 titles[0] = pptyname
 *                 titles[1] = "Computed %s" % pptyname             # <<<<<<<<<<<<<<
 *             return res, reseau.correlMatrix, reseau.projectionMatrix, titles
 *         return res, reseau.correlMatrix, reseau.projectionMatrix, None
 */
      __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_Computed_s, __pyx_v_pptyname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 992, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__Pyx_SetItemInt(__pyx_v_titles, 1, __pyx_t_5, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 992, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":990
 *             l1.extend(list(reseau.parameterNames))
 *             titles = [quotechar+val+quotechar for val in l1]
 *             if pptyname:             # <<<<<<<<<<<<<<
 *                 titles[0] = pptyname
 *                 titles[1] = "Computed %s" % pptyname
 */
    }

    /* "metaphor/chem_gm/core/gmtoolbox.py":993
 *                 titles[0] = pptyname
 *                 titles[1] = "Computed %s" % pptyname
 *             return res, reseau.correlMatrix, reseau.projectionMatrix, titles             # <<<<<<<<<<<<<<
 *         return res, reseau.correlMatrix, reseau.projectionMatrix, None
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_reseau, __pyx_n_s_correlMatrix); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 993, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_reseau, __pyx_n_s_projectionMatrix); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 993, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 993, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_res);
    __Pyx_GIVEREF(__pyx_v_res);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_res);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_11);
    __Pyx_INCREF(__pyx_v_titles);
    __Pyx_GIVEREF(__pyx_v_titles);
    PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_titles);
    __pyx_t_5 = 0;
    __pyx_t_11 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":975
 *             res[i][fullres.shape[1] + no:] = jacobian[i]
 * 
 *         if withtitles:             # <<<<<<<<<<<<<<
 *             l1 = list(reseau.inputNames) if ni else []
 *             if (no == 1):
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":994
 *                 titles[1] = "Computed %s" % pptyname
 *             return res, reseau.correlMatrix, reseau.projectionMatrix, titles
 *         return res, reseau.correlMatrix, reseau.projectionMatrix, None             # <<<<<<<<<<<<<<
 * 
 * if __name__ == "__main__":
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_reseau, __pyx_n_s_correlMatrix); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_reseau, __pyx_n_s_projectionMatrix); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_res);
  __Pyx_GIVEREF(__pyx_v_res);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_res);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_11);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_5, 3, Py_None);
  __pyx_t_6 = 0;
  __pyx_t_11 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":951
 *         return res
 * 
 *     def getResults(self, reseau, quotechar="", withtitles=True, pptyname=""):             # <<<<<<<<<<<<<<
 *         try:
 *             ni = reseau.inputCount
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmtoolbox.GMEngine.getResults", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ni);
  __Pyx_XDECREF(__pyx_v_no);
  __Pyx_XDECREF(__pyx_v_fullres);
  __Pyx_XDECREF(__pyx_v_jacobian);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_vec);
  __Pyx_XDECREF(__pyx_v_ii);
  __Pyx_XDECREF(__pyx_v_target);
  __Pyx_XDECREF(__pyx_v_computed);
  __Pyx_XDECREF(__pyx_v_leverage);
  __Pyx_XDECREF(__pyx_v_residual);
  __Pyx_XDECREF(__pyx_v_prevLOO);
  __Pyx_XDECREF(__pyx_v_l1);
  __Pyx_XDECREF(__pyx_v_ppty);
  __Pyx_XDECREF(__pyx_v_titles);
  __Pyx_XDECREF(__pyx_9genexpr17__pyx_v_val);
  __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_val);
  __Pyx_XDECREF(__pyx_9genexpr19__pyx_v_val);
  __Pyx_XDECREF(__pyx_9genexpr20__pyx_v_val);
  __Pyx_XDECREF(__pyx_9genexpr21__pyx_v_val);
  __Pyx_XDECREF(__pyx_9genexpr22__pyx_v_val);
  __Pyx_XDECREF(__pyx_9genexpr23__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix *__pyx_freelist_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix[8];
static int __pyx_freecount_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix = 0;

static PyObject *__pyx_tp_new_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix)))) {
    o = (PyObject*)__pyx_freelist_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix[--__pyx_freecount_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix];
    memset(o, 0, sizeof(struct __pyx_obj_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix(PyObject *o) {
  struct __pyx_obj_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix *p = (struct __pyx_obj_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_indextest);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix)))) {
    __pyx_freelist_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix[__pyx_freecount_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix++] = ((struct __pyx_obj_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix *p = (struct __pyx_obj_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix *)o;
  if (p->__pyx_v_indextest) {
    e = (*v)(p->__pyx_v_indextest, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix *p = (struct __pyx_obj_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix *)o;
  tmp = ((PyObject*)p->__pyx_v_indextest);
  p->__pyx_v_indextest = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix = {
  PyVarObject_HEAD_INIT(0, 0)
  "metaphor.chem_gm.core.gmtoolbox.__pyx_scope_struct__getMinMaxMatrix", /*tp_name*/
  sizeof(struct __pyx_obj_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix, /*tp_traverse*/
  __pyx_tp_clear_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_gmtoolbox(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_gmtoolbox},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "gmtoolbox",
    0, /* m_doc */
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    0, /* m_size */
  #else
    -1, /* m_size */
  #endif
    __pyx_methods /* m_methods */,
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    __pyx_moduledef_slots, /* m_slots */
  #else
    NULL, /* m_reload */
  #endif
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_u_0, __pyx_k_0, sizeof(__pyx_k_0), 0, 1, 0, 0},
  {&__pyx_kp_u_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 1, 0, 0},
  {&__pyx_n_s_Atomes, __pyx_k_Atomes, sizeof(__pyx_k_Atomes), 0, 0, 1, 1},
  {&__pyx_n_s_Atomes1, __pyx_k_Atomes1, sizeof(__pyx_k_Atomes1), 0, 0, 1, 1},
  {&__pyx_n_s_Atomes2, __pyx_k_Atomes2, sizeof(__pyx_k_Atomes2), 0, 0, 1, 1},
  {&__pyx_n_s_AtomsLower, __pyx_k_AtomsLower, sizeof(__pyx_k_AtomsLower), 0, 0, 1, 1},
  {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
  {&__pyx_n_u_BJMA_H_Si3_Br5_mol0_Class_5N, __pyx_k_BJMA_H_Si3_Br5_mol0_Class_5N, sizeof(__pyx_k_BJMA_H_Si3_Br5_mol0_Class_5N), 0, 1, 0, 1},
  {&__pyx_n_s_C, __pyx_k_C, sizeof(__pyx_k_C), 0, 0, 1, 1},
  {&__pyx_n_s_CCharOnlys, __pyx_k_CCharOnlys, sizeof(__pyx_k_CCharOnlys), 0, 0, 1, 1},
  {&__pyx_n_u_Class, __pyx_k_Class, sizeof(__pyx_k_Class), 0, 1, 0, 1},
  {&__pyx_n_u_Cn, __pyx_k_Cn, sizeof(__pyx_k_Cn), 0, 1, 0, 1},
  {&__pyx_kp_u_Cn_s, __pyx_k_Cn_s, sizeof(__pyx_k_Cn_s), 0, 1, 0, 0},
  {&__pyx_kp_u_Computed_s, __pyx_k_Computed_s, sizeof(__pyx_k_Computed_s), 0, 1, 0, 0},
  {&__pyx_n_s_Excel, __pyx_k_Excel, sizeof(__pyx_k_Excel), 0, 0, 1, 1},
  {&__pyx_n_s_ExcelCsv, __pyx_k_ExcelCsv, sizeof(__pyx_k_ExcelCsv), 0, 0, 1, 1},
  {&__pyx_n_s_ExcelXP, __pyx_k_ExcelXP, sizeof(__pyx_k_ExcelXP), 0, 0, 1, 1},
  {&__pyx_n_u_ExtraSheet, __pyx_k_ExtraSheet, sizeof(__pyx_k_ExtraSheet), 0, 1, 0, 1},
  {&__pyx_n_s_GMEngine, __pyx_k_GMEngine, sizeof(__pyx_k_GMEngine), 0, 0, 1, 1},
  {&__pyx_n_s_iso885915_GMEngine, __pyx_k_GMEngine, sizeof(__pyx_k_GMEngine), "iso-8859-15", 0, 1, 1},
  {&__pyx_n_s_GMEngine_ModelCfgItems, __pyx_k_GMEngine_ModelCfgItems, sizeof(__pyx_k_GMEngine_ModelCfgItems), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine___init, __pyx_k_GMEngine___init, sizeof(__pyx_k_GMEngine___init), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine___init___locals_lambda, __pyx_k_GMEngine___init___locals_lambda, sizeof(__pyx_k_GMEngine___init___locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine__getFromConf, __pyx_k_GMEngine__getFromConf, sizeof(__pyx_k_GMEngine__getFromConf), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine__getItemsFromConf, __pyx_k_GMEngine__getItemsFromConf, sizeof(__pyx_k_GMEngine__getItemsFromConf), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine__getOptionsFromConf, __pyx_k_GMEngine__getOptionsFromConf, sizeof(__pyx_k_GMEngine__getOptionsFromConf), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_baselen, __pyx_k_GMEngine_baselen, sizeof(__pyx_k_GMEngine_baselen), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_checkconnect, __pyx_k_GMEngine_checkconnect, sizeof(__pyx_k_GMEngine_checkconnect), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_clearProjectConfOptions, __pyx_k_GMEngine_clearProjectConfOptions, sizeof(__pyx_k_GMEngine_clearProjectConfOptions), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_configFile, __pyx_k_GMEngine_configFile, sizeof(__pyx_k_GMEngine_configFile), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_connect, __pyx_k_GMEngine_connect, sizeof(__pyx_k_GMEngine_connect), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_connect_locals_lambda, __pyx_k_GMEngine_connect_locals_lambda, sizeof(__pyx_k_GMEngine_connect_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_dataRoot, __pyx_k_GMEngine_dataRoot, sizeof(__pyx_k_GMEngine_dataRoot), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_dataiterator, __pyx_k_GMEngine_dataiterator, sizeof(__pyx_k_GMEngine_dataiterator), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_extras, __pyx_k_GMEngine_extras, sizeof(__pyx_k_GMEngine_extras), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_fullProjectIniFile, __pyx_k_GMEngine_fullProjectIniFile, sizeof(__pyx_k_GMEngine_fullProjectIniFile), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_getDefault, __pyx_k_GMEngine_getDefault, sizeof(__pyx_k_GMEngine_getDefault), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_getDefaultItems, __pyx_k_GMEngine_getDefaultItems, sizeof(__pyx_k_GMEngine_getDefaultItems), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_getDefaultOptions, __pyx_k_GMEngine_getDefaultOptions, sizeof(__pyx_k_GMEngine_getDefaultOptions), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_getModel, __pyx_k_GMEngine_getModel, sizeof(__pyx_k_GMEngine_getModel), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_getModelDict, __pyx_k_GMEngine_getModelDict, sizeof(__pyx_k_GMEngine_getModelDict), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_getProjectConf, __pyx_k_GMEngine_getProjectConf, sizeof(__pyx_k_GMEngine_getProjectConf), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_getProjectConfItems, __pyx_k_GMEngine_getProjectConfItems, sizeof(__pyx_k_GMEngine_getProjectConfItems), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_getProjectConfOptions, __pyx_k_GMEngine_getProjectConfOptions, sizeof(__pyx_k_GMEngine_getProjectConfOptions), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_getResults, __pyx_k_GMEngine_getResults, sizeof(__pyx_k_GMEngine_getResults), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_getTargetsFromFile, __pyx_k_GMEngine_getTargetsFromFile, sizeof(__pyx_k_GMEngine_getTargetsFromFile), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_getTempDir, __pyx_k_GMEngine_getTempDir, sizeof(__pyx_k_GMEngine_getTempDir), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_modelSelected, __pyx_k_GMEngine_modelSelected, sizeof(__pyx_k_GMEngine_modelSelected), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_modelconf, __pyx_k_GMEngine_modelconf, sizeof(__pyx_k_GMEngine_modelconf), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_onDestroy, __pyx_k_GMEngine_onDestroy, sizeof(__pyx_k_GMEngine_onDestroy), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_projectConf, __pyx_k_GMEngine_projectConf, sizeof(__pyx_k_GMEngine_projectConf), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_readConfig, __pyx_k_GMEngine_readConfig, sizeof(__pyx_k_GMEngine_readConfig), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_save, __pyx_k_GMEngine_save, sizeof(__pyx_k_GMEngine_save), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_saveDefaultConf, __pyx_k_GMEngine_saveDefaultConf, sizeof(__pyx_k_GMEngine_saveDefaultConf), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_saveModelConf, __pyx_k_GMEngine_saveModelConf, sizeof(__pyx_k_GMEngine_saveModelConf), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_sbaselen, __pyx_k_GMEngine_sbaselen, sizeof(__pyx_k_GMEngine_sbaselen), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_sconfigFile, __pyx_k_GMEngine_sconfigFile, sizeof(__pyx_k_GMEngine_sconfigFile), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_setDefaultConf, __pyx_k_GMEngine_setDefaultConf, sizeof(__pyx_k_GMEngine_setDefaultConf), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_setModel, __pyx_k_GMEngine_setModel, sizeof(__pyx_k_GMEngine_setModel), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_setProjectConf, __pyx_k_GMEngine_setProjectConf, sizeof(__pyx_k_GMEngine_setProjectConf), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_setmodelconf, __pyx_k_GMEngine_setmodelconf, sizeof(__pyx_k_GMEngine_setmodelconf), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_sworkingDir, __pyx_k_GMEngine_sworkingDir, sizeof(__pyx_k_GMEngine_sworkingDir), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_updateConfig, __pyx_k_GMEngine_updateConfig, sizeof(__pyx_k_GMEngine_updateConfig), 0, 0, 1, 1},
  {&__pyx_n_s_GMEngine_workingDir, __pyx_k_GMEngine_workingDir, sizeof(__pyx_k_GMEngine_workingDir), 0, 0, 1, 1},
  {&__pyx_n_s_Hydrogenes, __pyx_k_Hydrogenes, sizeof(__pyx_k_Hydrogenes), 0, 0, 1, 1},
  {&__pyx_n_s_INPUT_COUNT, __pyx_k_INPUT_COUNT, sizeof(__pyx_k_INPUT_COUNT), 0, 0, 1, 1},
  {&__pyx_n_u_LM, __pyx_k_LM, sizeof(__pyx_k_LM), 0, 1, 0, 1},
  {&__pyx_kp_u_LOO_s, __pyx_k_LOO_s, sizeof(__pyx_k_LOO_s), 0, 1, 0, 0},
  {&__pyx_n_u_Leverage, __pyx_k_Leverage, sizeof(__pyx_k_Leverage), 0, 1, 0, 1},
  {&__pyx_kp_u_Leverage_s, __pyx_k_Leverage_s, sizeof(__pyx_k_Leverage_s), 0, 1, 0, 0},
  {&__pyx_n_s_M, __pyx_k_M, sizeof(__pyx_k_M), 0, 0, 1, 1},
  {&__pyx_n_s_Mat, __pyx_k_Mat, sizeof(__pyx_k_Mat), 0, 0, 1, 1},
  {&__pyx_n_s_ModelCfgItems, __pyx_k_ModelCfgItems, sizeof(__pyx_k_ModelCfgItems), 0, 0, 1, 1},
  {&__pyx_n_s_N, __pyx_k_N, sizeof(__pyx_k_N), 0, 0, 1, 1},
  {&__pyx_n_u_N, __pyx_k_N, sizeof(__pyx_k_N), 0, 1, 0, 1},
  {&__pyx_n_s_OKchi, __pyx_k_OKchi, sizeof(__pyx_k_OKchi), 0, 0, 1, 1},
  {&__pyx_n_s_OKiso, __pyx_k_OKiso, sizeof(__pyx_k_OKiso), 0, 0, 1, 1},
  {&__pyx_n_s_OUTPUT_COUNT, __pyx_k_OUTPUT_COUNT, sizeof(__pyx_k_OUTPUT_COUNT), 0, 0, 1, 1},
  {&__pyx_n_s_OrderedDict, __pyx_k_OrderedDict, sizeof(__pyx_k_OrderedDict), 0, 0, 1, 1},
  {&__pyx_n_s_Property, __pyx_k_Property, sizeof(__pyx_k_Property), 0, 0, 1, 1},
  {&__pyx_n_u_Residual, __pyx_k_Residual, sizeof(__pyx_k_Residual), 0, 1, 0, 1},
  {&__pyx_kp_u_Residual_s, __pyx_k_Residual_s, sizeof(__pyx_k_Residual_s), 0, 1, 0, 0},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_n_s_VE_JACOBIAN, __pyx_k_VE_JACOBIAN, sizeof(__pyx_k_VE_JACOBIAN), 0, 0, 1, 1},
  {&__pyx_n_s_VE_TRAINING_DATA_LONG, __pyx_k_VE_TRAINING_DATA_LONG, sizeof(__pyx_k_VE_TRAINING_DATA_LONG), 0, 0, 1, 1},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_kp_u__209, __pyx_k__209, sizeof(__pyx_k__209), 0, 1, 0, 0},
  {&__pyx_kp_u__27, __pyx_k__27, sizeof(__pyx_k__27), 0, 1, 0, 0},
  {&__pyx_kp_u__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 1, 0, 0},
  {&__pyx_kp_u__41, __pyx_k__41, sizeof(__pyx_k__41), 0, 1, 0, 0},
  {&__pyx_n_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 1},
  {&__pyx_n_u__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 1, 0, 1},
  {&__pyx_kp_u__55, __pyx_k__55, sizeof(__pyx_k__55), 0, 1, 0, 0},
  {&__pyx_n_s__75, __pyx_k__75, sizeof(__pyx_k__75), 0, 0, 1, 1},
  {&__pyx_kp_u_absolute, __pyx_k_absolute, sizeof(__pyx_k_absolute), 0, 1, 0, 0},
  {&__pyx_n_s_abspath, __pyx_k_abspath, sizeof(__pyx_k_abspath), 0, 0, 1, 1},
  {&__pyx_n_s_add_section, __pyx_k_add_section, sizeof(__pyx_k_add_section), 0, 0, 1, 1},
  {&__pyx_n_s_add_worksheet, __pyx_k_add_worksheet, sizeof(__pyx_k_add_worksheet), 0, 0, 1, 1},
  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
  {&__pyx_n_s_asarray, __pyx_k_asarray, sizeof(__pyx_k_asarray), 0, 0, 1, 1},
  {&__pyx_n_s_atomdict, __pyx_k_atomdict, sizeof(__pyx_k_atomdict), 0, 0, 1, 1},
  {&__pyx_n_s_atomkeys, __pyx_k_atomkeys, sizeof(__pyx_k_atomkeys), 0, 0, 1, 1},
  {&__pyx_n_s_atoms, __pyx_k_atoms, sizeof(__pyx_k_atoms), 0, 0, 1, 1},
  {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
  {&__pyx_n_s_baselen, __pyx_k_baselen, sizeof(__pyx_k_baselen), 0, 0, 1, 1},
  {&__pyx_n_s_baselen_2, __pyx_k_baselen_2, sizeof(__pyx_k_baselen_2), 0, 0, 1, 1},
  {&__pyx_n_s_basename, __pyx_k_basename, sizeof(__pyx_k_basename), 0, 0, 1, 1},
  {&__pyx_n_s_c_size_t, __pyx_k_c_size_t, sizeof(__pyx_k_c_size_t), 0, 0, 1, 1},
  {&__pyx_n_s_candidatecount, __pyx_k_candidatecount, sizeof(__pyx_k_candidatecount), 0, 0, 1, 1},
  {&__pyx_n_u_candidatecount, __pyx_k_candidatecount, sizeof(__pyx_k_candidatecount), 0, 1, 0, 1},
  {&__pyx_n_s_capitalize, __pyx_k_capitalize, sizeof(__pyx_k_capitalize), 0, 0, 1, 1},
  {&__pyx_n_u_ccl, __pyx_k_ccl, sizeof(__pyx_k_ccl), 0, 1, 0, 1},
  {&__pyx_n_s_cclinputlst, __pyx_k_cclinputlst, sizeof(__pyx_k_cclinputlst), 0, 0, 1, 1},
  {&__pyx_n_s_ccllst, __pyx_k_ccllst, sizeof(__pyx_k_ccllst), 0, 0, 1, 1},
  {&__pyx_n_u_ccls, __pyx_k_ccls, sizeof(__pyx_k_ccls), 0, 1, 0, 1},
  {&__pyx_n_s_central, __pyx_k_central, sizeof(__pyx_k_central), 0, 0, 1, 1},
  {&__pyx_n_u_central, __pyx_k_central, sizeof(__pyx_k_central), 0, 1, 0, 1},
  {&__pyx_kp_u_cfg, __pyx_k_cfg, sizeof(__pyx_k_cfg), 0, 1, 0, 0},
  {&__pyx_n_s_cfg_2, __pyx_k_cfg_2, sizeof(__pyx_k_cfg_2), 0, 0, 1, 1},
  {&__pyx_n_s_cfgfile, __pyx_k_cfgfile, sizeof(__pyx_k_cfgfile), 0, 0, 1, 1},
  {&__pyx_n_s_chain, __pyx_k_chain, sizeof(__pyx_k_chain), 0, 0, 1, 1},
  {&__pyx_n_s_chargekey, __pyx_k_chargekey, sizeof(__pyx_k_chargekey), 0, 0, 1, 1},
  {&__pyx_n_s_checkconnect, __pyx_k_checkconnect, sizeof(__pyx_k_checkconnect), 0, 0, 1, 1},
  {&__pyx_n_u_chi, __pyx_k_chi, sizeof(__pyx_k_chi), 0, 1, 0, 1},
  {&__pyx_n_u_chi1, __pyx_k_chi1, sizeof(__pyx_k_chi1), 0, 1, 0, 1},
  {&__pyx_n_u_chi2, __pyx_k_chi2, sizeof(__pyx_k_chi2), 0, 1, 0, 1},
  {&__pyx_n_s_chikey, __pyx_k_chikey, sizeof(__pyx_k_chikey), 0, 0, 1, 1},
  {&__pyx_n_s_chimax, __pyx_k_chimax, sizeof(__pyx_k_chimax), 0, 0, 1, 1},
  {&__pyx_kp_s_class_GMEngine_Gestionnaire_comm, __pyx_k_class_GMEngine_Gestionnaire_comm, sizeof(__pyx_k_class_GMEngine_Gestionnaire_comm), 0, 0, 1, 0},
  {&__pyx_n_s_classif, __pyx_k_classif, sizeof(__pyx_k_classif), 0, 0, 1, 1},
  {&__pyx_n_u_classif, __pyx_k_classif, sizeof(__pyx_k_classif), 0, 1, 0, 1},
  {&__pyx_n_s_clearProjectConfOptions, __pyx_k_clearProjectConfOptions, sizeof(__pyx_k_clearProjectConfOptions), 0, 0, 1, 1},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_n_s_col0, __pyx_k_col0, sizeof(__pyx_k_col0), 0, 0, 1, 1},
  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
  {&__pyx_n_s_computed, __pyx_k_computed, sizeof(__pyx_k_computed), 0, 0, 1, 1},
  {&__pyx_n_s_cond, __pyx_k_cond, sizeof(__pyx_k_cond), 0, 0, 1, 1},
  {&__pyx_n_s_conf, __pyx_k_conf, sizeof(__pyx_k_conf), 0, 0, 1, 1},
  {&__pyx_n_s_conffile, __pyx_k_conffile, sizeof(__pyx_k_conffile), 0, 0, 1, 1},
  {&__pyx_n_s_config, __pyx_k_config, sizeof(__pyx_k_config), 0, 0, 1, 1},
  {&__pyx_n_s_configFile, __pyx_k_configFile, sizeof(__pyx_k_configFile), 0, 0, 1, 1},
  {&__pyx_n_s_configFile_2, __pyx_k_configFile_2, sizeof(__pyx_k_configFile_2), 0, 0, 1, 1},
  {&__pyx_n_s_configstr, __pyx_k_configstr, sizeof(__pyx_k_configstr), 0, 0, 1, 1},
  {&__pyx_n_s_conkeys, __pyx_k_conkeys, sizeof(__pyx_k_conkeys), 0, 0, 1, 1},
  {&__pyx_n_s_connect, __pyx_k_connect, sizeof(__pyx_k_connect), 0, 0, 1, 1},
  {&__pyx_n_s_connectivity, __pyx_k_connectivity, sizeof(__pyx_k_connectivity), 0, 0, 1, 1},
  {&__pyx_n_u_connectivity, __pyx_k_connectivity, sizeof(__pyx_k_connectivity), 0, 1, 0, 1},
  {&__pyx_n_s_connectlist, __pyx_k_connectlist, sizeof(__pyx_k_connectlist), 0, 0, 1, 1},
  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
  {&__pyx_n_s_correlMatrix, __pyx_k_correlMatrix, sizeof(__pyx_k_correlMatrix), 0, 0, 1, 1},
  {&__pyx_n_u_cost, __pyx_k_cost, sizeof(__pyx_k_cost), 0, 1, 0, 1},
  {&__pyx_kp_u_cost_s, __pyx_k_cost_s, sizeof(__pyx_k_cost_s), 0, 1, 0, 0},
  {&__pyx_n_s_ctypes, __pyx_k_ctypes, sizeof(__pyx_k_ctypes), 0, 0, 1, 1},
  {&__pyx_n_s_cumulatom, __pyx_k_cumulatom, sizeof(__pyx_k_cumulatom), 0, 0, 1, 1},
  {&__pyx_n_s_cur, __pyx_k_cur, sizeof(__pyx_k_cur), 0, 0, 1, 1},
  {&__pyx_n_s_curalgo, __pyx_k_curalgo, sizeof(__pyx_k_curalgo), 0, 0, 1, 1},
  {&__pyx_n_s_curcol, __pyx_k_curcol, sizeof(__pyx_k_curcol), 0, 0, 1, 1},
  {&__pyx_n_s_curproperty, __pyx_k_curproperty, sizeof(__pyx_k_curproperty), 0, 0, 1, 1},
  {&__pyx_n_s_currow, __pyx_k_currow, sizeof(__pyx_k_currow), 0, 0, 1, 1},
  {&__pyx_n_s_cyclekey, __pyx_k_cyclekey, sizeof(__pyx_k_cyclekey), 0, 0, 1, 1},
  {&__pyx_n_u_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 1, 0, 1},
  {&__pyx_kp_u_dN, __pyx_k_dN, sizeof(__pyx_k_dN), 0, 1, 0, 0},
  {&__pyx_n_s_dataRoot, __pyx_k_dataRoot, sizeof(__pyx_k_dataRoot), 0, 0, 1, 1},
  {&__pyx_n_s_dataiterator, __pyx_k_dataiterator, sizeof(__pyx_k_dataiterator), 0, 0, 1, 1},
  {&__pyx_n_s_datasource, __pyx_k_datasource, sizeof(__pyx_k_datasource), 0, 0, 1, 1},
  {&__pyx_n_s_debug, __pyx_k_debug, sizeof(__pyx_k_debug), 0, 0, 1, 1},
  {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
  {&__pyx_n_s_defaultConf, __pyx_k_defaultConf, sizeof(__pyx_k_defaultConf), 0, 0, 1, 1},
  {&__pyx_n_s_defaultConfigFile, __pyx_k_defaultConfigFile, sizeof(__pyx_k_defaultConfigFile), 0, 0, 1, 1},
  {&__pyx_n_s_defaultConnect, __pyx_k_defaultConnect, sizeof(__pyx_k_defaultConnect), 0, 0, 1, 1},
  {&__pyx_n_s_defaultModified, __pyx_k_defaultModified, sizeof(__pyx_k_defaultModified), 0, 0, 1, 1},
  {&__pyx_n_s_defaultcfg, __pyx_k_defaultcfg, sizeof(__pyx_k_defaultcfg), 0, 0, 1, 1},
  {&__pyx_n_s_defaultdict, __pyx_k_defaultdict, sizeof(__pyx_k_defaultdict), 0, 0, 1, 1},
  {&__pyx_n_s_defaultedConfigParser, __pyx_k_defaultedConfigParser, sizeof(__pyx_k_defaultedConfigParser), 0, 0, 1, 1},
  {&__pyx_n_u_dgr, __pyx_k_dgr, sizeof(__pyx_k_dgr), 0, 1, 0, 1},
  {&__pyx_n_u_dgrs, __pyx_k_dgrs, sizeof(__pyx_k_dgrs), 0, 1, 0, 1},
  {&__pyx_n_s_dico, __pyx_k_dico, sizeof(__pyx_k_dico), 0, 0, 1, 1},
  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {&__pyx_n_s_dictt, __pyx_k_dictt, sizeof(__pyx_k_dictt), 0, 0, 1, 1},
  {&__pyx_n_s_dispMat, __pyx_k_dispMat, sizeof(__pyx_k_dispMat), 0, 0, 1, 1},
  {&__pyx_n_s_dl, __pyx_k_dl, sizeof(__pyx_k_dl), 0, 0, 1, 1},
  {&__pyx_n_s_doHash, __pyx_k_doHash, sizeof(__pyx_k_doHash), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_s_docreate, __pyx_k_docreate, sizeof(__pyx_k_docreate), 0, 0, 1, 1},
  {&__pyx_n_s_doremovemodule, __pyx_k_doremovemodule, sizeof(__pyx_k_doremovemodule), 0, 0, 1, 1},
  {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
  {&__pyx_n_s_endswith, __pyx_k_endswith, sizeof(__pyx_k_endswith), 0, 0, 1, 1},
  {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
  {&__pyx_n_s_err, __pyx_k_err, sizeof(__pyx_k_err), 0, 0, 1, 1},
  {&__pyx_n_s_exists, __pyx_k_exists, sizeof(__pyx_k_exists), 0, 0, 1, 1},
  {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
  {&__pyx_n_s_ext, __pyx_k_ext, sizeof(__pyx_k_ext), 0, 0, 1, 1},
  {&__pyx_n_s_extended, __pyx_k_extended, sizeof(__pyx_k_extended), 0, 0, 1, 1},
  {&__pyx_n_s_extra, __pyx_k_extra, sizeof(__pyx_k_extra), 0, 0, 1, 1},
  {&__pyx_n_u_extra, __pyx_k_extra, sizeof(__pyx_k_extra), 0, 1, 0, 1},
  {&__pyx_kp_u_extra_d, __pyx_k_extra_d, sizeof(__pyx_k_extra_d), 0, 1, 0, 0},
  {&__pyx_n_s_extraopts, __pyx_k_extraopts, sizeof(__pyx_k_extraopts), 0, 0, 1, 1},
  {&__pyx_n_s_extraoptslow, __pyx_k_extraoptslow, sizeof(__pyx_k_extraoptslow), 0, 0, 1, 1},
  {&__pyx_n_s_extrarow, __pyx_k_extrarow, sizeof(__pyx_k_extrarow), 0, 0, 1, 1},
  {&__pyx_n_s_extras, __pyx_k_extras, sizeof(__pyx_k_extras), 0, 0, 1, 1},
  {&__pyx_n_u_extras, __pyx_k_extras, sizeof(__pyx_k_extras), 0, 1, 0, 1},
  {&__pyx_n_s_extrasheet, __pyx_k_extrasheet, sizeof(__pyx_k_extrasheet), 0, 0, 1, 1},
  {&__pyx_n_s_ff, __pyx_k_ff, sizeof(__pyx_k_ff), 0, 0, 1, 1},
  {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1},
  {&__pyx_n_s_files, __pyx_k_files, sizeof(__pyx_k_files), 0, 0, 1, 1},
  {&__pyx_n_s_fromConfigstr2Dict, __pyx_k_fromConfigstr2Dict, sizeof(__pyx_k_fromConfigstr2Dict), 0, 0, 1, 1},
  {&__pyx_n_s_fromconfig2Str, __pyx_k_fromconfig2Str, sizeof(__pyx_k_fromconfig2Str), 0, 0, 1, 1},
  {&__pyx_n_s_fromconfig2Str_locals_lambda, __pyx_k_fromconfig2Str_locals_lambda, sizeof(__pyx_k_fromconfig2Str_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_fullProjectIniFile, __pyx_k_fullProjectIniFile, sizeof(__pyx_k_fullProjectIniFile), 0, 0, 1, 1},
  {&__pyx_n_s_fullconfig, __pyx_k_fullconfig, sizeof(__pyx_k_fullconfig), 0, 0, 1, 1},
  {&__pyx_n_s_fullres, __pyx_k_fullres, sizeof(__pyx_k_fullres), 0, 0, 1, 1},
  {&__pyx_n_s_fval, __pyx_k_fval, sizeof(__pyx_k_fval), 0, 0, 1, 1},
  {&__pyx_n_u_general, __pyx_k_general, sizeof(__pyx_k_general), 0, 1, 0, 1},
  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
  {&__pyx_n_s_getArray, __pyx_k_getArray, sizeof(__pyx_k_getArray), 0, 0, 1, 1},
  {&__pyx_n_s_getConfigHash, __pyx_k_getConfigHash, sizeof(__pyx_k_getConfigHash), 0, 0, 1, 1},
  {&__pyx_n_s_getDefault, __pyx_k_getDefault, sizeof(__pyx_k_getDefault), 0, 0, 1, 1},
  {&__pyx_n_s_getDefaultItems, __pyx_k_getDefaultItems, sizeof(__pyx_k_getDefaultItems), 0, 0, 1, 1},
  {&__pyx_n_s_getDefaultOptions, __pyx_k_getDefaultOptions, sizeof(__pyx_k_getDefaultOptions), 0, 0, 1, 1},
  {&__pyx_n_s_getFromConf, __pyx_k_getFromConf, sizeof(__pyx_k_getFromConf), 0, 0, 1, 1},
  {&__pyx_n_s_getItemsFromConf, __pyx_k_getItemsFromConf, sizeof(__pyx_k_getItemsFromConf), 0, 0, 1, 1},
  {&__pyx_n_s_getMinMaxMatrix, __pyx_k_getMinMaxMatrix, sizeof(__pyx_k_getMinMaxMatrix), 0, 0, 1, 1},
  {&__pyx_n_s_getMinMaxMatrixSym, __pyx_k_getMinMaxMatrixSym, sizeof(__pyx_k_getMinMaxMatrixSym), 0, 0, 1, 1},
  {&__pyx_kp_u_getMinMaxMatrixSym_first_param_m, __pyx_k_getMinMaxMatrixSym_first_param_m, sizeof(__pyx_k_getMinMaxMatrixSym_first_param_m), 0, 1, 0, 0},
  {&__pyx_n_s_getMinMaxMatrixSym_locals_lambda, __pyx_k_getMinMaxMatrixSym_locals_lambda, sizeof(__pyx_k_getMinMaxMatrixSym_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_getMinMaxMatrix_locals_lambda, __pyx_k_getMinMaxMatrix_locals_lambda, sizeof(__pyx_k_getMinMaxMatrix_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_getModel, __pyx_k_getModel, sizeof(__pyx_k_getModel), 0, 0, 1, 1},
  {&__pyx_n_s_getModelBase, __pyx_k_getModelBase, sizeof(__pyx_k_getModelBase), 0, 0, 1, 1},
  {&__pyx_n_s_getModelDict, __pyx_k_getModelDict, sizeof(__pyx_k_getModelDict), 0, 0, 1, 1},
  {&__pyx_n_s_getModelKeyFromConf, __pyx_k_getModelKeyFromConf, sizeof(__pyx_k_getModelKeyFromConf), 0, 0, 1, 1},
  {&__pyx_n_s_getOptionsFromConf, __pyx_k_getOptionsFromConf, sizeof(__pyx_k_getOptionsFromConf), 0, 0, 1, 1},
  {&__pyx_n_s_getProjectConf, __pyx_k_getProjectConf, sizeof(__pyx_k_getProjectConf), 0, 0, 1, 1},
  {&__pyx_n_s_getProjectConfItems, __pyx_k_getProjectConfItems, sizeof(__pyx_k_getProjectConfItems), 0, 0, 1, 1},
  {&__pyx_n_s_getProjectConfOptions, __pyx_k_getProjectConfOptions, sizeof(__pyx_k_getProjectConfOptions), 0, 0, 1, 1},
  {&__pyx_n_s_getResults, __pyx_k_getResults, sizeof(__pyx_k_getResults), 0, 0, 1, 1},
  {&__pyx_n_s_getSectionDict, __pyx_k_getSectionDict, sizeof(__pyx_k_getSectionDict), 0, 0, 1, 1},
  {&__pyx_n_s_getTargetsFromFile, __pyx_k_getTargetsFromFile, sizeof(__pyx_k_getTargetsFromFile), 0, 0, 1, 1},
  {&__pyx_n_s_getTempDir, __pyx_k_getTempDir, sizeof(__pyx_k_getTempDir), 0, 0, 1, 1},
  {&__pyx_n_s_getTransferResults, __pyx_k_getTransferResults, sizeof(__pyx_k_getTransferResults), 0, 0, 1, 1},
  {&__pyx_n_s_getbooleandefault, __pyx_k_getbooleandefault, sizeof(__pyx_k_getbooleandefault), 0, 0, 1, 1},
  {&__pyx_n_s_getcwd, __pyx_k_getcwd, sizeof(__pyx_k_getcwd), 0, 0, 1, 1},
  {&__pyx_n_s_getdefault, __pyx_k_getdefault, sizeof(__pyx_k_getdefault), 0, 0, 1, 1},
  {&__pyx_n_s_getfloat, __pyx_k_getfloat, sizeof(__pyx_k_getfloat), 0, 0, 1, 1},
  {&__pyx_n_s_getint, __pyx_k_getint, sizeof(__pyx_k_getint), 0, 0, 1, 1},
  {&__pyx_n_s_getintdefault, __pyx_k_getintdefault, sizeof(__pyx_k_getintdefault), 0, 0, 1, 1},
  {&__pyx_n_s_gmconst, __pyx_k_gmconst, sizeof(__pyx_k_gmconst), 0, 0, 1, 1},
  {&__pyx_n_s_gmutils, __pyx_k_gmutils, sizeof(__pyx_k_gmutils), 0, 0, 1, 1},
  {&__pyx_n_s_gradekey, __pyx_k_gradekey, sizeof(__pyx_k_gradekey), 0, 0, 1, 1},
  {&__pyx_n_s_grademax, __pyx_k_grademax, sizeof(__pyx_k_grademax), 0, 0, 1, 1},
  {&__pyx_n_s_gradlst, __pyx_k_gradlst, sizeof(__pyx_k_gradlst), 0, 0, 1, 1},
  {&__pyx_n_u_grd, __pyx_k_grd, sizeof(__pyx_k_grd), 0, 1, 0, 1},
  {&__pyx_n_s_grdinputlist, __pyx_k_grdinputlist, sizeof(__pyx_k_grdinputlist), 0, 0, 1, 1},
  {&__pyx_n_u_grds, __pyx_k_grds, sizeof(__pyx_k_grds), 0, 1, 0, 1},
  {&__pyx_n_s_has_hydrogen, __pyx_k_has_hydrogen, sizeof(__pyx_k_has_hydrogen), 0, 0, 1, 1},
  {&__pyx_n_s_has_option, __pyx_k_has_option, sizeof(__pyx_k_has_option), 0, 0, 1, 1},
  {&__pyx_n_s_has_section, __pyx_k_has_section, sizeof(__pyx_k_has_section), 0, 0, 1, 1},
  {&__pyx_n_s_hashFromConfig, __pyx_k_hashFromConfig, sizeof(__pyx_k_hashFromConfig), 0, 0, 1, 1},
  {&__pyx_n_s_hashFromDict, __pyx_k_hashFromDict, sizeof(__pyx_k_hashFromDict), 0, 0, 1, 1},
  {&__pyx_n_s_head, __pyx_k_head, sizeof(__pyx_k_head), 0, 0, 1, 1},
  {&__pyx_n_s_header, __pyx_k_header, sizeof(__pyx_k_header), 0, 0, 1, 1},
  {&__pyx_n_s_headers, __pyx_k_headers, sizeof(__pyx_k_headers), 0, 0, 1, 1},
  {&__pyx_n_s_hidden, __pyx_k_hidden, sizeof(__pyx_k_hidden), 0, 0, 1, 1},
  {&__pyx_n_u_hidden, __pyx_k_hidden, sizeof(__pyx_k_hidden), 0, 1, 0, 1},
  {&__pyx_n_s_hii, __pyx_k_hii, sizeof(__pyx_k_hii), 0, 0, 1, 1},
  {&__pyx_n_s_hijmax, __pyx_k_hijmax, sizeof(__pyx_k_hijmax), 0, 0, 1, 1},
  {&__pyx_n_s_hijmean, __pyx_k_hijmean, sizeof(__pyx_k_hijmean), 0, 0, 1, 1},
  {&__pyx_n_s_hijmin, __pyx_k_hijmin, sizeof(__pyx_k_hijmin), 0, 0, 1, 1},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_s_ii, __pyx_k_ii, sizeof(__pyx_k_ii), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_ind, __pyx_k_ind, sizeof(__pyx_k_ind), 0, 0, 1, 1},
  {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
  {&__pyx_n_s_indextest, __pyx_k_indextest, sizeof(__pyx_k_indextest), 0, 0, 1, 1},
  {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_n_s_inputCount, __pyx_k_inputCount, sizeof(__pyx_k_inputCount), 0, 0, 1, 1},
  {&__pyx_n_s_inputNames, __pyx_k_inputNames, sizeof(__pyx_k_inputNames), 0, 0, 1, 1},
  {&__pyx_n_s_isHidden, __pyx_k_isHidden, sizeof(__pyx_k_isHidden), 0, 0, 1, 1},
  {&__pyx_n_s_isdir, __pyx_k_isdir, sizeof(__pyx_k_isdir), 0, 0, 1, 1},
  {&__pyx_n_s_isfull, __pyx_k_isfull, sizeof(__pyx_k_isfull), 0, 0, 1, 1},
  {&__pyx_n_s_isint, __pyx_k_isint, sizeof(__pyx_k_isint), 0, 0, 1, 1},
  {&__pyx_n_s_islong, __pyx_k_islong, sizeof(__pyx_k_islong), 0, 0, 1, 1},
  {&__pyx_n_s_ismodif, __pyx_k_ismodif, sizeof(__pyx_k_ismodif), 0, 0, 1, 1},
  {&__pyx_n_u_iso, __pyx_k_iso, sizeof(__pyx_k_iso), 0, 1, 0, 1},
  {&__pyx_n_u_iso1, __pyx_k_iso1, sizeof(__pyx_k_iso1), 0, 1, 0, 1},
  {&__pyx_n_u_iso2, __pyx_k_iso2, sizeof(__pyx_k_iso2), 0, 1, 0, 1},
  {&__pyx_n_s_isokey, __pyx_k_isokey, sizeof(__pyx_k_isokey), 0, 0, 1, 1},
  {&__pyx_n_s_isomax, __pyx_k_isomax, sizeof(__pyx_k_isomax), 0, 0, 1, 1},
  {&__pyx_n_s_item, __pyx_k_item, sizeof(__pyx_k_item), 0, 0, 1, 1},
  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  {&__pyx_n_s_iterData, __pyx_k_iterData, sizeof(__pyx_k_iterData), 0, 0, 1, 1},
  {&__pyx_n_s_iterator, __pyx_k_iterator, sizeof(__pyx_k_iterator), 0, 0, 1, 1},
  {&__pyx_n_s_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 0, 0, 1, 1},
  {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1},
  {&__pyx_n_s_jacobian, __pyx_k_jacobian, sizeof(__pyx_k_jacobian), 0, 0, 1, 1},
  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
  {&__pyx_n_s_key2long, __pyx_k_key2long, sizeof(__pyx_k_key2long), 0, 0, 1, 1},
  {&__pyx_n_s_key2short, __pyx_k_key2short, sizeof(__pyx_k_key2short), 0, 0, 1, 1},
  {&__pyx_n_s_keyfct, __pyx_k_keyfct, sizeof(__pyx_k_keyfct), 0, 0, 1, 1},
  {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
  {&__pyx_n_s_keyshort, __pyx_k_keyshort, sizeof(__pyx_k_keyshort), 0, 0, 1, 1},
  {&__pyx_n_s_l1, __pyx_k_l1, sizeof(__pyx_k_l1), 0, 0, 1, 1},
  {&__pyx_n_s_lastGMM, __pyx_k_lastGMM, sizeof(__pyx_k_lastGMM), 0, 0, 1, 1},
  {&__pyx_n_s_left, __pyx_k_left, sizeof(__pyx_k_left), 0, 0, 1, 1},
  {&__pyx_n_s_lefter, __pyx_k_lefter, sizeof(__pyx_k_lefter), 0, 0, 1, 1},
  {&__pyx_n_s_lefters, __pyx_k_lefters, sizeof(__pyx_k_lefters), 0, 0, 1, 1},
  {&__pyx_n_s_leverage, __pyx_k_leverage, sizeof(__pyx_k_leverage), 0, 0, 1, 1},
  {&__pyx_n_u_leverage, __pyx_k_leverage, sizeof(__pyx_k_leverage), 0, 1, 0, 1},
  {&__pyx_kp_u_leverages, __pyx_k_leverages, sizeof(__pyx_k_leverages), 0, 1, 0, 0},
  {&__pyx_n_u_lib, __pyx_k_lib, sizeof(__pyx_k_lib), 0, 1, 0, 1},
  {&__pyx_n_s_lig, __pyx_k_lig, sizeof(__pyx_k_lig), 0, 0, 1, 1},
  {&__pyx_n_s_lig2, __pyx_k_lig2, sizeof(__pyx_k_lig2), 0, 0, 1, 1},
  {&__pyx_n_s_loadtxt, __pyx_k_loadtxt, sizeof(__pyx_k_loadtxt), 0, 0, 1, 1},
  {&__pyx_n_s_locconf, __pyx_k_locconf, sizeof(__pyx_k_locconf), 0, 0, 1, 1},
  {&__pyx_n_s_longkey, __pyx_k_longkey, sizeof(__pyx_k_longkey), 0, 0, 1, 1},
  {&__pyx_n_s_lower, __pyx_k_lower, sizeof(__pyx_k_lower), 0, 0, 1, 1},
  {&__pyx_n_s_lrow, __pyx_k_lrow, sizeof(__pyx_k_lrow), 0, 0, 1, 1},
  {&__pyx_n_s_lst, __pyx_k_lst, sizeof(__pyx_k_lst), 0, 0, 1, 1},
  {&__pyx_n_s_lsts, __pyx_k_lsts, sizeof(__pyx_k_lsts), 0, 0, 1, 1},
  {&__pyx_n_s_ma, __pyx_k_ma, sizeof(__pyx_k_ma), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_u_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 1, 0, 1},
  {&__pyx_n_s_mainTitle, __pyx_k_mainTitle, sizeof(__pyx_k_mainTitle), 0, 0, 1, 1},
  {&__pyx_n_s_make_dir, __pyx_k_make_dir, sizeof(__pyx_k_make_dir), 0, 0, 1, 1},
  {&__pyx_n_s_mask, __pyx_k_mask, sizeof(__pyx_k_mask), 0, 0, 1, 1},
  {&__pyx_n_s_masked_array, __pyx_k_masked_array, sizeof(__pyx_k_masked_array), 0, 0, 1, 1},
  {&__pyx_kp_u_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 1, 0, 0},
  {&__pyx_n_s_max_2, __pyx_k_max_2, sizeof(__pyx_k_max_2), 0, 0, 1, 1},
  {&__pyx_kp_u_max_abs_hij, __pyx_k_max_abs_hij, sizeof(__pyx_k_max_abs_hij), 0, 1, 0, 0},
  {&__pyx_n_s_mean, __pyx_k_mean, sizeof(__pyx_k_mean), 0, 0, 1, 1},
  {&__pyx_kp_u_mean_abs_hij, __pyx_k_mean_abs_hij, sizeof(__pyx_k_mean_abs_hij), 0, 1, 0, 0},
  {&__pyx_n_s_mess, __pyx_k_mess, sizeof(__pyx_k_mess), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_k_metaphor_chem_gm_core_gmtoolbox, sizeof(__pyx_k_metaphor_chem_gm_core_gmtoolbox), 0, 0, 1, 1},
  {&__pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_k_metaphor_chem_gm_core_gmtoolbox_2, sizeof(__pyx_k_metaphor_chem_gm_core_gmtoolbox_2), 0, 0, 1, 0},
  {&__pyx_kp_u_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 1, 0, 0},
  {&__pyx_n_s_min_2, __pyx_k_min_2, sizeof(__pyx_k_min_2), 0, 0, 1, 1},
  {&__pyx_kp_u_min_abs_hij, __pyx_k_min_abs_hij, sizeof(__pyx_k_min_abs_hij), 0, 1, 0, 0},
  {&__pyx_n_s_minmax, __pyx_k_minmax, sizeof(__pyx_k_minmax), 0, 0, 1, 1},
  {&__pyx_n_s_minmaxsize, __pyx_k_minmaxsize, sizeof(__pyx_k_minmaxsize), 0, 0, 1, 1},
  {&__pyx_n_s_minmaxst, __pyx_k_minmaxst, sizeof(__pyx_k_minmaxst), 0, 0, 1, 1},
  {&__pyx_n_s_mkdtemp, __pyx_k_mkdtemp, sizeof(__pyx_k_mkdtemp), 0, 0, 1, 1},
  {&__pyx_n_s_mmlst0, __pyx_k_mmlst0, sizeof(__pyx_k_mmlst0), 0, 0, 1, 1},
  {&__pyx_n_s_mmlst1, __pyx_k_mmlst1, sizeof(__pyx_k_mmlst1), 0, 0, 1, 1},
  {&__pyx_n_s_modconf, __pyx_k_modconf, sizeof(__pyx_k_modconf), 0, 0, 1, 1},
  {&__pyx_n_s_moddict, __pyx_k_moddict, sizeof(__pyx_k_moddict), 0, 0, 1, 1},
  {&__pyx_n_u_model, __pyx_k_model, sizeof(__pyx_k_model), 0, 1, 0, 1},
  {&__pyx_n_s_modelConfFile, __pyx_k_modelConfFile, sizeof(__pyx_k_modelConfFile), 0, 0, 1, 1},
  {&__pyx_n_s_modelSelected, __pyx_k_modelSelected, sizeof(__pyx_k_modelSelected), 0, 0, 1, 1},
  {&__pyx_n_s_modelconf, __pyx_k_modelconf, sizeof(__pyx_k_modelconf), 0, 0, 1, 1},
  {&__pyx_n_s_modelconfdict, __pyx_k_modelconfdict, sizeof(__pyx_k_modelconfdict), 0, 0, 1, 1},
  {&__pyx_n_s_modeldict, __pyx_k_modeldict, sizeof(__pyx_k_modeldict), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_module_2, __pyx_k_module_2, sizeof(__pyx_k_module_2), 0, 0, 1, 1},
  {&__pyx_n_s_modulestoremove, __pyx_k_modulestoremove, sizeof(__pyx_k_modulestoremove), 0, 0, 1, 1},
  {&__pyx_n_u_mol, __pyx_k_mol, sizeof(__pyx_k_mol), 0, 1, 0, 1},
  {&__pyx_n_u_mol0, __pyx_k_mol0, sizeof(__pyx_k_mol0), 0, 1, 0, 1},
  {&__pyx_n_s_mol1, __pyx_k_mol1, sizeof(__pyx_k_mol1), 0, 0, 1, 1},
  {&__pyx_n_u_mol1, __pyx_k_mol1, sizeof(__pyx_k_mol1), 0, 1, 0, 1},
  {&__pyx_n_s_monal, __pyx_k_monal, sizeof(__pyx_k_monal), 0, 0, 1, 1},
  {&__pyx_n_s_monal_Property, __pyx_k_monal_Property, sizeof(__pyx_k_monal_Property), 0, 0, 1, 1},
  {&__pyx_n_s_monal_datareader__excel, __pyx_k_monal_datareader__excel, sizeof(__pyx_k_monal_datareader__excel), 0, 0, 1, 1},
  {&__pyx_n_s_monal_util_toolbox, __pyx_k_monal_util_toolbox, sizeof(__pyx_k_monal_util_toolbox), 0, 0, 1, 1},
  {&__pyx_n_s_monal_util_utils, __pyx_k_monal_util_utils, sizeof(__pyx_k_monal_util_utils), 0, 0, 1, 1},
  {&__pyx_n_s_monalconst, __pyx_k_monalconst, sizeof(__pyx_k_monalconst), 0, 0, 1, 1},
  {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
  {&__pyx_n_s_names, __pyx_k_names, sizeof(__pyx_k_names), 0, 0, 1, 1},
  {&__pyx_n_s_nb, __pyx_k_nb, sizeof(__pyx_k_nb), 0, 0, 1, 1},
  {&__pyx_n_s_newline, __pyx_k_newline, sizeof(__pyx_k_newline), 0, 0, 1, 1},
  {&__pyx_n_s_newprefix, __pyx_k_newprefix, sizeof(__pyx_k_newprefix), 0, 0, 1, 1},
  {&__pyx_n_s_ni, __pyx_k_ni, sizeof(__pyx_k_ni), 0, 0, 1, 1},
  {&__pyx_n_s_nntoolbox_configparsertoolbox, __pyx_k_nntoolbox_configparsertoolbox, sizeof(__pyx_k_nntoolbox_configparsertoolbox), 0, 0, 1, 1},
  {&__pyx_n_s_nntoolbox_filetoolbox, __pyx_k_nntoolbox_filetoolbox, sizeof(__pyx_k_nntoolbox_filetoolbox), 0, 0, 1, 1},
  {&__pyx_n_s_nntoolbox_utils, __pyx_k_nntoolbox_utils, sizeof(__pyx_k_nntoolbox_utils), 0, 0, 1, 1},
  {&__pyx_n_s_no, __pyx_k_no, sizeof(__pyx_k_no), 0, 0, 1, 1},
  {&__pyx_n_s_nonASCIICharsConvert, __pyx_k_nonASCIICharsConvert, sizeof(__pyx_k_nonASCIICharsConvert), 0, 0, 1, 1},
  {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
  {&__pyx_n_s_numpy_ma, __pyx_k_numpy_ma, sizeof(__pyx_k_numpy_ma), 0, 0, 1, 1},
  {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
  {&__pyx_n_u_occurence, __pyx_k_occurence, sizeof(__pyx_k_occurence), 0, 1, 0, 1},
  {&__pyx_n_s_onDestroy, __pyx_k_onDestroy, sizeof(__pyx_k_onDestroy), 0, 0, 1, 1},
  {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
  {&__pyx_n_s_oplst, __pyx_k_oplst, sizeof(__pyx_k_oplst), 0, 0, 1, 1},
  {&__pyx_n_s_opt, __pyx_k_opt, sizeof(__pyx_k_opt), 0, 0, 1, 1},
  {&__pyx_n_s_option, __pyx_k_option, sizeof(__pyx_k_option), 0, 0, 1, 1},
  {&__pyx_n_s_optionlist, __pyx_k_optionlist, sizeof(__pyx_k_optionlist), 0, 0, 1, 1},
  {&__pyx_n_s_optionoccur, __pyx_k_optionoccur, sizeof(__pyx_k_optionoccur), 0, 0, 1, 1},
  {&__pyx_n_s_options, __pyx_k_options, sizeof(__pyx_k_options), 0, 0, 1, 1},
  {&__pyx_n_s_origin, __pyx_k_origin, sizeof(__pyx_k_origin), 0, 0, 1, 1},
  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
  {&__pyx_n_s_outputCount, __pyx_k_outputCount, sizeof(__pyx_k_outputCount), 0, 0, 1, 1},
  {&__pyx_n_s_outputNames, __pyx_k_outputNames, sizeof(__pyx_k_outputNames), 0, 0, 1, 1},
  {&__pyx_n_s_parameterNames, __pyx_k_parameterNames, sizeof(__pyx_k_parameterNames), 0, 0, 1, 1},
  {&__pyx_n_s_paramlist, __pyx_k_paramlist, sizeof(__pyx_k_paramlist), 0, 0, 1, 1},
  {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
  {&__pyx_n_s_pathname, __pyx_k_pathname, sizeof(__pyx_k_pathname), 0, 0, 1, 1},
  {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
  {&__pyx_n_s_ppath, __pyx_k_ppath, sizeof(__pyx_k_ppath), 0, 0, 1, 1},
  {&__pyx_n_s_ppty, __pyx_k_ppty, sizeof(__pyx_k_ppty), 0, 0, 1, 1},
  {&__pyx_n_s_pptyname, __pyx_k_pptyname, sizeof(__pyx_k_pptyname), 0, 0, 1, 1},
  {&__pyx_n_s_prefix, __pyx_k_prefix, sizeof(__pyx_k_prefix), 0, 0, 1, 1},
  {&__pyx_n_u_prefix, __pyx_k_prefix, sizeof(__pyx_k_prefix), 0, 1, 0, 1},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_s_prevLOO, __pyx_k_prevLOO, sizeof(__pyx_k_prevLOO), 0, 0, 1, 1},
  {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
  {&__pyx_n_s_projMat, __pyx_k_projMat, sizeof(__pyx_k_projMat), 0, 0, 1, 1},
  {&__pyx_n_s_projectConf, __pyx_k_projectConf, sizeof(__pyx_k_projectConf), 0, 0, 1, 1},
  {&__pyx_n_s_projectConf_2, __pyx_k_projectConf_2, sizeof(__pyx_k_projectConf_2), 0, 0, 1, 1},
  {&__pyx_n_s_projectDir, __pyx_k_projectDir, sizeof(__pyx_k_projectDir), 0, 0, 1, 1},
  {&__pyx_n_s_projectionMatrix, __pyx_k_projectionMatrix, sizeof(__pyx_k_projectionMatrix), 0, 0, 1, 1},
  {&__pyx_n_u_projects, __pyx_k_projects, sizeof(__pyx_k_projects), 0, 1, 0, 1},
  {&__pyx_n_s_prop, __pyx_k_prop, sizeof(__pyx_k_prop), 0, 0, 1, 1},
  {&__pyx_n_u_properties, __pyx_k_properties, sizeof(__pyx_k_properties), 0, 1, 0, 1},
  {&__pyx_n_u_property, __pyx_k_property, sizeof(__pyx_k_property), 0, 1, 0, 1},
  {&__pyx_kp_u_pyd, __pyx_k_pyd, sizeof(__pyx_k_pyd), 0, 1, 0, 0},
  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  {&__pyx_n_s_quotechar, __pyx_k_quotechar, sizeof(__pyx_k_quotechar), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_read, __pyx_k_read, sizeof(__pyx_k_read), 0, 0, 1, 1},
  {&__pyx_n_s_readConfig, __pyx_k_readConfig, sizeof(__pyx_k_readConfig), 0, 0, 1, 1},
  {&__pyx_n_s_remove_option, __pyx_k_remove_option, sizeof(__pyx_k_remove_option), 0, 0, 1, 1},
  {&__pyx_n_s_remove_section, __pyx_k_remove_section, sizeof(__pyx_k_remove_section), 0, 0, 1, 1},
  {&__pyx_n_s_removemodule, __pyx_k_removemodule, sizeof(__pyx_k_removemodule), 0, 0, 1, 1},
  {&__pyx_n_s_repeat, __pyx_k_repeat, sizeof(__pyx_k_repeat), 0, 0, 1, 1},
  {&__pyx_n_s_res, __pyx_k_res, sizeof(__pyx_k_res), 0, 0, 1, 1},
  {&__pyx_n_s_reseau, __pyx_k_reseau, sizeof(__pyx_k_reseau), 0, 0, 1, 1},
  {&__pyx_n_s_reshash, __pyx_k_reshash, sizeof(__pyx_k_reshash), 0, 0, 1, 1},
  {&__pyx_n_s_residual, __pyx_k_residual, sizeof(__pyx_k_residual), 0, 0, 1, 1},
  {&__pyx_n_s_reslong, __pyx_k_reslong, sizeof(__pyx_k_reslong), 0, 0, 1, 1},
  {&__pyx_n_s_resst, __pyx_k_resst, sizeof(__pyx_k_resst), 0, 0, 1, 1},
  {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
  {&__pyx_n_s_resultlist, __pyx_k_resultlist, sizeof(__pyx_k_resultlist), 0, 0, 1, 1},
  {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1},
  {&__pyx_n_s_richDictFromConfigstr, __pyx_k_richDictFromConfigstr, sizeof(__pyx_k_richDictFromConfigstr), 0, 0, 1, 1},
  {&__pyx_n_s_root, __pyx_k_root, sizeof(__pyx_k_root), 0, 0, 1, 1},
  {&__pyx_n_u_root, __pyx_k_root, sizeof(__pyx_k_root), 0, 1, 0, 1},
  {&__pyx_n_s_row0, __pyx_k_row0, sizeof(__pyx_k_row0), 0, 0, 1, 1},
  {&__pyx_n_s_rowend, __pyx_k_rowend, sizeof(__pyx_k_rowend), 0, 0, 1, 1},
  {&__pyx_kp_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 0},
  {&__pyx_n_s_save, __pyx_k_save, sizeof(__pyx_k_save), 0, 0, 1, 1},
  {&__pyx_n_s_saveDefaultConf, __pyx_k_saveDefaultConf, sizeof(__pyx_k_saveDefaultConf), 0, 0, 1, 1},
  {&__pyx_n_s_saveModelConf, __pyx_k_saveModelConf, sizeof(__pyx_k_saveModelConf), 0, 0, 1, 1},
  {&__pyx_n_s_saveNpToXl, __pyx_k_saveNpToXl, sizeof(__pyx_k_saveNpToXl), 0, 0, 1, 1},
  {&__pyx_n_s_saveNpsToXl, __pyx_k_saveNpsToXl, sizeof(__pyx_k_saveNpsToXl), 0, 0, 1, 1},
  {&__pyx_n_s_sbaselen, __pyx_k_sbaselen, sizeof(__pyx_k_sbaselen), 0, 0, 1, 1},
  {&__pyx_n_s_sconfigFile, __pyx_k_sconfigFile, sizeof(__pyx_k_sconfigFile), 0, 0, 1, 1},
  {&__pyx_n_s_sec, __pyx_k_sec, sizeof(__pyx_k_sec), 0, 0, 1, 1},
  {&__pyx_n_s_section, __pyx_k_section, sizeof(__pyx_k_section), 0, 0, 1, 1},
  {&__pyx_n_s_sections, __pyx_k_sections, sizeof(__pyx_k_sections), 0, 0, 1, 1},
  {&__pyx_n_u_selected, __pyx_k_selected, sizeof(__pyx_k_selected), 0, 1, 0, 1},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_n_s_set, __pyx_k_set, sizeof(__pyx_k_set), 0, 0, 1, 1},
  {&__pyx_n_s_setDefaultConf, __pyx_k_setDefaultConf, sizeof(__pyx_k_setDefaultConf), 0, 0, 1, 1},
  {&__pyx_n_s_setModel, __pyx_k_setModel, sizeof(__pyx_k_setModel), 0, 0, 1, 1},
  {&__pyx_n_s_setProjectConf, __pyx_k_setProjectConf, sizeof(__pyx_k_setProjectConf), 0, 0, 1, 1},
  {&__pyx_n_s_setmodelconf, __pyx_k_setmodelconf, sizeof(__pyx_k_setmodelconf), 0, 0, 1, 1},
  {&__pyx_n_s_setter, __pyx_k_setter, sizeof(__pyx_k_setter), 0, 0, 1, 1},
  {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
  {&__pyx_n_s_sheet, __pyx_k_sheet, sizeof(__pyx_k_sheet), 0, 0, 1, 1},
  {&__pyx_n_u_sheet_1, __pyx_k_sheet_1, sizeof(__pyx_k_sheet_1), 0, 1, 0, 1},
  {&__pyx_n_s_sheets, __pyx_k_sheets, sizeof(__pyx_k_sheets), 0, 0, 1, 1},
  {&__pyx_n_s_shortTitles, __pyx_k_shortTitles, sizeof(__pyx_k_shortTitles), 0, 0, 1, 1},
  {&__pyx_n_s_shutil, __pyx_k_shutil, sizeof(__pyx_k_shutil), 0, 0, 1, 1},
  {&__pyx_n_s_simplecentral, __pyx_k_simplecentral, sizeof(__pyx_k_simplecentral), 0, 0, 1, 1},
  {&__pyx_n_s_sort, __pyx_k_sort, sizeof(__pyx_k_sort), 0, 0, 1, 1},
  {&__pyx_n_s_sorted, __pyx_k_sorted, sizeof(__pyx_k_sorted), 0, 0, 1, 1},
  {&__pyx_n_s_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 0, 1, 1},
  {&__pyx_n_s_sourceTitles, __pyx_k_sourceTitles, sizeof(__pyx_k_sourceTitles), 0, 0, 1, 1},
  {&__pyx_n_s_sources, __pyx_k_sources, sizeof(__pyx_k_sources), 0, 0, 1, 1},
  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {&__pyx_n_s_st, __pyx_k_st, sizeof(__pyx_k_st), 0, 0, 1, 1},
  {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1},
  {&__pyx_n_s_stconnect, __pyx_k_stconnect, sizeof(__pyx_k_stconnect), 0, 0, 1, 1},
  {&__pyx_n_s_stdout, __pyx_k_stdout, sizeof(__pyx_k_stdout), 0, 0, 1, 1},
  {&__pyx_n_s_structdict, __pyx_k_structdict, sizeof(__pyx_k_structdict), 0, 0, 1, 1},
  {&__pyx_n_s_structkeysloc, __pyx_k_structkeysloc, sizeof(__pyx_k_structkeysloc), 0, 0, 1, 1},
  {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
  {&__pyx_n_s_sworkingDir, __pyx_k_sworkingDir, sizeof(__pyx_k_sworkingDir), 0, 0, 1, 1},
  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
  {&__pyx_n_s_target, __pyx_k_target, sizeof(__pyx_k_target), 0, 0, 1, 1},
  {&__pyx_n_s_targets, __pyx_k_targets, sizeof(__pyx_k_targets), 0, 0, 1, 1},
  {&__pyx_n_s_tempDirs, __pyx_k_tempDirs, sizeof(__pyx_k_tempDirs), 0, 0, 1, 1},
  {&__pyx_n_s_tempfile, __pyx_k_tempfile, sizeof(__pyx_k_tempfile), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_test_2, __pyx_k_test_2, sizeof(__pyx_k_test_2), 0, 0, 1, 1},
  {&__pyx_n_s_titles, __pyx_k_titles, sizeof(__pyx_k_titles), 0, 0, 1, 1},
  {&__pyx_n_s_to_add, __pyx_k_to_add, sizeof(__pyx_k_to_add), 0, 0, 1, 1},
  {&__pyx_n_u_training, __pyx_k_training, sizeof(__pyx_k_training), 0, 1, 0, 1},
  {&__pyx_kp_u_training__s, __pyx_k_training__s, sizeof(__pyx_k_training__s), 0, 1, 0, 0},
  {&__pyx_n_s_trainlabel, __pyx_k_trainlabel, sizeof(__pyx_k_trainlabel), 0, 0, 1, 1},
  {&__pyx_n_s_triangle, __pyx_k_triangle, sizeof(__pyx_k_triangle), 0, 0, 1, 1},
  {&__pyx_n_u_true, __pyx_k_true, sizeof(__pyx_k_true), 0, 1, 0, 1},
  {&__pyx_n_s_updateConfig, __pyx_k_updateConfig, sizeof(__pyx_k_updateConfig), 0, 0, 1, 1},
  {&__pyx_n_s_updateConfigFromConfigstr, __pyx_k_updateConfigFromConfigstr, sizeof(__pyx_k_updateConfigFromConfigstr), 0, 0, 1, 1},
  {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1},
  {&__pyx_n_s_valtest, __pyx_k_valtest, sizeof(__pyx_k_valtest), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_vec, __pyx_k_vec, sizeof(__pyx_k_vec), 0, 0, 1, 1},
  {&__pyx_n_u_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 1, 0, 1},
  {&__pyx_kp_u_w_2, __pyx_k_w_2, sizeof(__pyx_k_w_2), 0, 1, 0, 0},
  {&__pyx_n_s_withdiag, __pyx_k_withdiag, sizeof(__pyx_k_withdiag), 0, 0, 1, 1},
  {&__pyx_n_s_withhidden, __pyx_k_withhidden, sizeof(__pyx_k_withhidden), 0, 0, 1, 1},
  {&__pyx_n_s_withprefix, __pyx_k_withprefix, sizeof(__pyx_k_withprefix), 0, 0, 1, 1},
  {&__pyx_n_s_withtitles, __pyx_k_withtitles, sizeof(__pyx_k_withtitles), 0, 0, 1, 1},
  {&__pyx_n_s_workingDir, __pyx_k_workingDir, sizeof(__pyx_k_workingDir), 0, 0, 1, 1},
  {&__pyx_n_s_workingdir, __pyx_k_workingdir, sizeof(__pyx_k_workingdir), 0, 0, 1, 1},
  {&__pyx_n_u_workingdir, __pyx_k_workingdir, sizeof(__pyx_k_workingdir), 0, 1, 0, 1},
  {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
  {&__pyx_n_s_write_col, __pyx_k_write_col, sizeof(__pyx_k_write_col), 0, 0, 1, 1},
  {&__pyx_n_s_write_row, __pyx_k_write_row, sizeof(__pyx_k_write_row), 0, 0, 1, 1},
  {&__pyx_n_s_writeconnect, __pyx_k_writeconnect, sizeof(__pyx_k_writeconnect), 0, 0, 1, 1},
  {&__pyx_n_s_writer, __pyx_k_writer, sizeof(__pyx_k_writer), 0, 0, 1, 1},
  {&__pyx_n_s_xl, __pyx_k_xl, sizeof(__pyx_k_xl), 0, 0, 1, 1},
  {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},
  {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 599, __pyx_L1_error)
  __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 999, __pyx_L1_error)
  __pyx_builtin_sorted = __Pyx_GetBuiltinName(__pyx_n_s_sorted); if (!__pyx_builtin_sorted) __PYX_ERR(0, 56, __pyx_L1_error)
  __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 55, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 63, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 66, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 172, __pyx_L1_error)
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 607, __pyx_L1_error)
  __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) __PYX_ERR(0, 703, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 781, __pyx_L1_error)
  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 956, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "metaphor/chem_gm/core/gmtoolbox.py":47
 * 
 * def writeconnect(config, connect):
 *     if not config.has_section("connectivity"):             # <<<<<<<<<<<<<<
 *         config.add_section("connectivity")
 *     for key in connect:
 */
  __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_u_connectivity); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "metaphor/chem_gm/core/gmtoolbox.py":48
 * def writeconnect(config, connect):
 *     if not config.has_section("connectivity"):
 *         config.add_section("connectivity")             # <<<<<<<<<<<<<<
 *     for key in connect:
 *         config.set("connectivity", key2long(key), str(connect[key]))
 */
  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_n_u_connectivity); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "metaphor/chem_gm/core/gmtoolbox.py":74
 * 
 * def saveNpToXl(filename, source, header=[], sheet="sheet_1"):
 *     with Excel(filename, sheet) as xl:             # <<<<<<<<<<<<<<
 *         if header:
 *             xl.write(header, newline=True)
 */
  __pyx_tuple__3 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "metaphor/chem_gm/core/gmtoolbox.py":150
 *                         if (shortTitles is not None) and len(shortTitles) >= 1:
 *                             #xl.add_worksheet("%s_%s"%(sheet, shortTitles[0]))
 *                             lst = sheet.split("_")             # <<<<<<<<<<<<<<
 *                             xl.add_worksheet("%s_%s"%(lst[-1], shortTitles[0]))
 *                             col0 = 1
 */
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_n_u__5); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "metaphor/chem_gm/core/gmtoolbox.py":207
 *                     if dispMat is not None:
 *                         if (shortTitles is not None) and len(shortTitles) >= 2:
 *                             lst = sheet.split("_")             # <<<<<<<<<<<<<<
 *                             xl.add_worksheet("%s_%s"%(lst[-1], shortTitles[1]))
 *                             col0 = 1
 */
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_n_u__5); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "metaphor/chem_gm/core/gmtoolbox.py":86
 *         dl = len(sources) - len(sheets)
 *         sheets = sheets if not dl else chain(sheets, repeat("", dl))
 *         with Excel(filename) as xl:  #, optimized_write=True             # <<<<<<<<<<<<<<
 *             if extra:
 *                 try:
 */
  __pyx_tuple__8 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "metaphor/chem_gm/core/gmtoolbox.py":266
 *     if not configstr:
 *         return dico
 *     lst = configstr.split('_')             # <<<<<<<<<<<<<<
 *     test = lst[-1]
 *     isHidden = test[-1] == "N"
 */
  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_n_u__5); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "metaphor/chem_gm/core/gmtoolbox.py":271
 *     if isHidden:
 *         try:
 *             dico['hidden'] = int(test[:-1])             # <<<<<<<<<<<<<<
 *             lst.pop(-1)
 *         except:
 */
  __pyx_slice__10 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__10)) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__10);
  __Pyx_GIVEREF(__pyx_slice__10);

  /* "metaphor/chem_gm/core/gmtoolbox.py":278
 *     for ind, value in enumerate(lst):
 *         if value[0] in Hydrogenes:
 *             st = value[1:]             # <<<<<<<<<<<<<<
 *             if st:
 *                 dico[value[0]] = int(st)
 */
  __pyx_slice__11 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__11)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__11);
  __Pyx_GIVEREF(__pyx_slice__11);

  /* "metaphor/chem_gm/core/gmtoolbox.py":293
 *         elif isint(value):
 *             pass # heu ???
 *         elif isint(value[1:]):             # <<<<<<<<<<<<<<
 *             val = int(value[1:])
 *             key = value[0]
 */
  __pyx_slice__12 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__12)) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__12);
  __Pyx_GIVEREF(__pyx_slice__12);

  /* "metaphor/chem_gm/core/gmtoolbox.py":294
 *             pass # heu ???
 *         elif isint(value[1:]):
 *             val = int(value[1:])             # <<<<<<<<<<<<<<
 *             key = value[0]
 *         elif isint(value[2:]):
 */
  __pyx_slice__13 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__13)) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__13);
  __Pyx_GIVEREF(__pyx_slice__13);

  /* "metaphor/chem_gm/core/gmtoolbox.py":296
 *             val = int(value[1:])
 *             key = value[0]
 *         elif isint(value[2:]):             # <<<<<<<<<<<<<<
 *             key = value[:2]
 *             val = int(value[2:])
 */
  __pyx_slice__14 = PySlice_New(__pyx_int_2, Py_None, Py_None); if (unlikely(!__pyx_slice__14)) __PYX_ERR(0, 296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__14);
  __Pyx_GIVEREF(__pyx_slice__14);

  /* "metaphor/chem_gm/core/gmtoolbox.py":297
 *             key = value[0]
 *         elif isint(value[2:]):
 *             key = value[:2]             # <<<<<<<<<<<<<<
 *             val = int(value[2:])
 *         elif isint(value[3:]):
 */
  __pyx_slice__15 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__15)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__15);
  __Pyx_GIVEREF(__pyx_slice__15);

  /* "metaphor/chem_gm/core/gmtoolbox.py":298
 *         elif isint(value[2:]):
 *             key = value[:2]
 *             val = int(value[2:])             # <<<<<<<<<<<<<<
 *         elif isint(value[3:]):
 *             if (len(value) > 4) and (value[:4] in ['iso1', 'iso2', 'chi1', 'chi2']):
 */
  __pyx_slice__16 = PySlice_New(__pyx_int_2, Py_None, Py_None); if (unlikely(!__pyx_slice__16)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__16);
  __Pyx_GIVEREF(__pyx_slice__16);

  /* "metaphor/chem_gm/core/gmtoolbox.py":299
 *             key = value[:2]
 *             val = int(value[2:])
 *         elif isint(value[3:]):             # <<<<<<<<<<<<<<
 *             if (len(value) > 4) and (value[:4] in ['iso1', 'iso2', 'chi1', 'chi2']):
 *                 key = value[:4]
 */
  __pyx_slice__17 = PySlice_New(__pyx_int_3, Py_None, Py_None); if (unlikely(!__pyx_slice__17)) __PYX_ERR(0, 299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__17);
  __Pyx_GIVEREF(__pyx_slice__17);

  /* "metaphor/chem_gm/core/gmtoolbox.py":300
 *             val = int(value[2:])
 *         elif isint(value[3:]):
 *             if (len(value) > 4) and (value[:4] in ['iso1', 'iso2', 'chi1', 'chi2']):             # <<<<<<<<<<<<<<
 *                 key = value[:4]
 *                 val = int(value[4:])
 */
  __pyx_slice__18 = PySlice_New(Py_None, __pyx_int_4, Py_None); if (unlikely(!__pyx_slice__18)) __PYX_ERR(0, 300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__18);
  __Pyx_GIVEREF(__pyx_slice__18);

  /* "metaphor/chem_gm/core/gmtoolbox.py":301
 *         elif isint(value[3:]):
 *             if (len(value) > 4) and (value[:4] in ['iso1', 'iso2', 'chi1', 'chi2']):
 *                 key = value[:4]             # <<<<<<<<<<<<<<
 *                 val = int(value[4:])
 *                 dico[key] = val
 */
  __pyx_slice__19 = PySlice_New(Py_None, __pyx_int_4, Py_None); if (unlikely(!__pyx_slice__19)) __PYX_ERR(0, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__19);
  __Pyx_GIVEREF(__pyx_slice__19);

  /* "metaphor/chem_gm/core/gmtoolbox.py":302
 *             if (len(value) > 4) and (value[:4] in ['iso1', 'iso2', 'chi1', 'chi2']):
 *                 key = value[:4]
 *                 val = int(value[4:])             # <<<<<<<<<<<<<<
 *                 dico[key] = val
 *             else:
 */
  __pyx_slice__20 = PySlice_New(__pyx_int_4, Py_None, Py_None); if (unlikely(!__pyx_slice__20)) __PYX_ERR(0, 302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__20);
  __Pyx_GIVEREF(__pyx_slice__20);

  /* "metaphor/chem_gm/core/gmtoolbox.py":305
 *                 dico[key] = val
 *             else:
 *                 key = value[:3]             # <<<<<<<<<<<<<<
 *                 if key in ['grd', 'dgr']:
 *                     fval = value[3:]
 */
  __pyx_slice__21 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__21)) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__21);
  __Pyx_GIVEREF(__pyx_slice__21);

  /* "metaphor/chem_gm/core/gmtoolbox.py":307
 *                 key = value[:3]
 *                 if key in ['grd', 'dgr']:
 *                     fval = value[3:]             # <<<<<<<<<<<<<<
 *     #                 if len(fval) == 2:
 *     #                     key = gradekey(int(fval[0]), longkey)
 */
  __pyx_slice__22 = PySlice_New(__pyx_int_3, Py_None, Py_None); if (unlikely(!__pyx_slice__22)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__22);
  __Pyx_GIVEREF(__pyx_slice__22);

  /* "metaphor/chem_gm/core/gmtoolbox.py":318
 *                         key = ""
 *                 else:
 *                     val = int(value[3:])             # <<<<<<<<<<<<<<
 *         elif len(value) > 3 and value[:3] in ['grd', 'dgr'] and value[-2:]=="-1":
 *             #key = value[:3]
 */
  __pyx_slice__23 = PySlice_New(__pyx_int_3, Py_None, Py_None); if (unlikely(!__pyx_slice__23)) __PYX_ERR(0, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__23);
  __Pyx_GIVEREF(__pyx_slice__23);

  /* "metaphor/chem_gm/core/gmtoolbox.py":319
 *                 else:
 *                     val = int(value[3:])
 *         elif len(value) > 3 and value[:3] in ['grd', 'dgr'] and value[-2:]=="-1":             # <<<<<<<<<<<<<<
 *             #key = value[:3]
 *             fval = value[3:-2]
 */
  __pyx_slice__24 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__24)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__24);
  __Pyx_GIVEREF(__pyx_slice__24);
  __pyx_slice__25 = PySlice_New(__pyx_int_neg_2, Py_None, Py_None); if (unlikely(!__pyx_slice__25)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__25);
  __Pyx_GIVEREF(__pyx_slice__25);

  /* "metaphor/chem_gm/core/gmtoolbox.py":321
 *         elif len(value) > 3 and value[:3] in ['grd', 'dgr'] and value[-2:]=="-1":
 *             #key = value[:3]
 *             fval = value[3:-2]             # <<<<<<<<<<<<<<
 *             for ind in range(len(fval)):
 *                 key = gradekey(int(fval[ind]), longkey)
 */
  __pyx_slice__26 = PySlice_New(__pyx_int_3, __pyx_int_neg_2, Py_None); if (unlikely(!__pyx_slice__26)) __PYX_ERR(0, 321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__26);
  __Pyx_GIVEREF(__pyx_slice__26);

  /* "metaphor/chem_gm/core/gmtoolbox.py":333
 *         elif '|' in value:
 *             key = "central"
 *             val = value.split('|')             # <<<<<<<<<<<<<<
 *         elif grademax and (len(value) == 5) and (value[:4] in ["grds", "dgrs"]):
 *             for ind in range(1, grademax + 1):
 */
  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_u__27); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "metaphor/chem_gm/core/gmtoolbox.py":334
 *             key = "central"
 *             val = value.split('|')
 *         elif grademax and (len(value) == 5) and (value[:4] in ["grds", "dgrs"]):             # <<<<<<<<<<<<<<
 *             for ind in range(1, grademax + 1):
 *                 key = gradekey(ind, longkey)
 */
  __pyx_slice__29 = PySlice_New(Py_None, __pyx_int_4, Py_None); if (unlikely(!__pyx_slice__29)) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__29);
  __Pyx_GIVEREF(__pyx_slice__29);

  /* "metaphor/chem_gm/core/gmtoolbox.py":337
 *             for ind in range(1, grademax + 1):
 *                 key = gradekey(ind, longkey)
 *                 dico[key] = value[4:]             # <<<<<<<<<<<<<<
 *             key = ""
 *         if key:
 */
  __pyx_slice__30 = PySlice_New(__pyx_int_4, Py_None, Py_None); if (unlikely(!__pyx_slice__30)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__30);
  __Pyx_GIVEREF(__pyx_slice__30);

  /* "metaphor/chem_gm/core/gmtoolbox.py":360
 * def hashFromConfig(config, hidden, fullconfig=False, withhidden=False):
 *     connectivity = OrderedDict()
 *     dict = config.getSectionDict("connectivity")             # <<<<<<<<<<<<<<
 *     conkeys = dict.keys()
 *     conkeys.sort()
 */
  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_n_u_connectivity); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "metaphor/chem_gm/core/gmtoolbox.py":398
 *         val = int(val)
 *         keyshort = key2short(key)
 *         if keyshort.startswith("ccl"):             # <<<<<<<<<<<<<<
 *             if not val in ccllst:
 *                 ccllst.append(val)
 */
  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_n_u_ccl); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "metaphor/chem_gm/core/gmtoolbox.py":401
 *             if not val in ccllst:
 *                 ccllst.append(val)
 *         elif keyshort.startswith("dgr"):             # <<<<<<<<<<<<<<
 *             if not val in gradlst:
 *                 gradlst.append(val)
 */
  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_n_u_dgr); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);

  /* "metaphor/chem_gm/core/gmtoolbox.py":436
 *         val = int(structdict[key])
 *         keyshort = key2short(key)
 *         if keyshort.startswith("chi"):             # <<<<<<<<<<<<<<
 *             if (val != 0):  # or not hidden:
 *                 OKchi = True
 */
  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_n_u_chi); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "metaphor/chem_gm/core/gmtoolbox.py":445
 *                 else:
 *                     chimax = min(hidden, val)
 *         elif keyshort.startswith("iso"):             # <<<<<<<<<<<<<<
 *             if (val != 0):  # or not hidden:
 *                 OKiso = True
 */
  __pyx_tuple__35 = PyTuple_Pack(1, __pyx_n_u_iso); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);

  /* "metaphor/chem_gm/core/gmtoolbox.py":454
 *                 else:
 *                     isomax = min(hidden, val)
 *         elif keyshort.startswith("ccl"):             # <<<<<<<<<<<<<<
 *             if val:
 *                 ind = ccllst.index(val)
 */
  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_n_u_ccl); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "metaphor/chem_gm/core/gmtoolbox.py":457
 *             if val:
 *                 ind = ccllst.index(val)
 *                 cclinputlst[ind].append(keyshort[3:])             # <<<<<<<<<<<<<<
 *         elif keyshort.startswith("dgr"):
 *             if val:
 */
  __pyx_slice__37 = PySlice_New(__pyx_int_3, Py_None, Py_None); if (unlikely(!__pyx_slice__37)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__37);
  __Pyx_GIVEREF(__pyx_slice__37);

  /* "metaphor/chem_gm/core/gmtoolbox.py":458
 *                 ind = ccllst.index(val)
 *                 cclinputlst[ind].append(keyshort[3:])
 *         elif keyshort.startswith("dgr"):             # <<<<<<<<<<<<<<
 *             if val:
 *                 ind = gradlst.index(val)
 */
  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_u_dgr); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);

  /* "metaphor/chem_gm/core/gmtoolbox.py":461
 *             if val:
 *                 ind = gradlst.index(val)
 *                 grdinputlist[ind].append(keyshort[3:])             # <<<<<<<<<<<<<<
 *         elif val:
 *             to_add.append((keyshort, val))
 */
  __pyx_slice__39 = PySlice_New(__pyx_int_3, Py_None, Py_None); if (unlikely(!__pyx_slice__39)) __PYX_ERR(0, 461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__39);
  __Pyx_GIVEREF(__pyx_slice__39);

  /* "metaphor/chem_gm/core/gmtoolbox.py":497
 *                 to_add.append(("grds", val))
 *             elif (val==-1) and not hidden:
 *                 to_add.append(("grds", 1))             # <<<<<<<<<<<<<<
 *         else:
 *             if val and cond:
 */
  __pyx_tuple__40 = PyTuple_Pack(2, __pyx_n_u_grds, __pyx_int_1); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);

  /* "metaphor/chem_gm/core/gmtoolbox.py":530
 *                 central = int(dict['central'])
 *             except:
 *                 central = len(dict['central'].split(','))             # <<<<<<<<<<<<<<
 *         if simplecentral:
 *             if central < dict['candidatecount']:
 */
  __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_u__41); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);

  /* "metaphor/chem_gm/core/gmtoolbox.py":539
 * #                 resultlist.append("Cn%s" % central)
 *         else:
 *             lst = dict['central'].split(',')             # <<<<<<<<<<<<<<
 *             st = "_".join(lst)
 *             resultlist.append("Cn%s" % st)
 */
  __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_u__41); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "metaphor/chem_gm/core/gmtoolbox.py":556
 *     fullconfig = fullconfig and (config is not None)
 *     if fullconfig:
 *         dict = config.getSectionDict("connectivity")             # <<<<<<<<<<<<<<
 *         hidden = config.getintdefault("model", "hidden", 0)
 *         if config.has_option("general", "root"):
 */
  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_n_u_connectivity); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "metaphor/chem_gm/core/gmtoolbox.py":557
 *     if fullconfig:
 *         dict = config.getSectionDict("connectivity")
 *         hidden = config.getintdefault("model", "hidden", 0)             # <<<<<<<<<<<<<<
 *         if config.has_option("general", "root"):
 *             root = config.get("general", "root")
 */
  __pyx_tuple__45 = PyTuple_Pack(3, __pyx_n_u_model, __pyx_n_u_hidden, __pyx_int_0); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);

  /* "metaphor/chem_gm/core/gmtoolbox.py":558
 *         dict = config.getSectionDict("connectivity")
 *         hidden = config.getintdefault("model", "hidden", 0)
 *         if config.has_option("general", "root"):             # <<<<<<<<<<<<<<
 *             root = config.get("general", "root")
 *         else:
 */
  __pyx_tuple__46 = PyTuple_Pack(2, __pyx_n_u_general, __pyx_n_u_root); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);

  /* "metaphor/chem_gm/core/gmtoolbox.py":559
 *         hidden = config.getintdefault("model", "hidden", 0)
 *         if config.has_option("general", "root"):
 *             root = config.get("general", "root")             # <<<<<<<<<<<<<<
 *         else:
 *             root = config.getdefault("projects", "0", "root")
 */
  __pyx_tuple__47 = PyTuple_Pack(2, __pyx_n_u_general, __pyx_n_u_root); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);

  /* "metaphor/chem_gm/core/gmtoolbox.py":561
 *             root = config.get("general", "root")
 *         else:
 *             root = config.getdefault("projects", "0", "root")             # <<<<<<<<<<<<<<
 *         prefix = config.getdefault("model", "prefix", root)
 *         central = config.getdefault("model", "central", "0")
 */
  __pyx_tuple__48 = PyTuple_Pack(3, __pyx_n_u_projects, __pyx_kp_u_0, __pyx_n_u_root); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "metaphor/chem_gm/core/gmtoolbox.py":563
 *             root = config.getdefault("projects", "0", "root")
 *         prefix = config.getdefault("model", "prefix", root)
 *         central = config.getdefault("model", "central", "0")             # <<<<<<<<<<<<<<
 *         classif = config.getbooleandefault("model", "classif", False)
 *         mol1 = config.getbooleandefault("model", "mol1", True)
 */
  __pyx_tuple__49 = PyTuple_Pack(3, __pyx_n_u_model, __pyx_n_u_central, __pyx_kp_u_0); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);

  /* "metaphor/chem_gm/core/gmtoolbox.py":564
 *         prefix = config.getdefault("model", "prefix", root)
 *         central = config.getdefault("model", "central", "0")
 *         classif = config.getbooleandefault("model", "classif", False)             # <<<<<<<<<<<<<<
 *         mol1 = config.getbooleandefault("model", "mol1", True)
 *     else:
 */
  __pyx_tuple__50 = PyTuple_Pack(3, __pyx_n_u_model, __pyx_n_u_classif, Py_False); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__50);
  __Pyx_GIVEREF(__pyx_tuple__50);

  /* "metaphor/chem_gm/core/gmtoolbox.py":565
 *         central = config.getdefault("model", "central", "0")
 *         classif = config.getbooleandefault("model", "classif", False)
 *         mol1 = config.getbooleandefault("model", "mol1", True)             # <<<<<<<<<<<<<<
 *     else:
 *         if moddict:
 */
  __pyx_tuple__51 = PyTuple_Pack(3, __pyx_n_u_model, __pyx_n_u_mol1, Py_True); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);

  /* "metaphor/chem_gm/core/gmtoolbox.py":570
 *             dict = moddict
 *         elif config:
 *             dict = config.getSectionDict("connectivity")             # <<<<<<<<<<<<<<
 *         else:
 *             dict ={}
 */
  __pyx_tuple__52 = PyTuple_Pack(1, __pyx_n_u_connectivity); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);

  /* "metaphor/chem_gm/core/gmtoolbox.py":573
 *         else:
 *             dict ={}
 *         hidden = hidden if (hidden is not None) else config.getintdefault(             # <<<<<<<<<<<<<<
 *                                                         "model", "hidden", 0)
 *     if dict is None:
 */
  __pyx_tuple__53 = PyTuple_Pack(3, __pyx_n_u_model, __pyx_n_u_hidden, __pyx_int_0); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);

  /* "metaphor/chem_gm/core/gmtoolbox.py":592
 * def getModelKeyFromConf(config, doHash=0):
 *     if doHash == 2:
 *         root = config.getdefault("general", "root", "")             # <<<<<<<<<<<<<<
 *         return "%s-%s"% (root, getConfigHash(config))
 *     if doHash == 1:
 */
  __pyx_tuple__54 = PyTuple_Pack(3, __pyx_n_u_general, __pyx_n_u_root, __pyx_kp_u__4); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);

  /* "metaphor/chem_gm/core/gmtoolbox.py":638
 *         connectlist = conf.options(stconnect)
 *         #islong = True
 *         for i in (1, 2):             # <<<<<<<<<<<<<<
 *             key = isokey(i, islong)
 *             if not key in connectlist:
 */
  __pyx_tuple__56 = PyTuple_Pack(2, __pyx_int_1, __pyx_int_2); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);

  /* "metaphor/chem_gm/core/gmtoolbox.py":666
 *     def dataiterator(self):
 *         if self.datasource:
 *             return self.datasource.iterData(True)             # <<<<<<<<<<<<<<
 * 
 *     def onDestroy(self):
 */
  __pyx_tuple__57 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);

  /* "metaphor/chem_gm/core/gmtoolbox.py":669
 * 
 *     def onDestroy(self):
 *         for ppath in self.tempDirs[-1::-1]:             # <<<<<<<<<<<<<<
 *             pass
 *             # effacer tout
 */
  __pyx_slice__58 = PySlice_New(__pyx_int_neg_1, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__58)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__58);
  __Pyx_GIVEREF(__pyx_slice__58);

  /* "metaphor/chem_gm/core/gmtoolbox.py":725
 *         st = self.modelconf(key).getdefault(trainlabel, "selected", "")
 *         if st:
 *             return [int(val) for val in st.split(',')]             # <<<<<<<<<<<<<<
 *         return []
 * 
 */
  __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_u__41); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);

  /* "metaphor/chem_gm/core/gmtoolbox.py":729
 * 
 *     def getTargetsFromFile(self):
 *         pathname = self.getProjectConf("general", "workingdir", "")             # <<<<<<<<<<<<<<
 *         filename = os.path.join(pathname, "properties", self.curproperty)
 * 
 */
  __pyx_tuple__60 = PyTuple_Pack(3, __pyx_n_u_general, __pyx_n_u_workingdir, __pyx_kp_u__4); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);

  /* "metaphor/chem_gm/core/gmtoolbox.py":736
 * 
 *     def ModelCfgItems(self):
 *         return [(key, self.getProjectConf("projects", key, "")) for key in self.getProjectConfOptions("projects")]             # <<<<<<<<<<<<<<
 * 
 *     def save(self, index=3):
 */
  __pyx_tuple__61 = PyTuple_Pack(1, __pyx_n_u_projects); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);

  /* "metaphor/chem_gm/core/gmtoolbox.py":832
 *         for module, modconf in modulestoremove:
 *             cfg.read(modconf)
 *             workingdir = cfg.get("general", "workingdir")             # <<<<<<<<<<<<<<
 *             prop = cfg.get("general", "property")
 *             workingdir = os.path.join(workingdir, prop)
 */
  __pyx_tuple__62 = PyTuple_Pack(2, __pyx_n_u_general, __pyx_n_u_workingdir); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);

  /* "metaphor/chem_gm/core/gmtoolbox.py":833
 *             cfg.read(modconf)
 *             workingdir = cfg.get("general", "workingdir")
 *             prop = cfg.get("general", "property")             # <<<<<<<<<<<<<<
 *             workingdir = os.path.join(workingdir, prop)
 *             if module.endswith("lib"):
 */
  __pyx_tuple__63 = PyTuple_Pack(2, __pyx_n_u_general, __pyx_n_u_property); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);

  /* "metaphor/chem_gm/core/gmtoolbox.py":835
 *             prop = cfg.get("general", "property")
 *             workingdir = os.path.join(workingdir, prop)
 *             if module.endswith("lib"):             # <<<<<<<<<<<<<<
 *                 module = module[:-3]
 *             module = module + ".pyd"
 */
  __pyx_tuple__64 = PyTuple_Pack(1, __pyx_n_u_lib); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);

  /* "metaphor/chem_gm/core/gmtoolbox.py":836
 *             workingdir = os.path.join(workingdir, prop)
 *             if module.endswith("lib"):
 *                 module = module[:-3]             # <<<<<<<<<<<<<<
 *             module = module + ".pyd"
 *             removemodule(module, workingdir)
 */
  __pyx_slice__65 = PySlice_New(Py_None, __pyx_int_neg_3, Py_None); if (unlikely(!__pyx_slice__65)) __PYX_ERR(0, 836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__65);
  __Pyx_GIVEREF(__pyx_slice__65);

  /* "metaphor/chem_gm/core/gmtoolbox.py":860
 *     def workingDir(self):
 *         try:
 *             res = self.projectConf.get("general", "workingdir")             # <<<<<<<<<<<<<<
 * #         except NoSectionError:
 *         except:
 */
  __pyx_tuple__66 = PyTuple_Pack(2, __pyx_n_u_general, __pyx_n_u_workingdir); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);

  /* "metaphor/chem_gm/core/gmtoolbox.py":872
 *     def dataRoot(self):
 *         try:
 *             return os.path.basename(self.projectConf.get("general", "workingdir"))             # <<<<<<<<<<<<<<
 *         except:
 * #         except NoSectionError:
 */
  __pyx_tuple__67 = PyTuple_Pack(2, __pyx_n_u_general, __pyx_n_u_workingdir); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);

  /* "metaphor/chem_gm/core/gmtoolbox.py":922
 *     def connect(self, config):
 *         res = defaultdict(lambda:0)
 *         options = config.options("connectivity")             # <<<<<<<<<<<<<<
 *         optionoccur = config.options("occurence")
 *         extraopts = self.extras(config)  #.values()
 */
  __pyx_tuple__68 = PyTuple_Pack(1, __pyx_n_u_connectivity); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);

  /* "metaphor/chem_gm/core/gmtoolbox.py":923
 *         res = defaultdict(lambda:0)
 *         options = config.options("connectivity")
 *         optionoccur = config.options("occurence")             # <<<<<<<<<<<<<<
 *         extraopts = self.extras(config)  #.values()
 *         extraoptslow = [val.lower() for val in extraopts]
 */
  __pyx_tuple__69 = PyTuple_Pack(1, __pyx_n_u_occurence); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__69);
  __Pyx_GIVEREF(__pyx_tuple__69);

  /* "metaphor/chem_gm/core/gmtoolbox.py":938
 * 
 *     def extras(self, config):
 *         if not config.has_section("general"):             # <<<<<<<<<<<<<<
 *             return []
 *         st = config.getdefault("general", "extras", "")
 */
  __pyx_tuple__70 = PyTuple_Pack(1, __pyx_n_u_general); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);

  /* "metaphor/chem_gm/core/gmtoolbox.py":940
 *         if not config.has_section("general"):
 *             return []
 *         st = config.getdefault("general", "extras", "")             # <<<<<<<<<<<<<<
 *         if st:
 *             return st.split(',')
 */
  __pyx_tuple__71 = PyTuple_Pack(3, __pyx_n_u_general, __pyx_n_u_extras, __pyx_kp_u__4); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);

  /* "metaphor/chem_gm/core/gmtoolbox.py":942
 *         st = config.getdefault("general", "extras", "")
 *         if st:
 *             return st.split(',')             # <<<<<<<<<<<<<<
 * 
 *         res= []
 */
  __pyx_tuple__72 = PyTuple_Pack(1, __pyx_kp_u__41); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);

  /* "metaphor/chem_gm/core/gmtoolbox.py":945
 * 
 *         res= []
 *         lst = [option for option in config.options("general") if option.startswith("extra") and (option != "extras")]             # <<<<<<<<<<<<<<
 *         for i in range(len(lst)):
 *             st = config.get("general", "extra(%d)"% i)
 */
  __pyx_tuple__73 = PyTuple_Pack(1, __pyx_n_u_general); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);
  __pyx_tuple__74 = PyTuple_Pack(1, __pyx_n_u_extra); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);

  /* "metaphor/chem_gm/core/gmtoolbox.py":46
 * defaultConf = None
 * 
 * def writeconnect(config, connect):             # <<<<<<<<<<<<<<
 *     if not config.has_section("connectivity"):
 *         config.add_section("connectivity")
 */
  __pyx_tuple__76 = PyTuple_Pack(3, __pyx_n_s_config, __pyx_n_s_connect, __pyx_n_s_key); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);
  __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_writeconnect, 46, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 46, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":52
 *         config.set("connectivity", key2long(key), str(connect[key]))
 * 
 * def getMinMaxMatrix(Mat, names, nb=10, indextest=0):             # <<<<<<<<<<<<<<
 *     N, M = Mat.shape
 *     nb = min(nb, N/2)
 */
  __pyx_tuple__78 = PyTuple_Pack(10, __pyx_n_s_Mat, __pyx_n_s_names, __pyx_n_s_nb, __pyx_n_s_indextest, __pyx_n_s_N, __pyx_n_s_M, __pyx_n_s_lst, __pyx_n_s_lsts, __pyx_n_s_vec, __pyx_n_s_name); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);
  __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_getMinMaxMatrix, 52, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(0, 52, __pyx_L1_error)
  __pyx_tuple__80 = PyTuple_Pack(2, ((PyObject *)__pyx_int_10), ((PyObject *)__pyx_int_0)); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__80);
  __Pyx_GIVEREF(__pyx_tuple__80);

  /* "metaphor/chem_gm/core/gmtoolbox.py":59
 *     return lsts[:nb], lsts[-nb:]
 * 
 * def getMinMaxMatrixSym(Mat, nb=10, withdiag=True):             # <<<<<<<<<<<<<<
 *     N, M = Mat.shape
 *     if N != M:
 */
  __pyx_tuple__81 = PyTuple_Pack(11, __pyx_n_s_Mat, __pyx_n_s_nb, __pyx_n_s_withdiag, __pyx_n_s_N, __pyx_n_s_M, __pyx_n_s_st, __pyx_n_s_lst, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_lsts, __pyx_n_s_val); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);
  __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_getMinMaxMatrixSym, 59, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 59, __pyx_L1_error)
  __pyx_tuple__83 = PyTuple_Pack(2, ((PyObject *)__pyx_int_10), ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);

  /* "metaphor/chem_gm/core/gmtoolbox.py":73
 *     return lsts[:nb], lsts[-nb:]
 * 
 * def saveNpToXl(filename, source, header=[], sheet="sheet_1"):             # <<<<<<<<<<<<<<
 *     with Excel(filename, sheet) as xl:
 *         if header:
 */
  __pyx_tuple__84 = PyTuple_Pack(5, __pyx_n_s_filename, __pyx_n_s_source, __pyx_n_s_header, __pyx_n_s_sheet, __pyx_n_s_xl); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);
  __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_saveNpToXl, 73, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 73, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":79
 *         xl.write(source)
 * 
 * def saveNpsToXl(filename, sources, sourceTitles=None, shortTitles=None,             # <<<<<<<<<<<<<<
 *     extra=None, extrasheet=None, extrarow=[], header=[], headers=None,
 *     lefter=None, lefters=None, sheets=[""], minmax=0):
 */
  __pyx_tuple__86 = PyTuple_Pack(51, __pyx_n_s_filename, __pyx_n_s_sources, __pyx_n_s_sourceTitles, __pyx_n_s_shortTitles, __pyx_n_s_extra, __pyx_n_s_extrasheet, __pyx_n_s_extrarow, __pyx_n_s_header, __pyx_n_s_headers, __pyx_n_s_lefter, __pyx_n_s_lefters, __pyx_n_s_sheets, __pyx_n_s_minmax, __pyx_n_s_minmaxsize, __pyx_n_s_dl, __pyx_n_s_xl, __pyx_n_s_err, __pyx_n_s_mainTitle, __pyx_n_s_iterator, __pyx_n_s_source, __pyx_n_s_dispMat, __pyx_n_s_projMat, __pyx_n_s_head, __pyx_n_s_left, __pyx_n_s_sheet, __pyx_n_s_col0, __pyx_n_s_row0, __pyx_n_s_rowend, __pyx_n_s_cur, __pyx_n_s_minmaxst, __pyx_n_s_res, __pyx_n_s_lst, __pyx_n_s_ind, __pyx_n_s_lig, __pyx_n_s_hii, __pyx_n_s_mask, __pyx_n_s_lig2, __pyx_n_s_hijmean, __pyx_n_s_hijmin, __pyx_n_s_hijmax, __pyx_n_s_mmlst0, __pyx_n_s_mmlst1, __pyx_n_s_N, __pyx_n_s_paramlist, __pyx_n_s_e, __pyx_n_s_mess, __pyx_n_s_val, __pyx_n_s_val, __pyx_n_s_val, __pyx_n_s_val, __pyx_n_s_val); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);
  __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(13, 0, 51, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_saveNpsToXl, 79, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 79, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":252
 *         pass
 * 
 * def richDictFromConfigstr(configstr, hidden=0, target=None, longkey=False, grademax=0):             # <<<<<<<<<<<<<<
 *     dico = fromConfigstr2Dict(configstr, hidden=0, target=None, longkey=False, grademax=0)
 *     return dico
 */
  __pyx_tuple__88 = PyTuple_Pack(6, __pyx_n_s_configstr, __pyx_n_s_hidden, __pyx_n_s_target, __pyx_n_s_longkey, __pyx_n_s_grademax, __pyx_n_s_dico); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);
  __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_richDictFromConfigstr, 252, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 252, __pyx_L1_error)
  __pyx_tuple__90 = PyTuple_Pack(4, ((PyObject *)__pyx_int_0), ((PyObject *)Py_None), ((PyObject *)Py_False), ((PyObject *)__pyx_int_0)); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);

  /* "metaphor/chem_gm/core/gmtoolbox.py":256
 *     return dico
 * 
 * def fromConfigstr2Dict(configstr, hidden=0, target=None, longkey=False, grademax=0):             # <<<<<<<<<<<<<<
 *     """Cration d'un dictionnaire de connexions  partir d'une chane de
 *     connexion.
 */
  __pyx_tuple__91 = PyTuple_Pack(15, __pyx_n_s_configstr, __pyx_n_s_hidden, __pyx_n_s_target, __pyx_n_s_longkey, __pyx_n_s_grademax, __pyx_n_s_dico, __pyx_n_s_lst, __pyx_n_s_test, __pyx_n_s_isHidden, __pyx_n_s_ind, __pyx_n_s_value, __pyx_n_s_st, __pyx_n_s_key, __pyx_n_s_val, __pyx_n_s_fval); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__91);
  __Pyx_GIVEREF(__pyx_tuple__91);
  __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(5, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__91, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_fromConfigstr2Dict, 256, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 256, __pyx_L1_error)
  __pyx_tuple__93 = PyTuple_Pack(4, ((PyObject *)__pyx_int_0), ((PyObject *)Py_None), ((PyObject *)Py_False), ((PyObject *)__pyx_int_0)); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);

  /* "metaphor/chem_gm/core/gmtoolbox.py":343
 *     return dico
 * 
 * def updateConfigFromConfigstr(configstr, config):             # <<<<<<<<<<<<<<
 *     dico = fromConfigstr2Dict(configstr)
 *     for key, val in dico.items():
 */
  __pyx_tuple__94 = PyTuple_Pack(5, __pyx_n_s_configstr, __pyx_n_s_config, __pyx_n_s_dico, __pyx_n_s_key, __pyx_n_s_val); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);
  __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_updateConfigFromConfigstr, 343, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(0, 343, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":352
 *     return config
 * 
 * def hashFromDict(dict, hidden, fullconfig=False, withhidden=False):             # <<<<<<<<<<<<<<
 *     resst = fromconfig2Str(dict, hidden, fullconfig=fullconfig, withhidden=withhidden)
 *     reslong = abs(ctypes.c_size_t(hash(resst)).value)
 */
  __pyx_tuple__96 = PyTuple_Pack(7, __pyx_n_s_dict, __pyx_n_s_hidden, __pyx_n_s_fullconfig, __pyx_n_s_withhidden, __pyx_n_s_resst, __pyx_n_s_reslong, __pyx_n_s_reshash); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__96);
  __Pyx_GIVEREF(__pyx_tuple__96);
  __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__96, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_hashFromDict, 352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 352, __pyx_L1_error)
  __pyx_tuple__98 = PyTuple_Pack(2, ((PyObject *)Py_False), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);

  /* "metaphor/chem_gm/core/gmtoolbox.py":358
 *     return reshash
 * 
 * def hashFromConfig(config, hidden, fullconfig=False, withhidden=False):             # <<<<<<<<<<<<<<
 *     connectivity = OrderedDict()
 *     dict = config.getSectionDict("connectivity")
 */
  __pyx_tuple__99 = PyTuple_Pack(12, __pyx_n_s_config, __pyx_n_s_hidden, __pyx_n_s_fullconfig, __pyx_n_s_withhidden, __pyx_n_s_connectivity, __pyx_n_s_dict, __pyx_n_s_conkeys, __pyx_n_s_key, __pyx_n_s_val, __pyx_n_s_resst, __pyx_n_s_reslong, __pyx_n_s_reshash); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);
  __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_hashFromConfig, 358, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 358, __pyx_L1_error)
  __pyx_tuple__101 = PyTuple_Pack(2, ((PyObject *)Py_False), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);

  /* "metaphor/chem_gm/core/gmtoolbox.py":383
 *     return reshash
 * 
 * def fromconfig2Str(dict, hidden, fullconfig=False, withhidden=False, simplecentral=False):             # <<<<<<<<<<<<<<
 *     """Cration d'une chane de connexion de connexions  partir d'un dictionnaire.
 *     """
 */
  __pyx_tuple__102 = PyTuple_Pack(42, __pyx_n_s_dict, __pyx_n_s_hidden, __pyx_n_s_fullconfig, __pyx_n_s_withhidden, __pyx_n_s_simplecentral, __pyx_n_s_has_hydrogen, __pyx_n_s_to_add, __pyx_n_s_chimax, __pyx_n_s_isomax, __pyx_n_s_ccllst, __pyx_n_s_gradlst, __pyx_n_s_key, __pyx_n_s_val, __pyx_n_s_keyshort, __pyx_n_s_grdinputlist, __pyx_n_s_cclinputlst, __pyx_n_s_OKchi, __pyx_n_s_OKiso, __pyx_n_s_atomdict, __pyx_n_s_structdict, __pyx_n_s_atomkeys, __pyx_n_s_keyfct, __pyx_n_s_structkeysloc, __pyx_n_s_ind, __pyx_n_s_lst, __pyx_n_s_valtest, __pyx_n_s_isfull, __pyx_n_s_n, __pyx_n_s_st, __pyx_n_s_cond, __pyx_n_s_resultlist, __pyx_n_s_cumulatom, __pyx_n_s_opt, __pyx_n_s_central, __pyx_n_s__5, __pyx_n_s__5, __pyx_n_s_key, __pyx_n_s_val, __pyx_n_s_key, __pyx_n_s_val, __pyx_n_s_item, __pyx_n_s_item); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__102);
  __Pyx_GIVEREF(__pyx_tuple__102);
  __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(5, 0, 42, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__102, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_fromconfig2Str, 383, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(0, 383, __pyx_L1_error)
  __pyx_tuple__104 = PyTuple_Pack(3, ((PyObject *)Py_False), ((PyObject *)Py_False), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);

  /* "metaphor/chem_gm/core/gmtoolbox.py":550
 *     return "_".join(resultlist)
 * 
 * def getModelBase(config=None, moddict=None, hidden=None, fullconfig=False,             # <<<<<<<<<<<<<<
 *         withprefix=True, withhidden=True, simplecentral=True,
 *         candidatecount=-1, ext=""):
 */
  __pyx_tuple__105 = PyTuple_Pack(17, __pyx_n_s_config, __pyx_n_s_moddict, __pyx_n_s_hidden, __pyx_n_s_fullconfig, __pyx_n_s_withprefix, __pyx_n_s_withhidden, __pyx_n_s_simplecentral, __pyx_n_s_candidatecount, __pyx_n_s_ext, __pyx_n_s_prefix, __pyx_n_s_dict, __pyx_n_s_root, __pyx_n_s_central, __pyx_n_s_classif, __pyx_n_s_mol1, __pyx_n_s_result, __pyx_n_s_newprefix); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__105);
  __Pyx_GIVEREF(__pyx_tuple__105);
  __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(9, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__105, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_getModelBase, 550, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(0, 550, __pyx_L1_error)
  __pyx_tuple__107 = PyTuple_Pack(9, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_False), ((PyObject *)Py_True), ((PyObject *)Py_True), ((PyObject *)Py_True), ((PyObject *)__pyx_int_neg_1), ((PyObject*)__pyx_kp_u__4)); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__107);
  __Pyx_GIVEREF(__pyx_tuple__107);

  /* "metaphor/chem_gm/core/gmtoolbox.py":590
 *     return result
 * 
 * def getModelKeyFromConf(config, doHash=0):             # <<<<<<<<<<<<<<
 *     if doHash == 2:
 *         root = config.getdefault("general", "root", "")
 */
  __pyx_tuple__108 = PyTuple_Pack(4, __pyx_n_s_config, __pyx_n_s_doHash, __pyx_n_s_root, __pyx_n_s_st); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);
  __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_getModelKeyFromConf, 590, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 590, __pyx_L1_error)
  __pyx_tuple__110 = PyTuple_Pack(1, ((PyObject *)__pyx_int_0)); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__110);
  __Pyx_GIVEREF(__pyx_tuple__110);

  /* "metaphor/chem_gm/core/gmtoolbox.py":599
 *     return getModelBase(config, fullconfig=True)
 * 
 * class GMEngine( object):             # <<<<<<<<<<<<<<
 *     """class GMEngine
 *     Gestionnaire commun a toutes pages de "Graph Mmachine" du moteur de
 */
  __pyx_tuple__111 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__111);
  __Pyx_GIVEREF(__pyx_tuple__111);

  /* "metaphor/chem_gm/core/gmtoolbox.py":605
 *     """
 * 
 *     def __init__(self, projectDir, defaultcfg="", debug=False):             # <<<<<<<<<<<<<<
 *         global defaultConf
 *         super(GMEngine, self).__init__()
 */
  __pyx_tuple__112 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_projectDir, __pyx_n_s_defaultcfg, __pyx_n_s_debug); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__112);
  __Pyx_GIVEREF(__pyx_tuple__112);
  __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_init, 605, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(0, 605, __pyx_L1_error)
  __pyx_tuple__114 = PyTuple_Pack(2, ((PyObject*)__pyx_kp_u__4), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);

  /* "metaphor/chem_gm/core/gmtoolbox.py":634
 *         self.defaultModified = False
 * 
 *     def checkconnect(self, conf, islong):             # <<<<<<<<<<<<<<
 *         stconnect = "connectivity"
 *         connectlist = conf.options(stconnect)
 */
  __pyx_tuple__115 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_conf, __pyx_n_s_islong, __pyx_n_s_stconnect, __pyx_n_s_connectlist, __pyx_n_s_i, __pyx_n_s_key); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(0, 634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__115);
  __Pyx_GIVEREF(__pyx_tuple__115);
  __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__115, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_checkconnect, 634, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(0, 634, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":657
 *                 conf.set(stconnect, key, "0")
 * 
 *     def setDefaultConf(self, conffile=""):             # <<<<<<<<<<<<<<
 *         if conffile:
 *             self.defaultConfigFile = conffile
 */
  __pyx_tuple__117 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_conffile); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__117);
  __Pyx_GIVEREF(__pyx_tuple__117);
  __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_setDefaultConf, 657, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(0, 657, __pyx_L1_error)
  __pyx_tuple__119 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_u__4)); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__119);
  __Pyx_GIVEREF(__pyx_tuple__119);

  /* "metaphor/chem_gm/core/gmtoolbox.py":664
 * 
 *     @Property
 *     def dataiterator(self):             # <<<<<<<<<<<<<<
 *         if self.datasource:
 *             return self.datasource.iterData(True)
 */
  __pyx_tuple__120 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__120);
  __Pyx_GIVEREF(__pyx_tuple__120);
  __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_dataiterator, 664, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 664, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":668
 *             return self.datasource.iterData(True)
 * 
 *     def onDestroy(self):             # <<<<<<<<<<<<<<
 *         for ppath in self.tempDirs[-1::-1]:
 *             pass
 */
  __pyx_tuple__122 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ppath); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__122);
  __Pyx_GIVEREF(__pyx_tuple__122);
  __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_onDestroy, 668, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 668, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":674
 * 
 *     @Property
 *     def baselen(self):             # <<<<<<<<<<<<<<
 *         return self._baselen
 *     @baselen.setter
 */
  __pyx_tuple__124 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__124);
  __Pyx_GIVEREF(__pyx_tuple__124);
  __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__124, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_baselen_2, 674, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(0, 674, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":677
 *         return self._baselen
 *     @baselen.setter
 *     def sbaselen(self, value):             # <<<<<<<<<<<<<<
 *         self._baselen = value
 * 
 */
  __pyx_tuple__126 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__126);
  __Pyx_GIVEREF(__pyx_tuple__126);
  __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_sbaselen, 677, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) __PYX_ERR(0, 677, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":680
 *         self._baselen = value
 * 
 *     def getTempDir(self, index = -1):             # <<<<<<<<<<<<<<
 *         if index < 0:
 *             self.tempDirs.append(mkdtemp())
 */
  __pyx_tuple__128 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_index); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__128);
  __Pyx_GIVEREF(__pyx_tuple__128);
  __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_getTempDir, 680, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(0, 680, __pyx_L1_error)
  __pyx_tuple__130 = PyTuple_Pack(1, ((PyObject *)__pyx_int_neg_1)); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__130);
  __Pyx_GIVEREF(__pyx_tuple__130);

  /* "metaphor/chem_gm/core/gmtoolbox.py":686
 *         return self.tempDirs[index]
 * 
 *     def setmodelconf(self, key, value):             # <<<<<<<<<<<<<<
 *         self._modelconfdict[key] = value
 * 
 */
  __pyx_tuple__131 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__131);
  __Pyx_GIVEREF(__pyx_tuple__131);
  __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_setmodelconf, 686, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(0, 686, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":689
 *         self._modelconfdict[key] = value
 * 
 *     def modelconf(self, key, origin=None):             # <<<<<<<<<<<<<<
 *         res = self._modelconfdict[key]
 *         if not res:
 */
  __pyx_tuple__133 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_origin, __pyx_n_s_res, __pyx_n_s_cfgfile); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(0, 689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__133);
  __Pyx_GIVEREF(__pyx_tuple__133);
  __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_modelconf, 689, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(0, 689, __pyx_L1_error)
  __pyx_tuple__135 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(0, 689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__135);
  __Pyx_GIVEREF(__pyx_tuple__135);

  /* "metaphor/chem_gm/core/gmtoolbox.py":702
 *         return res
 * 
 *     def saveModelConf(self, key):             # <<<<<<<<<<<<<<
 *         ff = open(self._modelConfFile[key], "w")
 *         try:
 */
  __pyx_tuple__136 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_ff); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(0, 702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__136);
  __Pyx_GIVEREF(__pyx_tuple__136);
  __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__136, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_saveModelConf, 702, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) __PYX_ERR(0, 702, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":709
 *             ff.close()
 * 
 *     def saveDefaultConf(self, filename=""):             # <<<<<<<<<<<<<<
 *         filename = filename if filename else self.defaultConfigFile
 *         ff = open(filename, "w")
 */
  __pyx_tuple__138 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_filename, __pyx_n_s_ff); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__138);
  __Pyx_GIVEREF(__pyx_tuple__138);
  __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_saveDefaultConf, 709, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 709, __pyx_L1_error)
  __pyx_tuple__140 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_u__4)); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__140);
  __Pyx_GIVEREF(__pyx_tuple__140);

  /* "metaphor/chem_gm/core/gmtoolbox.py":718
 *             ff.close()
 * 
 *     def modelSelected(self, key, ppty):             # <<<<<<<<<<<<<<
 *         if ppty:
 *             trainlabel = "training_%s"% ppty
 */
  __pyx_tuple__141 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_ppty, __pyx_n_s_trainlabel, __pyx_n_s_st, __pyx_n_s_val); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(0, 718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__141);
  __Pyx_GIVEREF(__pyx_tuple__141);
  __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_modelSelected, 718, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(0, 718, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":728
 *         return []
 * 
 *     def getTargetsFromFile(self):             # <<<<<<<<<<<<<<
 *         pathname = self.getProjectConf("general", "workingdir", "")
 *         filename = os.path.join(pathname, "properties", self.curproperty)
 */
  __pyx_tuple__143 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_pathname, __pyx_n_s_filename, __pyx_n_s_targets); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(0, 728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__143);
  __Pyx_GIVEREF(__pyx_tuple__143);
  __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_getTargetsFromFile, 728, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(0, 728, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":735
 *         return targets
 * 
 *     def ModelCfgItems(self):             # <<<<<<<<<<<<<<
 *         return [(key, self.getProjectConf("projects", key, "")) for key in self.getProjectConfOptions("projects")]
 * 
 */
  __pyx_tuple__145 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_key); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__145);
  __Pyx_GIVEREF(__pyx_tuple__145);
  __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_ModelCfgItems, 735, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(0, 735, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":738
 *         return [(key, self.getProjectConf("projects", key, "")) for key in self.getProjectConfOptions("projects")]
 * 
 *     def save(self, index=3):             # <<<<<<<<<<<<<<
 *         if index & 2:
 *             if not os.path.exists(self.configFile):
 */
  __pyx_tuple__147 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_index, __pyx_n_s_path, __pyx_n_s_base, __pyx_n_s_lst, __pyx_n_s_files); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__147);
  __Pyx_GIVEREF(__pyx_tuple__147);
  __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_save, 738, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 738, __pyx_L1_error)
  __pyx_tuple__149 = PyTuple_Pack(1, ((PyObject *)__pyx_int_3)); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__149);
  __Pyx_GIVEREF(__pyx_tuple__149);

  /* "metaphor/chem_gm/core/gmtoolbox.py":755
 *             files.close()
 * 
 *     def getDefault(self, section, option, default, docreate=False):             # <<<<<<<<<<<<<<
 *         return self._getFromConf(self.defaultConf, section, option, default, docreate)
 * 
 */
  __pyx_tuple__150 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_section, __pyx_n_s_option, __pyx_n_s_default, __pyx_n_s_docreate); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__150);
  __Pyx_GIVEREF(__pyx_tuple__150);
  __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_getDefault, 755, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(0, 755, __pyx_L1_error)
  __pyx_tuple__152 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__152);
  __Pyx_GIVEREF(__pyx_tuple__152);

  /* "metaphor/chem_gm/core/gmtoolbox.py":758
 *         return self._getFromConf(self.defaultConf, section, option, default, docreate)
 * 
 *     def getProjectConf(self, section, option, default, docreate=False):             # <<<<<<<<<<<<<<
 *         return self._getFromConf(self.projectConf, section, option, default, docreate)
 * 
 */
  __pyx_tuple__153 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_section, __pyx_n_s_option, __pyx_n_s_default, __pyx_n_s_docreate); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__153);
  __Pyx_GIVEREF(__pyx_tuple__153);
  __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_getProjectConf, 758, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 758, __pyx_L1_error)
  __pyx_tuple__155 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__155);
  __Pyx_GIVEREF(__pyx_tuple__155);

  /* "metaphor/chem_gm/core/gmtoolbox.py":761
 *         return self._getFromConf(self.projectConf, section, option, default, docreate)
 * 
 *     def _getFromConf(self, conf, section, option, default, docreate=False):             # <<<<<<<<<<<<<<
 *         if conf.has_section(section) and conf.has_option(section, option):
 *             try:
 */
  __pyx_tuple__156 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_conf, __pyx_n_s_section, __pyx_n_s_option, __pyx_n_s_default, __pyx_n_s_docreate, __pyx_n_s_st); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__156);
  __Pyx_GIVEREF(__pyx_tuple__156);
  __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(6, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__156, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_getFromConf, 761, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(0, 761, __pyx_L1_error)
  __pyx_tuple__158 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__158);
  __Pyx_GIVEREF(__pyx_tuple__158);

  /* "metaphor/chem_gm/core/gmtoolbox.py":792
 *         return default
 * 
 *     def setProjectConf(self, section, option, value):             # <<<<<<<<<<<<<<
 *         if not self.projectConf.has_section(section):
 *             self.projectConf.add_section(section)
 */
  __pyx_tuple__159 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_section, __pyx_n_s_option, __pyx_n_s_value); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__159);
  __Pyx_GIVEREF(__pyx_tuple__159);
  __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_setProjectConf, 792, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 792, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":798
 *         self.projectConf.ismodif = True
 * 
 *     def getDefaultOptions(self, section):             # <<<<<<<<<<<<<<
 *         return self._getOptionsFromConf(self.defaultConf, section)
 * 
 */
  __pyx_tuple__161 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_section); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__161);
  __Pyx_GIVEREF(__pyx_tuple__161);
  __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_getDefaultOptions, 798, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 798, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":801
 *         return self._getOptionsFromConf(self.defaultConf, section)
 * 
 *     def getDefaultItems(self, section):             # <<<<<<<<<<<<<<
 *         return self._getItemsFromConf(self.defaultConf, section)
 * 
 */
  __pyx_tuple__163 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_section); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__163);
  __Pyx_GIVEREF(__pyx_tuple__163);
  __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_getDefaultItems, 801, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(0, 801, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":804
 *         return self._getItemsFromConf(self.defaultConf, section)
 * 
 *     def getProjectConfOptions(self, section):             # <<<<<<<<<<<<<<
 *         return self._getOptionsFromConf(self.projectConf, section)
 * 
 */
  __pyx_tuple__165 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_section); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(0, 804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__165);
  __Pyx_GIVEREF(__pyx_tuple__165);
  __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_getProjectConfOptions, 804, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(0, 804, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":807
 *         return self._getOptionsFromConf(self.projectConf, section)
 * 
 *     def getProjectConfItems(self, section):             # <<<<<<<<<<<<<<
 *         return self._getItemsFromConf(self.projectConf, section)
 * 
 */
  __pyx_tuple__167 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_section); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(0, 807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__167);
  __Pyx_GIVEREF(__pyx_tuple__167);
  __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_getProjectConfItems, 807, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(0, 807, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":810
 *         return self._getItemsFromConf(self.projectConf, section)
 * 
 *     def _getOptionsFromConf(self, conf, section):             # <<<<<<<<<<<<<<
 *         if conf.has_section(section):
 *             return conf.options(section)
 */
  __pyx_tuple__169 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_conf, __pyx_n_s_section); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(0, 810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__169);
  __Pyx_GIVEREF(__pyx_tuple__169);
  __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_getOptionsFromConf, 810, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(0, 810, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":815
 *         return []
 * 
 *     def _getItemsFromConf(self, conf, section):             # <<<<<<<<<<<<<<
 *         if conf.has_section(section):
 *             return conf.items(section)
 */
  __pyx_tuple__171 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_conf, __pyx_n_s_section); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__171);
  __Pyx_GIVEREF(__pyx_tuple__171);
  __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_getItemsFromConf, 815, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(0, 815, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":820
 *         return []
 * 
 *     def clearProjectConfOptions(self, section, optionlist=None, doremovemodule=False):             # <<<<<<<<<<<<<<
 *         if optionlist is None:
 *             optionlist = self.getProjectConfOptions(section)
 */
  __pyx_tuple__173 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_section, __pyx_n_s_optionlist, __pyx_n_s_doremovemodule, __pyx_n_s_modulestoremove, __pyx_n_s_opt, __pyx_n_s_cfg_2, __pyx_n_s_module, __pyx_n_s_modconf, __pyx_n_s_workingdir, __pyx_n_s_prop); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(0, 820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__173);
  __Pyx_GIVEREF(__pyx_tuple__173);
  __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_clearProjectConfOptions, 820, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(0, 820, __pyx_L1_error)
  __pyx_tuple__175 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(0, 820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__175);
  __Pyx_GIVEREF(__pyx_tuple__175);

  /* "metaphor/chem_gm/core/gmtoolbox.py":841
 * 
 * 
 *     def getModelDict(self, cfgfile):             # <<<<<<<<<<<<<<
 *         locconf = defaultedConfigParser()
 *         locconf.read(cfgfile)
 */
  __pyx_tuple__176 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_cfgfile, __pyx_n_s_locconf, __pyx_n_s_oplst, __pyx_n_s_dictt, __pyx_n_s_opt, __pyx_n_s_val); if (unlikely(!__pyx_tuple__176)) __PYX_ERR(0, 841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__176);
  __Pyx_GIVEREF(__pyx_tuple__176);
  __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__176, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_getModelDict, 841, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) __PYX_ERR(0, 841, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":851
 *         return dictt
 * 
 *     def getModel(self, config):             # <<<<<<<<<<<<<<
 *         return self._modeldict[config]
 * 
 */
  __pyx_tuple__178 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_config); if (unlikely(!__pyx_tuple__178)) __PYX_ERR(0, 851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__178);
  __Pyx_GIVEREF(__pyx_tuple__178);
  __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_getModel, 851, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) __PYX_ERR(0, 851, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":854
 *         return self._modeldict[config]
 * 
 *     def setModel(self, config, value):             # <<<<<<<<<<<<<<
 *         self._modeldict[config] = value
 * 
 */
  __pyx_tuple__180 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_config, __pyx_n_s_value); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(0, 854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__180);
  __Pyx_GIVEREF(__pyx_tuple__180);
  __pyx_codeobj__181 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__180, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_setModel, 854, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__181)) __PYX_ERR(0, 854, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":858
 * 
 *     @Property
 *     def workingDir(self):             # <<<<<<<<<<<<<<
 *         try:
 *             res = self.projectConf.get("general", "workingdir")
 */
  __pyx_tuple__182 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_res); if (unlikely(!__pyx_tuple__182)) __PYX_ERR(0, 858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__182);
  __Pyx_GIVEREF(__pyx_tuple__182);
  __pyx_codeobj__183 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__182, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_workingDir, 858, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__183)) __PYX_ERR(0, 858, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":866
 *         return res
 *     @workingDir.setter
 *     def sworkingDir(self, value):             # <<<<<<<<<<<<<<
 *         self.setProjectConf("general", "workingdir", value)
 * 
 */
  __pyx_tuple__184 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__184)) __PYX_ERR(0, 866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__184);
  __Pyx_GIVEREF(__pyx_tuple__184);
  __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_sworkingDir, 866, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) __PYX_ERR(0, 866, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":870
 * 
 *     @Property
 *     def dataRoot(self):             # <<<<<<<<<<<<<<
 *         try:
 *             return os.path.basename(self.projectConf.get("general", "workingdir"))
 */
  __pyx_tuple__186 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__186)) __PYX_ERR(0, 870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__186);
  __Pyx_GIVEREF(__pyx_tuple__186);
  __pyx_codeobj__187 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__186, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_dataRoot, 870, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__187)) __PYX_ERR(0, 870, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":878
 * 
 *     @Property
 *     def projectConf(self):             # <<<<<<<<<<<<<<
 *         return self._projectConf
 * 
 */
  __pyx_tuple__188 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__188)) __PYX_ERR(0, 878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__188);
  __Pyx_GIVEREF(__pyx_tuple__188);
  __pyx_codeobj__189 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__188, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_projectConf_2, 878, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__189)) __PYX_ERR(0, 878, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":882
 * 
 *     @Property
 *     def configFile(self):             # <<<<<<<<<<<<<<
 *         return self._configFile
 *     @configFile.setter
 */
  __pyx_tuple__190 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__190)) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__190);
  __Pyx_GIVEREF(__pyx_tuple__190);
  __pyx_codeobj__191 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__190, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_configFile_2, 882, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__191)) __PYX_ERR(0, 882, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":885
 *         return self._configFile
 *     @configFile.setter
 *     def sconfigFile(self, value):             # <<<<<<<<<<<<<<
 *         if self._configFile == value:
 *             return
 */
  __pyx_tuple__192 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_sec, __pyx_n_s_opt); if (unlikely(!__pyx_tuple__192)) __PYX_ERR(0, 885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__192);
  __Pyx_GIVEREF(__pyx_tuple__192);
  __pyx_codeobj__193 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__192, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_sconfigFile, 885, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__193)) __PYX_ERR(0, 885, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":898
 *             self.readConfig(value)
 * 
 *     def readConfig(self, filename=""):             # <<<<<<<<<<<<<<
 *         if filename:
 *             self._configFile = filename
 */
  __pyx_tuple__194 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_filename, __pyx_n_s_sec, __pyx_n_s_opt); if (unlikely(!__pyx_tuple__194)) __PYX_ERR(0, 898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__194);
  __Pyx_GIVEREF(__pyx_tuple__194);
  __pyx_codeobj__195 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__194, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_readConfig, 898, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__195)) __PYX_ERR(0, 898, __pyx_L1_error)
  __pyx_tuple__196 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_u__4)); if (unlikely(!__pyx_tuple__196)) __PYX_ERR(0, 898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__196);
  __Pyx_GIVEREF(__pyx_tuple__196);

  /* "metaphor/chem_gm/core/gmtoolbox.py":909
 * 
 * 
 *     def fullProjectIniFile(self, key):             # <<<<<<<<<<<<<<
 *         st = os.path.join(self.projectDir, key, key + ".cfg")
 *         #st = os.path.join(self.projectDir, self.projectIniFile)
 */
  __pyx_tuple__197 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_st); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(0, 909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__197);
  __Pyx_GIVEREF(__pyx_tuple__197);
  __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__197, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_fullProjectIniFile, 909, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(0, 909, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":914
 *         return self.getProjectConf("projects", key, st)
 * 
 *     def updateConfig(self, section, items):             # <<<<<<<<<<<<<<
 *         if not self._projectConf.has_section(section):
 *             self._projectConf.add_section(section)
 */
  __pyx_tuple__199 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_section, __pyx_n_s_items, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(0, 914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__199);
  __Pyx_GIVEREF(__pyx_tuple__199);
  __pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__199, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_updateConfig, 914, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(0, 914, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":920
 *             self._projectConf.set(section, key, value)
 * 
 *     def connect(self, config):             # <<<<<<<<<<<<<<
 *         res = defaultdict(lambda:0)
 *         options = config.options("connectivity")
 */
  __pyx_tuple__201 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_config, __pyx_n_s_res, __pyx_n_s_options, __pyx_n_s_optionoccur, __pyx_n_s_extraopts, __pyx_n_s_extraoptslow, __pyx_n_s_opt, __pyx_n_s_n, __pyx_n_s_ind, __pyx_n_s_val); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(0, 920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__201);
  __Pyx_GIVEREF(__pyx_tuple__201);
  __pyx_codeobj__202 = (PyObject*)__Pyx_PyCode_New(2, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__201, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_connect, 920, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) __PYX_ERR(0, 920, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":937
 *         return res
 * 
 *     def extras(self, config):             # <<<<<<<<<<<<<<
 *         if not config.has_section("general"):
 *             return []
 */
  __pyx_tuple__203 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_config, __pyx_n_s_st, __pyx_n_s_res, __pyx_n_s_lst, __pyx_n_s_i, __pyx_n_s_option); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(0, 937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__203);
  __Pyx_GIVEREF(__pyx_tuple__203);
  __pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__203, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_extras, 937, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) __PYX_ERR(0, 937, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":951
 *         return res
 * 
 *     def getResults(self, reseau, quotechar="", withtitles=True, pptyname=""):             # <<<<<<<<<<<<<<
 *         try:
 *             ni = reseau.inputCount
 */
  __pyx_tuple__205 = PyTuple_Pack(28, __pyx_n_s_self, __pyx_n_s_reseau, __pyx_n_s_quotechar, __pyx_n_s_withtitles, __pyx_n_s_pptyname, __pyx_n_s_ni, __pyx_n_s_no, __pyx_n_s_fullres, __pyx_n_s_jacobian, __pyx_n_s_res, __pyx_n_s_i, __pyx_n_s_vec, __pyx_n_s_ii, __pyx_n_s_target, __pyx_n_s_computed, __pyx_n_s_leverage, __pyx_n_s_residual, __pyx_n_s_prevLOO, __pyx_n_s_l1, __pyx_n_s_ppty, __pyx_n_s_titles, __pyx_n_s_val, __pyx_n_s_val, __pyx_n_s_val, __pyx_n_s_val, __pyx_n_s_val, __pyx_n_s_val, __pyx_n_s_val); if (unlikely(!__pyx_tuple__205)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__205);
  __Pyx_GIVEREF(__pyx_tuple__205);
  __pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(5, 0, 28, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__205, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmtoolbox_2, __pyx_n_s_getResults, 951, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) __PYX_ERR(0, 951, __pyx_L1_error)
  __pyx_tuple__207 = PyTuple_Pack(3, ((PyObject*)__pyx_kp_u__4), ((PyObject *)Py_True), ((PyObject*)__pyx_kp_u__4)); if (unlikely(!__pyx_tuple__207)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__207);
  __Pyx_GIVEREF(__pyx_tuple__207);

  /* "metaphor/chem_gm/core/gmtoolbox.py":997
 * 
 * if __name__ == "__main__":
 *     dict = fromConfigstr2Dict("BJMA_H_Si3_Br5_mol0_Class_5N")             # <<<<<<<<<<<<<<
 *     for key, val in dict.items():
 *         print(key, ":", val)
 */
  __pyx_tuple__208 = PyTuple_Pack(1, __pyx_n_u_BJMA_H_Si3_Br5_mol0_Class_5N); if (unlikely(!__pyx_tuple__208)) __PYX_ERR(0, 997, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__208);
  __Pyx_GIVEREF(__pyx_tuple__208);
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  __pyx_umethod_PyDict_Type_keys.type = (PyObject*)&PyDict_Type;
  __pyx_umethod_PyList_Type_index.type = (PyObject*)&PyList_Type;
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_2 = PyInt_FromLong(-2); if (unlikely(!__pyx_int_neg_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_3 = PyInt_FromLong(-3); if (unlikely(!__pyx_int_neg_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_modinit_global_init_code(void); /*proto*/
static int __Pyx_modinit_variable_export_code(void); /*proto*/
static int __Pyx_modinit_function_export_code(void); /*proto*/
static int __Pyx_modinit_type_init_code(void); /*proto*/
static int __Pyx_modinit_type_import_code(void); /*proto*/
static int __Pyx_modinit_variable_import_code(void); /*proto*/
static int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
  __pyx_type_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix.tp_dictoffset && __pyx_type_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix = &__pyx_type_8metaphor_7chem_gm_4core_9gmtoolbox___pyx_scope_struct__getMinMaxMatrix;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#if PY_MAJOR_VERSION < 3
#ifdef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC void
#else
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#endif
#else
#ifdef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#endif
#endif
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (!(defined(__cplusplus)) || (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4)))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initgmtoolbox(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initgmtoolbox(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_gmtoolbox(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_gmtoolbox(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) {
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        result = PyDict_SetItemString(moddict, to_name, value);
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__") < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static int __pyx_pymod_exec_gmtoolbox(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0;
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  #if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
  PyErr_Clear();
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  if (!__Pyx_RefNanny)
      Py_FatalError("failed to import 'refnanny' module");
}
#endif
  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_gmtoolbox(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("gmtoolbox", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_metaphor__chem_gm__core__gmtoolbox) {
    if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "metaphor.chem_gm.core.gmtoolbox")) {
      if (unlikely(PyDict_SetItemString(modules, "metaphor.chem_gm.core.gmtoolbox", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  (void)__Pyx_modinit_function_export_code();
  if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
  (void)__Pyx_modinit_type_import_code();
  (void)__Pyx_modinit_variable_import_code();
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "metaphor/chem_gm/core/gmtoolbox.py":20
 * #
 * 
 * import os, sys             # <<<<<<<<<<<<<<
 * from collections import defaultdict, OrderedDict
 * from itertools import chain, repeat
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":21
 * 
 * import os, sys
 * from collections import defaultdict, OrderedDict             # <<<<<<<<<<<<<<
 * from itertools import chain, repeat
 * import ctypes
 */
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_defaultdict);
  __Pyx_GIVEREF(__pyx_n_s_defaultdict);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_defaultdict);
  __Pyx_INCREF(__pyx_n_s_OrderedDict);
  __Pyx_GIVEREF(__pyx_n_s_OrderedDict);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_OrderedDict);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_defaultdict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_defaultdict, __pyx_t_1) < 0) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OrderedDict, __pyx_t_1) < 0) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":22
 * import os, sys
 * from collections import defaultdict, OrderedDict
 * from itertools import chain, repeat             # <<<<<<<<<<<<<<
 * import ctypes
 * import numpy as np
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_chain);
  __Pyx_GIVEREF(__pyx_n_s_chain);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_chain);
  __Pyx_INCREF(__pyx_n_s_repeat);
  __Pyx_GIVEREF(__pyx_n_s_repeat);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_repeat);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_itertools, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_chain); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_chain, __pyx_t_2) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_repeat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_repeat, __pyx_t_2) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":23
 * from collections import defaultdict, OrderedDict
 * from itertools import chain, repeat
 * import ctypes             # <<<<<<<<<<<<<<
 * import numpy as np
 * import numpy.ma as ma
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_ctypes, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ctypes, __pyx_t_1) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":24
 * from itertools import chain, repeat
 * import ctypes
 * import numpy as np             # <<<<<<<<<<<<<<
 * import numpy.ma as ma
 * import shutil
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":25
 * import ctypes
 * import numpy as np
 * import numpy.ma as ma             # <<<<<<<<<<<<<<
 * import shutil
 * 
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s__75);
  __Pyx_GIVEREF(__pyx_n_s__75);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s__75);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_numpy_ma, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ma, __pyx_t_2) < 0) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":26
 * import numpy as np
 * import numpy.ma as ma
 * import shutil             # <<<<<<<<<<<<<<
 * 
 * from ...nntoolbox.utils import isint
 */
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_shutil, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_shutil, __pyx_t_2) < 0) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":28
 * import shutil
 * 
 * from ...nntoolbox.utils import isint             # <<<<<<<<<<<<<<
 * from ...nntoolbox.filetoolbox import removemodule
 * from ...nntoolbox.configparsertoolbox import defaultedConfigParser
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_isint);
  __Pyx_GIVEREF(__pyx_n_s_isint);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_isint);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_nntoolbox_utils, __pyx_t_2, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_isint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_isint, __pyx_t_2) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":29
 * 
 * from ...nntoolbox.utils import isint
 * from ...nntoolbox.filetoolbox import removemodule             # <<<<<<<<<<<<<<
 * from ...nntoolbox.configparsertoolbox import defaultedConfigParser
 * from .gmutils import getConfigHash, key2long, key2short, \
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_removemodule);
  __Pyx_GIVEREF(__pyx_n_s_removemodule);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_removemodule);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_nntoolbox_filetoolbox, __pyx_t_1, 3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_removemodule); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_removemodule, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":30
 * from ...nntoolbox.utils import isint
 * from ...nntoolbox.filetoolbox import removemodule
 * from ...nntoolbox.configparsertoolbox import defaultedConfigParser             # <<<<<<<<<<<<<<
 * from .gmutils import getConfigHash, key2long, key2short, \
 *     nonASCIICharsConvert, gradekey
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_defaultedConfigParser);
  __Pyx_GIVEREF(__pyx_n_s_defaultedConfigParser);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_defaultedConfigParser);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_nntoolbox_configparsertoolbox, __pyx_t_2, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_defaultedConfigParser); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_defaultedConfigParser, __pyx_t_2) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":31
 * from ...nntoolbox.filetoolbox import removemodule
 * from ...nntoolbox.configparsertoolbox import defaultedConfigParser
 * from .gmutils import getConfigHash, key2long, key2short, \             # <<<<<<<<<<<<<<
 *     nonASCIICharsConvert, gradekey
 * from tempfile import mkdtemp
 */
  __pyx_t_1 = PyList_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_getConfigHash);
  __Pyx_GIVEREF(__pyx_n_s_getConfigHash);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_getConfigHash);
  __Pyx_INCREF(__pyx_n_s_key2long);
  __Pyx_GIVEREF(__pyx_n_s_key2long);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_key2long);
  __Pyx_INCREF(__pyx_n_s_key2short);
  __Pyx_GIVEREF(__pyx_n_s_key2short);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_key2short);
  __Pyx_INCREF(__pyx_n_s_nonASCIICharsConvert);
  __Pyx_GIVEREF(__pyx_n_s_nonASCIICharsConvert);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_nonASCIICharsConvert);
  __Pyx_INCREF(__pyx_n_s_gradekey);
  __Pyx_GIVEREF(__pyx_n_s_gradekey);
  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_gradekey);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_gmutils, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_getConfigHash); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getConfigHash, __pyx_t_1) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_key2long); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_key2long, __pyx_t_1) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_key2short); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_key2short, __pyx_t_1) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_nonASCIICharsConvert); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nonASCIICharsConvert, __pyx_t_1) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_gradekey); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_gradekey, __pyx_t_1) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":33
 * from .gmutils import getConfigHash, key2long, key2short, \
 *     nonASCIICharsConvert, gradekey
 * from tempfile import mkdtemp             # <<<<<<<<<<<<<<
 * from .gmconst import defaultConnect
 * from .gmutils import isokey, chikey, cyclekey, chargekey
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_mkdtemp);
  __Pyx_GIVEREF(__pyx_n_s_mkdtemp);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_mkdtemp);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_tempfile, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_mkdtemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mkdtemp, __pyx_t_2) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":34
 *     nonASCIICharsConvert, gradekey
 * from tempfile import mkdtemp
 * from .gmconst import defaultConnect             # <<<<<<<<<<<<<<
 * from .gmutils import isokey, chikey, cyclekey, chargekey
 * from .atoms import Atomes, AtomsLower, connectivity, Atomes1, \
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_defaultConnect);
  __Pyx_GIVEREF(__pyx_n_s_defaultConnect);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_defaultConnect);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_gmconst, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_defaultConnect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_defaultConnect, __pyx_t_1) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":35
 * from tempfile import mkdtemp
 * from .gmconst import defaultConnect
 * from .gmutils import isokey, chikey, cyclekey, chargekey             # <<<<<<<<<<<<<<
 * from .atoms import Atomes, AtomsLower, connectivity, Atomes1, \
 *     Atomes2, Hydrogenes
 */
  __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_isokey);
  __Pyx_GIVEREF(__pyx_n_s_isokey);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_isokey);
  __Pyx_INCREF(__pyx_n_s_chikey);
  __Pyx_GIVEREF(__pyx_n_s_chikey);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_chikey);
  __Pyx_INCREF(__pyx_n_s_cyclekey);
  __Pyx_GIVEREF(__pyx_n_s_cyclekey);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_cyclekey);
  __Pyx_INCREF(__pyx_n_s_chargekey);
  __Pyx_GIVEREF(__pyx_n_s_chargekey);
  PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_chargekey);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_gmutils, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_isokey); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_isokey, __pyx_t_2) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_chikey); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_chikey, __pyx_t_2) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_cyclekey); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cyclekey, __pyx_t_2) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_chargekey); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_chargekey, __pyx_t_2) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":36
 * from .gmconst import defaultConnect
 * from .gmutils import isokey, chikey, cyclekey, chargekey
 * from .atoms import Atomes, AtomsLower, connectivity, Atomes1, \             # <<<<<<<<<<<<<<
 *     Atomes2, Hydrogenes
 * from ...monal import monalconst as C
 */
  __pyx_t_1 = PyList_New(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Atomes);
  __Pyx_GIVEREF(__pyx_n_s_Atomes);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Atomes);
  __Pyx_INCREF(__pyx_n_s_AtomsLower);
  __Pyx_GIVEREF(__pyx_n_s_AtomsLower);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_AtomsLower);
  __Pyx_INCREF(__pyx_n_s_connectivity);
  __Pyx_GIVEREF(__pyx_n_s_connectivity);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_connectivity);
  __Pyx_INCREF(__pyx_n_s_Atomes1);
  __Pyx_GIVEREF(__pyx_n_s_Atomes1);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_Atomes1);
  __Pyx_INCREF(__pyx_n_s_Atomes2);
  __Pyx_GIVEREF(__pyx_n_s_Atomes2);
  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_Atomes2);
  __Pyx_INCREF(__pyx_n_s_Hydrogenes);
  __Pyx_GIVEREF(__pyx_n_s_Hydrogenes);
  PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_s_Hydrogenes);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_atoms, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Atomes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Atomes, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_AtomsLower); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_AtomsLower, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_connectivity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_connectivity, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Atomes1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Atomes1, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Atomes2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Atomes2, __pyx_t_1) < 0) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Hydrogenes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Hydrogenes, __pyx_t_1) < 0) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":38
 * from .atoms import Atomes, AtomsLower, connectivity, Atomes1, \
 *     Atomes2, Hydrogenes
 * from ...monal import monalconst as C             # <<<<<<<<<<<<<<
 * from ...monal.Property import Property
 * from ...monal.util.utils import CCharOnlys
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_monalconst);
  __Pyx_GIVEREF(__pyx_n_s_monalconst);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_monalconst);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_monal, __pyx_t_2, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_monalconst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_C, __pyx_t_2) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":39
 *     Atomes2, Hydrogenes
 * from ...monal import monalconst as C
 * from ...monal.Property import Property             # <<<<<<<<<<<<<<
 * from ...monal.util.utils import CCharOnlys
 * from ...monal.util.toolbox import make_dir
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Property);
  __Pyx_GIVEREF(__pyx_n_s_Property);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Property);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_monal_Property, __pyx_t_1, 3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Property); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Property, __pyx_t_1) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":40
 * from ...monal import monalconst as C
 * from ...monal.Property import Property
 * from ...monal.util.utils import CCharOnlys             # <<<<<<<<<<<<<<
 * from ...monal.util.toolbox import make_dir
 * from ...monal.datareader._excel import Excel, ExcelCsv, ExcelXP
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_CCharOnlys);
  __Pyx_GIVEREF(__pyx_n_s_CCharOnlys);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_CCharOnlys);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_monal_util_utils, __pyx_t_2, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CCharOnlys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CCharOnlys, __pyx_t_2) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":41
 * from ...monal.Property import Property
 * from ...monal.util.utils import CCharOnlys
 * from ...monal.util.toolbox import make_dir             # <<<<<<<<<<<<<<
 * from ...monal.datareader._excel import Excel, ExcelCsv, ExcelXP
 * 
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_make_dir);
  __Pyx_GIVEREF(__pyx_n_s_make_dir);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_make_dir);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_monal_util_toolbox, __pyx_t_1, 3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_make_dir); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_dir, __pyx_t_1) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":42
 * from ...monal.util.utils import CCharOnlys
 * from ...monal.util.toolbox import make_dir
 * from ...monal.datareader._excel import Excel, ExcelCsv, ExcelXP             # <<<<<<<<<<<<<<
 * 
 * defaultConf = None
 */
  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Excel);
  __Pyx_GIVEREF(__pyx_n_s_Excel);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Excel);
  __Pyx_INCREF(__pyx_n_s_ExcelCsv);
  __Pyx_GIVEREF(__pyx_n_s_ExcelCsv);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_ExcelCsv);
  __Pyx_INCREF(__pyx_n_s_ExcelXP);
  __Pyx_GIVEREF(__pyx_n_s_ExcelXP);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_ExcelXP);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_monal_datareader__excel, __pyx_t_2, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Excel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Excel, __pyx_t_2) < 0) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_ExcelCsv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ExcelCsv, __pyx_t_2) < 0) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_ExcelXP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ExcelXP, __pyx_t_2) < 0) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":44
 * from ...monal.datareader._excel import Excel, ExcelCsv, ExcelXP
 * 
 * defaultConf = None             # <<<<<<<<<<<<<<
 * 
 * def writeconnect(config, connect):
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_defaultConf, Py_None) < 0) __PYX_ERR(0, 44, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":46
 * defaultConf = None
 * 
 * def writeconnect(config, connect):             # <<<<<<<<<<<<<<
 *     if not config.has_section("connectivity"):
 *         config.add_section("connectivity")
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_1writeconnect, 0, __pyx_n_s_writeconnect, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_writeconnect, __pyx_t_1) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":52
 *         config.set("connectivity", key2long(key), str(connect[key]))
 * 
 * def getMinMaxMatrix(Mat, names, nb=10, indextest=0):             # <<<<<<<<<<<<<<
 *     N, M = Mat.shape
 *     nb = min(nb, N/2)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_3getMinMaxMatrix, 0, __pyx_n_s_getMinMaxMatrix, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__80);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getMinMaxMatrix, __pyx_t_1) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":59
 *     return lsts[:nb], lsts[-nb:]
 * 
 * def getMinMaxMatrixSym(Mat, nb=10, withdiag=True):             # <<<<<<<<<<<<<<
 *     N, M = Mat.shape
 *     if N != M:
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_5getMinMaxMatrixSym, 0, __pyx_n_s_getMinMaxMatrixSym, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__83);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getMinMaxMatrixSym, __pyx_t_1) < 0) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":73
 *     return lsts[:nb], lsts[-nb:]
 * 
 * def saveNpToXl(filename, source, header=[], sheet="sheet_1"):             # <<<<<<<<<<<<<<
 *     with Excel(filename, sheet) as xl:
 *         if header:
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_7saveNpToXl, 0, __pyx_n_s_saveNpToXl, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_1, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 73, __pyx_L1_error)
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_1)->__pyx_arg_header = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_1, __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_26__defaults__);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_saveNpToXl, __pyx_t_1) < 0) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":79
 *         xl.write(source)
 * 
 * def saveNpsToXl(filename, sources, sourceTitles=None, shortTitles=None,             # <<<<<<<<<<<<<<
 *     extra=None, extrasheet=None, extrarow=[], header=[], headers=None,
 *     lefter=None, lefters=None, sheets=[""], minmax=0):
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_9saveNpsToXl, 0, __pyx_n_s_saveNpsToXl, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_1, sizeof(__pyx_defaults1), 3)) __PYX_ERR(0, 79, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmtoolbox.py":80
 * 
 * def saveNpsToXl(filename, sources, sourceTitles=None, shortTitles=None,
 *     extra=None, extrasheet=None, extrarow=[], header=[], headers=None,             # <<<<<<<<<<<<<<
 *     lefter=None, lefters=None, sheets=[""], minmax=0):
 *     minmaxsize = minmax
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_t_1)->__pyx_arg_extrarow = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_t_1)->__pyx_arg_header = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":81
 * def saveNpsToXl(filename, sources, sourceTitles=None, shortTitles=None,
 *     extra=None, extrasheet=None, extrarow=[], header=[], headers=None,
 *     lefter=None, lefters=None, sheets=[""], minmax=0):             # <<<<<<<<<<<<<<
 *     minmaxsize = minmax
 *     if len(sources):
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_kp_u__4);
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u__4);
  __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_t_1)->__pyx_arg_sheets = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_1, __pyx_pf_8metaphor_7chem_gm_4core_9gmtoolbox_28__defaults__);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_saveNpsToXl, __pyx_t_1) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":252
 *         pass
 * 
 * def richDictFromConfigstr(configstr, hidden=0, target=None, longkey=False, grademax=0):             # <<<<<<<<<<<<<<
 *     dico = fromConfigstr2Dict(configstr, hidden=0, target=None, longkey=False, grademax=0)
 *     return dico
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_11richDictFromConfigstr, 0, __pyx_n_s_richDictFromConfigstr, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__90);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_richDictFromConfigstr, __pyx_t_1) < 0) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":256
 *     return dico
 * 
 * def fromConfigstr2Dict(configstr, hidden=0, target=None, longkey=False, grademax=0):             # <<<<<<<<<<<<<<
 *     """Cration d'un dictionnaire de connexions  partir d'une chane de
 *     connexion.
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_13fromConfigstr2Dict, 0, __pyx_n_s_fromConfigstr2Dict, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__92)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__93);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_fromConfigstr2Dict, __pyx_t_1) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":343
 *     return dico
 * 
 * def updateConfigFromConfigstr(configstr, config):             # <<<<<<<<<<<<<<
 *     dico = fromConfigstr2Dict(configstr)
 *     for key, val in dico.items():
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_15updateConfigFromConfigstr, 0, __pyx_n_s_updateConfigFromConfigstr, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__95)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateConfigFromConfigstr, __pyx_t_1) < 0) __PYX_ERR(0, 343, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":352
 *     return config
 * 
 * def hashFromDict(dict, hidden, fullconfig=False, withhidden=False):             # <<<<<<<<<<<<<<
 *     resst = fromconfig2Str(dict, hidden, fullconfig=fullconfig, withhidden=withhidden)
 *     reslong = abs(ctypes.c_size_t(hash(resst)).value)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_17hashFromDict, 0, __pyx_n_s_hashFromDict, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__98);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_hashFromDict, __pyx_t_1) < 0) __PYX_ERR(0, 352, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":358
 *     return reshash
 * 
 * def hashFromConfig(config, hidden, fullconfig=False, withhidden=False):             # <<<<<<<<<<<<<<
 *     connectivity = OrderedDict()
 *     dict = config.getSectionDict("connectivity")
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_19hashFromConfig, 0, __pyx_n_s_hashFromConfig, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__101);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_hashFromConfig, __pyx_t_1) < 0) __PYX_ERR(0, 358, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":383
 *     return reshash
 * 
 * def fromconfig2Str(dict, hidden, fullconfig=False, withhidden=False, simplecentral=False):             # <<<<<<<<<<<<<<
 *     """Cration d'une chane de connexion de connexions  partir d'un dictionnaire.
 *     """
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_21fromconfig2Str, 0, __pyx_n_s_fromconfig2Str, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__104);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_fromconfig2Str, __pyx_t_1) < 0) __PYX_ERR(0, 383, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":550
 *     return "_".join(resultlist)
 * 
 * def getModelBase(config=None, moddict=None, hidden=None, fullconfig=False,             # <<<<<<<<<<<<<<
 *         withprefix=True, withhidden=True, simplecentral=True,
 *         candidatecount=-1, ext=""):
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_23getModelBase, 0, __pyx_n_s_getModelBase, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__106)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__107);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getModelBase, __pyx_t_1) < 0) __PYX_ERR(0, 550, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":590
 *     return result
 * 
 * def getModelKeyFromConf(config, doHash=0):             # <<<<<<<<<<<<<<
 *     if doHash == 2:
 *         root = config.getdefault("general", "root", "")
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_25getModelKeyFromConf, 0, __pyx_n_s_getModelKeyFromConf, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__110);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getModelKeyFromConf, __pyx_t_1) < 0) __PYX_ERR(0, 590, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":599
 *     return getModelBase(config, fullconfig=True)
 * 
 * class GMEngine( object):             # <<<<<<<<<<<<<<
 *     """class GMEngine
 *     Gestionnaire commun a toutes pages de "Graph Mmachine" du moteur de
 */
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__111); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__111, __pyx_n_s_iso885915_GMEngine, __pyx_n_s_GMEngine, (PyObject *) NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_kp_s_class_GMEngine_Gestionnaire_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "metaphor/chem_gm/core/gmtoolbox.py":605
 *     """
 * 
 *     def __init__(self, projectDir, defaultcfg="", debug=False):             # <<<<<<<<<<<<<<
 *         global defaultConf
 *         super(GMEngine, self).__init__()
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_1__init__, 0, __pyx_n_s_GMEngine___init, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__114);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_3) < 0) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":634
 *         self.defaultModified = False
 * 
 *     def checkconnect(self, conf, islong):             # <<<<<<<<<<<<<<
 *         stconnect = "connectivity"
 *         connectlist = conf.options(stconnect)
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_3checkconnect, 0, __pyx_n_s_GMEngine_checkconnect, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__116)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_checkconnect, __pyx_t_3) < 0) __PYX_ERR(0, 634, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":657
 *                 conf.set(stconnect, key, "0")
 * 
 *     def setDefaultConf(self, conffile=""):             # <<<<<<<<<<<<<<
 *         if conffile:
 *             self.defaultConfigFile = conffile
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_5setDefaultConf, 0, __pyx_n_s_GMEngine_setDefaultConf, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__118)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__119);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_setDefaultConf, __pyx_t_3) < 0) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":663
 *         self.defaultModified = False
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def dataiterator(self):
 *         if self.datasource:
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "metaphor/chem_gm/core/gmtoolbox.py":664
 * 
 *     @Property
 *     def dataiterator(self):             # <<<<<<<<<<<<<<
 *         if self.datasource:
 *             return self.datasource.iterData(True)
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_7dataiterator, 0, __pyx_n_s_GMEngine_dataiterator, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 663, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 663, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 663, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 663, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_dataiterator, __pyx_t_3) < 0) __PYX_ERR(0, 664, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":668
 *             return self.datasource.iterData(True)
 * 
 *     def onDestroy(self):             # <<<<<<<<<<<<<<
 *         for ppath in self.tempDirs[-1::-1]:
 *             pass
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_9onDestroy, 0, __pyx_n_s_GMEngine_onDestroy, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_onDestroy, __pyx_t_3) < 0) __PYX_ERR(0, 668, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":673
 *             # effacer tout
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def baselen(self):
 *         return self._baselen
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "metaphor/chem_gm/core/gmtoolbox.py":674
 * 
 *     @Property
 *     def baselen(self):             # <<<<<<<<<<<<<<
 *         return self._baselen
 *     @baselen.setter
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_11baselen, 0, __pyx_n_s_GMEngine_baselen, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 673, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 673, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 673, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 673, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_baselen_2, __pyx_t_3) < 0) __PYX_ERR(0, 674, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":676
 *     def baselen(self):
 *         return self._baselen
 *     @baselen.setter             # <<<<<<<<<<<<<<
 *     def sbaselen(self, value):
 *         self._baselen = value
 */
  __pyx_t_4 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_baselen_2);
  if (unlikely(!__pyx_t_4)) {
    PyErr_Clear();
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_baselen_2);
  }
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_setter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":677
 *         return self._baselen
 *     @baselen.setter
 *     def sbaselen(self, value):             # <<<<<<<<<<<<<<
 *         self._baselen = value
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_13sbaselen, 0, __pyx_n_s_GMEngine_sbaselen, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__127)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 676, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 676, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 676, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 676, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 676, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_sbaselen, __pyx_t_3) < 0) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":680
 *         self._baselen = value
 * 
 *     def getTempDir(self, index = -1):             # <<<<<<<<<<<<<<
 *         if index < 0:
 *             self.tempDirs.append(mkdtemp())
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_15getTempDir, 0, __pyx_n_s_GMEngine_getTempDir, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__129)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__130);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getTempDir, __pyx_t_3) < 0) __PYX_ERR(0, 680, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":686
 *         return self.tempDirs[index]
 * 
 *     def setmodelconf(self, key, value):             # <<<<<<<<<<<<<<
 *         self._modelconfdict[key] = value
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_17setmodelconf, 0, __pyx_n_s_GMEngine_setmodelconf, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__132)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_setmodelconf, __pyx_t_3) < 0) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":689
 *         self._modelconfdict[key] = value
 * 
 *     def modelconf(self, key, origin=None):             # <<<<<<<<<<<<<<
 *         res = self._modelconfdict[key]
 *         if not res:
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_19modelconf, 0, __pyx_n_s_GMEngine_modelconf, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__135);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_modelconf, __pyx_t_3) < 0) __PYX_ERR(0, 689, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":702
 *         return res
 * 
 *     def saveModelConf(self, key):             # <<<<<<<<<<<<<<
 *         ff = open(self._modelConfFile[key], "w")
 *         try:
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_21saveModelConf, 0, __pyx_n_s_GMEngine_saveModelConf, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__137)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_saveModelConf, __pyx_t_3) < 0) __PYX_ERR(0, 702, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":709
 *             ff.close()
 * 
 *     def saveDefaultConf(self, filename=""):             # <<<<<<<<<<<<<<
 *         filename = filename if filename else self.defaultConfigFile
 *         ff = open(filename, "w")
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_23saveDefaultConf, 0, __pyx_n_s_GMEngine_saveDefaultConf, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__139)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__140);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_saveDefaultConf, __pyx_t_3) < 0) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":718
 *             ff.close()
 * 
 *     def modelSelected(self, key, ppty):             # <<<<<<<<<<<<<<
 *         if ppty:
 *             trainlabel = "training_%s"% ppty
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_25modelSelected, 0, __pyx_n_s_GMEngine_modelSelected, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_modelSelected, __pyx_t_3) < 0) __PYX_ERR(0, 718, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":728
 *         return []
 * 
 *     def getTargetsFromFile(self):             # <<<<<<<<<<<<<<
 *         pathname = self.getProjectConf("general", "workingdir", "")
 *         filename = os.path.join(pathname, "properties", self.curproperty)
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_27getTargetsFromFile, 0, __pyx_n_s_GMEngine_getTargetsFromFile, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getTargetsFromFile, __pyx_t_3) < 0) __PYX_ERR(0, 728, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":735
 *         return targets
 * 
 *     def ModelCfgItems(self):             # <<<<<<<<<<<<<<
 *         return [(key, self.getProjectConf("projects", key, "")) for key in self.getProjectConfOptions("projects")]
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_29ModelCfgItems, 0, __pyx_n_s_GMEngine_ModelCfgItems, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ModelCfgItems, __pyx_t_3) < 0) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":738
 *         return [(key, self.getProjectConf("projects", key, "")) for key in self.getProjectConfOptions("projects")]
 * 
 *     def save(self, index=3):             # <<<<<<<<<<<<<<
 *         if index & 2:
 *             if not os.path.exists(self.configFile):
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_31save, 0, __pyx_n_s_GMEngine_save, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__148)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__149);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_save, __pyx_t_3) < 0) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":755
 *             files.close()
 * 
 *     def getDefault(self, section, option, default, docreate=False):             # <<<<<<<<<<<<<<
 *         return self._getFromConf(self.defaultConf, section, option, default, docreate)
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_33getDefault, 0, __pyx_n_s_GMEngine_getDefault, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__151)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__152);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getDefault, __pyx_t_3) < 0) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":758
 *         return self._getFromConf(self.defaultConf, section, option, default, docreate)
 * 
 *     def getProjectConf(self, section, option, default, docreate=False):             # <<<<<<<<<<<<<<
 *         return self._getFromConf(self.projectConf, section, option, default, docreate)
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_35getProjectConf, 0, __pyx_n_s_GMEngine_getProjectConf, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__155);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getProjectConf, __pyx_t_3) < 0) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":761
 *         return self._getFromConf(self.projectConf, section, option, default, docreate)
 * 
 *     def _getFromConf(self, conf, section, option, default, docreate=False):             # <<<<<<<<<<<<<<
 *         if conf.has_section(section) and conf.has_option(section, option):
 *             try:
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_37_getFromConf, 0, __pyx_n_s_GMEngine__getFromConf, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__157)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__158);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getFromConf, __pyx_t_3) < 0) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":792
 *         return default
 * 
 *     def setProjectConf(self, section, option, value):             # <<<<<<<<<<<<<<
 *         if not self.projectConf.has_section(section):
 *             self.projectConf.add_section(section)
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_39setProjectConf, 0, __pyx_n_s_GMEngine_setProjectConf, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_setProjectConf, __pyx_t_3) < 0) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":798
 *         self.projectConf.ismodif = True
 * 
 *     def getDefaultOptions(self, section):             # <<<<<<<<<<<<<<
 *         return self._getOptionsFromConf(self.defaultConf, section)
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_41getDefaultOptions, 0, __pyx_n_s_GMEngine_getDefaultOptions, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getDefaultOptions, __pyx_t_3) < 0) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":801
 *         return self._getOptionsFromConf(self.defaultConf, section)
 * 
 *     def getDefaultItems(self, section):             # <<<<<<<<<<<<<<
 *         return self._getItemsFromConf(self.defaultConf, section)
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_43getDefaultItems, 0, __pyx_n_s_GMEngine_getDefaultItems, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__164)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getDefaultItems, __pyx_t_3) < 0) __PYX_ERR(0, 801, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":804
 *         return self._getItemsFromConf(self.defaultConf, section)
 * 
 *     def getProjectConfOptions(self, section):             # <<<<<<<<<<<<<<
 *         return self._getOptionsFromConf(self.projectConf, section)
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_45getProjectConfOptions, 0, __pyx_n_s_GMEngine_getProjectConfOptions, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getProjectConfOptions, __pyx_t_3) < 0) __PYX_ERR(0, 804, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":807
 *         return self._getOptionsFromConf(self.projectConf, section)
 * 
 *     def getProjectConfItems(self, section):             # <<<<<<<<<<<<<<
 *         return self._getItemsFromConf(self.projectConf, section)
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_47getProjectConfItems, 0, __pyx_n_s_GMEngine_getProjectConfItems, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getProjectConfItems, __pyx_t_3) < 0) __PYX_ERR(0, 807, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":810
 *         return self._getItemsFromConf(self.projectConf, section)
 * 
 *     def _getOptionsFromConf(self, conf, section):             # <<<<<<<<<<<<<<
 *         if conf.has_section(section):
 *             return conf.options(section)
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_49_getOptionsFromConf, 0, __pyx_n_s_GMEngine__getOptionsFromConf, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__170)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getOptionsFromConf, __pyx_t_3) < 0) __PYX_ERR(0, 810, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":815
 *         return []
 * 
 *     def _getItemsFromConf(self, conf, section):             # <<<<<<<<<<<<<<
 *         if conf.has_section(section):
 *             return conf.items(section)
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_51_getItemsFromConf, 0, __pyx_n_s_GMEngine__getItemsFromConf, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__172)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getItemsFromConf, __pyx_t_3) < 0) __PYX_ERR(0, 815, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":820
 *         return []
 * 
 *     def clearProjectConfOptions(self, section, optionlist=None, doremovemodule=False):             # <<<<<<<<<<<<<<
 *         if optionlist is None:
 *             optionlist = self.getProjectConfOptions(section)
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_53clearProjectConfOptions, 0, __pyx_n_s_GMEngine_clearProjectConfOptions, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__174)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__175);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_clearProjectConfOptions, __pyx_t_3) < 0) __PYX_ERR(0, 820, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":841
 * 
 * 
 *     def getModelDict(self, cfgfile):             # <<<<<<<<<<<<<<
 *         locconf = defaultedConfigParser()
 *         locconf.read(cfgfile)
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_55getModelDict, 0, __pyx_n_s_GMEngine_getModelDict, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__177)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getModelDict, __pyx_t_3) < 0) __PYX_ERR(0, 841, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":851
 *         return dictt
 * 
 *     def getModel(self, config):             # <<<<<<<<<<<<<<
 *         return self._modeldict[config]
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_57getModel, 0, __pyx_n_s_GMEngine_getModel, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__179)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getModel, __pyx_t_3) < 0) __PYX_ERR(0, 851, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":854
 *         return self._modeldict[config]
 * 
 *     def setModel(self, config, value):             # <<<<<<<<<<<<<<
 *         self._modeldict[config] = value
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_59setModel, 0, __pyx_n_s_GMEngine_setModel, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__181)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_setModel, __pyx_t_3) < 0) __PYX_ERR(0, 854, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":857
 *         self._modeldict[config] = value
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def workingDir(self):
 *         try:
 */
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "metaphor/chem_gm/core/gmtoolbox.py":858
 * 
 *     @Property
 *     def workingDir(self):             # <<<<<<<<<<<<<<
 *         try:
 *             res = self.projectConf.get("general", "workingdir")
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_61workingDir, 0, __pyx_n_s_GMEngine_workingDir, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__183)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 857, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 857, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 857, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 857, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 857, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_workingDir, __pyx_t_3) < 0) __PYX_ERR(0, 858, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":865
 *             res = os.getcwd()
 *         return res
 *     @workingDir.setter             # <<<<<<<<<<<<<<
 *     def sworkingDir(self, value):
 *         self.setProjectConf("general", "workingdir", value)
 */
  __pyx_t_6 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_workingDir);
  if (unlikely(!__pyx_t_6)) {
    PyErr_Clear();
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_workingDir);
  }
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_setter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":866
 *         return res
 *     @workingDir.setter
 *     def sworkingDir(self, value):             # <<<<<<<<<<<<<<
 *         self.setProjectConf("general", "workingdir", value)
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_63sworkingDir, 0, __pyx_n_s_GMEngine_sworkingDir, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__185)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 865, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 865, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 865, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 865, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 865, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_sworkingDir, __pyx_t_3) < 0) __PYX_ERR(0, 866, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":869
 *         self.setProjectConf("general", "workingdir", value)
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def dataRoot(self):
 *         try:
 */
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "metaphor/chem_gm/core/gmtoolbox.py":870
 * 
 *     @Property
 *     def dataRoot(self):             # <<<<<<<<<<<<<<
 *         try:
 *             return os.path.basename(self.projectConf.get("general", "workingdir"))
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_65dataRoot, 0, __pyx_n_s_GMEngine_dataRoot, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__187)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 869, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 869, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 869, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 869, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 869, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_dataRoot, __pyx_t_3) < 0) __PYX_ERR(0, 870, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":877
 *             return ""
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def projectConf(self):
 *         return self._projectConf
 */
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "metaphor/chem_gm/core/gmtoolbox.py":878
 * 
 *     @Property
 *     def projectConf(self):             # <<<<<<<<<<<<<<
 *         return self._projectConf
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_67projectConf, 0, __pyx_n_s_GMEngine_projectConf, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__189)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 877, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 877, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 877, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 877, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 877, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_projectConf_2, __pyx_t_3) < 0) __PYX_ERR(0, 878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":881
 *         return self._projectConf
 * 
 *     @Property             # <<<<<<<<<<<<<<
 *     def configFile(self):
 *         return self._configFile
 */
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_Property); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "metaphor/chem_gm/core/gmtoolbox.py":882
 * 
 *     @Property
 *     def configFile(self):             # <<<<<<<<<<<<<<
 *         return self._configFile
 *     @configFile.setter
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_69configFile, 0, __pyx_n_s_GMEngine_configFile, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__191)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 881, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 881, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 881, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 881, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 881, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_configFile_2, __pyx_t_3) < 0) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":884
 *     def configFile(self):
 *         return self._configFile
 *     @configFile.setter             # <<<<<<<<<<<<<<
 *     def sconfigFile(self, value):
 *         if self._configFile == value:
 */
  __pyx_t_7 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_configFile_2);
  if (unlikely(!__pyx_t_7)) {
    PyErr_Clear();
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_configFile_2);
  }
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_setter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":885
 *         return self._configFile
 *     @configFile.setter
 *     def sconfigFile(self, value):             # <<<<<<<<<<<<<<
 *         if self._configFile == value:
 *             return
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_71sconfigFile, 0, __pyx_n_s_GMEngine_sconfigFile, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__193)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 884, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 884, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 884, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 884, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 884, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_sconfigFile, __pyx_t_3) < 0) __PYX_ERR(0, 885, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":898
 *             self.readConfig(value)
 * 
 *     def readConfig(self, filename=""):             # <<<<<<<<<<<<<<
 *         if filename:
 *             self._configFile = filename
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_73readConfig, 0, __pyx_n_s_GMEngine_readConfig, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__195)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__196);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_readConfig, __pyx_t_3) < 0) __PYX_ERR(0, 898, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":909
 * 
 * 
 *     def fullProjectIniFile(self, key):             # <<<<<<<<<<<<<<
 *         st = os.path.join(self.projectDir, key, key + ".cfg")
 *         #st = os.path.join(self.projectDir, self.projectIniFile)
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_75fullProjectIniFile, 0, __pyx_n_s_GMEngine_fullProjectIniFile, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__198)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_fullProjectIniFile, __pyx_t_3) < 0) __PYX_ERR(0, 909, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":914
 *         return self.getProjectConf("projects", key, st)
 * 
 *     def updateConfig(self, section, items):             # <<<<<<<<<<<<<<
 *         if not self._projectConf.has_section(section):
 *             self._projectConf.add_section(section)
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_77updateConfig, 0, __pyx_n_s_GMEngine_updateConfig, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__200)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_updateConfig, __pyx_t_3) < 0) __PYX_ERR(0, 914, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":920
 *             self._projectConf.set(section, key, value)
 * 
 *     def connect(self, config):             # <<<<<<<<<<<<<<
 *         res = defaultdict(lambda:0)
 *         options = config.options("connectivity")
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_79connect, 0, __pyx_n_s_GMEngine_connect, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__202)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_connect, __pyx_t_3) < 0) __PYX_ERR(0, 920, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":937
 *         return res
 * 
 *     def extras(self, config):             # <<<<<<<<<<<<<<
 *         if not config.has_section("general"):
 *             return []
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_81extras, 0, __pyx_n_s_GMEngine_extras, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__204)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_extras, __pyx_t_3) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":951
 *         return res
 * 
 *     def getResults(self, reseau, quotechar="", withtitles=True, pptyname=""):             # <<<<<<<<<<<<<<
 *         try:
 *             ni = reseau.inputCount
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_9gmtoolbox_8GMEngine_83getResults, 0, __pyx_n_s_GMEngine_getResults, NULL, __pyx_n_s_metaphor_chem_gm_core_gmtoolbox, __pyx_d, ((PyObject *)__pyx_codeobj__206)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__207);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getResults, __pyx_t_3) < 0) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":599
 *     return getModelBase(config, fullconfig=True)
 * 
 * class GMEngine( object):             # <<<<<<<<<<<<<<
 *     """class GMEngine
 *     Gestionnaire commun a toutes pages de "Graph Mmachine" du moteur de
 */
  __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_iso885915_GMEngine, __pyx_tuple__111, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_iso885915_GMEngine, __pyx_t_3) < 0) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmtoolbox.py":996
 *         return res, reseau.correlMatrix, reseau.projectionMatrix, None
 * 
 * if __name__ == "__main__":             # <<<<<<<<<<<<<<
 *     dict = fromConfigstr2Dict("BJMA_H_Si3_Br5_mol0_Class_5N")
 *     for key, val in dict.items():
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_main, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 996, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_8) {

    /* "metaphor/chem_gm/core/gmtoolbox.py":997
 * 
 * if __name__ == "__main__":
 *     dict = fromConfigstr2Dict("BJMA_H_Si3_Br5_mol0_Class_5N")             # <<<<<<<<<<<<<<
 *     for key, val in dict.items():
 *         print(key, ":", val)
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_fromConfigstr2Dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__208, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_dict, __pyx_t_2) < 0) __PYX_ERR(0, 997, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":998
 * if __name__ == "__main__":
 *     dict = fromConfigstr2Dict("BJMA_H_Si3_Br5_mol0_Class_5N")
 *     for key, val in dict.items():             # <<<<<<<<<<<<<<
 *         print(key, ":", val)
 */
    __pyx_t_9 = 0;
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(__pyx_t_1 == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
      __PYX_ERR(0, 998, __pyx_L1_error)
    }
    __pyx_t_3 = __Pyx_dict_iterator(__pyx_t_1, 0, __pyx_n_s_items, (&__pyx_t_10), (&__pyx_t_11)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2);
    __pyx_t_2 = __pyx_t_3;
    __pyx_t_3 = 0;
    while (1) {
      __pyx_t_12 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_10, &__pyx_t_9, &__pyx_t_3, &__pyx_t_1, NULL, __pyx_t_11);
      if (unlikely(__pyx_t_12 == 0)) break;
      if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 998, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_key, __pyx_t_3) < 0) __PYX_ERR(0, 998, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_val, __pyx_t_1) < 0) __PYX_ERR(0, 998, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/chem_gm/core/gmtoolbox.py":999
 *     dict = fromConfigstr2Dict("BJMA_H_Si3_Br5_mol0_Class_5N")
 *     for key, val in dict.items():
 *         print(key, ":", val)             # <<<<<<<<<<<<<<
 */
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_val); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 999, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 999, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
      __Pyx_INCREF(__pyx_kp_u__209);
      __Pyx_GIVEREF(__pyx_kp_u__209);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_u__209);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
      __pyx_t_1 = 0;
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 999, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "metaphor/chem_gm/core/gmtoolbox.py":996
 *         return res, reseau.correlMatrix, reseau.projectionMatrix, None
 * 
 * if __name__ == "__main__":             # <<<<<<<<<<<<<<
 *     dict = fromConfigstr2Dict("BJMA_H_Si3_Br5_mol0_Class_5N")
 *     for key, val in dict.items():
 */
  }

  /* "metaphor/chem_gm/core/gmtoolbox.py":1
 * # -*- coding: ISO-8859-15 -*-             # <<<<<<<<<<<<<<
 * #
 * # $Id: gmtoolbox.py 4299 2016-11-10 07:11:42Z jeanluc $
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init metaphor.chem_gm.core.gmtoolbox", 0, __pyx_lineno, __pyx_filename);
    }
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init metaphor.chem_gm.core.gmtoolbox");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* GetModuleGlobalName */
static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    if (likely(result)) {
        Py_INCREF(result);
    } else if (unlikely(PyErr_Occurred())) {
        result = NULL;
    } else {
#else
    result = PyDict_GetItem(__pyx_d, name);
    if (likely(result)) {
        Py_INCREF(result);
    } else {
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    if (!result) {
        PyErr_Clear();
#endif
        result = __Pyx_GetBuiltinName(name);
    }
    return result;
}

/* PyCFunctionFastCall */
    #if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs);
    }
}
#endif

/* PyFunctionFastCall */
    #if CYTHON_FAST_PYCALL
#include "frameobject.h"
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = f->f_localsplus;
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* PyObjectCallMethO */
    #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallOneArg */
    #if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* GetItemInt */
    static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* ObjectGetItem */
    #if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
    PyObject *runerr;
    Py_ssize_t key_value;
    PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
    if (unlikely(!(m && m->sq_item))) {
        PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
        return NULL;
    }
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
    PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
    if (likely(m && m->mp_subscript)) {
        return m->mp_subscript(obj, key);
    }
    return __Pyx_PyObject_GetIndex(obj, key);
}
#endif

/* None */
    static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

/* RaiseTooManyValuesToUnpack */
    static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
    static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* IterFinish */
    static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* UnpackItemEndCheck */
    static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

/* PyIntBinop */
    #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_TrueDivideObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
            if (8 * sizeof(long) <= 53 || likely(labs(a) <= ((PY_LONG_LONG)1 << 53))) {
                return PyFloat_FromDouble((double)a / (double)b);
            }
            return PyInt_Type.tp_as_number->nb_true_divide(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT && 1 * PyLong_SHIFT < 53) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT && 1 * PyLong_SHIFT < 53) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT && 2 * PyLong_SHIFT < 53) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT && 2 * PyLong_SHIFT < 53) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT && 3 * PyLong_SHIFT < 53) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT && 3 * PyLong_SHIFT < 53) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_true_divide(op1, op2);
            }
        }
                if ((8 * sizeof(long) <= 53 || likely(labs(a) <= ((PY_LONG_LONG)1 << 53)))
                    || __Pyx_sst_abs(size) <= 52 / PyLong_SHIFT) {
                    return PyFloat_FromDouble((double)a / (double)b);
                }
                return PyLong_Type.tp_as_number->nb_true_divide(op1, op2);
            return PyLong_FromLong(x);
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("divide", return NULL)
            result = ((double)a) / (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceTrueDivide : PyNumber_TrueDivide)(op1, op2);
}
#endif

/* FetchCommonType */
    static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CythonFunction */
    #include <structmember.h>
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
    if (op == NULL)
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    PyObject_GC_Track(op);
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
    return __Pyx_PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    Py_ssize_t size;
    switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
        argc = PyTuple_GET_SIZE(args);
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
};
static int __pyx_CyFunction_init(void) {
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* SliceObject */
        static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
        Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
#if CYTHON_USE_TYPE_SLOTS
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                    goto bad;
                PyErr_Clear();
            }
        }
        return ms->sq_slice(obj, cstart, cstop);
    }
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_subscript))
#endif
    {
        PyObject* result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_USE_TYPE_SLOTS
        result = mp->mp_subscript(obj, py_slice);
#else
        result = PyObject_GetItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    PyErr_Format(PyExc_TypeError,
        "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
bad:
    return NULL;
}

/* PyErrFetchRestore */
        #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* RaiseException */
        #if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_COMPILING_IN_PYPY
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* py_abs */
        #if CYTHON_USE_PYLONG_INTERNALS
static PyObject *__Pyx_PyLong_AbsNeg(PyObject *n) {
    if (likely(Py_SIZE(n) == -1)) {
        return PyLong_FromLong(((PyLongObject*)n)->ob_digit[0]);
    }
#if CYTHON_COMPILING_IN_CPYTHON
    {
        PyObject *copy = _PyLong_Copy((PyLongObject*)n);
        if (likely(copy)) {
            Py_SIZE(copy) = -(Py_SIZE(copy));
        }
        return copy;
    }
#else
    return PyNumber_Negative(n);
#endif
}
#endif

/* PyObjectCallNoArg */
        #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || __Pyx_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

/* SaveResetException */
          #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    #if PY_VERSION_HEX >= 0x030700A3
    *type = tstate->exc_state.exc_type;
    *value = tstate->exc_state.exc_value;
    *tb = tstate->exc_state.exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if PY_VERSION_HEX >= 0x030700A3
    tmp_type = tstate->exc_state.exc_type;
    tmp_value = tstate->exc_state.exc_value;
    tmp_tb = tstate->exc_state.exc_traceback;
    tstate->exc_state.exc_type = type;
    tstate->exc_state.exc_value = value;
    tstate->exc_state.exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* GetException */
          #if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
#endif
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if PY_VERSION_HEX >= 0x030700A3
    tmp_type = tstate->exc_state.exc_type;
    tmp_value = tstate->exc_state.exc_value;
    tmp_tb = tstate->exc_state.exc_traceback;
    tstate->exc_state.exc_type = local_type;
    tstate->exc_state.exc_value = local_value;
    tstate->exc_state.exc_traceback = local_tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* PyErrExceptionMatches */
            #if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* SwapException */
            #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if PY_VERSION_HEX >= 0x030700A3
    tmp_type = tstate->exc_state.exc_type;
    tmp_value = tstate->exc_state.exc_value;
    tmp_tb = tstate->exc_state.exc_traceback;
    tstate->exc_state.exc_type = *type;
    tstate->exc_state.exc_value = *value;
    tstate->exc_state.exc_traceback = *tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
    #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* PyObjectSetAttrStr */
            #if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#endif

/* PyIntBinop */
            #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* PyIntBinop */
            #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a - b);
            if (likely((x^a) >= 0 || (x^~b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
            }
        }
                x = a - b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla - llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("subtract", return NULL)
            result = ((double)a) - (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
}
#endif

/* PyObjectFormat */
            #if CYTHON_USE_UNICODE_WRITER
static PyObject* __Pyx_PyObject_Format(PyObject* obj, PyObject* format_spec) {
    int ret;
    _PyUnicodeWriter writer;
    if (likely(PyFloat_CheckExact(obj))) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x03040000
        _PyUnicodeWriter_Init(&writer, 0);
#else
        _PyUnicodeWriter_Init(&writer);
#endif
        ret = _PyFloat_FormatAdvancedWriter(
            &writer,
            obj,
            format_spec, 0, PyUnicode_GET_LENGTH(format_spec));
    } else if (likely(PyLong_CheckExact(obj))) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x03040000
        _PyUnicodeWriter_Init(&writer, 0);
#else
        _PyUnicodeWriter_Init(&writer);
#endif
        ret = _PyLong_FormatAdvancedWriter(
            &writer,
            obj,
            format_spec, 0, PyUnicode_GET_LENGTH(format_spec));
    } else {
        return PyObject_Format(obj, format_spec);
    }
    if (unlikely(ret == -1)) {
        _PyUnicodeWriter_Dealloc(&writer);
        return NULL;
    }
    return _PyUnicodeWriter_Finish(&writer);
}
#endif

/* JoinPyUnicode */
            static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      CYTHON_UNUSED Py_UCS4 max_char) {
#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyObject *result_uval;
    int result_ukind;
    Py_ssize_t i, char_pos;
    void *result_udata;
#if CYTHON_PEP393_ENABLED
    result_uval = PyUnicode_New(result_ulength, max_char);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
    result_udata = PyUnicode_DATA(result_uval);
#else
    result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = sizeof(Py_UNICODE);
    result_udata = PyUnicode_AS_UNICODE(result_uval);
#endif
    char_pos = 0;
    for (i=0; i < value_count; i++) {
        int ukind;
        Py_ssize_t ulength;
        void *udata;
        PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
        if (unlikely(__Pyx_PyUnicode_READY(uval)))
            goto bad;
        ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
        if (unlikely(!ulength))
            continue;
        if (unlikely(char_pos + ulength < 0))
            goto overflow;
        ukind = __Pyx_PyUnicode_KIND(uval);
        udata = __Pyx_PyUnicode_DATA(uval);
        if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
            memcpy((char *)result_udata + char_pos * result_ukind, udata, (size_t) (ulength * result_ukind));
        } else {
            #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
            _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
            #else
            Py_ssize_t j;
            for (j=0; j < ulength; j++) {
                Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
                __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
            }
            #endif
        }
        char_pos += ulength;
    }
    return result_uval;
overflow:
    PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
bad:
    Py_DECREF(result_uval);
    return NULL;
#else
    result_ulength++;
    value_count++;
    return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
#endif
}

/* None */
            static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* PyObjectFormatAndDecref */
            static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
    if (unlikely(!s)) return NULL;
    if (likely(PyUnicode_CheckExact(s))) return s;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyString_CheckExact(s))) {
        PyObject *result = PyUnicode_FromEncodedObject(s, NULL, "strict");
        Py_DECREF(s);
        return result;
    }
    #endif
    return __Pyx_PyObject_FormatAndDecref(s, f);
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
    PyObject *result = PyObject_Format(s, f);
    Py_DECREF(s);
    return result;
}

/* PyObjectCallMethod1 */
            static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = NULL;
#if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(method))) {
        PyObject *self = PyMethod_GET_SELF(method);
        if (likely(self)) {
            PyObject *args;
            PyObject *function = PyMethod_GET_FUNCTION(method);
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(function)) {
                PyObject *args[2] = {self, arg};
                result = __Pyx_PyFunction_FastCall(function, args, 2);
                goto done;
            }
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(function)) {
                PyObject *args[2] = {self, arg};
                result = __Pyx_PyCFunction_FastCall(function, args, 2);
                goto done;
            }
            #endif
            args = PyTuple_New(2);
            if (unlikely(!args)) goto done;
            Py_INCREF(self);
            PyTuple_SET_ITEM(args, 0, self);
            Py_INCREF(arg);
            PyTuple_SET_ITEM(args, 1, arg);
            Py_INCREF(function);
            result = __Pyx_PyObject_Call(function, args, NULL);
            Py_DECREF(args);
            Py_DECREF(function);
            return result;
        }
    }
#endif
    result = __Pyx_PyObject_CallOneArg(method, arg);
    goto done;
done:
    return result;
}
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method, *result;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) return NULL;
    result = __Pyx__PyObject_CallMethod1(method, arg);
    Py_DECREF(method);
    return result;
}

/* pop_index */
            static PyObject* __Pyx__PyObject_PopNewIndex(PyObject* L, PyObject* py_ix) {
    PyObject *r;
    if (unlikely(!py_ix)) return NULL;
    r = __Pyx__PyObject_PopIndex(L, py_ix);
    Py_DECREF(py_ix);
    return r;
}
static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, PyObject* py_ix) {
    return __Pyx_PyObject_CallMethod1(L, __pyx_n_s_pop, py_ix);
}
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static PyObject* __Pyx__PyList_PopIndex(PyObject* L, PyObject* py_ix, Py_ssize_t ix) {
    Py_ssize_t size = PyList_GET_SIZE(L);
    if (likely(size > (((PyListObject*)L)->allocated >> 1))) {
        Py_ssize_t cix = ix;
        if (cix < 0) {
            cix += size;
        }
        if (likely(0 <= cix && cix < size)) {
            PyObject* v = PyList_GET_ITEM(L, cix);
            Py_SIZE(L) -= 1;
            size -= 1;
            memmove(&PyList_GET_ITEM(L, cix), &PyList_GET_ITEM(L, cix+1), (size_t)(size-cix)*sizeof(PyObject*));
            return v;
        }
    }
    if (py_ix == Py_None) {
        return __Pyx__PyObject_PopNewIndex(L, PyInt_FromSsize_t(ix));
    } else {
        return __Pyx__PyObject_PopIndex(L, py_ix);
    }
}
#endif

/* BytesEquals */
            static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals */
            static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

/* PyObjectCallMethod0 */
            static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method, *result = NULL;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) goto bad;
#if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(method))) {
        PyObject *self = PyMethod_GET_SELF(method);
        if (likely(self)) {
            PyObject *function = PyMethod_GET_FUNCTION(method);
            result = __Pyx_PyObject_CallOneArg(function, self);
            Py_DECREF(method);
            return result;
        }
    }
#endif
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

/* RaiseNoneIterError */
            static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* UnpackTupleError */
            static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

/* UnpackTuple2 */
            static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
        PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
    PyObject *value1 = NULL, *value2 = NULL;
#if CYTHON_COMPILING_IN_PYPY
    value1 = PySequence_ITEM(tuple, 0);  if (unlikely(!value1)) goto bad;
    value2 = PySequence_ITEM(tuple, 1);  if (unlikely(!value2)) goto bad;
#else
    value1 = PyTuple_GET_ITEM(tuple, 0);  Py_INCREF(value1);
    value2 = PyTuple_GET_ITEM(tuple, 1);  Py_INCREF(value2);
#endif
    if (decref_tuple) {
        Py_DECREF(tuple);
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
#if CYTHON_COMPILING_IN_PYPY
bad:
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
#endif
}
static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                       int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    iternextfunc iternext;
    iter = PyObject_GetIter(tuple);
    if (unlikely(!iter)) goto bad;
    if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
    iternext = Py_TYPE(iter)->tp_iternext;
    value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
    value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
    if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
    Py_DECREF(iter);
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

/* dict_iter */
            static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
    if (is_dict) {
#if !CYTHON_COMPILING_IN_PYPY
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
#elif PY_MAJOR_VERSION >= 3
        static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
        PyObject **pp = NULL;
        if (method_name) {
            const char *name = PyUnicode_AsUTF8(method_name);
            if (strcmp(name, "iteritems") == 0) pp = &py_items;
            else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
            else if (strcmp(name, "itervalues") == 0) pp = &py_values;
            if (pp) {
                if (!*pp) {
                    *pp = PyUnicode_FromString(name + 4);
                    if (!*pp)
                        return NULL;
                }
                method_name = *pp;
            }
        }
#endif
    }
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
        if (!iterable)
            return NULL;
#if !CYTHON_COMPILING_IN_PYPY
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_dict_iter_next(
        PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
        PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_COMPILING_IN_PYPY
    if (source_is_dict) {
        PyObject *key, *value;
        if (unlikely(orig_length != PyDict_Size(iter_obj))) {
            PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
            return -1;
        }
        if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
            return 0;
        }
        if (pitem) {
            PyObject* tuple = PyTuple_New(2);
            if (unlikely(!tuple)) {
                return -1;
            }
            Py_INCREF(key);
            Py_INCREF(value);
            PyTuple_SET_ITEM(tuple, 0, key);
            PyTuple_SET_ITEM(tuple, 1, value);
            *pitem = tuple;
        } else {
            if (pkey) {
                Py_INCREF(key);
                *pkey = key;
            }
            if (pvalue) {
                Py_INCREF(value);
                *pvalue = value;
            }
        }
        return 1;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyList_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

/* UnpackUnboundCMethod */
            static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
    }
#endif
    return 0;
}

/* CallUnboundCMethod0 */
            static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_ASSUME_SAFE_MACROS
    args = PyTuple_New(1);
    if (unlikely(!args)) goto bad;
    Py_INCREF(self);
    PyTuple_SET_ITEM(args, 0, self);
#else
    args = PyTuple_Pack(1, self);
    if (unlikely(!args)) goto bad;
#endif
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    Py_DECREF(args);
bad:
    return result;
}

/* py_dict_keys */
            static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d) {
    if (PY_MAJOR_VERSION >= 3)
        return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_keys, d);
    else
        return PyDict_Keys(d);
}

/* DictGetItem */
            #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred()) {
            PyObject* args = PyTuple_Pack(1, key);
            if (likely(args))
                PyErr_SetObject(PyExc_KeyError, args);
            Py_XDECREF(args);
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#endif

/* PyIntBinop */
            #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    if (op1 == op2) {
        Py_RETURN_TRUE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a == b) {
            Py_RETURN_TRUE;
        } else {
            Py_RETURN_FALSE;
        }
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a;
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15
                default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ);
                #else
                default: Py_RETURN_FALSE;
                #endif
            }
        }
            if (a == b) {
                Py_RETURN_TRUE;
            } else {
                Py_RETURN_FALSE;
            }
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            if ((double)a == (double)b) {
                Py_RETURN_TRUE;
            } else {
                Py_RETURN_FALSE;
            }
    }
    return PyObject_RichCompare(op1, op2, Py_EQ);
}
#endif

/* CallUnboundCMethod1 */
            #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
    if (likely(cfunc->func)) {
        int flag = cfunc->flag;
        if (flag == METH_O) {
            return (*(cfunc->func))(self, arg);
        } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) {
            if (PY_VERSION_HEX >= 0x030700A0) {
                return (*(__Pyx_PyCFunctionFast)cfunc->func)(self, &arg, 1);
            } else {
                return (*(__Pyx_PyCFunctionFastWithKeywords)cfunc->func)(self, &arg, 1, NULL);
            }
        } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) {
            return (*(__Pyx_PyCFunctionFastWithKeywords)cfunc->func)(self, &arg, 1, NULL);
        }
    }
    return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 0, arg);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 1, arg);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(2, self, arg);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* append */
            static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
    } else {
        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
        if (unlikely(!retval))
            return -1;
        Py_DECREF(retval);
    }
    return 0;
}

/* PyIntBinop */
            #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AndObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
            return PyInt_FromLong(a & b);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_and(op1, op2);
            }
        }
                x = a & b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla & llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    return (inplace ? PyNumber_InPlaceAnd : PyNumber_And)(op1, op2);
}
#endif

/* SliceObject */
            static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value,
        Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
#if CYTHON_USE_TYPE_SLOTS
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_ass_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                    goto bad;
                PyErr_Clear();
            }
        }
        return ms->sq_ass_slice(obj, cstart, cstop, value);
    }
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_ass_subscript))
#endif
    {
        int result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_USE_TYPE_SLOTS
        result = mp->mp_ass_subscript(obj, py_slice, value);
#else
        result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    PyErr_Format(PyExc_TypeError,
        "'%.200s' object does not support slice %.10s",
        Py_TYPE(obj)->tp_name, value ? "assignment" : "deletion");
bad:
    return -1;
}

/* PyIntBinop */
            #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractCObj(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op2))) {
        const long a = intval;
        long x;
        long b = PyInt_AS_LONG(op2);
            x = (long)((unsigned long)a - b);
            if (likely((x^a) >= 0 || (x^~b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op2))) {
        const long a = intval;
        long b, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG lla = intval;
        PY_LONG_LONG llb, llx;
#endif
        const digit* digits = ((PyLongObject*)op2)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op2);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            b = likely(size) ? digits[0] : 0;
            if (size == -1) b = -b;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        b = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        b = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        b = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
            }
        }
                x = a - b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla - llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op2)) {
        const long a = intval;
        double b = PyFloat_AS_DOUBLE(op2);
            double result;
            PyFPE_START_PROTECT("subtract", return NULL)
            result = ((double)a) - (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
}
#endif

/* SetItemInt */
            static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
    int r;
    if (!j) return -1;
    r = PyObject_SetItem(o, j, v);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
                                               CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
        if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
            PyObject* old = PyList_GET_ITEM(o, n);
            Py_INCREF(v);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 1;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_ass_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return -1;
                    PyErr_Clear();
                }
            }
            return m->sq_ass_item(o, i, v);
        }
    }
#else
#if CYTHON_COMPILING_IN_PYPY
    if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) {
#else
    if (is_list || PySequence_Check(o)) {
#endif
        return PySequence_SetItem(o, i, v);
    }
#endif
    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}

/* PyObject_GenericGetAttrNoDict */
              #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, attr_name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(attr_name));
#endif
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* Import */
              static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.')) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
              static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* CalculateMetaclass */
              static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* Py3ClassCreate */
              static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs = PyTuple_Pack(2, name, bases);
            if (unlikely(!pargs)) {
                Py_DECREF(prep);
                return NULL;
            }
            ns = PyObject_Call(prep, pargs, mkw);
            Py_DECREF(prep);
            Py_DECREF(pargs);
        } else {
            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
                return NULL;
            PyErr_Clear();
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module_2, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result, *margs;
    PyObject *owned_metaclass = NULL;
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    margs = PyTuple_Pack(3, name, bases, dict);
    if (unlikely(!margs)) {
        result = NULL;
    } else {
        result = PyObject_Call(metaclass, margs, mkw);
        Py_DECREF(margs);
    }
    Py_XDECREF(owned_metaclass);
    return result;
}

/* CLineInTraceback */
              #ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
      use_cline = __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback);
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (PyObject_Not(use_cline) != 0) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
              static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
              #include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* CIntToPy */
              static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) -1, const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntFromPyVerify */
              #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntFromPy */
              static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) -1, const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntFromPy */
              static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) -1, const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* FastTypeChecks */
              #if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = a->tp_base;
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
    if (!res) {
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
    return res;
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* CheckBinaryVersion */
              static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* InitStrings */
              static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(x);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
