/* Generated by Cython 0.28.5 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "name": "metaphor.chem_gm.core.gmutils",
        "sources": [
            "metaphor/chem_gm/core/gmutils.py"
        ]
    },
    "module_name": "metaphor.chem_gm.core.gmutils"
}
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__gmutils
#define __PYX_HAVE_API__metaphor__chem_gm__core__gmutils
/* 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/gmutils.py",
};

/*--- Type declarations ---*/
struct __pyx_defaults;
typedef struct __pyx_defaults __pyx_defaults;
struct __pyx_defaults {
  PyObject *__pyx_arg_argv;
};

/* --- 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);

/* 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);

/* 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);

/* 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));
}

/* 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

/* 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

/* 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);

/* 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

/* 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

/* 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

/* 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

/* UnicodeAsUCS4.proto */
static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject*);

/* object_ord.proto */
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyObject_Ord(c)\
    (likely(PyUnicode_Check(c)) ? (long)__Pyx_PyUnicode_AsPy_UCS4(c) : __Pyx__PyObject_Ord(c))
#else
#define __Pyx_PyObject_Ord(c) __Pyx__PyObject_Ord(c)
#endif
static long __Pyx__PyObject_Ord(PyObject* c);

/* 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

/* 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);

/* 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

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

/* 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);

/* 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

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

/* 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

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

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

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

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

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

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

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

/* 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);

/* 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

/* 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);

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

/* 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

/* pyobject_as_double.proto */
static double __Pyx__PyObject_AsDouble(PyObject* obj);
#if CYTHON_COMPILING_IN_PYPY
#define __Pyx_PyObject_AsDouble(obj)\
(likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) :\
 likely(PyInt_CheckExact(obj)) ?\
 PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj))
#else
#define __Pyx_PyObject_AsDouble(obj)\
((likely(PyFloat_CheckExact(obj))) ?\
 PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))
#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

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

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

/* 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.gmutils' */
static PyObject *__pyx_8genexpr2__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index;
static PyObject *__pyx_8genexpr3__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index;
static PyObject *__pyx_8genexpr4__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index;
static PyObject *__pyx_8genexpr5__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index;
static PyObject *__pyx_8genexpr6__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index;
static PyObject *__pyx_8genexpr7__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index;
static PyObject *__pyx_8genexpr8__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index;
static PyObject *__pyx_8genexpr9__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index;
static PyObject *__pyx_9genexpr10__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index;
static PyObject *__pyx_9genexpr11__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index;
static PyObject *__pyx_9genexpr12__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index;
static PyObject *__pyx_9genexpr13__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index;
static PyObject *__pyx_9genexpr14__pyx_v_8metaphor_7chem_gm_4core_7gmutils_val;
#define __Pyx_MODULE_NAME "metaphor.chem_gm.core.gmutils"
extern int __pyx_module_is_main_metaphor__chem_gm__core__gmutils;
int __pyx_module_is_main_metaphor__chem_gm__core__gmutils = 0;

/* Implementation of 'metaphor.chem_gm.core.gmutils' */
static PyObject *__pyx_builtin_print;
static PyObject *__pyx_builtin_hex;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_open;
static PyObject *__pyx_builtin_zip;
static const char __pyx_k_[] = "";
static const char __pyx_k_0[] = "0";
static const char __pyx_k_1[] = "-1";
static const char __pyx_k_3[] = "3";
static const char __pyx_k_C[] = "C";
static const char __pyx_k_D[] = "D";
static const char __pyx_k_F[] = "F";
static const char __pyx_k_H[] = "H";
static const char __pyx_k_N[] = "N";
static const char __pyx_k_S[] = "S";
static const char __pyx_k_T[] = "T";
static const char __pyx_k_c[] = "c";
static const char __pyx_k_f[] = "f";
static const char __pyx_k_h[] = "h";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_n[] = "n";
static const char __pyx_k_q[] = "q";
static const char __pyx_k_s[] = "\\%s";
static const char __pyx_k__3[] = "-";
static const char __pyx_k__7[] = "_";
static const char __pyx_k_cc[] = "cc";
static const char __pyx_k_ce[] = "ce";
static const char __pyx_k_i0[] = "i0";
static const char __pyx_k_ii[] = "ii";
static const char __pyx_k_nc[] = "nc";
static const char __pyx_k_nn[] = "nn";
static const char __pyx_k_ok[] = "ok";
static const char __pyx_k_os[] = "os";
static const char __pyx_k_rb[] = "rb";
static const char __pyx_k_re[] = "re";
static const char __pyx_k_rg[] = "rg";
static const char __pyx_k_rr[] = "rr";
static const char __pyx_k_sN[] = "%sN";
static const char __pyx_k_st[] = "st";
static const char __pyx_k_tb[] = "tb";
static const char __pyx_k_tt[] = "tt";
static const char __pyx_k_0_2[] = "%0.";
static const char __pyx_k__45[] = ",";
static const char __pyx_k__47[] = "|";
static const char __pyx_k__48[] = ", ";
static const char __pyx_k__49[] = "\t\t";
static const char __pyx_k__50[] = " = ";
static const char __pyx_k__51[] = "\n";
static const char __pyx_k__58[] = " ";
static const char __pyx_k__61[] = ",;";
static const char __pyx_k__68[] = "\"";
static const char __pyx_k__69[] = ";";
static const char __pyx_k__70[] = "\t";
static const char __pyx_k__73[] = ".";
static const char __pyx_k__78[] = ")";
static const char __pyx_k__80[] = "(";
static const char __pyx_k_ccl[] = "ccl";
static const char __pyx_k_chi[] = "chi";
static const char __pyx_k_csv[] = "csv";
static const char __pyx_k_d_d[] = "(?<=\\d),(?=\\d)";
static const char __pyx_k_dgr[] = "dgr";
static const char __pyx_k_get[] = "get";
static const char __pyx_k_grd[] = "grd";
static const char __pyx_k_hex[] = "hex";
static const char __pyx_k_ind[] = "ind";
static const char __pyx_k_inn[] = "inn";
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_lst[] = "lst";
static const char __pyx_k_mol[] = "mol";
static const char __pyx_k_nam[] = "nam";
static const char __pyx_k_nan[] = "nan";
static const char __pyx_k_nom[] = "nom";
static const char __pyx_k_pop[] = "pop";
static const char __pyx_k_res[] = "res";
static const char __pyx_k_row[] = "row";
static const char __pyx_k_sep[] = "sep";
static const char __pyx_k_six[] = "six";
static const char __pyx_k_smi[] = "smi";
static const char __pyx_k_sub[] = "sub";
static const char __pyx_k_sys[] = "sys";
static const char __pyx_k_val[] = "val";
static const char __pyx_k_zip[] = "zip";
static const char __pyx_k_Item[] = "Item";
static const char __pyx_k_W__d[] = "W_%d";
static const char __pyx_k_argv[] = "argv";
static const char __pyx_k_ccls[] = "ccls";
static const char __pyx_k_cond[] = "cond";
static const char __pyx_k_copy[] = "copy";
static const char __pyx_k_exit[] = "__exit__";
static const char __pyx_k_form[] = "form";
static const char __pyx_k_full[] = "full";
static const char __pyx_k_grds[] = "grds";
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_lens[] = "lens";
static const char __pyx_k_line[] = "line";
static const char __pyx_k_lres[] = "lres";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_math[] = "math";
static const char __pyx_k_mol1[] = "mol1";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_next[] = "next";
static const char __pyx_k_nrow[] = "nrow";
static const char __pyx_k_open[] = "open";
static const char __pyx_k_path[] = "path";
static const char __pyx_k_qm_d[] = "qm%d";
static const char __pyx_k_qp_d[] = "qp%d";
static const char __pyx_k_read[] = "read";
static const char __pyx_k_row2[] = "row2";
static const char __pyx_k_seek[] = "seek";
static const char __pyx_k_temp[] = "temp";
static const char __pyx_k_test[] = "test";
static const char __pyx_k_time[] = "time";
static const char __pyx_k_tmpl[] = "tmpl";
static const char __pyx_k_Event[] = "Event";
static const char __pyx_k_False[] = "False";
static const char __pyx_k_atoms[] = "atoms";
static const char __pyx_k_ccl_d[] = "ccl%d";
static const char __pyx_k_chi_s[] = "chi%s";
static const char __pyx_k_count[] = "count";
static const char __pyx_k_dgr_d[] = "dgr%d";
static const char __pyx_k_enter[] = "__enter__";
static const char __pyx_k_fullH[] = "fullH";
static const char __pyx_k_index[] = "index";
static const char __pyx_k_isNum[] = "isNum";
static const char __pyx_k_isint[] = "isint";
static const char __pyx_k_isnan[] = "isnan";
static const char __pyx_k_isnum[] = "isnum";
static const char __pyx_k_iso_s[] = "iso%s";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_lower[] = "lower";
static const char __pyx_k_model[] = "model";
static const char __pyx_k_monal[] = "monal";
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_rjust[] = "rjust";
static const char __pyx_k_short[] = "short";
static const char __pyx_k_sniff[] = "sniff";
static const char __pyx_k_split[] = "split";
static const char __pyx_k_strip[] = "strip";
static const char __pyx_k_vallo[] = "vallo";
static const char __pyx_k_valst[] = "valst";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_Atomes[] = "Atomes";
static const char __pyx_k_Chaine[] = "Chaine";
static const char __pyx_k_Thread[] = "Thread";
static const char __pyx_k_chikey[] = "chikey";
static const char __pyx_k_config[] = "config";
static const char __pyx_k_ctypes[] = "ctypes";
static const char __pyx_k_degree[] = "degree";
static const char __pyx_k_full_0[] = "full_0";
static const char __pyx_k_hidden[] = "hidden";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_indsmi[] = "indsmi";
static const char __pyx_k_islong[] = "islong";
static const char __pyx_k_isokey[] = "isokey";
static const char __pyx_k_isomer[] = "isomer";
static const char __pyx_k_lambda[] = "<lambda>";
static const char __pyx_k_length[] = "length";
static const char __pyx_k_lenloc[] = "lenloc";
static const char __pyx_k_lenrow[] = "lenrow";
static const char __pyx_k_lmatch[] = "lmatch";
static const char __pyx_k_module[] = "module";
static const char __pyx_k_name_2[] = "__name__";
static const char __pyx_k_option[] = "option";
static const char __pyx_k_prlist[] = "prlist";
static const char __pyx_k_reader[] = "reader";
static const char __pyx_k_sindex[] = "sindex";
static const char __pyx_k_source[] = "source";
static const char __pyx_k_stddev[] = "stddev";
static const char __pyx_k_test_2[] = "__test__";
static const char __pyx_k_toLong[] = "toLong";
static const char __pyx_k_valint[] = "valint";
static const char __pyx_k_value2[] = "value2";
static const char __pyx_k_Sniffer[] = "Sniffer";
static const char __pyx_k_already[] = "already";
static const char __pyx_k_central[] = "central";
static const char __pyx_k_classif[] = "classif";
static const char __pyx_k_compile[] = "compile";
static const char __pyx_k_connect[] = "connect";
static const char __pyx_k_csvfile[] = "csvfile";
static const char __pyx_k_cycle_d[] = "cycle(%d)";
static const char __pyx_k_decimal[] = "decimal";
static const char __pyx_k_default[] = "default";
static const char __pyx_k_dialect[] = "dialect";
static const char __pyx_k_findall[] = "findall";
static const char __pyx_k_floatex[] = "floatex";
static const char __pyx_k_gmconst[] = "gmconst";
static const char __pyx_k_gmmTmpl[] = "gmmTmpl";
static const char __pyx_k_gmxTmpl[] = "gmxTmpl";
static const char __pyx_k_numlist[] = "numlist";
static const char __pyx_k_replace[] = "replace";
static const char __pyx_k_reshash[] = "reshash";
static const char __pyx_k_reslong[] = "reslong";
static const char __pyx_k_smiletk[] = "smiletk";
static const char __pyx_k_source2[] = "source2";
static const char __pyx_k_student[] = "student";
static const char __pyx_k_toolbox[] = "toolbox";
static const char __pyx_k_version[] = "__version__";
static const char __pyx_k_weights[] = "weights";
static const char __pyx_k_atomlist[] = "atomlist";
static const char __pyx_k_basename[] = "basename";
static const char __pyx_k_c_size_t[] = "c_size_t";
static const char __pyx_k_charge_d[] = "charge(+%d)";
static const char __pyx_k_chiral_d[] = "chiral(%d)";
static const char __pyx_k_corename[] = "corename";
static const char __pyx_k_cyclekey[] = "cyclekey";
static const char __pyx_k_degree_d[] = "degree(%d)";
static const char __pyx_k_endswith[] = "endswith";
static const char __pyx_k_filename[] = "filename";
static const char __pyx_k_fullsize[] = "fullsize";
static const char __pyx_k_gradekey[] = "gradekey";
static const char __pyx_k_hasOneOf[] = "hasOneOf";
static const char __pyx_k_hidden_s[] = "\thidden: %s";
static const char __pyx_k_isomer_d[] = "isomer(%d)";
static const char __pyx_k_iterTmpl[] = "iterTmpl";
static const char __pyx_k_key2long[] = "key2long";
static const char __pyx_k_readline[] = "readline";
static const char __pyx_k_skipline[] = "skipline";
static const char __pyx_k_splitext[] = "splitext";
static const char __pyx_k_tempkeys[] = "tempkeys";
static const char __pyx_k_tmplfile[] = "tmplfile";
static const char __pyx_k_central_s[] = "\tcentral: %s";
static const char __pyx_k_chargekey[] = "chargekey";
static const char __pyx_k_configstr[] = "configstr";
static const char __pyx_k_delimiter[] = "delimiter";
static const char __pyx_k_directory[] = "directory";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_formatted[] = "formatted";
static const char __pyx_k_hiddenout[] = "hiddenout";
static const char __pyx_k_intersect[] = "intersect";
static const char __pyx_k_key2short[] = "key2short";
static const char __pyx_k_nameIndex[] = "nameIndex";
static const char __pyx_k_otherlist[] = "otherlist";
static const char __pyx_k_quotechar[] = "quotechar";
static const char __pyx_k_sniffFile[] = "sniffFile";
static const char __pyx_k_suggested[] = "suggested";
static const char __pyx_k_threading[] = "threading";
static const char __pyx_k_AtomsLower[] = "AtomsLower";
static const char __pyx_k_Hydrogenes[] = "Hydrogenes";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_a_zA_Z_1_2[] = "[a-zA-Z]{1,2}";
static const char __pyx_k_addcentral[] = "addcentral";
static const char __pyx_k_capitalize[] = "capitalize";
static const char __pyx_k_charge_d_2[] = "charge(%d)";
static const char __pyx_k_configTmpl[] = "configTmpl";
static const char __pyx_k_connectdef[] = "connectdef";
static const char __pyx_k_datareader[] = "datareader";
static const char __pyx_k_delimiters[] = "delimiters";
static const char __pyx_k_dispersion[] = "dispersion";
static const char __pyx_k_findinlist[] = "findinlist";
static const char __pyx_k_getdefault[] = "getdefault";
static const char __pyx_k_keppexcept[] = "keppexcept";
static const char __pyx_k_monal_util[] = "monal.util";
static const char __pyx_k_monalconst[] = "monalconst";
static const char __pyx_k_readoption[] = "readoption";
static const char __pyx_k_resampling[] = "resampling";
static const char __pyx_k_smileIndex[] = "smileIndex";
static const char __pyx_k_startswith[] = "startswith";
static const char __pyx_k_structkeys[] = "structkeys";
static const char __pyx_k_weightFile[] = "weightFile";
static const char __pyx_k_weightTmpl[] = "weightTmpl";
static const char __pyx_k_weight_03d[] = "weight%03d";
static const char __pyx_k_OrderedDict[] = "OrderedDict";
static const char __pyx_k_collections[] = "collections";
static const char __pyx_k_decmark_reg[] = "decmark_reg";
static const char __pyx_k_defaultdict[] = "defaultdict";
static const char __pyx_k_gmxFileName[] = "gmxFileName";
static const char __pyx_k_leftjustify[] = "leftjustify";
static const char __pyx_k_res_03d_gmm[] = "res%03d.gmm";
static const char __pyx_k_res_03d_gmx[] = "res%03d.gmx";
static const char __pyx_k_classif_True[] = "\tclassif: True";
static const char __pyx_k_conf_03d_cfg[] = "conf%03d.cfg";
static const char __pyx_k_connectivity[] = "connectivity";
static const char __pyx_k_iter_03d_txt[] = "iter%03d.txt";
static const char __pyx_k_module2short[] = "module2short";
static const char __pyx_k_monalversion[] = "monalversion";
static const char __pyx_k_string_types[] = "string_types";
static const char __pyx_k_IndexFilename[] = "IndexFilename";
static const char __pyx_k_candidatelist[] = "candidatelist";
static const char __pyx_k_getConfigHash[] = "getConfigHash";
static const char __pyx_k_propertyIndex[] = "propertyIndex";
static const char __pyx_k_Configurattion[] = "Configurattion:";
static const char __pyx_k_chem_gmversion[] = "chem_gmversion";
static const char __pyx_k_connectdefault[] = "connectdefault";
static const char __pyx_k_connectivities[] = "connectivities";
static const char __pyx_k_connectivity_2[] = "\tconnectivity:";
static const char __pyx_k_defaultConnect[] = "defaultConnect";
static const char __pyx_k_getSectionDict[] = "getSectionDict";
static const char __pyx_k_getConfigString[] = "getConfigString";
static const char __pyx_k_getcsvdelimiter[] = "getcsvdelimiter";
static const char __pyx_k_nntoolbox_utils[] = "nntoolbox.utils";
static const char __pyx_k_structkeysshort[] = "structkeysshort";
static const char __pyx_k_splitindexedname[] = "splitindexedname";
static const char __pyx_k_analyseProjectName[] = "analyseProjectName";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_symbolFromNodeName[] = "symbolFromNodeName";
static const char __pyx_k_ReverseConfigString[] = "ReverseConfigString";
static const char __pyx_k_structkeysgradeless[] = "structkeysgradeless";
static const char __pyx_k_nonASCIICharsConvert[] = "nonASCIICharsConvert";
static const char __pyx_k_defaultedConfigParser[] = "defaultedConfigParser";
static const char __pyx_k_nntoolbox_filetoolbox[] = "nntoolbox.filetoolbox";
static const char __pyx_k_getParameterListFomFile[] = "getParameterListFomFile";
static const char __pyx_k_structkeysgradelessshort[] = "structkeysgradelessshort";
static const char __pyx_k_ReverseConfigString2String[] = "ReverseConfigString2String";
static const char __pyx_k_connectdefault_locals_lambda[] = "connectdefault.<locals>.<lambda>";
static const char __pyx_k_metaphor_chem_gm_core_gmutils[] = "metaphor.chem_gm.core.gmutils";
static const char __pyx_k_Module_graphmachine_chem_gm_core[] = "Module graphmachine.chem_gm.core.gmutils\n\nUtilitaires divers\n";
static const char __pyx_k_metaphor_chem_gm_core_gmutils_py[] = "metaphor/chem_gm/core/gmutils.py";
static PyObject *__pyx_n_s_;
static PyObject *__pyx_kp_u_;
static PyObject *__pyx_kp_u_0;
static PyObject *__pyx_kp_u_0_2;
static PyObject *__pyx_kp_u_1;
static PyObject *__pyx_kp_u_3;
static PyObject *__pyx_n_s_Atomes;
static PyObject *__pyx_n_s_AtomsLower;
static PyObject *__pyx_n_s_C;
static PyObject *__pyx_n_s_Chaine;
static PyObject *__pyx_kp_u_Configurattion;
static PyObject *__pyx_n_u_D;
static PyObject *__pyx_n_s_Event;
static PyObject *__pyx_n_u_F;
static PyObject *__pyx_n_u_False;
static PyObject *__pyx_n_u_H;
static PyObject *__pyx_n_s_Hydrogenes;
static PyObject *__pyx_n_s_IndexFilename;
static PyObject *__pyx_n_s_Item;
static PyObject *__pyx_n_s_N;
static PyObject *__pyx_n_u_N;
static PyObject *__pyx_n_s_OrderedDict;
static PyObject *__pyx_n_s_ReverseConfigString;
static PyObject *__pyx_n_s_ReverseConfigString2String;
static PyObject *__pyx_n_s_S;
static PyObject *__pyx_n_s_Sniffer;
static PyObject *__pyx_n_u_T;
static PyObject *__pyx_n_s_Thread;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_kp_u_W__d;
static PyObject *__pyx_kp_u__3;
static PyObject *__pyx_kp_u__45;
static PyObject *__pyx_kp_u__47;
static PyObject *__pyx_kp_u__48;
static PyObject *__pyx_kp_u__49;
static PyObject *__pyx_kp_u__50;
static PyObject *__pyx_kp_u__51;
static PyObject *__pyx_kp_u__58;
static PyObject *__pyx_kp_u__61;
static PyObject *__pyx_kp_u__68;
static PyObject *__pyx_kp_u__69;
static PyObject *__pyx_n_s__7;
static PyObject *__pyx_n_u__7;
static PyObject *__pyx_kp_u__70;
static PyObject *__pyx_kp_u__73;
static PyObject *__pyx_kp_u__78;
static PyObject *__pyx_kp_u__80;
static PyObject *__pyx_kp_u_a_zA_Z_1_2;
static PyObject *__pyx_n_s_addcentral;
static PyObject *__pyx_n_s_already;
static PyObject *__pyx_n_s_analyseProjectName;
static PyObject *__pyx_n_s_argv;
static PyObject *__pyx_n_s_atomlist;
static PyObject *__pyx_n_s_atoms;
static PyObject *__pyx_n_s_basename;
static PyObject *__pyx_n_s_c;
static PyObject *__pyx_n_u_c;
static PyObject *__pyx_n_s_c_size_t;
static PyObject *__pyx_n_s_candidatelist;
static PyObject *__pyx_n_s_capitalize;
static PyObject *__pyx_n_s_cc;
static PyObject *__pyx_n_u_ccl;
static PyObject *__pyx_kp_u_ccl_d;
static PyObject *__pyx_n_u_ccls;
static PyObject *__pyx_n_u_ce;
static PyObject *__pyx_n_s_central;
static PyObject *__pyx_n_u_central;
static PyObject *__pyx_kp_u_central_s;
static PyObject *__pyx_kp_u_charge_d;
static PyObject *__pyx_kp_u_charge_d_2;
static PyObject *__pyx_n_s_chargekey;
static PyObject *__pyx_n_s_chem_gmversion;
static PyObject *__pyx_n_u_chi;
static PyObject *__pyx_kp_u_chi_s;
static PyObject *__pyx_n_s_chikey;
static PyObject *__pyx_kp_u_chiral_d;
static PyObject *__pyx_n_s_classif;
static PyObject *__pyx_n_u_classif;
static PyObject *__pyx_kp_u_classif_True;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_collections;
static PyObject *__pyx_n_s_compile;
static PyObject *__pyx_n_s_cond;
static PyObject *__pyx_kp_u_conf_03d_cfg;
static PyObject *__pyx_n_s_config;
static PyObject *__pyx_n_s_configTmpl;
static PyObject *__pyx_n_s_configstr;
static PyObject *__pyx_n_s_connect;
static PyObject *__pyx_n_s_connectdef;
static PyObject *__pyx_n_s_connectdefault;
static PyObject *__pyx_n_s_connectdefault_locals_lambda;
static PyObject *__pyx_n_s_connectivities;
static PyObject *__pyx_n_s_connectivity;
static PyObject *__pyx_n_u_connectivity;
static PyObject *__pyx_kp_u_connectivity_2;
static PyObject *__pyx_n_s_copy;
static PyObject *__pyx_n_s_corename;
static PyObject *__pyx_n_u_count;
static PyObject *__pyx_n_s_csv;
static PyObject *__pyx_n_s_csvfile;
static PyObject *__pyx_n_s_ctypes;
static PyObject *__pyx_kp_u_cycle_d;
static PyObject *__pyx_n_s_cyclekey;
static PyObject *__pyx_kp_u_d_d;
static PyObject *__pyx_n_s_datareader;
static PyObject *__pyx_n_s_decimal;
static PyObject *__pyx_n_s_decmark_reg;
static PyObject *__pyx_n_s_default;
static PyObject *__pyx_n_s_defaultConnect;
static PyObject *__pyx_n_s_defaultdict;
static PyObject *__pyx_n_s_defaultedConfigParser;
static PyObject *__pyx_n_u_degree;
static PyObject *__pyx_kp_u_degree_d;
static PyObject *__pyx_n_s_delimiter;
static PyObject *__pyx_n_s_delimiters;
static PyObject *__pyx_n_u_dgr;
static PyObject *__pyx_kp_u_dgr_d;
static PyObject *__pyx_n_s_dialect;
static PyObject *__pyx_n_s_directory;
static PyObject *__pyx_n_u_dispersion;
static PyObject *__pyx_n_s_endswith;
static PyObject *__pyx_n_s_enter;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_exit;
static PyObject *__pyx_n_u_f;
static PyObject *__pyx_n_s_filename;
static PyObject *__pyx_n_s_findall;
static PyObject *__pyx_n_s_findinlist;
static PyObject *__pyx_n_s_floatex;
static PyObject *__pyx_n_s_form;
static PyObject *__pyx_n_s_formatted;
static PyObject *__pyx_n_s_full;
static PyObject *__pyx_n_s_fullH;
static PyObject *__pyx_n_s_full_0;
static PyObject *__pyx_n_s_fullsize;
static PyObject *__pyx_n_s_get;
static PyObject *__pyx_n_s_getConfigHash;
static PyObject *__pyx_n_s_getConfigString;
static PyObject *__pyx_n_s_getParameterListFomFile;
static PyObject *__pyx_n_s_getSectionDict;
static PyObject *__pyx_n_s_getcsvdelimiter;
static PyObject *__pyx_n_s_getdefault;
static PyObject *__pyx_n_s_gmconst;
static PyObject *__pyx_n_s_gmmTmpl;
static PyObject *__pyx_n_s_gmxFileName;
static PyObject *__pyx_n_s_gmxTmpl;
static PyObject *__pyx_n_s_gradekey;
static PyObject *__pyx_n_u_grd;
static PyObject *__pyx_n_u_grds;
static PyObject *__pyx_n_u_h;
static PyObject *__pyx_n_s_hasOneOf;
static PyObject *__pyx_n_s_hex;
static PyObject *__pyx_n_s_hidden;
static PyObject *__pyx_n_u_hidden;
static PyObject *__pyx_kp_u_hidden_s;
static PyObject *__pyx_n_s_hiddenout;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_i0;
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_indsmi;
static PyObject *__pyx_n_s_inn;
static PyObject *__pyx_n_s_intersect;
static PyObject *__pyx_n_s_isNum;
static PyObject *__pyx_n_s_isint;
static PyObject *__pyx_n_s_islong;
static PyObject *__pyx_n_s_isnan;
static PyObject *__pyx_n_s_isnum;
static PyObject *__pyx_n_u_iso;
static PyObject *__pyx_kp_u_iso_s;
static PyObject *__pyx_n_s_isokey;
static PyObject *__pyx_n_u_isomer;
static PyObject *__pyx_kp_u_isomer_d;
static PyObject *__pyx_n_s_item;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_iterTmpl;
static PyObject *__pyx_kp_u_iter_03d_txt;
static PyObject *__pyx_n_s_join;
static PyObject *__pyx_n_s_keppexcept;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_s_key2long;
static PyObject *__pyx_n_s_key2short;
static PyObject *__pyx_n_s_keys;
static PyObject *__pyx_n_s_lambda;
static PyObject *__pyx_n_s_leftjustify;
static PyObject *__pyx_n_s_length;
static PyObject *__pyx_n_s_lenloc;
static PyObject *__pyx_n_s_lenrow;
static PyObject *__pyx_n_s_lens;
static PyObject *__pyx_n_u_lib;
static PyObject *__pyx_n_s_line;
static PyObject *__pyx_n_s_lmatch;
static PyObject *__pyx_n_s_lower;
static PyObject *__pyx_n_s_lres;
static PyObject *__pyx_n_s_lst;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_u_main;
static PyObject *__pyx_n_s_math;
static PyObject *__pyx_n_s_metaphor_chem_gm_core_gmutils;
static PyObject *__pyx_kp_s_metaphor_chem_gm_core_gmutils_py;
static PyObject *__pyx_n_u_model;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_module2short;
static PyObject *__pyx_n_u_mol;
static PyObject *__pyx_n_u_mol1;
static PyObject *__pyx_n_s_monal;
static PyObject *__pyx_n_s_monal_util;
static PyObject *__pyx_n_s_monalconst;
static PyObject *__pyx_n_s_monalversion;
static PyObject *__pyx_n_u_n;
static PyObject *__pyx_n_u_nam;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_nameIndex;
static PyObject *__pyx_n_s_name_2;
static PyObject *__pyx_n_u_nan;
static PyObject *__pyx_n_s_nc;
static PyObject *__pyx_n_s_next;
static PyObject *__pyx_n_s_nn;
static PyObject *__pyx_n_s_nntoolbox_filetoolbox;
static PyObject *__pyx_n_s_nntoolbox_utils;
static PyObject *__pyx_n_u_nom;
static PyObject *__pyx_n_s_nonASCIICharsConvert;
static PyObject *__pyx_n_s_nrow;
static PyObject *__pyx_n_s_numlist;
static PyObject *__pyx_n_s_ok;
static PyObject *__pyx_n_s_open;
static PyObject *__pyx_n_s_option;
static PyObject *__pyx_n_s_os;
static PyObject *__pyx_n_s_otherlist;
static PyObject *__pyx_n_s_path;
static PyObject *__pyx_n_s_pop;
static PyObject *__pyx_n_s_print;
static PyObject *__pyx_n_s_prlist;
static PyObject *__pyx_n_s_propertyIndex;
static PyObject *__pyx_n_u_q;
static PyObject *__pyx_kp_u_qm_d;
static PyObject *__pyx_kp_u_qp_d;
static PyObject *__pyx_n_s_quotechar;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_u_rb;
static PyObject *__pyx_n_s_re;
static PyObject *__pyx_n_s_read;
static PyObject *__pyx_n_s_reader;
static PyObject *__pyx_n_s_readline;
static PyObject *__pyx_n_s_readoption;
static PyObject *__pyx_n_s_replace;
static PyObject *__pyx_n_s_res;
static PyObject *__pyx_kp_u_res_03d_gmm;
static PyObject *__pyx_kp_u_res_03d_gmx;
static PyObject *__pyx_n_u_resampling;
static PyObject *__pyx_n_s_reshash;
static PyObject *__pyx_n_s_reslong;
static PyObject *__pyx_n_s_resst;
static PyObject *__pyx_n_s_rg;
static PyObject *__pyx_n_s_rjust;
static PyObject *__pyx_n_s_row;
static PyObject *__pyx_n_s_row2;
static PyObject *__pyx_n_s_rr;
static PyObject *__pyx_kp_u_s;
static PyObject *__pyx_kp_u_sN;
static PyObject *__pyx_n_s_seek;
static PyObject *__pyx_n_s_sep;
static PyObject *__pyx_n_s_short;
static PyObject *__pyx_n_s_sindex;
static PyObject *__pyx_n_s_six;
static PyObject *__pyx_n_s_skipline;
static PyObject *__pyx_n_u_smi;
static PyObject *__pyx_n_s_smileIndex;
static PyObject *__pyx_n_s_smiletk;
static PyObject *__pyx_n_s_sniff;
static PyObject *__pyx_n_s_sniffFile;
static PyObject *__pyx_n_s_source;
static PyObject *__pyx_n_s_source2;
static PyObject *__pyx_n_s_split;
static PyObject *__pyx_n_s_splitext;
static PyObject *__pyx_n_s_splitindexedname;
static PyObject *__pyx_n_s_st;
static PyObject *__pyx_n_s_startswith;
static PyObject *__pyx_n_u_stddev;
static PyObject *__pyx_n_s_string_types;
static PyObject *__pyx_n_s_strip;
static PyObject *__pyx_n_s_structkeys;
static PyObject *__pyx_n_s_structkeysgradeless;
static PyObject *__pyx_n_s_structkeysgradelessshort;
static PyObject *__pyx_n_s_structkeysshort;
static PyObject *__pyx_n_u_student;
static PyObject *__pyx_n_s_sub;
static PyObject *__pyx_n_s_suggested;
static PyObject *__pyx_n_s_symbolFromNodeName;
static PyObject *__pyx_n_s_sys;
static PyObject *__pyx_n_s_tb;
static PyObject *__pyx_n_s_temp;
static PyObject *__pyx_n_s_tempkeys;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_test_2;
static PyObject *__pyx_n_s_threading;
static PyObject *__pyx_n_s_time;
static PyObject *__pyx_n_s_tmpl;
static PyObject *__pyx_n_s_tmplfile;
static PyObject *__pyx_n_s_toLong;
static PyObject *__pyx_n_s_toolbox;
static PyObject *__pyx_n_s_tt;
static PyObject *__pyx_n_s_val;
static PyObject *__pyx_n_s_valint;
static PyObject *__pyx_n_s_vallo;
static PyObject *__pyx_n_s_valst;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_value2;
static PyObject *__pyx_n_s_version;
static PyObject *__pyx_n_s_weightFile;
static PyObject *__pyx_n_s_weightTmpl;
static PyObject *__pyx_kp_u_weight_03d;
static PyObject *__pyx_n_u_weights;
static PyObject *__pyx_n_s_zip;
static PyObject *__pyx_lambda_funcdef_8metaphor_7chem_gm_4core_7gmutils_lambda(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_55__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_readoption(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_argv, PyObject *__pyx_v_option, PyObject *__pyx_v_default); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_2nonASCIICharsConvert(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_Chaine); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_4analyseProjectName(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_source); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_6tmplfile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tmpl, PyObject *__pyx_v_index, PyObject *__pyx_v_directory); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_8gmxFileName(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index, PyObject *__pyx_v_directory); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_10getConfigHash(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_config, PyObject *__pyx_v_full, PyObject *__pyx_v_hiddenout); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_12getConfigString(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_atomlist, PyObject *__pyx_v_connectivities, PyObject *__pyx_v_central, PyObject *__pyx_v_classif, PyObject *__pyx_v_hidden, PyObject *__pyx_v_fullH, PyObject *__pyx_v_short); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_14ReverseConfigString2String(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_configstr); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_16ReverseConfigString(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_configstr, PyObject *__pyx_v_toLong); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_18module2short(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_module); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_20leftjustify(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_source, PyObject *__pyx_v_lens); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_22fullsize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_smiletk); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_24findinlist(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lst, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_26chargekey(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_islong); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_28gradekey(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index, PyObject *__pyx_v_islong); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_30isokey(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index, PyObject *__pyx_v_islong); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_32chikey(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index, PyObject *__pyx_v_islong); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_34cyclekey(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index, PyObject *__pyx_v_islong); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_36connectdefault(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_full_0); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_38symbolFromNodeName(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_40sniffFile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_42getcsvdelimiter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_suggested, PyObject *__pyx_v_quotechar, PyObject *__pyx_v_nrow); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_44isNum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_46floatex(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_keppexcept); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_48getParameterListFomFile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_weightFile); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_50formatted(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_decimal, PyObject *__pyx_v_length); /* proto */
static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_52splitindexedname(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name); /* proto */
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_255;
static PyObject *__pyx_int_1024;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_slice__2;
static PyObject *__pyx_slice__6;
static PyObject *__pyx_slice__9;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__8;
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__27;
static PyObject *__pyx_slice__28;
static PyObject *__pyx_slice__29;
static PyObject *__pyx_slice__30;
static PyObject *__pyx_slice__31;
static PyObject *__pyx_slice__32;
static PyObject *__pyx_slice__33;
static PyObject *__pyx_slice__34;
static PyObject *__pyx_slice__35;
static PyObject *__pyx_slice__36;
static PyObject *__pyx_slice__37;
static PyObject *__pyx_slice__38;
static PyObject *__pyx_slice__39;
static PyObject *__pyx_slice__53;
static PyObject *__pyx_slice__54;
static PyObject *__pyx_slice__57;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__40;
static PyObject *__pyx_tuple__41;
static PyObject *__pyx_tuple__42;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__52;
static PyObject *__pyx_tuple__55;
static PyObject *__pyx_tuple__56;
static PyObject *__pyx_tuple__59;
static PyObject *__pyx_tuple__60;
static PyObject *__pyx_tuple__62;
static PyObject *__pyx_tuple__63;
static PyObject *__pyx_tuple__64;
static PyObject *__pyx_tuple__65;
static PyObject *__pyx_tuple__66;
static PyObject *__pyx_tuple__67;
static PyObject *__pyx_tuple__71;
static PyObject *__pyx_tuple__72;
static PyObject *__pyx_tuple__74;
static PyObject *__pyx_tuple__75;
static PyObject *__pyx_tuple__76;
static PyObject *__pyx_tuple__77;
static PyObject *__pyx_tuple__79;
static PyObject *__pyx_tuple__81;
static PyObject *__pyx_tuple__82;
static PyObject *__pyx_tuple__83;
static PyObject *__pyx_tuple__85;
static PyObject *__pyx_tuple__87;
static PyObject *__pyx_tuple__89;
static PyObject *__pyx_tuple__91;
static PyObject *__pyx_tuple__92;
static PyObject *__pyx_tuple__94;
static PyObject *__pyx_tuple__95;
static PyObject *__pyx_tuple__97;
static PyObject *__pyx_tuple__98;
static PyObject *__pyx_tuple__100;
static PyObject *__pyx_tuple__101;
static PyObject *__pyx_tuple__103;
static PyObject *__pyx_tuple__105;
static PyObject *__pyx_tuple__106;
static PyObject *__pyx_tuple__108;
static PyObject *__pyx_tuple__110;
static PyObject *__pyx_tuple__112;
static PyObject *__pyx_tuple__114;
static PyObject *__pyx_tuple__116;
static PyObject *__pyx_tuple__117;
static PyObject *__pyx_tuple__119;
static PyObject *__pyx_tuple__120;
static PyObject *__pyx_tuple__122;
static PyObject *__pyx_tuple__123;
static PyObject *__pyx_tuple__125;
static PyObject *__pyx_tuple__126;
static PyObject *__pyx_tuple__128;
static PyObject *__pyx_tuple__129;
static PyObject *__pyx_tuple__130;
static PyObject *__pyx_tuple__131;
static PyObject *__pyx_tuple__132;
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__142;
static PyObject *__pyx_tuple__143;
static PyObject *__pyx_tuple__145;
static PyObject *__pyx_tuple__147;
static PyObject *__pyx_tuple__148;
static PyObject *__pyx_tuple__150;
static PyObject *__pyx_tuple__152;
static PyObject *__pyx_tuple__153;
static PyObject *__pyx_codeobj__84;
static PyObject *__pyx_codeobj__86;
static PyObject *__pyx_codeobj__88;
static PyObject *__pyx_codeobj__90;
static PyObject *__pyx_codeobj__93;
static PyObject *__pyx_codeobj__96;
static PyObject *__pyx_codeobj__99;
static PyObject *__pyx_codeobj__102;
static PyObject *__pyx_codeobj__104;
static PyObject *__pyx_codeobj__107;
static PyObject *__pyx_codeobj__109;
static PyObject *__pyx_codeobj__111;
static PyObject *__pyx_codeobj__113;
static PyObject *__pyx_codeobj__115;
static PyObject *__pyx_codeobj__118;
static PyObject *__pyx_codeobj__121;
static PyObject *__pyx_codeobj__124;
static PyObject *__pyx_codeobj__127;
static PyObject *__pyx_codeobj__134;
static PyObject *__pyx_codeobj__137;
static PyObject *__pyx_codeobj__139;
static PyObject *__pyx_codeobj__141;
static PyObject *__pyx_codeobj__144;
static PyObject *__pyx_codeobj__146;
static PyObject *__pyx_codeobj__149;
static PyObject *__pyx_codeobj__151;
static PyObject *__pyx_codeobj__154;
/* Late includes */

/* "metaphor/chem_gm/core/gmutils.py":468
 *     structkeysgradelessshort
 * 
 * connectdef = defaultdict(lambda: -1, {val: 0 for val in structkeysgradeless})             # <<<<<<<<<<<<<<
 * 
 * def connectdefault(full_0=False):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_54lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_54lambda = {"lambda", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_54lambda, METH_NOARGS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_54lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_8metaphor_7chem_gm_4core_7gmutils_lambda(__pyx_self);

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

static PyObject *__pyx_lambda_funcdef_8metaphor_7chem_gm_4core_7gmutils_lambda(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_neg_1);
  __pyx_r = __pyx_int_neg_1;
  goto __pyx_L0;

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

/* "metaphor/chem_gm/core/gmutils.py":127
 * #     return dico
 * 
 * def readoption(argv=[], option="", default=0):             # <<<<<<<<<<<<<<
 *     rg = default
 *     if option in argv:
 */

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_55__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(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_argv);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_argv);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_argv);
  __Pyx_INCREF(((PyObject*)__pyx_kp_u_));
  __Pyx_GIVEREF(((PyObject*)__pyx_kp_u_));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject*)__pyx_kp_u_));
  __Pyx_INCREF(((PyObject *)__pyx_int_0));
  __Pyx_GIVEREF(((PyObject *)__pyx_int_0));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_int_0));
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __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.gmutils.__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_7gmutils_1readoption(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_1readoption = {"readoption", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_1readoption, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_1readoption(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_argv = 0;
  PyObject *__pyx_v_option = 0;
  PyObject *__pyx_v_default = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("readoption (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_argv,&__pyx_n_s_option,&__pyx_n_s_default,0};
    PyObject* values[3] = {0,0,0};
    __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
    values[0] = __pyx_dynamic_args->__pyx_arg_argv;
    values[1] = ((PyObject *)((PyObject*)__pyx_kp_u_));
    values[2] = ((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  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_argv);
          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_option);
          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_default);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "readoption") < 0)) __PYX_ERR(0, 127, __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);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_argv = values[0];
    __pyx_v_option = values[1];
    __pyx_v_default = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("readoption", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 127, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.readoption", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_readoption(__pyx_self, __pyx_v_argv, __pyx_v_option, __pyx_v_default);

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_readoption(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_argv, PyObject *__pyx_v_option, PyObject *__pyx_v_default) {
  PyObject *__pyx_v_rg = NULL;
  PyObject *__pyx_v_nn = 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;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("readoption", 0);

  /* "metaphor/chem_gm/core/gmutils.py":128
 * 
 * def readoption(argv=[], option="", default=0):
 *     rg = default             # <<<<<<<<<<<<<<
 *     if option in argv:
 *         nn = argv.index(option)
 */
  __Pyx_INCREF(__pyx_v_default);
  __pyx_v_rg = __pyx_v_default;

  /* "metaphor/chem_gm/core/gmutils.py":129
 * def readoption(argv=[], option="", default=0):
 *     rg = default
 *     if option in argv:             # <<<<<<<<<<<<<<
 *         nn = argv.index(option)
 *         try:
 */
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_option, __pyx_v_argv, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 129, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "metaphor/chem_gm/core/gmutils.py":130
 *     rg = default
 *     if option in argv:
 *         nn = argv.index(option)             # <<<<<<<<<<<<<<
 *         try:
 *             rg = int(argv[nn + 1])
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_argv, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 130, __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_option); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __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_option};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __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_option};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __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, 130, __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_option);
        __Pyx_GIVEREF(__pyx_v_option);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_option);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __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_v_nn = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":131
 *     if option in argv:
 *         nn = argv.index(option)
 *         try:             # <<<<<<<<<<<<<<
 *             rg = int(argv[nn + 1])
 *         except:
 */
    {
      __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:*/ {

        /* "metaphor/chem_gm/core/gmutils.py":132
 *         nn = argv.index(option)
 *         try:
 *             rg = int(argv[nn + 1])             # <<<<<<<<<<<<<<
 *         except:
 *             rg = default
 */
        __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_nn, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 132, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_argv, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 132, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 132, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF_SET(__pyx_v_rg, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "metaphor/chem_gm/core/gmutils.py":131
 *     if option in argv:
 *         nn = argv.index(option)
 *         try:             # <<<<<<<<<<<<<<
 *             rg = int(argv[nn + 1])
 *         except:
 */
      }
      __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_L9_try_end;
      __pyx_L4_error:;
      __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;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":133
 *         try:
 *             rg = int(argv[nn + 1])
 *         except:             # <<<<<<<<<<<<<<
 *             rg = default
 *     return rg
 */
      /*except:*/ {
        __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.readoption", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 133, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_t_6);

        /* "metaphor/chem_gm/core/gmutils.py":134
 *             rg = int(argv[nn + 1])
 *         except:
 *             rg = default             # <<<<<<<<<<<<<<
 *     return rg
 * 
 */
        __Pyx_INCREF(__pyx_v_default);
        __Pyx_DECREF_SET(__pyx_v_rg, __pyx_v_default);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L5_exception_handled;
      }
      __pyx_L6_except_error:;

      /* "metaphor/chem_gm/core/gmutils.py":131
 *     if option in argv:
 *         nn = argv.index(option)
 *         try:             # <<<<<<<<<<<<<<
 *             rg = int(argv[nn + 1])
 *         except:
 */
      __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_L5_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_L9_try_end:;
    }

    /* "metaphor/chem_gm/core/gmutils.py":129
 * def readoption(argv=[], option="", default=0):
 *     rg = default
 *     if option in argv:             # <<<<<<<<<<<<<<
 *         nn = argv.index(option)
 *         try:
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":135
 *         except:
 *             rg = default
 *     return rg             # <<<<<<<<<<<<<<
 * 
 * def nonASCIICharsConvert(Chaine):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_rg);
  __pyx_r = __pyx_v_rg;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmutils.py":127
 * #     return dico
 * 
 * def readoption(argv=[], option="", default=0):             # <<<<<<<<<<<<<<
 *     rg = default
 *     if option in argv:
 */

  /* 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_6);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.readoption", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rg);
  __Pyx_XDECREF(__pyx_v_nn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmutils.py":137
 *     return rg
 * 
 * def nonASCIICharsConvert(Chaine):             # <<<<<<<<<<<<<<
 *     lst = []
 *     for c in Chaine:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_3nonASCIICharsConvert(PyObject *__pyx_self, PyObject *__pyx_v_Chaine); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_3nonASCIICharsConvert = {"nonASCIICharsConvert", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_3nonASCIICharsConvert, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_3nonASCIICharsConvert(PyObject *__pyx_self, PyObject *__pyx_v_Chaine) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("nonASCIICharsConvert (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_2nonASCIICharsConvert(__pyx_self, ((PyObject *)__pyx_v_Chaine));

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_2nonASCIICharsConvert(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_Chaine) {
  PyObject *__pyx_v_lst = NULL;
  PyObject *__pyx_v_c = NULL;
  long __pyx_v_nn;
  PyObject *__pyx_v_st = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  long __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("nonASCIICharsConvert", 0);

  /* "metaphor/chem_gm/core/gmutils.py":138
 * 
 * def nonASCIICharsConvert(Chaine):
 *     lst = []             # <<<<<<<<<<<<<<
 *     for c in Chaine:
 *         nn = ord(c)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_lst = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":139
 * def nonASCIICharsConvert(Chaine):
 *     lst = []
 *     for c in Chaine:             # <<<<<<<<<<<<<<
 *         nn = ord(c)
 *         if 0 < nn < 128:
 */
  if (likely(PyList_CheckExact(__pyx_v_Chaine)) || PyTuple_CheckExact(__pyx_v_Chaine)) {
    __pyx_t_1 = __pyx_v_Chaine; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_Chaine); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      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_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 139, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= 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_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 139, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__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, 139, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":140
 *     lst = []
 *     for c in Chaine:
 *         nn = ord(c)             # <<<<<<<<<<<<<<
 *         if 0 < nn < 128:
 *             lst.append(c)
 */
    __pyx_t_5 = __Pyx_PyObject_Ord(__pyx_v_c); if (unlikely(__pyx_t_5 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 140, __pyx_L1_error)
    __pyx_v_nn = __pyx_t_5;

    /* "metaphor/chem_gm/core/gmutils.py":141
 *     for c in Chaine:
 *         nn = ord(c)
 *         if 0 < nn < 128:             # <<<<<<<<<<<<<<
 *             lst.append(c)
 *         else:
 */
    __pyx_t_6 = (0 < __pyx_v_nn);
    if (__pyx_t_6) {
      __pyx_t_6 = (__pyx_v_nn < 0x80);
    }
    __pyx_t_7 = (__pyx_t_6 != 0);
    if (__pyx_t_7) {

      /* "metaphor/chem_gm/core/gmutils.py":142
 *         nn = ord(c)
 *         if 0 < nn < 128:
 *             lst.append(c)             # <<<<<<<<<<<<<<
 *         else:
 *             st = hex(nn)
 */
      __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_lst, __pyx_v_c); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 142, __pyx_L1_error)

      /* "metaphor/chem_gm/core/gmutils.py":141
 *     for c in Chaine:
 *         nn = ord(c)
 *         if 0 < nn < 128:             # <<<<<<<<<<<<<<
 *             lst.append(c)
 *         else:
 */
      goto __pyx_L5;
    }

    /* "metaphor/chem_gm/core/gmutils.py":144
 *             lst.append(c)
 *         else:
 *             st = hex(nn)             # <<<<<<<<<<<<<<
 *             lst.append('\\%s'%st[1:])
 *     return "".join(lst)
 */
    /*else*/ {
      __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_nn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_v_st, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":145
 *         else:
 *             st = hex(nn)
 *             lst.append('\\%s'%st[1:])             # <<<<<<<<<<<<<<
 *     return "".join(lst)
 * 
 */
      __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_st, 1, 0, NULL, NULL, &__pyx_slice__2, 1, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_s, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_lst, __pyx_t_4); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 145, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_L5:;

    /* "metaphor/chem_gm/core/gmutils.py":139
 * def nonASCIICharsConvert(Chaine):
 *     lst = []
 *     for c in Chaine:             # <<<<<<<<<<<<<<
 *         nn = ord(c)
 *         if 0 < nn < 128:
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":146
 *             st = hex(nn)
 *             lst.append('\\%s'%st[1:])
 *     return "".join(lst)             # <<<<<<<<<<<<<<
 * 
 * def analyseProjectName(source):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyUnicode_Join(__pyx_kp_u_, __pyx_v_lst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmutils.py":137
 *     return rg
 * 
 * def nonASCIICharsConvert(Chaine):             # <<<<<<<<<<<<<<
 *     lst = []
 *     for c in Chaine:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.nonASCIICharsConvert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_lst);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_st);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmutils.py":148
 *     return "".join(lst)
 * 
 * def analyseProjectName(source):             # <<<<<<<<<<<<<<
 *     nc = -1
 *     try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_5analyseProjectName(PyObject *__pyx_self, PyObject *__pyx_v_source); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_5analyseProjectName = {"analyseProjectName", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_5analyseProjectName, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_5analyseProjectName(PyObject *__pyx_self, PyObject *__pyx_v_source) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("analyseProjectName (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_4analyseProjectName(__pyx_self, ((PyObject *)__pyx_v_source));

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_4analyseProjectName(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_source) {
  PyObject *__pyx_v_nc = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_nn = NULL;
  PyObject *__pyx_v_lst = NULL;
  PyObject *__pyx_v_source2 = NULL;
  PyObject *__pyx_v_prlist = NULL;
  PyObject *__pyx_v_already = NULL;
  PyObject *__pyx_v_lres = NULL;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_v_inn = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_v_cond = NULL;
  PyObject *__pyx_v_ind = 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;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  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 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  __Pyx_RefNannySetupContext("analyseProjectName", 0);

  /* "metaphor/chem_gm/core/gmutils.py":149
 * 
 * def analyseProjectName(source):
 *     nc = -1             # <<<<<<<<<<<<<<
 *     try:
 *         nn = source.index('-')
 */
  __Pyx_INCREF(__pyx_int_neg_1);
  __pyx_v_nc = __pyx_int_neg_1;

  /* "metaphor/chem_gm/core/gmutils.py":150
 * def analyseProjectName(source):
 *     nc = -1
 *     try:             # <<<<<<<<<<<<<<
 *         nn = source.index('-')
 *         lst = source.split('-')
 */
  {
    __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/gmutils.py":151
 *     nc = -1
 *     try:
 *         nn = source.index('-')             # <<<<<<<<<<<<<<
 *         lst = source.split('-')
 *         source2 = "-".join(lst[1:])
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_nn = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":152
 *     try:
 *         nn = source.index('-')
 *         lst = source.split('-')             # <<<<<<<<<<<<<<
 *         source2 = "-".join(lst[1:])
 *     except:
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 152, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 152, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_lst = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":153
 *         nn = source.index('-')
 *         lst = source.split('-')
 *         source2 = "-".join(lst[1:])             # <<<<<<<<<<<<<<
 *     except:
 *         source2 = source
 */
      __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_lst, 1, 0, NULL, NULL, &__pyx_slice__6, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 153, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyUnicode_Join(__pyx_kp_u__3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 153, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_source2 = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":150
 * def analyseProjectName(source):
 *     nc = -1
 *     try:             # <<<<<<<<<<<<<<
 *         nn = source.index('-')
 *         lst = source.split('-')
 */
    }
    __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_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":154
 *         lst = source.split('-')
 *         source2 = "-".join(lst[1:])
 *     except:             # <<<<<<<<<<<<<<
 *         source2 = source
 *     #lst = source.split('-')
 */
    /*except:*/ {
      __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.analyseProjectName", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 154, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);

      /* "metaphor/chem_gm/core/gmutils.py":155
 *         source2 = "-".join(lst[1:])
 *     except:
 *         source2 = source             # <<<<<<<<<<<<<<
 *     #lst = source.split('-')
 *     #source2 =
 */
      __Pyx_INCREF(__pyx_v_source);
      __Pyx_XDECREF_SET(__pyx_v_source2, __pyx_v_source);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;

    /* "metaphor/chem_gm/core/gmutils.py":150
 * def analyseProjectName(source):
 *     nc = -1
 *     try:             # <<<<<<<<<<<<<<
 *         nn = source.index('-')
 *         lst = source.split('-')
 */
    __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/gmutils.py":158
 *     #lst = source.split('-')
 *     #source2 =
 *     prlist = source2.lower().split('_')[-1::-1]             # <<<<<<<<<<<<<<
 *     already = []
 *     lres = []
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_source2, __pyx_n_s_lower); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __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_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 158, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 158, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_slice__9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_prlist = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":159
 *     #source2 =
 *     prlist = source2.lower().split('_')[-1::-1]
 *     already = []             # <<<<<<<<<<<<<<
 *     lres = []
 *     for val in prlist:
 */
  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_already = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":160
 *     prlist = source2.lower().split('_')[-1::-1]
 *     already = []
 *     lres = []             # <<<<<<<<<<<<<<
 *     for val in prlist:
 *         if 'n' in val.lower():
 */
  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_lres = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":161
 *     already = []
 *     lres = []
 *     for val in prlist:             # <<<<<<<<<<<<<<
 *         if 'n' in val.lower():
 *             inn = val.lower().index('n') + 1
 */
  if (likely(PyList_CheckExact(__pyx_v_prlist)) || PyTuple_CheckExact(__pyx_v_prlist)) {
    __pyx_t_4 = __pyx_v_prlist; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_prlist); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 161, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_7 >= 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_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 161, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 161, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_7 >= 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_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 161, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 161, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_8(__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, 161, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":162
 *     lres = []
 *     for val in prlist:
 *         if 'n' in val.lower():             # <<<<<<<<<<<<<<
 *             inn = val.lower().index('n') + 1
 *             if (inn != 1) and val[inn:]:
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_lower); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 162, __pyx_L1_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_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 162, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else {
      __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 162, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_n, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 162, __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/gmutils.py":163
 *     for val in prlist:
 *         if 'n' in val.lower():
 *             inn = val.lower().index('n') + 1             # <<<<<<<<<<<<<<
 *             if (inn != 1) and val[inn:]:
 *                 lres.append(val[inn:])
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_lower); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 163, __pyx_L1_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_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 163, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else {
        __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 163, __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_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_6, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_inn, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":164
 *         if 'n' in val.lower():
 *             inn = val.lower().index('n') + 1
 *             if (inn != 1) and val[inn:]:             # <<<<<<<<<<<<<<
 *                 lres.append(val[inn:])
 *                 lres.append(val[:inn])
 */
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_inn, __pyx_int_1, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 164, __pyx_L1_error)
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 164, __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_L15_bool_binop_done;
      }
      __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_val, 0, 0, &__pyx_v_inn, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 164, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 164, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_11 = __pyx_t_10;
      __pyx_L15_bool_binop_done:;
      if (__pyx_t_11) {

        /* "metaphor/chem_gm/core/gmutils.py":165
 *             inn = val.lower().index('n') + 1
 *             if (inn != 1) and val[inn:]:
 *                 lres.append(val[inn:])             # <<<<<<<<<<<<<<
 *                 lres.append(val[:inn])
 *             else:
 */
        __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_val, 0, 0, &__pyx_v_inn, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 165, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_lres, __pyx_t_5); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 165, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "metaphor/chem_gm/core/gmutils.py":166
 *             if (inn != 1) and val[inn:]:
 *                 lres.append(val[inn:])
 *                 lres.append(val[:inn])             # <<<<<<<<<<<<<<
 *             else:
 *                 lres.append(val)
 */
        __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_val, 0, 0, NULL, &__pyx_v_inn, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 166, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_lres, __pyx_t_5); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 166, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "metaphor/chem_gm/core/gmutils.py":164
 *         if 'n' in val.lower():
 *             inn = val.lower().index('n') + 1
 *             if (inn != 1) and val[inn:]:             # <<<<<<<<<<<<<<
 *                 lres.append(val[inn:])
 *                 lres.append(val[:inn])
 */
        goto __pyx_L14;
      }

      /* "metaphor/chem_gm/core/gmutils.py":168
 *                 lres.append(val[:inn])
 *             else:
 *                 lres.append(val)             # <<<<<<<<<<<<<<
 *         else:
 *             lres.append(val)
 */
      /*else*/ {
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_lres, __pyx_v_val); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 168, __pyx_L1_error)
      }
      __pyx_L14:;

      /* "metaphor/chem_gm/core/gmutils.py":162
 *     lres = []
 *     for val in prlist:
 *         if 'n' in val.lower():             # <<<<<<<<<<<<<<
 *             inn = val.lower().index('n') + 1
 *             if (inn != 1) and val[inn:]:
 */
      goto __pyx_L13;
    }

    /* "metaphor/chem_gm/core/gmutils.py":170
 *                 lres.append(val)
 *         else:
 *             lres.append(val)             # <<<<<<<<<<<<<<
 *     prlist = lres
 * 
 */
    /*else*/ {
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_lres, __pyx_v_val); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 170, __pyx_L1_error)
    }
    __pyx_L13:;

    /* "metaphor/chem_gm/core/gmutils.py":161
 *     already = []
 *     lres = []
 *     for val in prlist:             # <<<<<<<<<<<<<<
 *         if 'n' in val.lower():
 *             inn = val.lower().index('n') + 1
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":171
 *         else:
 *             lres.append(val)
 *     prlist = lres             # <<<<<<<<<<<<<<
 * 
 *     res = {"central":3, "mol1":True, "grds": -1}
 */
  __Pyx_INCREF(__pyx_v_lres);
  __Pyx_DECREF_SET(__pyx_v_prlist, __pyx_v_lres);

  /* "metaphor/chem_gm/core/gmutils.py":173
 *     prlist = lres
 * 
 *     res = {"central":3, "mol1":True, "grds": -1}             # <<<<<<<<<<<<<<
 *     for index, val in enumerate(prlist):
 *         if (val[:4] == "ccls") and not ("ccls" in already):
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_central, __pyx_int_3) < 0) __PYX_ERR(0, 173, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_mol1, Py_True) < 0) __PYX_ERR(0, 173, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_grds, __pyx_int_neg_1) < 0) __PYX_ERR(0, 173, __pyx_L1_error)
  __pyx_v_res = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":174
 * 
 *     res = {"central":3, "mol1":True, "grds": -1}
 *     for index, val in enumerate(prlist):             # <<<<<<<<<<<<<<
 *         if (val[:4] == "ccls") and not ("ccls" in already):
 *             already.append("ccls")
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_4 = __pyx_int_0;
  if (likely(PyList_CheckExact(__pyx_v_prlist)) || PyTuple_CheckExact(__pyx_v_prlist)) {
    __pyx_t_5 = __pyx_v_prlist; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_prlist); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 174, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_5))) {
        if (__pyx_t_7 >= 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_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 174, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 174, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_7 >= 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_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 174, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 174, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_8(__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, 174, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_4);
    __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4);
    __pyx_t_4 = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":175
 *     res = {"central":3, "mol1":True, "grds": -1}
 *     for index, val in enumerate(prlist):
 *         if (val[:4] == "ccls") and not ("ccls" in already):             # <<<<<<<<<<<<<<
 *             already.append("ccls")
 *             res["ccl"] = val[4:]
 */
    __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_val, 0, 4, NULL, NULL, &__pyx_slice__11, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ccls, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 175, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_10) {
    } else {
      __pyx_t_11 = __pyx_t_10;
      goto __pyx_L20_bool_binop_done;
    }
    __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_ccls, __pyx_v_already, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 175, __pyx_L1_error)
    __pyx_t_13 = (__pyx_t_10 != 0);
    __pyx_t_11 = __pyx_t_13;
    __pyx_L20_bool_binop_done:;
    if (__pyx_t_11) {

      /* "metaphor/chem_gm/core/gmutils.py":176
 *     for index, val in enumerate(prlist):
 *         if (val[:4] == "ccls") and not ("ccls" in already):
 *             already.append("ccls")             # <<<<<<<<<<<<<<
 *             res["ccl"] = val[4:]
 *         elif (val[:4] == "grds") and not ("grds" in already):
 */
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_already, __pyx_n_u_ccls); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 176, __pyx_L1_error)

      /* "metaphor/chem_gm/core/gmutils.py":177
 *         if (val[:4] == "ccls") and not ("ccls" in already):
 *             already.append("ccls")
 *             res["ccl"] = val[4:]             # <<<<<<<<<<<<<<
 *         elif (val[:4] == "grds") and not ("grds" in already):
 *             already.append("grds")
 */
      __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_val, 4, 0, NULL, NULL, &__pyx_slice__12, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(PyDict_SetItem(__pyx_v_res, __pyx_n_u_ccl, __pyx_t_6) < 0)) __PYX_ERR(0, 177, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":175
 *     res = {"central":3, "mol1":True, "grds": -1}
 *     for index, val in enumerate(prlist):
 *         if (val[:4] == "ccls") and not ("ccls" in already):             # <<<<<<<<<<<<<<
 *             already.append("ccls")
 *             res["ccl"] = val[4:]
 */
      goto __pyx_L19;
    }

    /* "metaphor/chem_gm/core/gmutils.py":178
 *             already.append("ccls")
 *             res["ccl"] = val[4:]
 *         elif (val[:4] == "grds") and not ("grds" in already):             # <<<<<<<<<<<<<<
 *             already.append("grds")
 *             res["grds"] = val[4:]
 */
    __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_val, 0, 4, NULL, NULL, &__pyx_slice__13, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_13 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_grds, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 178, __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_L22_bool_binop_done;
    }
    __pyx_t_13 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_grds, __pyx_v_already, Py_NE)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 178, __pyx_L1_error)
    __pyx_t_10 = (__pyx_t_13 != 0);
    __pyx_t_11 = __pyx_t_10;
    __pyx_L22_bool_binop_done:;
    if (__pyx_t_11) {

      /* "metaphor/chem_gm/core/gmutils.py":179
 *             res["ccl"] = val[4:]
 *         elif (val[:4] == "grds") and not ("grds" in already):
 *             already.append("grds")             # <<<<<<<<<<<<<<
 *             res["grds"] = val[4:]
 *         elif (val[:3] == "mol") and not ("mol" in already):
 */
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_already, __pyx_n_u_grds); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 179, __pyx_L1_error)

      /* "metaphor/chem_gm/core/gmutils.py":180
 *         elif (val[:4] == "grds") and not ("grds" in already):
 *             already.append("grds")
 *             res["grds"] = val[4:]             # <<<<<<<<<<<<<<
 *         elif (val[:3] == "mol") and not ("mol" in already):
 *             res["mol1"] = int(val[3:])
 */
      __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_val, 4, 0, NULL, NULL, &__pyx_slice__14, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(PyDict_SetItem(__pyx_v_res, __pyx_n_u_grds, __pyx_t_6) < 0)) __PYX_ERR(0, 180, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":178
 *             already.append("ccls")
 *             res["ccl"] = val[4:]
 *         elif (val[:4] == "grds") and not ("grds" in already):             # <<<<<<<<<<<<<<
 *             already.append("grds")
 *             res["grds"] = val[4:]
 */
      goto __pyx_L19;
    }

    /* "metaphor/chem_gm/core/gmutils.py":181
 *             already.append("grds")
 *             res["grds"] = val[4:]
 *         elif (val[:3] == "mol") and not ("mol" in already):             # <<<<<<<<<<<<<<
 *             res["mol1"] = int(val[3:])
 *             already.append("mol")
 */
    __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_val, 0, 3, NULL, NULL, &__pyx_slice__15, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_mol, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 181, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_10) {
    } else {
      __pyx_t_11 = __pyx_t_10;
      goto __pyx_L24_bool_binop_done;
    }
    __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_mol, __pyx_v_already, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 181, __pyx_L1_error)
    __pyx_t_13 = (__pyx_t_10 != 0);
    __pyx_t_11 = __pyx_t_13;
    __pyx_L24_bool_binop_done:;
    if (__pyx_t_11) {

      /* "metaphor/chem_gm/core/gmutils.py":182
 *             res["grds"] = val[4:]
 *         elif (val[:3] == "mol") and not ("mol" in already):
 *             res["mol1"] = int(val[3:])             # <<<<<<<<<<<<<<
 *             already.append("mol")
 *         elif (val[:3] == "ccl"):
 */
      __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_val, 3, 0, NULL, NULL, &__pyx_slice__16, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 182, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = __Pyx_PyNumber_Int(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 182, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(PyDict_SetItem(__pyx_v_res, __pyx_n_u_mol1, __pyx_t_9) < 0)) __PYX_ERR(0, 182, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":183
 *         elif (val[:3] == "mol") and not ("mol" in already):
 *             res["mol1"] = int(val[3:])
 *             already.append("mol")             # <<<<<<<<<<<<<<
 *         elif (val[:3] == "ccl"):
 *             res["ccl"] = val[3:]
 */
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_already, __pyx_n_u_mol); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 183, __pyx_L1_error)

      /* "metaphor/chem_gm/core/gmutils.py":181
 *             already.append("grds")
 *             res["grds"] = val[4:]
 *         elif (val[:3] == "mol") and not ("mol" in already):             # <<<<<<<<<<<<<<
 *             res["mol1"] = int(val[3:])
 *             already.append("mol")
 */
      goto __pyx_L19;
    }

    /* "metaphor/chem_gm/core/gmutils.py":184
 *             res["mol1"] = int(val[3:])
 *             already.append("mol")
 *         elif (val[:3] == "ccl"):             # <<<<<<<<<<<<<<
 *             res["ccl"] = val[3:]
 *         elif (val[:3] == "grd") :
 */
    __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_val, 0, 3, NULL, NULL, &__pyx_slice__17, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_ccl, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 184, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_11) {

      /* "metaphor/chem_gm/core/gmutils.py":185
 *             already.append("mol")
 *         elif (val[:3] == "ccl"):
 *             res["ccl"] = val[3:]             # <<<<<<<<<<<<<<
 *         elif (val[:3] == "grd") :
 *             res["grd"] = val[3:]
 */
      __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_val, 3, 0, NULL, NULL, &__pyx_slice__18, 1, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (unlikely(PyDict_SetItem(__pyx_v_res, __pyx_n_u_ccl, __pyx_t_9) < 0)) __PYX_ERR(0, 185, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":184
 *             res["mol1"] = int(val[3:])
 *             already.append("mol")
 *         elif (val[:3] == "ccl"):             # <<<<<<<<<<<<<<
 *             res["ccl"] = val[3:]
 *         elif (val[:3] == "grd") :
 */
      goto __pyx_L19;
    }

    /* "metaphor/chem_gm/core/gmutils.py":186
 *         elif (val[:3] == "ccl"):
 *             res["ccl"] = val[3:]
 *         elif (val[:3] == "grd") :             # <<<<<<<<<<<<<<
 *             res["grd"] = val[3:]
 *         elif (val[:3] == "chi") and not ("chi" in already):
 */
    __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_val, 0, 3, NULL, NULL, &__pyx_slice__19, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_grd, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 186, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_11) {

      /* "metaphor/chem_gm/core/gmutils.py":187
 *             res["ccl"] = val[3:]
 *         elif (val[:3] == "grd") :
 *             res["grd"] = val[3:]             # <<<<<<<<<<<<<<
 *         elif (val[:3] == "chi") and not ("chi" in already):
 *             already.append("chi")
 */
      __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_val, 3, 0, NULL, NULL, &__pyx_slice__20, 1, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (unlikely(PyDict_SetItem(__pyx_v_res, __pyx_n_u_grd, __pyx_t_9) < 0)) __PYX_ERR(0, 187, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":186
 *         elif (val[:3] == "ccl"):
 *             res["ccl"] = val[3:]
 *         elif (val[:3] == "grd") :             # <<<<<<<<<<<<<<
 *             res["grd"] = val[3:]
 *         elif (val[:3] == "chi") and not ("chi" in already):
 */
      goto __pyx_L19;
    }

    /* "metaphor/chem_gm/core/gmutils.py":188
 *         elif (val[:3] == "grd") :
 *             res["grd"] = val[3:]
 *         elif (val[:3] == "chi") and not ("chi" in already):             # <<<<<<<<<<<<<<
 *             already.append("chi")
 *             res["chi"] = int(val[3:])
 */
    __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_val, 0, 3, NULL, NULL, &__pyx_slice__21, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_13 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_chi, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 188, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_13) {
    } else {
      __pyx_t_11 = __pyx_t_13;
      goto __pyx_L26_bool_binop_done;
    }
    __pyx_t_13 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_chi, __pyx_v_already, Py_NE)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 188, __pyx_L1_error)
    __pyx_t_10 = (__pyx_t_13 != 0);
    __pyx_t_11 = __pyx_t_10;
    __pyx_L26_bool_binop_done:;
    if (__pyx_t_11) {

      /* "metaphor/chem_gm/core/gmutils.py":189
 *             res["grd"] = val[3:]
 *         elif (val[:3] == "chi") and not ("chi" in already):
 *             already.append("chi")             # <<<<<<<<<<<<<<
 *             res["chi"] = int(val[3:])
 *         elif (val[:3] == "iso") and not ("iso" in already):
 */
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_already, __pyx_n_u_chi); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 189, __pyx_L1_error)

      /* "metaphor/chem_gm/core/gmutils.py":190
 *         elif (val[:3] == "chi") and not ("chi" in already):
 *             already.append("chi")
 *             res["chi"] = int(val[3:])             # <<<<<<<<<<<<<<
 *         elif (val[:3] == "iso") and not ("iso" in already):
 *             already.append("iso")
 */
      __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_val, 3, 0, NULL, NULL, &__pyx_slice__22, 1, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 190, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 190, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(PyDict_SetItem(__pyx_v_res, __pyx_n_u_chi, __pyx_t_6) < 0)) __PYX_ERR(0, 190, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":188
 *         elif (val[:3] == "grd") :
 *             res["grd"] = val[3:]
 *         elif (val[:3] == "chi") and not ("chi" in already):             # <<<<<<<<<<<<<<
 *             already.append("chi")
 *             res["chi"] = int(val[3:])
 */
      goto __pyx_L19;
    }

    /* "metaphor/chem_gm/core/gmutils.py":191
 *             already.append("chi")
 *             res["chi"] = int(val[3:])
 *         elif (val[:3] == "iso") and not ("iso" in already):             # <<<<<<<<<<<<<<
 *             already.append("iso")
 *             res["iso"] = int(val[3:])
 */
    __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_val, 0, 3, NULL, NULL, &__pyx_slice__23, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_iso, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 191, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_10) {
    } else {
      __pyx_t_11 = __pyx_t_10;
      goto __pyx_L28_bool_binop_done;
    }
    __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_iso, __pyx_v_already, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 191, __pyx_L1_error)
    __pyx_t_13 = (__pyx_t_10 != 0);
    __pyx_t_11 = __pyx_t_13;
    __pyx_L28_bool_binop_done:;
    if (__pyx_t_11) {

      /* "metaphor/chem_gm/core/gmutils.py":192
 *             res["chi"] = int(val[3:])
 *         elif (val[:3] == "iso") and not ("iso" in already):
 *             already.append("iso")             # <<<<<<<<<<<<<<
 *             res["iso"] = int(val[3:])
 *         elif (val[:2] == "ce") and not ("central" in  already):
 */
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_already, __pyx_n_u_iso); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 192, __pyx_L1_error)

      /* "metaphor/chem_gm/core/gmutils.py":193
 *         elif (val[:3] == "iso") and not ("iso" in already):
 *             already.append("iso")
 *             res["iso"] = int(val[3:])             # <<<<<<<<<<<<<<
 *         elif (val[:2] == "ce") and not ("central" in  already):
 *             cond = (index == 1) if ("mol" in already) else (index == 0)
 */
      __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_val, 3, 0, NULL, NULL, &__pyx_slice__24, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 193, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = __Pyx_PyNumber_Int(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 193, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(PyDict_SetItem(__pyx_v_res, __pyx_n_u_iso, __pyx_t_9) < 0)) __PYX_ERR(0, 193, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":191
 *             already.append("chi")
 *             res["chi"] = int(val[3:])
 *         elif (val[:3] == "iso") and not ("iso" in already):             # <<<<<<<<<<<<<<
 *             already.append("iso")
 *             res["iso"] = int(val[3:])
 */
      goto __pyx_L19;
    }

    /* "metaphor/chem_gm/core/gmutils.py":194
 *             already.append("iso")
 *             res["iso"] = int(val[3:])
 *         elif (val[:2] == "ce") and not ("central" in  already):             # <<<<<<<<<<<<<<
 *             cond = (index == 1) if ("mol" in already) else (index == 0)
 *             if cond:
 */
    __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_val, 0, 2, NULL, NULL, &__pyx_slice__25, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_13 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_ce, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 194, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_13) {
    } else {
      __pyx_t_11 = __pyx_t_13;
      goto __pyx_L30_bool_binop_done;
    }
    __pyx_t_13 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_central, __pyx_v_already, Py_NE)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 194, __pyx_L1_error)
    __pyx_t_10 = (__pyx_t_13 != 0);
    __pyx_t_11 = __pyx_t_10;
    __pyx_L30_bool_binop_done:;
    if (__pyx_t_11) {

      /* "metaphor/chem_gm/core/gmutils.py":195
 *             res["iso"] = int(val[3:])
 *         elif (val[:2] == "ce") and not ("central" in  already):
 *             cond = (index == 1) if ("mol" in already) else (index == 0)             # <<<<<<<<<<<<<<
 *             if cond:
 *                 nc = int(val[2:])
 */
      __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_mol, __pyx_v_already, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 195, __pyx_L1_error)
      if ((__pyx_t_11 != 0)) {
        __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 195, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_9 = __pyx_t_6;
        __pyx_t_6 = 0;
      } else {
        __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 195, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_9 = __pyx_t_6;
        __pyx_t_6 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_cond, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":196
 *         elif (val[:2] == "ce") and not ("central" in  already):
 *             cond = (index == 1) if ("mol" in already) else (index == 0)
 *             if cond:             # <<<<<<<<<<<<<<
 *                 nc = int(val[2:])
 *                 if nc > 0:
 */
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_cond); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 196, __pyx_L1_error)
      if (__pyx_t_11) {

        /* "metaphor/chem_gm/core/gmutils.py":197
 *             cond = (index == 1) if ("mol" in already) else (index == 0)
 *             if cond:
 *                 nc = int(val[2:])             # <<<<<<<<<<<<<<
 *                 if nc > 0:
 *                     res["central"] = nc
 */
        __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_val, 2, 0, NULL, NULL, &__pyx_slice__26, 1, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 197, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 197, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF_SET(__pyx_v_nc, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "metaphor/chem_gm/core/gmutils.py":198
 *             if cond:
 *                 nc = int(val[2:])
 *                 if nc > 0:             # <<<<<<<<<<<<<<
 *                     res["central"] = nc
 *                 already.append("central")
 */
        __pyx_t_6 = PyObject_RichCompare(__pyx_v_nc, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 198, __pyx_L1_error)
        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 198, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (__pyx_t_11) {

          /* "metaphor/chem_gm/core/gmutils.py":199
 *                 nc = int(val[2:])
 *                 if nc > 0:
 *                     res["central"] = nc             # <<<<<<<<<<<<<<
 *                 already.append("central")
 *         elif (val[0] == "c") and not ("central" in  already):
 */
          if (unlikely(PyDict_SetItem(__pyx_v_res, __pyx_n_u_central, __pyx_v_nc) < 0)) __PYX_ERR(0, 199, __pyx_L1_error)

          /* "metaphor/chem_gm/core/gmutils.py":198
 *             if cond:
 *                 nc = int(val[2:])
 *                 if nc > 0:             # <<<<<<<<<<<<<<
 *                     res["central"] = nc
 *                 already.append("central")
 */
        }

        /* "metaphor/chem_gm/core/gmutils.py":200
 *                 if nc > 0:
 *                     res["central"] = nc
 *                 already.append("central")             # <<<<<<<<<<<<<<
 *         elif (val[0] == "c") and not ("central" in  already):
 *             cond = (index == 1) if ("mol" in already) else (index == 0)
 */
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_already, __pyx_n_u_central); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 200, __pyx_L1_error)

        /* "metaphor/chem_gm/core/gmutils.py":196
 *         elif (val[:2] == "ce") and not ("central" in  already):
 *             cond = (index == 1) if ("mol" in already) else (index == 0)
 *             if cond:             # <<<<<<<<<<<<<<
 *                 nc = int(val[2:])
 *                 if nc > 0:
 */
      }

      /* "metaphor/chem_gm/core/gmutils.py":194
 *             already.append("iso")
 *             res["iso"] = int(val[3:])
 *         elif (val[:2] == "ce") and not ("central" in  already):             # <<<<<<<<<<<<<<
 *             cond = (index == 1) if ("mol" in already) else (index == 0)
 *             if cond:
 */
      goto __pyx_L19;
    }

    /* "metaphor/chem_gm/core/gmutils.py":201
 *                     res["central"] = nc
 *                 already.append("central")
 *         elif (val[0] == "c") and not ("central" in  already):             # <<<<<<<<<<<<<<
 *             cond = (index == 1) if ("mol" in already) else (index == 0)
 *             if cond:
 */
    __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_val, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_c, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 201, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_10) {
    } else {
      __pyx_t_11 = __pyx_t_10;
      goto __pyx_L34_bool_binop_done;
    }
    __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_central, __pyx_v_already, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 201, __pyx_L1_error)
    __pyx_t_13 = (__pyx_t_10 != 0);
    __pyx_t_11 = __pyx_t_13;
    __pyx_L34_bool_binop_done:;
    if (__pyx_t_11) {

      /* "metaphor/chem_gm/core/gmutils.py":202
 *                 already.append("central")
 *         elif (val[0] == "c") and not ("central" in  already):
 *             cond = (index == 1) if ("mol" in already) else (index == 0)             # <<<<<<<<<<<<<<
 *             if cond:
 *                 nc = int(val[1:])
 */
      __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_mol, __pyx_v_already, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 202, __pyx_L1_error)
      if ((__pyx_t_11 != 0)) {
        __pyx_t_9 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 202, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_6 = __pyx_t_9;
        __pyx_t_9 = 0;
      } else {
        __pyx_t_9 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 202, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_6 = __pyx_t_9;
        __pyx_t_9 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_cond, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":203
 *         elif (val[0] == "c") and not ("central" in  already):
 *             cond = (index == 1) if ("mol" in already) else (index == 0)
 *             if cond:             # <<<<<<<<<<<<<<
 *                 nc = int(val[1:])
 *                 if nc > 0:
 */
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_cond); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 203, __pyx_L1_error)
      if (__pyx_t_11) {

        /* "metaphor/chem_gm/core/gmutils.py":204
 *             cond = (index == 1) if ("mol" in already) else (index == 0)
 *             if cond:
 *                 nc = int(val[1:])             # <<<<<<<<<<<<<<
 *                 if nc > 0:
 *                     res["central"] = nc
 */
        __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_val, 1, 0, NULL, NULL, &__pyx_slice__27, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 204, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_9 = __Pyx_PyNumber_Int(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 204, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF_SET(__pyx_v_nc, __pyx_t_9);
        __pyx_t_9 = 0;

        /* "metaphor/chem_gm/core/gmutils.py":205
 *             if cond:
 *                 nc = int(val[1:])
 *                 if nc > 0:             # <<<<<<<<<<<<<<
 *                     res["central"] = nc
 *                 already.append("central")
 */
        __pyx_t_9 = PyObject_RichCompare(__pyx_v_nc, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 205, __pyx_L1_error)
        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 205, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (__pyx_t_11) {

          /* "metaphor/chem_gm/core/gmutils.py":206
 *                 nc = int(val[1:])
 *                 if nc > 0:
 *                     res["central"] = nc             # <<<<<<<<<<<<<<
 *                 already.append("central")
 *         elif (val[:1] == "q"): #
 */
          if (unlikely(PyDict_SetItem(__pyx_v_res, __pyx_n_u_central, __pyx_v_nc) < 0)) __PYX_ERR(0, 206, __pyx_L1_error)

          /* "metaphor/chem_gm/core/gmutils.py":205
 *             if cond:
 *                 nc = int(val[1:])
 *                 if nc > 0:             # <<<<<<<<<<<<<<
 *                     res["central"] = nc
 *                 already.append("central")
 */
        }

        /* "metaphor/chem_gm/core/gmutils.py":207
 *                 if nc > 0:
 *                     res["central"] = nc
 *                 already.append("central")             # <<<<<<<<<<<<<<
 *         elif (val[:1] == "q"): #
 *             res[val[:2]] = val[2:]
 */
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_already, __pyx_n_u_central); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 207, __pyx_L1_error)

        /* "metaphor/chem_gm/core/gmutils.py":203
 *         elif (val[0] == "c") and not ("central" in  already):
 *             cond = (index == 1) if ("mol" in already) else (index == 0)
 *             if cond:             # <<<<<<<<<<<<<<
 *                 nc = int(val[1:])
 *                 if nc > 0:
 */
      }

      /* "metaphor/chem_gm/core/gmutils.py":201
 *                     res["central"] = nc
 *                 already.append("central")
 *         elif (val[0] == "c") and not ("central" in  already):             # <<<<<<<<<<<<<<
 *             cond = (index == 1) if ("mol" in already) else (index == 0)
 *             if cond:
 */
      goto __pyx_L19;
    }

    /* "metaphor/chem_gm/core/gmutils.py":208
 *                     res["central"] = nc
 *                 already.append("central")
 *         elif (val[:1] == "q"): #             # <<<<<<<<<<<<<<
 *             res[val[:2]] = val[2:]
 *         elif (val[-1] == "n") and not ("hidden" in already):
 */
    __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_val, 0, 1, NULL, NULL, &__pyx_slice__28, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_q, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 208, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_11) {

      /* "metaphor/chem_gm/core/gmutils.py":209
 *                 already.append("central")
 *         elif (val[:1] == "q"): #
 *             res[val[:2]] = val[2:]             # <<<<<<<<<<<<<<
 *         elif (val[-1] == "n") and not ("hidden" in already):
 *             res["hidden"] = int(val[:-1])
 */
      __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_val, 2, 0, NULL, NULL, &__pyx_slice__29, 1, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 209, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_val, 0, 2, NULL, NULL, &__pyx_slice__30, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 209, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(PyDict_SetItem(__pyx_v_res, __pyx_t_6, __pyx_t_9) < 0)) __PYX_ERR(0, 209, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":208
 *                     res["central"] = nc
 *                 already.append("central")
 *         elif (val[:1] == "q"): #             # <<<<<<<<<<<<<<
 *             res[val[:2]] = val[2:]
 *         elif (val[-1] == "n") and not ("hidden" in already):
 */
      goto __pyx_L19;
    }

    /* "metaphor/chem_gm/core/gmutils.py":210
 *         elif (val[:1] == "q"): #
 *             res[val[:2]] = val[2:]
 *         elif (val[-1] == "n") and not ("hidden" in already):             # <<<<<<<<<<<<<<
 *             res["hidden"] = int(val[:-1])
 *             already.append("hidden")
 */
    __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_val, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_13 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_n, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 210, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_13) {
    } else {
      __pyx_t_11 = __pyx_t_13;
      goto __pyx_L38_bool_binop_done;
    }
    __pyx_t_13 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_hidden, __pyx_v_already, Py_NE)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 210, __pyx_L1_error)
    __pyx_t_10 = (__pyx_t_13 != 0);
    __pyx_t_11 = __pyx_t_10;
    __pyx_L38_bool_binop_done:;
    if (__pyx_t_11) {

      /* "metaphor/chem_gm/core/gmutils.py":211
 *             res[val[:2]] = val[2:]
 *         elif (val[-1] == "n") and not ("hidden" in already):
 *             res["hidden"] = int(val[:-1])             # <<<<<<<<<<<<<<
 *             already.append("hidden")
 *         elif (val[:2] in AtomsLower()) and (isNum(val[2:])):
 */
      __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_val, 0, -1L, NULL, NULL, &__pyx_slice__31, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 211, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 211, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(PyDict_SetItem(__pyx_v_res, __pyx_n_u_hidden, __pyx_t_6) < 0)) __PYX_ERR(0, 211, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":212
 *         elif (val[-1] == "n") and not ("hidden" in already):
 *             res["hidden"] = int(val[:-1])
 *             already.append("hidden")             # <<<<<<<<<<<<<<
 *         elif (val[:2] in AtomsLower()) and (isNum(val[2:])):
 *             ind = AtomsLower().index(val[:2])
 */
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_already, __pyx_n_u_hidden); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 212, __pyx_L1_error)

      /* "metaphor/chem_gm/core/gmutils.py":210
 *         elif (val[:1] == "q"): #
 *             res[val[:2]] = val[2:]
 *         elif (val[-1] == "n") and not ("hidden" in already):             # <<<<<<<<<<<<<<
 *             res["hidden"] = int(val[:-1])
 *             already.append("hidden")
 */
      goto __pyx_L19;
    }

    /* "metaphor/chem_gm/core/gmutils.py":213
 *             res["hidden"] = int(val[:-1])
 *             already.append("hidden")
 *         elif (val[:2] in AtomsLower()) and (isNum(val[2:])):             # <<<<<<<<<<<<<<
 *             ind = AtomsLower().index(val[:2])
 *             res[Atomes[ind]] = val[2:]
 */
    __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_val, 0, 2, NULL, NULL, &__pyx_slice__32, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_AtomsLower); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_15 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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);
      }
    }
    if (__pyx_t_15) {
      __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 213, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    } else {
      __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 213, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_t_6, __pyx_t_9, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 213, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_13 = (__pyx_t_10 != 0);
    if (__pyx_t_13) {
    } else {
      __pyx_t_11 = __pyx_t_13;
      goto __pyx_L40_bool_binop_done;
    }
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_isNum); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_14 = __Pyx_PyObject_GetSlice(__pyx_v_val, 2, 0, NULL, NULL, &__pyx_slice__33, 1, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_15 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_15)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_15);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_15) {
      __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 213, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_GOTREF(__pyx_t_9);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_15, __pyx_t_14};
        __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 213, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[2] = {__pyx_t_15, __pyx_t_14};
        __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 213, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      } else
      #endif
      {
        __pyx_t_16 = PyTuple_New(1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 213, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15); __pyx_t_15 = NULL;
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_16, 0+1, __pyx_t_14);
        __pyx_t_14 = 0;
        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_16, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 213, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 213, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_11 = __pyx_t_13;
    __pyx_L40_bool_binop_done:;
    if (__pyx_t_11) {

      /* "metaphor/chem_gm/core/gmutils.py":214
 *             already.append("hidden")
 *         elif (val[:2] in AtomsLower()) and (isNum(val[2:])):
 *             ind = AtomsLower().index(val[:2])             # <<<<<<<<<<<<<<
 *             res[Atomes[ind]] = val[2:]
 *         elif( val[:1] in AtomsLower()) and (isNum(val[1:])):
 */
      __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s_AtomsLower); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 214, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_14 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_16))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_16);
        if (likely(__pyx_t_14)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_16, function);
        }
      }
      if (__pyx_t_14) {
        __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 214, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      } else {
        __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_16); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 214, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_index); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 214, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_val, 0, 2, NULL, NULL, &__pyx_slice__34, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 214, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_14 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_16);
        if (likely(__pyx_t_14)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_16, function);
        }
      }
      if (!__pyx_t_14) {
        __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 214, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_9);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_16)) {
          PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_6};
          __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 214, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_16)) {
          PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_6};
          __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 214, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        } else
        #endif
        {
          __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 214, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14); __pyx_t_14 = NULL;
          __Pyx_GIVEREF(__pyx_t_6);
          PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_t_6);
          __pyx_t_6 = 0;
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_15, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 214, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":215
 *         elif (val[:2] in AtomsLower()) and (isNum(val[2:])):
 *             ind = AtomsLower().index(val[:2])
 *             res[Atomes[ind]] = val[2:]             # <<<<<<<<<<<<<<
 *         elif( val[:1] in AtomsLower()) and (isNum(val[1:])):
 *             ind = AtomsLower().index(val[:1])
 */
      __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_val, 2, 0, NULL, NULL, &__pyx_slice__35, 1, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 215, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s_Atomes); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 215, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_15 = __Pyx_PyObject_GetItem(__pyx_t_16, __pyx_v_ind); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 215, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (unlikely(PyDict_SetItem(__pyx_v_res, __pyx_t_15, __pyx_t_9) < 0)) __PYX_ERR(0, 215, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":213
 *             res["hidden"] = int(val[:-1])
 *             already.append("hidden")
 *         elif (val[:2] in AtomsLower()) and (isNum(val[2:])):             # <<<<<<<<<<<<<<
 *             ind = AtomsLower().index(val[:2])
 *             res[Atomes[ind]] = val[2:]
 */
      goto __pyx_L19;
    }

    /* "metaphor/chem_gm/core/gmutils.py":216
 *             ind = AtomsLower().index(val[:2])
 *             res[Atomes[ind]] = val[2:]
 *         elif( val[:1] in AtomsLower()) and (isNum(val[1:])):             # <<<<<<<<<<<<<<
 *             ind = AtomsLower().index(val[:1])
 *             res[Atomes[ind]] = val[1:]
 */
    __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_val, 0, 1, NULL, NULL, &__pyx_slice__36, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s_AtomsLower); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_16))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_16);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_16, function);
      }
    }
    if (__pyx_t_6) {
      __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_6); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 216, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __pyx_t_15 = __Pyx_PyObject_CallNoArg(__pyx_t_16); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 216, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __pyx_t_13 = (__Pyx_PySequence_ContainsTF(__pyx_t_9, __pyx_t_15, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 216, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __pyx_t_10 = (__pyx_t_13 != 0);
    if (__pyx_t_10) {
    } else {
      __pyx_t_11 = __pyx_t_10;
      goto __pyx_L42_bool_binop_done;
    }
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_isNum); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_16 = __Pyx_PyObject_GetSlice(__pyx_v_val, 1, 0, NULL, NULL, &__pyx_slice__37, 1, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_16); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 216, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_GOTREF(__pyx_t_15);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_16};
        __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 216, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_16};
        __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 216, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      } else
      #endif
      {
        __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 216, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_GIVEREF(__pyx_t_16);
        PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_16);
        __pyx_t_16 = 0;
        __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_14, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 216, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 216, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __pyx_t_11 = __pyx_t_10;
    __pyx_L42_bool_binop_done:;
    if (__pyx_t_11) {

      /* "metaphor/chem_gm/core/gmutils.py":217
 *             res[Atomes[ind]] = val[2:]
 *         elif( val[:1] in AtomsLower()) and (isNum(val[1:])):
 *             ind = AtomsLower().index(val[:1])             # <<<<<<<<<<<<<<
 *             res[Atomes[ind]] = val[1:]
 *         elif val == "h":
 */
      __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_AtomsLower); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 217, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_16 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(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_9 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_16); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 217, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      } else {
        __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 217, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_index); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 217, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_val, 0, 1, NULL, NULL, &__pyx_slice__38, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 217, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __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_15 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 217, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_15);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_14)) {
          PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_t_9};
          __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 217, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
          PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_t_9};
          __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 217, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 217, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_16); __pyx_t_16 = NULL;
          __Pyx_GIVEREF(__pyx_t_9);
          PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_9);
          __pyx_t_9 = 0;
          __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_6, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 217, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_15);
      __pyx_t_15 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":218
 *         elif( val[:1] in AtomsLower()) and (isNum(val[1:])):
 *             ind = AtomsLower().index(val[:1])
 *             res[Atomes[ind]] = val[1:]             # <<<<<<<<<<<<<<
 *         elif val == "h":
 *             res["h"] = True
 */
      __pyx_t_15 = __Pyx_PyObject_GetSlice(__pyx_v_val, 1, 0, NULL, NULL, &__pyx_slice__39, 1, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 218, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_Atomes); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 218, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_14, __pyx_v_ind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 218, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      if (unlikely(PyDict_SetItem(__pyx_v_res, __pyx_t_6, __pyx_t_15) < 0)) __PYX_ERR(0, 218, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":216
 *             ind = AtomsLower().index(val[:2])
 *             res[Atomes[ind]] = val[2:]
 *         elif( val[:1] in AtomsLower()) and (isNum(val[1:])):             # <<<<<<<<<<<<<<
 *             ind = AtomsLower().index(val[:1])
 *             res[Atomes[ind]] = val[1:]
 */
      goto __pyx_L19;
    }

    /* "metaphor/chem_gm/core/gmutils.py":219
 *             ind = AtomsLower().index(val[:1])
 *             res[Atomes[ind]] = val[1:]
 *         elif val == "h":             # <<<<<<<<<<<<<<
 *             res["h"] = True
 *         else: break
 */
    __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_val, __pyx_n_u_h, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 219, __pyx_L1_error)
    if (__pyx_t_11) {

      /* "metaphor/chem_gm/core/gmutils.py":220
 *             res[Atomes[ind]] = val[1:]
 *         elif val == "h":
 *             res["h"] = True             # <<<<<<<<<<<<<<
 *         else: break
 *     return res
 */
      if (unlikely(PyDict_SetItem(__pyx_v_res, __pyx_n_u_h, Py_True) < 0)) __PYX_ERR(0, 220, __pyx_L1_error)

      /* "metaphor/chem_gm/core/gmutils.py":219
 *             ind = AtomsLower().index(val[:1])
 *             res[Atomes[ind]] = val[1:]
 *         elif val == "h":             # <<<<<<<<<<<<<<
 *             res["h"] = True
 *         else: break
 */
      goto __pyx_L19;
    }

    /* "metaphor/chem_gm/core/gmutils.py":221
 *         elif val == "h":
 *             res["h"] = True
 *         else: break             # <<<<<<<<<<<<<<
 *     return res
 * 
 */
    /*else*/ {
      goto __pyx_L18_break;
    }
    __pyx_L19:;

    /* "metaphor/chem_gm/core/gmutils.py":174
 * 
 *     res = {"central":3, "mol1":True, "grds": -1}
 *     for index, val in enumerate(prlist):             # <<<<<<<<<<<<<<
 *         if (val[:4] == "ccls") and not ("ccls" in already):
 *             already.append("ccls")
 */
  }
  __pyx_L18_break:;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":222
 *             res["h"] = True
 *         else: break
 *     return res             # <<<<<<<<<<<<<<
 * 
 *     # todo completer
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmutils.py":148
 *     return "".join(lst)
 * 
 * def analyseProjectName(source):             # <<<<<<<<<<<<<<
 *     nc = -1
 *     try:
 */

  /* 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_9);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.analyseProjectName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_nc);
  __Pyx_XDECREF(__pyx_v_nn);
  __Pyx_XDECREF(__pyx_v_lst);
  __Pyx_XDECREF(__pyx_v_source2);
  __Pyx_XDECREF(__pyx_v_prlist);
  __Pyx_XDECREF(__pyx_v_already);
  __Pyx_XDECREF(__pyx_v_lres);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_inn);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_cond);
  __Pyx_XDECREF(__pyx_v_ind);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmutils.py":226
 *     # todo completer
 * 
 * def tmplfile(tmpl, index, directory=""):             # <<<<<<<<<<<<<<
 *     if directory:
 *         return os.path.join(directory, tmpl% (index))
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_7tmplfile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_7tmplfile = {"tmplfile", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_7tmplfile, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_7tmplfile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_tmpl = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_v_directory = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tmplfile (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tmpl,&__pyx_n_s_index,&__pyx_n_s_directory,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject*)__pyx_kp_u_));
    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_tmpl)) != 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_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("tmplfile", 0, 2, 3, 1); __PYX_ERR(0, 226, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_directory);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tmplfile") < 0)) __PYX_ERR(0, 226, __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_tmpl = values[0];
    __pyx_v_index = values[1];
    __pyx_v_directory = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tmplfile", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 226, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.tmplfile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_6tmplfile(__pyx_self, __pyx_v_tmpl, __pyx_v_index, __pyx_v_directory);

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_6tmplfile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tmpl, PyObject *__pyx_v_index, PyObject *__pyx_v_directory) {
  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;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("tmplfile", 0);

  /* "metaphor/chem_gm/core/gmutils.py":227
 * 
 * def tmplfile(tmpl, index, directory=""):
 *     if directory:             # <<<<<<<<<<<<<<
 *         return os.path.join(directory, tmpl% (index))
 *     else:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_directory); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 227, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/chem_gm/core/gmutils.py":228
 * def tmplfile(tmpl, index, directory=""):
 *     if directory:
 *         return os.path.join(directory, tmpl% (index))             # <<<<<<<<<<<<<<
 *     else:
 *         return tmpl% (index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __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, 228, __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_join); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Remainder(__pyx_v_tmpl, __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __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_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_v_directory, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __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_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_directory, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __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_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 228, __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_INCREF(__pyx_v_directory);
      __Pyx_GIVEREF(__pyx_v_directory);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_directory);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmutils.py":227
 * 
 * def tmplfile(tmpl, index, directory=""):
 *     if directory:             # <<<<<<<<<<<<<<
 *         return os.path.join(directory, tmpl% (index))
 *     else:
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":230
 *         return os.path.join(directory, tmpl% (index))
 *     else:
 *         return tmpl% (index)             # <<<<<<<<<<<<<<
 * 
 * def gmxFileName(index, directory=""):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyNumber_Remainder(__pyx_v_tmpl, __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "metaphor/chem_gm/core/gmutils.py":226
 *     # todo completer
 * 
 * def tmplfile(tmpl, index, directory=""):             # <<<<<<<<<<<<<<
 *     if directory:
 *         return os.path.join(directory, tmpl% (index))
 */

  /* 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_7);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.tmplfile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmutils.py":232
 *         return tmpl% (index)
 * 
 * def gmxFileName(index, directory=""):             # <<<<<<<<<<<<<<
 *     return tmplfile(gmxTmpl, index, directory)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_9gmxFileName(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_9gmxFileName = {"gmxFileName", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_9gmxFileName, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_9gmxFileName(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_v_directory = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gmxFileName (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_directory,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_kp_u_));
    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_index)) != 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_directory);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "gmxFileName") < 0)) __PYX_ERR(0, 232, __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_index = values[0];
    __pyx_v_directory = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("gmxFileName", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 232, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.gmxFileName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_8gmxFileName(__pyx_self, __pyx_v_index, __pyx_v_directory);

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_8gmxFileName(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index, PyObject *__pyx_v_directory) {
  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("gmxFileName", 0);

  /* "metaphor/chem_gm/core/gmutils.py":233
 * 
 * def gmxFileName(index, directory=""):
 *     return tmplfile(gmxTmpl, index, directory)             # <<<<<<<<<<<<<<
 * 
 * def getConfigHash(config, full=False, hiddenout=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_tmplfile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_gmxTmpl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 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_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_index, __pyx_v_directory};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __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[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_index, __pyx_v_directory};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __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(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 233, __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_index);
    __Pyx_GIVEREF(__pyx_v_index);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_index);
    __Pyx_INCREF(__pyx_v_directory);
    __Pyx_GIVEREF(__pyx_v_directory);
    PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_directory);
    __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, 233, __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/gmutils.py":232
 *         return tmpl% (index)
 * 
 * def gmxFileName(index, directory=""):             # <<<<<<<<<<<<<<
 *     return tmplfile(gmxTmpl, index, directory)
 * 
 */

  /* 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.gmutils.gmxFileName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmutils.py":235
 *     return tmplfile(gmxTmpl, index, directory)
 * 
 * def getConfigHash(config, full=False, hiddenout=False):             # <<<<<<<<<<<<<<
 *     if isinstance(config, string_types):
 *         config = tb.defaultedConfigParser(config)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_11getConfigHash(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_11getConfigHash = {"getConfigHash", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_11getConfigHash, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_11getConfigHash(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_config = 0;
  PyObject *__pyx_v_full = 0;
  PyObject *__pyx_v_hiddenout = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getConfigHash (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_config,&__pyx_n_s_full,&__pyx_n_s_hiddenout,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_False));
    values[2] = ((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  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 (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_full);
          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_hiddenout);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getConfigHash") < 0)) __PYX_ERR(0, 235, __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_config = values[0];
    __pyx_v_full = values[1];
    __pyx_v_hiddenout = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getConfigHash", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 235, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.getConfigHash", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_10getConfigHash(__pyx_self, __pyx_v_config, __pyx_v_full, __pyx_v_hiddenout);

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_10getConfigHash(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_config, PyObject *__pyx_v_full, PyObject *__pyx_v_hiddenout) {
  PyObject *__pyx_v_hidden = NULL;
  PyObject *__pyx_v_temp = NULL;
  PyObject *__pyx_v_tempkeys = NULL;
  PyObject *__pyx_v_atomlist = NULL;
  PyObject *__pyx_v_otherlist = NULL;
  PyObject *__pyx_v_connectivity = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_v_central = NULL;
  int __pyx_v_classif;
  PyObject *__pyx_v_resst = NULL;
  PyObject *__pyx_v_reslong = NULL;
  PyObject *__pyx_v_reshash = NULL;
  PyObject *__pyx_7genexpr__pyx_v_val = NULL;
  PyObject *__pyx_8genexpr1__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  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 = NULL;
  int __pyx_t_10;
  Py_hash_t __pyx_t_11;
  Py_UCS4 __pyx_t_12;
  __Pyx_RefNannySetupContext("getConfigHash", 0);
  __Pyx_INCREF(__pyx_v_config);

  /* "metaphor/chem_gm/core/gmutils.py":236
 * 
 * def getConfigHash(config, full=False, hiddenout=False):
 *     if isinstance(config, string_types):             # <<<<<<<<<<<<<<
 *         config = tb.defaultedConfigParser(config)
 *     hidden = config.get("model", "hidden")
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_string_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_config, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 236, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "metaphor/chem_gm/core/gmutils.py":237
 * def getConfigHash(config, full=False, hiddenout=False):
 *     if isinstance(config, string_types):
 *         config = tb.defaultedConfigParser(config)             # <<<<<<<<<<<<<<
 *     hidden = config.get("model", "hidden")
 *     temp = config.getSectionDict("connectivity")
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_tb); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_defaultedConfigParser); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 237, __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_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_config); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __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_4, __pyx_v_config};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __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_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_config};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 237, __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_INCREF(__pyx_v_config);
        __Pyx_GIVEREF(__pyx_v_config);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_config);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __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_DECREF_SET(__pyx_v_config, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":236
 * 
 * def getConfigHash(config, full=False, hiddenout=False):
 *     if isinstance(config, string_types):             # <<<<<<<<<<<<<<
 *         config = tb.defaultedConfigParser(config)
 *     hidden = config.get("model", "hidden")
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":238
 *     if isinstance(config, string_types):
 *         config = tb.defaultedConfigParser(config)
 *     hidden = config.get("model", "hidden")             # <<<<<<<<<<<<<<
 *     temp = config.getSectionDict("connectivity")
 *     tempkeys = list(temp.keys())
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_hidden = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":239
 *         config = tb.defaultedConfigParser(config)
 *     hidden = config.get("model", "hidden")
 *     temp = config.getSectionDict("connectivity")             # <<<<<<<<<<<<<<
 *     tempkeys = list(temp.keys())
 *     tempkeys.sort()
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_getSectionDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_temp = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":240
 *     hidden = config.get("model", "hidden")
 *     temp = config.getSectionDict("connectivity")
 *     tempkeys = list(temp.keys())             # <<<<<<<<<<<<<<
 *     tempkeys.sort()
 *     atomlist = [val for val in tempkeys if val.capitalize() in Atomes]
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp, __pyx_n_s_keys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 240, __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_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_tempkeys = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":241
 *     temp = config.getSectionDict("connectivity")
 *     tempkeys = list(temp.keys())
 *     tempkeys.sort()             # <<<<<<<<<<<<<<
 *     atomlist = [val for val in tempkeys if val.capitalize() in Atomes]
 *     otherlist = [val for val in tempkeys if not val in atomlist]
 */
  __pyx_t_7 = PyList_Sort(__pyx_v_tempkeys); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 241, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmutils.py":242
 *     tempkeys = list(temp.keys())
 *     tempkeys.sort()
 *     atomlist = [val for val in tempkeys if val.capitalize() in Atomes]             # <<<<<<<<<<<<<<
 *     otherlist = [val for val in tempkeys if not val in atomlist]
 *     connectivity = OrderedDict()
 */
  { /* enter inner scope */
    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 242, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_v_tempkeys; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0;
    for (;;) {
      if (__pyx_t_8 >= 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_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 242, __pyx_L6_error)
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 242, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_val, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_7genexpr__pyx_v_val, __pyx_n_s_capitalize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 242, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (__pyx_t_9) {
        __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 242, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else {
        __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 242, __pyx_L6_error)
      }
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Atomes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 242, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_6, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 242, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_2 = (__pyx_t_3 != 0);
      if (__pyx_t_2) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_7genexpr__pyx_v_val))) __PYX_ERR(0, 242, __pyx_L6_error)
      }
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_val); __pyx_7genexpr__pyx_v_val = 0;
    goto __pyx_L10_exit_scope;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_val); __pyx_7genexpr__pyx_v_val = 0;
    goto __pyx_L1_error;
    __pyx_L10_exit_scope:;
  } /* exit inner scope */
  __pyx_v_atomlist = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":243
 *     tempkeys.sort()
 *     atomlist = [val for val in tempkeys if val.capitalize() in Atomes]
 *     otherlist = [val for val in tempkeys if not val in atomlist]             # <<<<<<<<<<<<<<
 *     connectivity = OrderedDict()
 *     for key in atomlist:
 */
  { /* enter inner scope */
    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 243, __pyx_L13_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_v_tempkeys; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0;
    for (;;) {
      if (__pyx_t_8 >= 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_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 243, __pyx_L13_error)
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 243, __pyx_L13_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_val, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_8genexpr1__pyx_v_val, __pyx_v_atomlist, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 243, __pyx_L13_error)
      __pyx_t_3 = (__pyx_t_2 != 0);
      if (__pyx_t_3) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_8genexpr1__pyx_v_val))) __PYX_ERR(0, 243, __pyx_L13_error)
      }
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_val); __pyx_8genexpr1__pyx_v_val = 0;
    goto __pyx_L17_exit_scope;
    __pyx_L13_error:;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_val); __pyx_8genexpr1__pyx_v_val = 0;
    goto __pyx_L1_error;
    __pyx_L17_exit_scope:;
  } /* exit inner scope */
  __pyx_v_otherlist = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":244
 *     atomlist = [val for val in tempkeys if val.capitalize() in Atomes]
 *     otherlist = [val for val in tempkeys if not val in atomlist]
 *     connectivity = OrderedDict()             # <<<<<<<<<<<<<<
 *     for key in atomlist:
 *         val = temp[key]
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(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_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 244, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 244, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_connectivity = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":245
 *     otherlist = [val for val in tempkeys if not val in atomlist]
 *     connectivity = OrderedDict()
 *     for key in atomlist:             # <<<<<<<<<<<<<<
 *         val = temp[key]
 *         if val == "-1":
 */
  __pyx_t_5 = __pyx_v_atomlist; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0;
  for (;;) {
    if (__pyx_t_8 >= 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_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 245, __pyx_L1_error)
    #else
    __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __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/gmutils.py":246
 *     connectivity = OrderedDict()
 *     for key in atomlist:
 *         val = temp[key]             # <<<<<<<<<<<<<<
 *         if val == "-1":
 *             connectivity[key] = str(hidden)
 */
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_temp, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __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/gmutils.py":247
 *     for key in atomlist:
 *         val = temp[key]
 *         if val == "-1":             # <<<<<<<<<<<<<<
 *             connectivity[key] = str(hidden)
 *         else:
 */
    __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_val, __pyx_kp_u_1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 247, __pyx_L1_error)
    if (__pyx_t_3) {

      /* "metaphor/chem_gm/core/gmutils.py":248
 *         val = temp[key]
 *         if val == "-1":
 *             connectivity[key] = str(hidden)             # <<<<<<<<<<<<<<
 *         else:
 *             connectivity[key] = val
 */
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_hidden); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(PyObject_SetItem(__pyx_v_connectivity, __pyx_v_key, __pyx_t_1) < 0)) __PYX_ERR(0, 248, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":247
 *     for key in atomlist:
 *         val = temp[key]
 *         if val == "-1":             # <<<<<<<<<<<<<<
 *             connectivity[key] = str(hidden)
 *         else:
 */
      goto __pyx_L20;
    }

    /* "metaphor/chem_gm/core/gmutils.py":250
 *             connectivity[key] = str(hidden)
 *         else:
 *             connectivity[key] = val             # <<<<<<<<<<<<<<
 *     for key in otherlist:
 *         val = temp[key]
 */
    /*else*/ {
      if (unlikely(PyObject_SetItem(__pyx_v_connectivity, __pyx_v_key, __pyx_v_val) < 0)) __PYX_ERR(0, 250, __pyx_L1_error)
    }
    __pyx_L20:;

    /* "metaphor/chem_gm/core/gmutils.py":245
 *     otherlist = [val for val in tempkeys if not val in atomlist]
 *     connectivity = OrderedDict()
 *     for key in atomlist:             # <<<<<<<<<<<<<<
 *         val = temp[key]
 *         if val == "-1":
 */
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":251
 *         else:
 *             connectivity[key] = val
 *     for key in otherlist:             # <<<<<<<<<<<<<<
 *         val = temp[key]
 *         if val == "-1":
 */
  __pyx_t_5 = __pyx_v_otherlist; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0;
  for (;;) {
    if (__pyx_t_8 >= 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_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 251, __pyx_L1_error)
    #else
    __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __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/gmutils.py":252
 *             connectivity[key] = val
 *     for key in otherlist:
 *         val = temp[key]             # <<<<<<<<<<<<<<
 *         if val == "-1":
 *             connectivity[key] = str(hidden)
 */
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_temp, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __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/gmutils.py":253
 *     for key in otherlist:
 *         val = temp[key]
 *         if val == "-1":             # <<<<<<<<<<<<<<
 *             connectivity[key] = str(hidden)
 *         else:
 */
    __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_val, __pyx_kp_u_1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 253, __pyx_L1_error)
    if (__pyx_t_3) {

      /* "metaphor/chem_gm/core/gmutils.py":254
 *         val = temp[key]
 *         if val == "-1":
 *             connectivity[key] = str(hidden)             # <<<<<<<<<<<<<<
 *         else:
 *             connectivity[key] = val
 */
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_hidden); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(PyObject_SetItem(__pyx_v_connectivity, __pyx_v_key, __pyx_t_1) < 0)) __PYX_ERR(0, 254, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":253
 *     for key in otherlist:
 *         val = temp[key]
 *         if val == "-1":             # <<<<<<<<<<<<<<
 *             connectivity[key] = str(hidden)
 *         else:
 */
      goto __pyx_L23;
    }

    /* "metaphor/chem_gm/core/gmutils.py":256
 *             connectivity[key] = str(hidden)
 *         else:
 *             connectivity[key] = val             # <<<<<<<<<<<<<<
 *     #connectivity = OrderedDict(config.getSectionDict("connectivity"))
 *     #connectivity.sort()
 */
    /*else*/ {
      if (unlikely(PyObject_SetItem(__pyx_v_connectivity, __pyx_v_key, __pyx_v_val) < 0)) __PYX_ERR(0, 256, __pyx_L1_error)
    }
    __pyx_L23:;

    /* "metaphor/chem_gm/core/gmutils.py":251
 *         else:
 *             connectivity[key] = val
 *     for key in otherlist:             # <<<<<<<<<<<<<<
 *         val = temp[key]
 *         if val == "-1":
 */
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":266
 * #     for item in lst:
 * #         connectivities[item] = config.get("connectivity", item)
 *     central = config.getdefault("model", "central", "3")             # <<<<<<<<<<<<<<
 *     classif = not config.getdefault("model", "classif", "False") in ["False", "0"]
 *     hidden = config.get("model", "hidden")
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_getdefault); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_central = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":267
 * #         connectivities[item] = config.get("connectivity", item)
 *     central = config.getdefault("model", "central", "3")
 *     classif = not config.getdefault("model", "classif", "False") in ["False", "0"]             # <<<<<<<<<<<<<<
 *     hidden = config.get("model", "hidden")
 *     if hiddenout:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_getdefault); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_5, __pyx_n_u_False, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 267, __pyx_L1_error)
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L24_bool_binop_done;
  }
  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_5, __pyx_kp_u_0, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 267, __pyx_L1_error)
  __pyx_t_3 = __pyx_t_2;
  __pyx_L24_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_classif = __pyx_t_3;

  /* "metaphor/chem_gm/core/gmutils.py":268
 *     central = config.getdefault("model", "central", "3")
 *     classif = not config.getdefault("model", "classif", "False") in ["False", "0"]
 *     hidden = config.get("model", "hidden")             # <<<<<<<<<<<<<<
 *     if hiddenout:
 *         resst = getConfigString(atomlist, connectivity, central, classif, None)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF_SET(__pyx_v_hidden, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":269
 *     classif = not config.getdefault("model", "classif", "False") in ["False", "0"]
 *     hidden = config.get("model", "hidden")
 *     if hiddenout:             # <<<<<<<<<<<<<<
 *         resst = getConfigString(atomlist, connectivity, central, classif, None)
 *     else:
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_hiddenout); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 269, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "metaphor/chem_gm/core/gmutils.py":270
 *     hidden = config.get("model", "hidden")
 *     if hiddenout:
 *         resst = getConfigString(atomlist, connectivity, central, classif, None)             # <<<<<<<<<<<<<<
 *     else:
 *         resst = getConfigString(atomlist, connectivity, central, classif, hidden)
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_getConfigString); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_classif); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    __pyx_t_10 = 0;
    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);
        __pyx_t_10 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[6] = {__pyx_t_6, __pyx_v_atomlist, __pyx_v_connectivity, __pyx_v_central, __pyx_t_4, Py_None};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 5+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 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_5)) {
      PyObject *__pyx_temp[6] = {__pyx_t_6, __pyx_v_atomlist, __pyx_v_connectivity, __pyx_v_central, __pyx_t_4, Py_None};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 5+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(5+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 270, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_INCREF(__pyx_v_atomlist);
      __Pyx_GIVEREF(__pyx_v_atomlist);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_v_atomlist);
      __Pyx_INCREF(__pyx_v_connectivity);
      __Pyx_GIVEREF(__pyx_v_connectivity);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_v_connectivity);
      __Pyx_INCREF(__pyx_v_central);
      __Pyx_GIVEREF(__pyx_v_central);
      PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_10, __pyx_v_central);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_10, __pyx_t_4);
      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      PyTuple_SET_ITEM(__pyx_t_9, 4+__pyx_t_10, Py_None);
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_resst = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":269
 *     classif = not config.getdefault("model", "classif", "False") in ["False", "0"]
 *     hidden = config.get("model", "hidden")
 *     if hiddenout:             # <<<<<<<<<<<<<<
 *         resst = getConfigString(atomlist, connectivity, central, classif, None)
 *     else:
 */
    goto __pyx_L26;
  }

  /* "metaphor/chem_gm/core/gmutils.py":272
 *         resst = getConfigString(atomlist, connectivity, central, classif, None)
 *     else:
 *         resst = getConfigString(atomlist, connectivity, central, classif, hidden)             # <<<<<<<<<<<<<<
 *     reslong = ctypes.c_size_t(hash(resst)).value
 *     reshash = str(reslong)
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_getConfigString); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = __Pyx_PyBool_FromLong(__pyx_v_classif); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_4 = NULL;
    __pyx_t_10 = 0;
    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);
        __pyx_t_10 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[6] = {__pyx_t_4, __pyx_v_atomlist, __pyx_v_connectivity, __pyx_v_central, __pyx_t_9, __pyx_v_hidden};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 5+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[6] = {__pyx_t_4, __pyx_v_atomlist, __pyx_v_connectivity, __pyx_v_central, __pyx_t_9, __pyx_v_hidden};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 5+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(5+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 272, __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_atomlist);
      __Pyx_GIVEREF(__pyx_v_atomlist);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_10, __pyx_v_atomlist);
      __Pyx_INCREF(__pyx_v_connectivity);
      __Pyx_GIVEREF(__pyx_v_connectivity);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_10, __pyx_v_connectivity);
      __Pyx_INCREF(__pyx_v_central);
      __Pyx_GIVEREF(__pyx_v_central);
      PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_10, __pyx_v_central);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_10, __pyx_t_9);
      __Pyx_INCREF(__pyx_v_hidden);
      __Pyx_GIVEREF(__pyx_v_hidden);
      PyTuple_SET_ITEM(__pyx_t_6, 4+__pyx_t_10, __pyx_v_hidden);
      __pyx_t_9 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __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_v_resst = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_L26:;

  /* "metaphor/chem_gm/core/gmutils.py":273
 *     else:
 *         resst = getConfigString(atomlist, connectivity, central, classif, hidden)
 *     reslong = ctypes.c_size_t(hash(resst)).value             # <<<<<<<<<<<<<<
 *     reshash = str(reslong)
 *     #resst2 = fromconfig2Str(config)
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_size_t); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_11 = PyObject_Hash(__pyx_v_resst); if (unlikely(__pyx_t_11 == ((Py_hash_t)-1))) __PYX_ERR(0, 273, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyInt_FromHash_t(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __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_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __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_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __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_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __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_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 273, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9); __pyx_t_9 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_reslong = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":274
 *         resst = getConfigString(atomlist, connectivity, central, classif, hidden)
 *     reslong = ctypes.c_size_t(hash(resst)).value
 *     reshash = str(reslong)             # <<<<<<<<<<<<<<
 *     #resst2 = fromconfig2Str(config)
 *     if hiddenout:
 */
  __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_reslong); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_reshash = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":276
 *     reshash = str(reslong)
 *     #resst2 = fromconfig2Str(config)
 *     if hiddenout:             # <<<<<<<<<<<<<<
 *         reshash = "%s_%sN"% (reshash, hidden)
 *     if full:
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_hiddenout); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 276, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "metaphor/chem_gm/core/gmutils.py":277
 *     #resst2 = fromconfig2Str(config)
 *     if hiddenout:
 *         reshash = "%s_%sN"% (reshash, hidden)             # <<<<<<<<<<<<<<
 *     if full:
 *         return reshash, resst
 */
    __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = 0;
    __pyx_t_12 = 127;
    __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_reshash), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_12) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_12;
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_n_u__7);
    __pyx_t_8 += 1;
    __Pyx_GIVEREF(__pyx_n_u__7);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_u__7);
    __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_hidden), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_12) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_12;
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_n_u_N);
    __pyx_t_8 += 1;
    __Pyx_GIVEREF(__pyx_n_u_N);
    PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_n_u_N);
    __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, __pyx_t_8, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF_SET(__pyx_v_reshash, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":276
 *     reshash = str(reslong)
 *     #resst2 = fromconfig2Str(config)
 *     if hiddenout:             # <<<<<<<<<<<<<<
 *         reshash = "%s_%sN"% (reshash, hidden)
 *     if full:
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":278
 *     if hiddenout:
 *         reshash = "%s_%sN"% (reshash, hidden)
 *     if full:             # <<<<<<<<<<<<<<
 *         return reshash, resst
 *     return reshash
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_full); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 278, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "metaphor/chem_gm/core/gmutils.py":279
 *         reshash = "%s_%sN"% (reshash, hidden)
 *     if full:
 *         return reshash, resst             # <<<<<<<<<<<<<<
 *     return reshash
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_reshash);
    __Pyx_GIVEREF(__pyx_v_reshash);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_reshash);
    __Pyx_INCREF(__pyx_v_resst);
    __Pyx_GIVEREF(__pyx_v_resst);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_resst);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmutils.py":278
 *     if hiddenout:
 *         reshash = "%s_%sN"% (reshash, hidden)
 *     if full:             # <<<<<<<<<<<<<<
 *         return reshash, resst
 *     return reshash
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":280
 *     if full:
 *         return reshash, resst
 *     return reshash             # <<<<<<<<<<<<<<
 * 
 * def getConfigString(atomlist, connectivities, central, classif, hidden, fullH=False, short=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_reshash);
  __pyx_r = __pyx_v_reshash;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmutils.py":235
 *     return tmplfile(gmxTmpl, index, directory)
 * 
 * def getConfigHash(config, full=False, hiddenout=False):             # <<<<<<<<<<<<<<
 *     if isinstance(config, string_types):
 *         config = tb.defaultedConfigParser(config)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.getConfigHash", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_hidden);
  __Pyx_XDECREF(__pyx_v_temp);
  __Pyx_XDECREF(__pyx_v_tempkeys);
  __Pyx_XDECREF(__pyx_v_atomlist);
  __Pyx_XDECREF(__pyx_v_otherlist);
  __Pyx_XDECREF(__pyx_v_connectivity);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_central);
  __Pyx_XDECREF(__pyx_v_resst);
  __Pyx_XDECREF(__pyx_v_reslong);
  __Pyx_XDECREF(__pyx_v_reshash);
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_val);
  __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_config);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmutils.py":282
 *     return reshash
 * 
 * def getConfigString(atomlist, connectivities, central, classif, hidden, fullH=False, short=False):             # <<<<<<<<<<<<<<
 *     """Creation de la chaine de configuration caracteristique de la structure.
 *     connectivities: dictionnaire des connectivites
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_13getConfigString(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_7chem_gm_4core_7gmutils_12getConfigString[] = "Creation de la chaine de configuration caracteristique de la structure.\n    connectivities: dictionnaire des connectivites\n    central: nombre ou liste des atomes centraux\n    classif: booleen\n    hidden: nombre de neurones caches\n    ";
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_13getConfigString = {"getConfigString", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_13getConfigString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_7chem_gm_4core_7gmutils_12getConfigString};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_13getConfigString(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_atomlist = 0;
  PyObject *__pyx_v_connectivities = 0;
  PyObject *__pyx_v_central = 0;
  PyObject *__pyx_v_classif = 0;
  PyObject *__pyx_v_hidden = 0;
  PyObject *__pyx_v_fullH = 0;
  PyObject *__pyx_v_short = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getConfigString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_atomlist,&__pyx_n_s_connectivities,&__pyx_n_s_central,&__pyx_n_s_classif,&__pyx_n_s_hidden,&__pyx_n_s_fullH,&__pyx_n_s_short,0};
    PyObject* values[7] = {0,0,0,0,0,0,0};
    values[5] = ((PyObject *)((PyObject *)Py_False));
    values[6] = ((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  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_atomlist)) != 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_connectivities)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getConfigString", 0, 5, 7, 1); __PYX_ERR(0, 282, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_central)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getConfigString", 0, 5, 7, 2); __PYX_ERR(0, 282, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_classif)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getConfigString", 0, 5, 7, 3); __PYX_ERR(0, 282, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hidden)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getConfigString", 0, 5, 7, 4); __PYX_ERR(0, 282, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fullH);
          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_short);
          if (value) { values[6] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getConfigString") < 0)) __PYX_ERR(0, 282, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        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);
        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_atomlist = values[0];
    __pyx_v_connectivities = values[1];
    __pyx_v_central = values[2];
    __pyx_v_classif = values[3];
    __pyx_v_hidden = values[4];
    __pyx_v_fullH = values[5];
    __pyx_v_short = values[6];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getConfigString", 0, 5, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 282, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.getConfigString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_12getConfigString(__pyx_self, __pyx_v_atomlist, __pyx_v_connectivities, __pyx_v_central, __pyx_v_classif, __pyx_v_hidden, __pyx_v_fullH, __pyx_v_short);

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_12getConfigString(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_atomlist, PyObject *__pyx_v_connectivities, PyObject *__pyx_v_central, PyObject *__pyx_v_classif, PyObject *__pyx_v_hidden, PyObject *__pyx_v_fullH, PyObject *__pyx_v_short) {
  PyObject *__pyx_v_lst = NULL;
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_v_valst = NULL;
  PyObject *__pyx_v_valint = NULL;
  PyObject *__pyx_v_Item = NULL;
  PyObject *__pyx_v_cond = NULL;
  PyObject *__pyx_v_intersect = NULL;
  PyObject *__pyx_v_candidatelist = NULL;
  PyObject *__pyx_v_val = NULL;
  int __pyx_v_addcentral;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_t_13;
  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;
  __Pyx_RefNannySetupContext("getConfigString", 0);
  __Pyx_INCREF(__pyx_v_central);

  /* "metaphor/chem_gm/core/gmutils.py":289
 *     hidden: nombre de neurones caches
 *     """
 *     lst = []             # <<<<<<<<<<<<<<
 *     if fullH:
 *         lst = ['H']
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_lst = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":290
 *     """
 *     lst = []
 *     if fullH:             # <<<<<<<<<<<<<<
 *         lst = ['H']
 *     for item, valst in connectivities.items():
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_fullH); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 290, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "metaphor/chem_gm/core/gmutils.py":291
 *     lst = []
 *     if fullH:
 *         lst = ['H']             # <<<<<<<<<<<<<<
 *     for item, valst in connectivities.items():
 *         valint = int(valst)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_u_H);
    __Pyx_GIVEREF(__pyx_n_u_H);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_H);
    __Pyx_DECREF_SET(__pyx_v_lst, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":290
 *     """
 *     lst = []
 *     if fullH:             # <<<<<<<<<<<<<<
 *         lst = ['H']
 *     for item, valst in connectivities.items():
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":292
 *     if fullH:
 *         lst = ['H']
 *     for item, valst in connectivities.items():             # <<<<<<<<<<<<<<
 *         valint = int(valst)
 *         valst = str(valst)
 */
  __pyx_t_3 = 0;
  if (unlikely(__pyx_v_connectivities == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 292, __pyx_L1_error)
  }
  __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_connectivities, 0, __pyx_n_s_items, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_6;
  __pyx_t_6 = 0;
  while (1) {
    __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_4, &__pyx_t_3, &__pyx_t_6, &__pyx_t_7, NULL, __pyx_t_5);
    if (unlikely(__pyx_t_8 == 0)) break;
    if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_valst, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":293
 *         lst = ['H']
 *     for item, valst in connectivities.items():
 *         valint = int(valst)             # <<<<<<<<<<<<<<
 *         valst = str(valst)
 *         if item in atomlist:
 */
    __pyx_t_7 = __Pyx_PyNumber_Int(__pyx_v_valst); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_XDECREF_SET(__pyx_v_valint, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":294
 *     for item, valst in connectivities.items():
 *         valint = int(valst)
 *         valst = str(valst)             # <<<<<<<<<<<<<<
 *         if item in atomlist:
 *             Item = item.capitalize()
 */
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_valst); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 294, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF_SET(__pyx_v_valst, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":295
 *         valint = int(valst)
 *         valst = str(valst)
 *         if item in atomlist:             # <<<<<<<<<<<<<<
 *             Item = item.capitalize()
 *         else:
 */
    __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_item, __pyx_v_atomlist, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 295, __pyx_L1_error)
    __pyx_t_9 = (__pyx_t_2 != 0);
    if (__pyx_t_9) {

      /* "metaphor/chem_gm/core/gmutils.py":296
 *         valst = str(valst)
 *         if item in atomlist:
 *             Item = item.capitalize()             # <<<<<<<<<<<<<<
 *         else:
 *             Item = key2short(item)
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_capitalize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 296, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      if (__pyx_t_10) {
        __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 296, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else {
        __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 296, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_Item, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":295
 *         valint = int(valst)
 *         valst = str(valst)
 *         if item in atomlist:             # <<<<<<<<<<<<<<
 *             Item = item.capitalize()
 *         else:
 */
      goto __pyx_L6;
    }

    /* "metaphor/chem_gm/core/gmutils.py":298
 *             Item = item.capitalize()
 *         else:
 *             Item = key2short(item)             # <<<<<<<<<<<<<<
 *         #valst = connectivities[item]   #config.get("co nnectivity", item)
 *         cond = not short or valint != defaultConnect[Item]
 */
    /*else*/ {
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_key2short); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 298, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      if (!__pyx_t_10) {
        __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_item); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 298, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_item};
          __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 298, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_GOTREF(__pyx_t_7);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_item};
          __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 298, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_GOTREF(__pyx_t_7);
        } else
        #endif
        {
          __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 298, __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_item);
          __Pyx_GIVEREF(__pyx_v_item);
          PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_item);
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 298, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_Item, __pyx_t_7);
      __pyx_t_7 = 0;
    }
    __pyx_L6:;

    /* "metaphor/chem_gm/core/gmutils.py":300
 *             Item = key2short(item)
 *         #valst = connectivities[item]   #config.get("co nnectivity", item)
 *         cond = not short or valint != defaultConnect[Item]             # <<<<<<<<<<<<<<
 *         if cond:
 *             if valint == -1:
 */
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_short); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 300, __pyx_L1_error)
    __pyx_t_2 = (!__pyx_t_9);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 300, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __pyx_t_6;
      __pyx_t_6 = 0;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultConnect); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 300, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_v_Item); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 300, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_valint, __pyx_t_11, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 300, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_7 = __pyx_t_6;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_L7_bool_binop_done:;
    __Pyx_XDECREF_SET(__pyx_v_cond, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":301
 *         #valst = connectivities[item]   #config.get("co nnectivity", item)
 *         cond = not short or valint != defaultConnect[Item]
 *         if cond:             # <<<<<<<<<<<<<<
 *             if valint == -1:
 *                 lst.append(Item)
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_cond); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 301, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "metaphor/chem_gm/core/gmutils.py":302
 *         cond = not short or valint != defaultConnect[Item]
 *         if cond:
 *             if valint == -1:             # <<<<<<<<<<<<<<
 *                 lst.append(Item)
 *             elif valint:
 */
      __pyx_t_7 = __Pyx_PyInt_EqObjC(__pyx_v_valint, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 302, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 302, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_2) {

        /* "metaphor/chem_gm/core/gmutils.py":303
 *         if cond:
 *             if valint == -1:
 *                 lst.append(Item)             # <<<<<<<<<<<<<<
 *             elif valint:
 *                 lst.append(Item + valst)
 */
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_lst, __pyx_v_Item); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 303, __pyx_L1_error)

        /* "metaphor/chem_gm/core/gmutils.py":302
 *         cond = not short or valint != defaultConnect[Item]
 *         if cond:
 *             if valint == -1:             # <<<<<<<<<<<<<<
 *                 lst.append(Item)
 *             elif valint:
 */
        goto __pyx_L10;
      }

      /* "metaphor/chem_gm/core/gmutils.py":304
 *             if valint == -1:
 *                 lst.append(Item)
 *             elif valint:             # <<<<<<<<<<<<<<
 *                 lst.append(Item + valst)
 *     if central is not None and central:
 */
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_valint); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 304, __pyx_L1_error)
      if (__pyx_t_2) {

        /* "metaphor/chem_gm/core/gmutils.py":305
 *                 lst.append(Item)
 *             elif valint:
 *                 lst.append(Item + valst)             # <<<<<<<<<<<<<<
 *     if central is not None and central:
 *         intersect = list(set(atomlist) & set(Hydrogenes))
 */
        __pyx_t_7 = PyNumber_Add(__pyx_v_Item, __pyx_v_valst); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 305, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_lst, __pyx_t_7); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 305, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "metaphor/chem_gm/core/gmutils.py":304
 *             if valint == -1:
 *                 lst.append(Item)
 *             elif valint:             # <<<<<<<<<<<<<<
 *                 lst.append(Item + valst)
 *     if central is not None and central:
 */
      }
      __pyx_L10:;

      /* "metaphor/chem_gm/core/gmutils.py":301
 *         #valst = connectivities[item]   #config.get("co nnectivity", item)
 *         cond = not short or valint != defaultConnect[Item]
 *         if cond:             # <<<<<<<<<<<<<<
 *             if valint == -1:
 *                 lst.append(Item)
 */
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":306
 *             elif valint:
 *                 lst.append(Item + valst)
 *     if central is not None and central:             # <<<<<<<<<<<<<<
 *         intersect = list(set(atomlist) & set(Hydrogenes))
 *         if fullH or not len(intersect):
 */
  __pyx_t_9 = (__pyx_v_central != Py_None);
  __pyx_t_13 = (__pyx_t_9 != 0);
  if (__pyx_t_13) {
  } else {
    __pyx_t_2 = __pyx_t_13;
    goto __pyx_L12_bool_binop_done;
  }
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_central); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 306, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_13;
  __pyx_L12_bool_binop_done:;
  if (__pyx_t_2) {

    /* "metaphor/chem_gm/core/gmutils.py":307
 *                 lst.append(Item + valst)
 *     if central is not None and central:
 *         intersect = list(set(atomlist) & set(Hydrogenes))             # <<<<<<<<<<<<<<
 *         if fullH or not len(intersect):
 *             candidatelist = atomlist
 */
    __pyx_t_1 = PySet_New(__pyx_v_atomlist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_Hydrogenes); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = PySet_New(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyNumber_And(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PySequence_List(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_intersect = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":308
 *     if central is not None and central:
 *         intersect = list(set(atomlist) & set(Hydrogenes))
 *         if fullH or not len(intersect):             # <<<<<<<<<<<<<<
 *             candidatelist = atomlist
 *         else:
 */
    __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_fullH); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 308, __pyx_L1_error)
    if (!__pyx_t_13) {
    } else {
      __pyx_t_2 = __pyx_t_13;
      goto __pyx_L15_bool_binop_done;
    }
    __pyx_t_4 = PyList_GET_SIZE(__pyx_v_intersect); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 308, __pyx_L1_error)
    __pyx_t_13 = ((!(__pyx_t_4 != 0)) != 0);
    __pyx_t_2 = __pyx_t_13;
    __pyx_L15_bool_binop_done:;
    if (__pyx_t_2) {

      /* "metaphor/chem_gm/core/gmutils.py":309
 *         intersect = list(set(atomlist) & set(Hydrogenes))
 *         if fullH or not len(intersect):
 *             candidatelist = atomlist             # <<<<<<<<<<<<<<
 *         else:
 *             candidatelist = atomlist.copy()
 */
      __Pyx_INCREF(__pyx_v_atomlist);
      __pyx_v_candidatelist = __pyx_v_atomlist;

      /* "metaphor/chem_gm/core/gmutils.py":308
 *     if central is not None and central:
 *         intersect = list(set(atomlist) & set(Hydrogenes))
 *         if fullH or not len(intersect):             # <<<<<<<<<<<<<<
 *             candidatelist = atomlist
 *         else:
 */
      goto __pyx_L14;
    }

    /* "metaphor/chem_gm/core/gmutils.py":311
 *             candidatelist = atomlist
 *         else:
 *             candidatelist = atomlist.copy()             # <<<<<<<<<<<<<<
 *             for val in intersect:
 *                 candidatelist.pop(candidatelist.index(val))
 */
    /*else*/ {
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_atomlist, __pyx_n_s_copy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 311, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      if (__pyx_t_1) {
        __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 311, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 311, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_v_candidatelist = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":312
 *         else:
 *             candidatelist = atomlist.copy()
 *             for val in intersect:             # <<<<<<<<<<<<<<
 *                 candidatelist.pop(candidatelist.index(val))
 *         addcentral = True
 */
      __pyx_t_6 = __pyx_v_intersect; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
      for (;;) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 312, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 312, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "metaphor/chem_gm/core/gmutils.py":313
 *             candidatelist = atomlist.copy()
 *             for val in intersect:
 *                 candidatelist.pop(candidatelist.index(val))             # <<<<<<<<<<<<<<
 *         addcentral = True
 *         if isinstance(central, int):
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_candidatelist, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_candidatelist, __pyx_n_s_index); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 313, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_14 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_14)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_14);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
          }
        }
        if (!__pyx_t_14) {
          __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_val); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 313, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_10)) {
            PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_v_val};
            __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 313, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_GOTREF(__pyx_t_11);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
            PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_v_val};
            __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 313, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_GOTREF(__pyx_t_11);
          } else
          #endif
          {
            __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 313, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_15);
            __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14); __pyx_t_14 = NULL;
            __Pyx_INCREF(__pyx_v_val);
            __Pyx_GIVEREF(__pyx_v_val);
            PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_v_val);
            __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_15, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 313, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        if (!__pyx_t_10) {
          __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 313, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_GOTREF(__pyx_t_7);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_1)) {
            PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_11};
            __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 313, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
            PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_11};
            __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 313, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          } else
          #endif
          {
            __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 313, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_15);
            __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_10); __pyx_t_10 = NULL;
            __Pyx_GIVEREF(__pyx_t_11);
            PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_t_11);
            __pyx_t_11 = 0;
            __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_15, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 313, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "metaphor/chem_gm/core/gmutils.py":312
 *         else:
 *             candidatelist = atomlist.copy()
 *             for val in intersect:             # <<<<<<<<<<<<<<
 *                 candidatelist.pop(candidatelist.index(val))
 *         addcentral = True
 */
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_L14:;

    /* "metaphor/chem_gm/core/gmutils.py":314
 *             for val in intersect:
 *                 candidatelist.pop(candidatelist.index(val))
 *         addcentral = True             # <<<<<<<<<<<<<<
 *         if isinstance(central, int):
 * #             addcentral = central != 3
 */
    __pyx_v_addcentral = 1;

    /* "metaphor/chem_gm/core/gmutils.py":315
 *                 candidatelist.pop(candidatelist.index(val))
 *         addcentral = True
 *         if isinstance(central, int):             # <<<<<<<<<<<<<<
 * #             addcentral = central != 3
 *             central = candidatelist[:central]
 */
    __pyx_t_2 = PyInt_Check(__pyx_v_central); 
    __pyx_t_13 = (__pyx_t_2 != 0);
    if (__pyx_t_13) {

      /* "metaphor/chem_gm/core/gmutils.py":317
 *         if isinstance(central, int):
 * #             addcentral = central != 3
 *             central = candidatelist[:central]             # <<<<<<<<<<<<<<
 *         elif isinstance(central, string_types):
 *             try:
 */
      __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_candidatelist, 0, 0, NULL, &__pyx_v_central, NULL, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 317, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF_SET(__pyx_v_central, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":315
 *                 candidatelist.pop(candidatelist.index(val))
 *         addcentral = True
 *         if isinstance(central, int):             # <<<<<<<<<<<<<<
 * #             addcentral = central != 3
 *             central = candidatelist[:central]
 */
      goto __pyx_L19;
    }

    /* "metaphor/chem_gm/core/gmutils.py":318
 * #             addcentral = central != 3
 *             central = candidatelist[:central]
 *         elif isinstance(central, string_types):             # <<<<<<<<<<<<<<
 *             try:
 * #                 addcentral = int(central) != 3
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_string_types); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_13 = PyObject_IsInstance(__pyx_v_central, __pyx_t_6); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 318, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_2 = (__pyx_t_13 != 0);
    if (__pyx_t_2) {

      /* "metaphor/chem_gm/core/gmutils.py":319
 *             central = candidatelist[:central]
 *         elif isinstance(central, string_types):
 *             try:             # <<<<<<<<<<<<<<
 * #                 addcentral = int(central) != 3
 *                 central = candidatelist[:int(central)]
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
        __Pyx_XGOTREF(__pyx_t_16);
        __Pyx_XGOTREF(__pyx_t_17);
        __Pyx_XGOTREF(__pyx_t_18);
        /*try:*/ {

          /* "metaphor/chem_gm/core/gmutils.py":321
 *             try:
 * #                 addcentral = int(central) != 3
 *                 central = candidatelist[:int(central)]             # <<<<<<<<<<<<<<
 *             except ValueError:
 *                 central = central.split(",")
 */
          __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_v_central); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 321, __pyx_L20_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_candidatelist, 0, 0, NULL, &__pyx_t_6, NULL, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 321, __pyx_L20_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF_SET(__pyx_v_central, __pyx_t_7);
          __pyx_t_7 = 0;

          /* "metaphor/chem_gm/core/gmutils.py":319
 *             central = candidatelist[:central]
 *         elif isinstance(central, string_types):
 *             try:             # <<<<<<<<<<<<<<
 * #                 addcentral = int(central) != 3
 *                 central = candidatelist[:int(central)]
 */
        }
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
        goto __pyx_L25_try_end;
        __pyx_L20_error:;
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "metaphor/chem_gm/core/gmutils.py":322
 * #                 addcentral = int(central) != 3
 *                 central = candidatelist[:int(central)]
 *             except ValueError:             # <<<<<<<<<<<<<<
 *                 central = central.split(",")
 * #         addcentral = addcentral and len(central) != 3
 */
        __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
        if (__pyx_t_5) {
          __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.getConfigString", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(0, 322, __pyx_L22_except_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GOTREF(__pyx_t_1);

          /* "metaphor/chem_gm/core/gmutils.py":323
 *                 central = candidatelist[:int(central)]
 *             except ValueError:
 *                 central = central.split(",")             # <<<<<<<<<<<<<<
 * #         addcentral = addcentral and len(central) != 3
 *         if addcentral:
 */
          __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_central, __pyx_n_s_split); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 323, __pyx_L22_except_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 323, __pyx_L22_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_DECREF_SET(__pyx_v_central, __pyx_t_11);
          __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          goto __pyx_L21_exception_handled;
        }
        goto __pyx_L22_except_error;
        __pyx_L22_except_error:;

        /* "metaphor/chem_gm/core/gmutils.py":319
 *             central = candidatelist[:central]
 *         elif isinstance(central, string_types):
 *             try:             # <<<<<<<<<<<<<<
 * #                 addcentral = int(central) != 3
 *                 central = candidatelist[:int(central)]
 */
        __Pyx_XGIVEREF(__pyx_t_16);
        __Pyx_XGIVEREF(__pyx_t_17);
        __Pyx_XGIVEREF(__pyx_t_18);
        __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
        goto __pyx_L1_error;
        __pyx_L21_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_16);
        __Pyx_XGIVEREF(__pyx_t_17);
        __Pyx_XGIVEREF(__pyx_t_18);
        __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
        __pyx_L25_try_end:;
      }

      /* "metaphor/chem_gm/core/gmutils.py":318
 * #             addcentral = central != 3
 *             central = candidatelist[:central]
 *         elif isinstance(central, string_types):             # <<<<<<<<<<<<<<
 *             try:
 * #                 addcentral = int(central) != 3
 */
    }
    __pyx_L19:;

    /* "metaphor/chem_gm/core/gmutils.py":325
 *                 central = central.split(",")
 * #         addcentral = addcentral and len(central) != 3
 *         if addcentral:             # <<<<<<<<<<<<<<
 *             lst.append("|".join(central))
 *     if int(classif):
 */
    __pyx_t_2 = (__pyx_v_addcentral != 0);
    if (__pyx_t_2) {

      /* "metaphor/chem_gm/core/gmutils.py":326
 * #         addcentral = addcentral and len(central) != 3
 *         if addcentral:
 *             lst.append("|".join(central))             # <<<<<<<<<<<<<<
 *     if int(classif):
 *         lst.append("T")
 */
      __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__47, __pyx_v_central); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_lst, __pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 326, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":325
 *                 central = central.split(",")
 * #         addcentral = addcentral and len(central) != 3
 *         if addcentral:             # <<<<<<<<<<<<<<
 *             lst.append("|".join(central))
 *     if int(classif):
 */
    }

    /* "metaphor/chem_gm/core/gmutils.py":306
 *             elif valint:
 *                 lst.append(Item + valst)
 *     if central is not None and central:             # <<<<<<<<<<<<<<
 *         intersect = list(set(atomlist) & set(Hydrogenes))
 *         if fullH or not len(intersect):
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":327
 *         if addcentral:
 *             lst.append("|".join(central))
 *     if int(classif):             # <<<<<<<<<<<<<<
 *         lst.append("T")
 *     if hidden is not None:
 */
  __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_classif); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __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, 327, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "metaphor/chem_gm/core/gmutils.py":328
 *             lst.append("|".join(central))
 *     if int(classif):
 *         lst.append("T")             # <<<<<<<<<<<<<<
 *     if hidden is not None:
 *         lst.append("%sN"% hidden)
 */
    __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_lst, __pyx_n_u_T); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 328, __pyx_L1_error)

    /* "metaphor/chem_gm/core/gmutils.py":327
 *         if addcentral:
 *             lst.append("|".join(central))
 *     if int(classif):             # <<<<<<<<<<<<<<
 *         lst.append("T")
 *     if hidden is not None:
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":329
 *     if int(classif):
 *         lst.append("T")
 *     if hidden is not None:             # <<<<<<<<<<<<<<
 *         lst.append("%sN"% hidden)
 * 
 */
  __pyx_t_2 = (__pyx_v_hidden != Py_None);
  __pyx_t_13 = (__pyx_t_2 != 0);
  if (__pyx_t_13) {

    /* "metaphor/chem_gm/core/gmutils.py":330
 *         lst.append("T")
 *     if hidden is not None:
 *         lst.append("%sN"% hidden)             # <<<<<<<<<<<<<<
 * 
 *     return "_".join(lst)
 */
    __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_sN, __pyx_v_hidden); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_lst, __pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 330, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":329
 *     if int(classif):
 *         lst.append("T")
 *     if hidden is not None:             # <<<<<<<<<<<<<<
 *         lst.append("%sN"% hidden)
 * 
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":332
 *         lst.append("%sN"% hidden)
 * 
 *     return "_".join(lst)             # <<<<<<<<<<<<<<
 * 
 * def ReverseConfigString2String(configstr):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyUnicode_Join(__pyx_n_u__7, __pyx_v_lst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmutils.py":282
 *     return reshash
 * 
 * def getConfigString(atomlist, connectivities, central, classif, hidden, fullH=False, short=False):             # <<<<<<<<<<<<<<
 *     """Creation de la chaine de configuration caracteristique de la structure.
 *     connectivities: dictionnaire des connectivites
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.getConfigString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_lst);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XDECREF(__pyx_v_valst);
  __Pyx_XDECREF(__pyx_v_valint);
  __Pyx_XDECREF(__pyx_v_Item);
  __Pyx_XDECREF(__pyx_v_cond);
  __Pyx_XDECREF(__pyx_v_intersect);
  __Pyx_XDECREF(__pyx_v_candidatelist);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_central);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmutils.py":334
 *     return "_".join(lst)
 * 
 * def ReverseConfigString2String(configstr):             # <<<<<<<<<<<<<<
 *     lst = ["Configurattion:"]
 *     connect, central, classif, hidden, fullH = ReverseConfigString(configstr)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_15ReverseConfigString2String(PyObject *__pyx_self, PyObject *__pyx_v_configstr); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_15ReverseConfigString2String = {"ReverseConfigString2String", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_15ReverseConfigString2String, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_15ReverseConfigString2String(PyObject *__pyx_self, PyObject *__pyx_v_configstr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ReverseConfigString2String (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_14ReverseConfigString2String(__pyx_self, ((PyObject *)__pyx_v_configstr));

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_14ReverseConfigString2String(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_configstr) {
  PyObject *__pyx_v_lst = NULL;
  PyObject *__pyx_v_connect = NULL;
  PyObject *__pyx_v_central = NULL;
  PyObject *__pyx_v_classif = NULL;
  PyObject *__pyx_v_hidden = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_fullH = 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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_UCS4 __pyx_t_17;
  __Pyx_RefNannySetupContext("ReverseConfigString2String", 0);

  /* "metaphor/chem_gm/core/gmutils.py":335
 * 
 * def ReverseConfigString2String(configstr):
 *     lst = ["Configurattion:"]             # <<<<<<<<<<<<<<
 *     connect, central, classif, hidden, fullH = ReverseConfigString(configstr)
 *     lst.append("\thidden: %s"% hidden)
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_kp_u_Configurattion);
  __Pyx_GIVEREF(__pyx_kp_u_Configurattion);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Configurattion);
  __pyx_v_lst = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":336
 * def ReverseConfigString2String(configstr):
 *     lst = ["Configurattion:"]
 *     connect, central, classif, hidden, fullH = ReverseConfigString(configstr)             # <<<<<<<<<<<<<<
 *     lst.append("\thidden: %s"% hidden)
 *     if not isinstance(central, string_types):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ReverseConfigString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 336, __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, 336, __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, 336, __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, 336, __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, 336, __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, 336, __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;
  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 != 5)) {
      if (size > 5) __Pyx_RaiseTooManyValuesError(5);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 336, __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_4 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 3); 
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 4); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 3); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 4); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_6);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[5] = {&__pyx_t_2,&__pyx_t_4,&__pyx_t_3,&__pyx_t_5,&__pyx_t_6};
      for (i=0; i < 5; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 336, __pyx_L1_error)
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    PyObject** temps[5] = {&__pyx_t_2,&__pyx_t_4,&__pyx_t_3,&__pyx_t_5,&__pyx_t_6};
    __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 336, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
    for (index=0; index < 5; index++) {
      PyObject* item = __pyx_t_8(__pyx_t_7); if (unlikely(!item)) goto __pyx_L3_unpacking_failed;
      __Pyx_GOTREF(item);
      *(temps[index]) = item;
    }
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 5) < 0) __PYX_ERR(0, 336, __pyx_L1_error)
    __pyx_t_8 = NULL;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_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, 336, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_connect = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_central = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_classif = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_hidden = __pyx_t_5;
  __pyx_t_5 = 0;
  __pyx_v_fullH = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":337
 *     lst = ["Configurattion:"]
 *     connect, central, classif, hidden, fullH = ReverseConfigString(configstr)
 *     lst.append("\thidden: %s"% hidden)             # <<<<<<<<<<<<<<
 *     if not isinstance(central, string_types):
 *         central = ", ".join(central)
 */
  __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_hidden_s, __pyx_v_hidden); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_lst, __pyx_t_1); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":338
 *     connect, central, classif, hidden, fullH = ReverseConfigString(configstr)
 *     lst.append("\thidden: %s"% hidden)
 *     if not isinstance(central, string_types):             # <<<<<<<<<<<<<<
 *         central = ", ".join(central)
 *     lst.append("\tcentral: %s" % central)
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_string_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_10 = PyObject_IsInstance(__pyx_v_central, __pyx_t_1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 338, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_11 = ((!(__pyx_t_10 != 0)) != 0);
  if (__pyx_t_11) {

    /* "metaphor/chem_gm/core/gmutils.py":339
 *     lst.append("\thidden: %s"% hidden)
 *     if not isinstance(central, string_types):
 *         central = ", ".join(central)             # <<<<<<<<<<<<<<
 *     lst.append("\tcentral: %s" % central)
 *     if classif:
 */
    __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__48, __pyx_v_central); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_central, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":338
 *     connect, central, classif, hidden, fullH = ReverseConfigString(configstr)
 *     lst.append("\thidden: %s"% hidden)
 *     if not isinstance(central, string_types):             # <<<<<<<<<<<<<<
 *         central = ", ".join(central)
 *     lst.append("\tcentral: %s" % central)
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":340
 *     if not isinstance(central, string_types):
 *         central = ", ".join(central)
 *     lst.append("\tcentral: %s" % central)             # <<<<<<<<<<<<<<
 *     if classif:
 *         lst.append("\tclassif: True")
 */
  __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_central_s, __pyx_v_central); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_lst, __pyx_t_1); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 340, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":341
 *         central = ", ".join(central)
 *     lst.append("\tcentral: %s" % central)
 *     if classif:             # <<<<<<<<<<<<<<
 *         lst.append("\tclassif: True")
 *     lst.append("\tconnectivity:")
 */
  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_classif); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 341, __pyx_L1_error)
  if (__pyx_t_11) {

    /* "metaphor/chem_gm/core/gmutils.py":342
 *     lst.append("\tcentral: %s" % central)
 *     if classif:
 *         lst.append("\tclassif: True")             # <<<<<<<<<<<<<<
 *     lst.append("\tconnectivity:")
 *     for key, val in connect.items():
 */
    __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_lst, __pyx_kp_u_classif_True); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 342, __pyx_L1_error)

    /* "metaphor/chem_gm/core/gmutils.py":341
 *         central = ", ".join(central)
 *     lst.append("\tcentral: %s" % central)
 *     if classif:             # <<<<<<<<<<<<<<
 *         lst.append("\tclassif: True")
 *     lst.append("\tconnectivity:")
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":343
 *     if classif:
 *         lst.append("\tclassif: True")
 *     lst.append("\tconnectivity:")             # <<<<<<<<<<<<<<
 *     for key, val in connect.items():
 *         lst.append("\t\t%s = %s"%(key, val))
 */
  __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_lst, __pyx_kp_u_connectivity_2); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 343, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmutils.py":344
 *         lst.append("\tclassif: True")
 *     lst.append("\tconnectivity:")
 *     for key, val in connect.items():             # <<<<<<<<<<<<<<
 *         lst.append("\t\t%s = %s"%(key, val))
 * 
 */
  __pyx_t_12 = 0;
  if (unlikely(__pyx_v_connect == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 344, __pyx_L1_error)
  }
  __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_connect, 0, __pyx_n_s_items, (&__pyx_t_13), (&__pyx_t_14)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_6;
  __pyx_t_6 = 0;
  while (1) {
    __pyx_t_15 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_13, &__pyx_t_12, &__pyx_t_6, &__pyx_t_5, NULL, __pyx_t_14);
    if (unlikely(__pyx_t_15 == 0)) break;
    if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":345
 *     lst.append("\tconnectivity:")
 *     for key, val in connect.items():
 *         lst.append("\t\t%s = %s"%(key, val))             # <<<<<<<<<<<<<<
 * 
 *     return "\n".join(lst)
 */
    __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_16 = 0;
    __pyx_t_17 = 127;
    __Pyx_INCREF(__pyx_kp_u__49);
    __pyx_t_16 += 2;
    __Pyx_GIVEREF(__pyx_kp_u__49);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u__49);
    __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_key), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_17 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_17) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_17;
    __pyx_t_16 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_kp_u__50);
    __pyx_t_16 += 3;
    __Pyx_GIVEREF(__pyx_kp_u__50);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__50);
    __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_val), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_17 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_17) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_17;
    __pyx_t_16 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_5, 4, __pyx_t_16, __pyx_t_17); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_lst, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 345, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":347
 *         lst.append("\t\t%s = %s"%(key, val))
 * 
 *     return "\n".join(lst)             # <<<<<<<<<<<<<<
 * 
 * def ReverseConfigString(configstr, toLong=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__51, __pyx_v_lst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmutils.py":334
 *     return "_".join(lst)
 * 
 * def ReverseConfigString2String(configstr):             # <<<<<<<<<<<<<<
 *     lst = ["Configurattion:"]
 *     connect, central, classif, hidden, fullH = ReverseConfigString(configstr)
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.ReverseConfigString2String", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_lst);
  __Pyx_XDECREF(__pyx_v_connect);
  __Pyx_XDECREF(__pyx_v_central);
  __Pyx_XDECREF(__pyx_v_classif);
  __Pyx_XDECREF(__pyx_v_hidden);
  __Pyx_XDECREF(__pyx_v_fullH);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmutils.py":349
 *     return "\n".join(lst)
 * 
 * def ReverseConfigString(configstr, toLong=True):             # <<<<<<<<<<<<<<
 *     connect = OrderedDict()
 *     central = 3
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_17ReverseConfigString(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_17ReverseConfigString = {"ReverseConfigString", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_17ReverseConfigString, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_17ReverseConfigString(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_configstr = 0;
  PyObject *__pyx_v_toLong = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ReverseConfigString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_configstr,&__pyx_n_s_toLong,0};
    PyObject* values[2] = {0,0};
    values[1] = ((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  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_toLong);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ReverseConfigString") < 0)) __PYX_ERR(0, 349, __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_configstr = values[0];
    __pyx_v_toLong = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ReverseConfigString", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 349, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.ReverseConfigString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_16ReverseConfigString(__pyx_self, __pyx_v_configstr, __pyx_v_toLong);

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_16ReverseConfigString(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_configstr, PyObject *__pyx_v_toLong) {
  PyObject *__pyx_v_connect = NULL;
  PyObject *__pyx_v_central = NULL;
  PyObject *__pyx_v_classif = NULL;
  PyObject *__pyx_v_hidden = NULL;
  int __pyx_v_fullH;
  PyObject *__pyx_v_lst = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_test = NULL;
  PyObject *__pyx_v_val = 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;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("ReverseConfigString", 0);

  /* "metaphor/chem_gm/core/gmutils.py":350
 * 
 * def ReverseConfigString(configstr, toLong=True):
 *     connect = OrderedDict()             # <<<<<<<<<<<<<<
 *     central = 3
 *     classif = False
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 350, __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, 350, __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, 350, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_connect = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":351
 * def ReverseConfigString(configstr, toLong=True):
 *     connect = OrderedDict()
 *     central = 3             # <<<<<<<<<<<<<<
 *     classif = False
 *     hidden = -1
 */
  __Pyx_INCREF(__pyx_int_3);
  __pyx_v_central = __pyx_int_3;

  /* "metaphor/chem_gm/core/gmutils.py":352
 *     connect = OrderedDict()
 *     central = 3
 *     classif = False             # <<<<<<<<<<<<<<
 *     hidden = -1
 *     fullH = False
 */
  __Pyx_INCREF(Py_False);
  __pyx_v_classif = Py_False;

  /* "metaphor/chem_gm/core/gmutils.py":353
 *     central = 3
 *     classif = False
 *     hidden = -1             # <<<<<<<<<<<<<<
 *     fullH = False
 *     if configstr:
 */
  __Pyx_INCREF(__pyx_int_neg_1);
  __pyx_v_hidden = __pyx_int_neg_1;

  /* "metaphor/chem_gm/core/gmutils.py":354
 *     classif = False
 *     hidden = -1
 *     fullH = False             # <<<<<<<<<<<<<<
 *     if configstr:
 *         central = []
 */
  __pyx_v_fullH = 0;

  /* "metaphor/chem_gm/core/gmutils.py":355
 *     hidden = -1
 *     fullH = False
 *     if configstr:             # <<<<<<<<<<<<<<
 *         central = []
 *         lst = configstr.split("_")
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_configstr); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 355, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "metaphor/chem_gm/core/gmutils.py":356
 *     fullH = False
 *     if configstr:
 *         central = []             # <<<<<<<<<<<<<<
 *         lst = configstr.split("_")
 *         for value in lst:
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_central, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":357
 *     if configstr:
 *         central = []
 *         lst = configstr.split("_")             # <<<<<<<<<<<<<<
 *         for value in lst:
 *             if not value:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_configstr, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_lst = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":358
 *         central = []
 *         lst = configstr.split("_")
 *         for value in lst:             # <<<<<<<<<<<<<<
 *             if not value:
 *                 continue
 */
    if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
      __pyx_t_2 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 358, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 358, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_5 >= 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_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 358, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_5 >= 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_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 358, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_6(__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, 358, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":359
 *         lst = configstr.split("_")
 *         for value in lst:
 *             if not value:             # <<<<<<<<<<<<<<
 *                 continue
 *             if value in ["T", "F", ""]:
 */
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 359, __pyx_L1_error)
      __pyx_t_7 = ((!__pyx_t_4) != 0);
      if (__pyx_t_7) {

        /* "metaphor/chem_gm/core/gmutils.py":360
 *         for value in lst:
 *             if not value:
 *                 continue             # <<<<<<<<<<<<<<
 *             if value in ["T", "F", ""]:
 *                 classif = value == "T"
 */
        goto __pyx_L4_continue;

        /* "metaphor/chem_gm/core/gmutils.py":359
 *         lst = configstr.split("_")
 *         for value in lst:
 *             if not value:             # <<<<<<<<<<<<<<
 *                 continue
 *             if value in ["T", "F", ""]:
 */
      }

      /* "metaphor/chem_gm/core/gmutils.py":361
 *             if not value:
 *                 continue
 *             if value in ["T", "F", ""]:             # <<<<<<<<<<<<<<
 *                 classif = value == "T"
 *             elif value[-1] in ["H", "D"]:
 */
      __Pyx_INCREF(__pyx_v_value);
      __pyx_t_1 = __pyx_v_value;
      __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_T, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
      if (!__pyx_t_4) {
      } else {
        __pyx_t_7 = __pyx_t_4;
        goto __pyx_L8_bool_binop_done;
      }
      __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_F, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
      if (!__pyx_t_4) {
      } else {
        __pyx_t_7 = __pyx_t_4;
        goto __pyx_L8_bool_binop_done;
      }
      __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_kp_u_, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
      __pyx_t_7 = __pyx_t_4;
      __pyx_L8_bool_binop_done:;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_4 = (__pyx_t_7 != 0);
      if (__pyx_t_4) {

        /* "metaphor/chem_gm/core/gmutils.py":362
 *                 continue
 *             if value in ["T", "F", ""]:
 *                 classif = value == "T"             # <<<<<<<<<<<<<<
 *             elif value[-1] in ["H", "D"]:
 *                 fullH = True
 */
        __pyx_t_1 = PyObject_RichCompare(__pyx_v_value, __pyx_n_u_T, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error)
        __Pyx_DECREF_SET(__pyx_v_classif, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "metaphor/chem_gm/core/gmutils.py":361
 *             if not value:
 *                 continue
 *             if value in ["T", "F", ""]:             # <<<<<<<<<<<<<<
 *                 classif = value == "T"
 *             elif value[-1] in ["H", "D"]:
 */
        goto __pyx_L7;
      }

      /* "metaphor/chem_gm/core/gmutils.py":363
 *             if value in ["T", "F", ""]:
 *                 classif = value == "T"
 *             elif value[-1] in ["H", "D"]:             # <<<<<<<<<<<<<<
 *                 fullH = True
 *             elif isint(value[0]) and value[-1]=="N":
 */
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_value, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_H, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 363, __pyx_L1_error)
      if (!__pyx_t_7) {
      } else {
        __pyx_t_4 = __pyx_t_7;
        goto __pyx_L11_bool_binop_done;
      }
      __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_D, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 363, __pyx_L1_error)
      __pyx_t_4 = __pyx_t_7;
      __pyx_L11_bool_binop_done:;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = (__pyx_t_4 != 0);
      if (__pyx_t_7) {

        /* "metaphor/chem_gm/core/gmutils.py":364
 *                 classif = value == "T"
 *             elif value[-1] in ["H", "D"]:
 *                 fullH = True             # <<<<<<<<<<<<<<
 *             elif isint(value[0]) and value[-1]=="N":
 *                 hidden = int(value[:-1])
 */
        __pyx_v_fullH = 1;

        /* "metaphor/chem_gm/core/gmutils.py":363
 *             if value in ["T", "F", ""]:
 *                 classif = value == "T"
 *             elif value[-1] in ["H", "D"]:             # <<<<<<<<<<<<<<
 *                 fullH = True
 *             elif isint(value[0]) and value[-1]=="N":
 */
        goto __pyx_L7;
      }

      /* "metaphor/chem_gm/core/gmutils.py":365
 *             elif value[-1] in ["H", "D"]:
 *                 fullH = True
 *             elif isint(value[0]) and value[-1]=="N":             # <<<<<<<<<<<<<<
 *                 hidden = int(value[:-1])
 *             elif isint(value[-1]):
 */
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_isint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 365, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 365, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_9) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __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_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __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_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __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_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 365, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
          __Pyx_GIVEREF(__pyx_t_8);
          PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_8);
          __pyx_t_8 = 0;
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 365, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_4) {
      } else {
        __pyx_t_7 = __pyx_t_4;
        goto __pyx_L13_bool_binop_done;
      }
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_value, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_N, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 365, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = __pyx_t_4;
      __pyx_L13_bool_binop_done:;
      if (__pyx_t_7) {

        /* "metaphor/chem_gm/core/gmutils.py":366
 *                 fullH = True
 *             elif isint(value[0]) and value[-1]=="N":
 *                 hidden = int(value[:-1])             # <<<<<<<<<<<<<<
 *             elif isint(value[-1]):
 *                 test = value[:-1]
 */
        __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_value, 0, -1L, NULL, NULL, &__pyx_slice__53, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 366, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 366, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF_SET(__pyx_v_hidden, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "metaphor/chem_gm/core/gmutils.py":365
 *             elif value[-1] in ["H", "D"]:
 *                 fullH = True
 *             elif isint(value[0]) and value[-1]=="N":             # <<<<<<<<<<<<<<
 *                 hidden = int(value[:-1])
 *             elif isint(value[-1]):
 */
        goto __pyx_L7;
      }

      /* "metaphor/chem_gm/core/gmutils.py":367
 *             elif isint(value[0]) and value[-1]=="N":
 *                 hidden = int(value[:-1])
 *             elif isint(value[-1]):             # <<<<<<<<<<<<<<
 *                 test = value[:-1]
 *                 val = int(value[-1])
 */
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_isint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 367, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_value, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 367, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      if (!__pyx_t_8) {
        __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 367, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_10};
          __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 367, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_10};
          __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 367, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        } else
        #endif
        {
          __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 367, __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_GIVEREF(__pyx_t_10);
          PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_10);
          __pyx_t_10 = 0;
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 367, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 367, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {

        /* "metaphor/chem_gm/core/gmutils.py":368
 *                 hidden = int(value[:-1])
 *             elif isint(value[-1]):
 *                 test = value[:-1]             # <<<<<<<<<<<<<<
 *                 val = int(value[-1])
 *                 #if test[:2] in ["gr", "is", "ch", "qm", "qp", "cc"]
 */
        __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_value, 0, -1L, NULL, NULL, &__pyx_slice__54, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 368, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_XDECREF_SET(__pyx_v_test, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "metaphor/chem_gm/core/gmutils.py":369
 *             elif isint(value[-1]):
 *                 test = value[:-1]
 *                 val = int(value[-1])             # <<<<<<<<<<<<<<
 *                 #if test[:2] in ["gr", "is", "ch", "qm", "qp", "cc"]
 *                 if toLong:
 */
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_value, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 369, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "metaphor/chem_gm/core/gmutils.py":371
 *                 val = int(value[-1])
 *                 #if test[:2] in ["gr", "is", "ch", "qm", "qp", "cc"]
 *                 if toLong:             # <<<<<<<<<<<<<<
 *                     key = key2long(test)
 *                 else:
 */
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_toLong); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 371, __pyx_L1_error)
        if (__pyx_t_7) {

          /* "metaphor/chem_gm/core/gmutils.py":372
 *                 #if test[:2] in ["gr", "is", "ch", "qm", "qp", "cc"]
 *                 if toLong:
 *                     key = key2long(test)             # <<<<<<<<<<<<<<
 *                 else:
 *                     key = key2short(test)
 */
          __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_key2long); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 372, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_9 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_9)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_9);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
            }
          }
          if (!__pyx_t_9) {
            __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_test); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __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_9, __pyx_v_test};
              __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 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_9, __pyx_v_test};
              __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_GOTREF(__pyx_t_1);
            } else
            #endif
            {
              __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 372, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
              __Pyx_INCREF(__pyx_v_test);
              __Pyx_GIVEREF(__pyx_v_test);
              PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_test);
              __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            }
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
          __pyx_t_1 = 0;

          /* "metaphor/chem_gm/core/gmutils.py":371
 *                 val = int(value[-1])
 *                 #if test[:2] in ["gr", "is", "ch", "qm", "qp", "cc"]
 *                 if toLong:             # <<<<<<<<<<<<<<
 *                     key = key2long(test)
 *                 else:
 */
          goto __pyx_L15;
        }

        /* "metaphor/chem_gm/core/gmutils.py":374
 *                     key = key2long(test)
 *                 else:
 *                     key = key2short(test)             # <<<<<<<<<<<<<<
 *                 connect[key] = val
 *             else:
 */
        /*else*/ {
          __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_key2short); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_10 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_10)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_10);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
            }
          }
          if (!__pyx_t_10) {
            __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_test); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __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_10, __pyx_v_test};
              __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 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_10, __pyx_v_test};
              __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_GOTREF(__pyx_t_1);
            } else
            #endif
            {
              __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 374, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __pyx_t_10 = NULL;
              __Pyx_INCREF(__pyx_v_test);
              __Pyx_GIVEREF(__pyx_v_test);
              PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_test);
              __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            }
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
          __pyx_t_1 = 0;
        }
        __pyx_L15:;

        /* "metaphor/chem_gm/core/gmutils.py":375
 *                 else:
 *                     key = key2short(test)
 *                 connect[key] = val             # <<<<<<<<<<<<<<
 *             else:
 *                 central = value.split("|")
 */
        if (unlikely(PyObject_SetItem(__pyx_v_connect, __pyx_v_key, __pyx_v_val) < 0)) __PYX_ERR(0, 375, __pyx_L1_error)

        /* "metaphor/chem_gm/core/gmutils.py":367
 *             elif isint(value[0]) and value[-1]=="N":
 *                 hidden = int(value[:-1])
 *             elif isint(value[-1]):             # <<<<<<<<<<<<<<
 *                 test = value[:-1]
 *                 val = int(value[-1])
 */
        goto __pyx_L7;
      }

      /* "metaphor/chem_gm/core/gmutils.py":377
 *                 connect[key] = val
 *             else:
 *                 central = value.split("|")             # <<<<<<<<<<<<<<
 *     return connect, central, classif, hidden, fullH
 * 
 */
      /*else*/ {
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF_SET(__pyx_v_central, __pyx_t_3);
        __pyx_t_3 = 0;
      }
      __pyx_L7:;

      /* "metaphor/chem_gm/core/gmutils.py":358
 *         central = []
 *         lst = configstr.split("_")
 *         for value in lst:             # <<<<<<<<<<<<<<
 *             if not value:
 *                 continue
 */
      __pyx_L4_continue:;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":355
 *     hidden = -1
 *     fullH = False
 *     if configstr:             # <<<<<<<<<<<<<<
 *         central = []
 *         lst = configstr.split("_")
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":378
 *             else:
 *                 central = value.split("|")
 *     return connect, central, classif, hidden, fullH             # <<<<<<<<<<<<<<
 * 
 * def module2short(module):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_fullH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_connect);
  __Pyx_GIVEREF(__pyx_v_connect);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_connect);
  __Pyx_INCREF(__pyx_v_central);
  __Pyx_GIVEREF(__pyx_v_central);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_central);
  __Pyx_INCREF(__pyx_v_classif);
  __Pyx_GIVEREF(__pyx_v_classif);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_classif);
  __Pyx_INCREF(__pyx_v_hidden);
  __Pyx_GIVEREF(__pyx_v_hidden);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_hidden);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmutils.py":349
 *     return "\n".join(lst)
 * 
 * def ReverseConfigString(configstr, toLong=True):             # <<<<<<<<<<<<<<
 *     connect = OrderedDict()
 *     central = 3
 */

  /* 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_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.ReverseConfigString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_connect);
  __Pyx_XDECREF(__pyx_v_central);
  __Pyx_XDECREF(__pyx_v_classif);
  __Pyx_XDECREF(__pyx_v_hidden);
  __Pyx_XDECREF(__pyx_v_lst);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_test);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmutils.py":380
 *     return connect, central, classif, hidden, fullH
 * 
 * def module2short(module):             # <<<<<<<<<<<<<<
 *     res = os.path.splitext(os.path.basename(module))[0]
 *     return res[3:] if res.startswith('lib') else res
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_19module2short(PyObject *__pyx_self, PyObject *__pyx_v_module); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_19module2short = {"module2short", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_19module2short, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_19module2short(PyObject *__pyx_self, PyObject *__pyx_v_module) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("module2short (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_18module2short(__pyx_self, ((PyObject *)__pyx_v_module));

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_18module2short(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_module) {
  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;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("module2short", 0);

  /* "metaphor/chem_gm/core/gmutils.py":381
 * 
 * def module2short(module):
 *     res = os.path.splitext(os.path.basename(module))[0]             # <<<<<<<<<<<<<<
 *     return res[3:] if res.startswith('lib') else res
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 381, __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, 381, __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_splitext); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_basename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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_module); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 381, __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_module};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 381, __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_module};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 381, __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, 381, __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_module);
      __Pyx_GIVEREF(__pyx_v_module);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_module);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 381, __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 = 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_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 381, __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, 381, __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, 381, __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(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 381, __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_3);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
      __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, 381, __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_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 381, __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/gmutils.py":382
 * def module2short(module):
 *     res = os.path.splitext(os.path.basename(module))[0]
 *     return res[3:] if res.startswith('lib') else res             # <<<<<<<<<<<<<<
 * 
 * def leftjustify(source, lens):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_7) {
    __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_res, 3, 0, NULL, NULL, &__pyx_slice__57, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __pyx_t_6;
    __pyx_t_6 = 0;
  } else {
    __Pyx_INCREF(__pyx_v_res);
    __pyx_t_2 = __pyx_v_res;
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmutils.py":380
 *     return connect, central, classif, hidden, fullH
 * 
 * def module2short(module):             # <<<<<<<<<<<<<<
 *     res = os.path.splitext(os.path.basename(module))[0]
 *     return res[3:] if res.startswith('lib') else res
 */

  /* 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_6);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.module2short", __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/gmutils.py":384
 *     return res[3:] if res.startswith('lib') else res
 * 
 * def leftjustify(source, lens):             # <<<<<<<<<<<<<<
 *     """Justify by the left"""
 *     res = source
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_21leftjustify(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_7chem_gm_4core_7gmutils_20leftjustify[] = "Justify by the left";
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_21leftjustify = {"leftjustify", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_21leftjustify, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_7chem_gm_4core_7gmutils_20leftjustify};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_21leftjustify(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_source = 0;
  PyObject *__pyx_v_lens = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("leftjustify (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,&__pyx_n_s_lens,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_source)) != 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_lens)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("leftjustify", 1, 2, 2, 1); __PYX_ERR(0, 384, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "leftjustify") < 0)) __PYX_ERR(0, 384, __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_source = values[0];
    __pyx_v_lens = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("leftjustify", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 384, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.leftjustify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_20leftjustify(__pyx_self, __pyx_v_source, __pyx_v_lens);

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_20leftjustify(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_source, PyObject *__pyx_v_lens) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_nn = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("leftjustify", 0);

  /* "metaphor/chem_gm/core/gmutils.py":386
 * def leftjustify(source, lens):
 *     """Justify by the left"""
 *     res = source             # <<<<<<<<<<<<<<
 *     nn = lens - len(res)
 *     if nn > 0:
 */
  __Pyx_INCREF(__pyx_v_source);
  __pyx_v_res = __pyx_v_source;

  /* "metaphor/chem_gm/core/gmutils.py":387
 *     """Justify by the left"""
 *     res = source
 *     nn = lens - len(res)             # <<<<<<<<<<<<<<
 *     if nn > 0:
 *         return source + ' ' * nn
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_res); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 387, __pyx_L1_error)
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Subtract(__pyx_v_lens, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_nn = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":388
 *     res = source
 *     nn = lens - len(res)
 *     if nn > 0:             # <<<<<<<<<<<<<<
 *         return source + ' ' * nn
 *     else:
 */
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_nn, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 388, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 388, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "metaphor/chem_gm/core/gmutils.py":389
 *     nn = lens - len(res)
 *     if nn > 0:
 *         return source + ' ' * nn             # <<<<<<<<<<<<<<
 *     else:
 *         return source
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyNumber_Multiply(__pyx_kp_u__58, __pyx_v_nn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyNumber_Add(__pyx_v_source, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmutils.py":388
 *     res = source
 *     nn = lens - len(res)
 *     if nn > 0:             # <<<<<<<<<<<<<<
 *         return source + ' ' * nn
 *     else:
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":391
 *         return source + ' ' * nn
 *     else:
 *         return source             # <<<<<<<<<<<<<<
 * 
 * #-------------------------------------------------------------------
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_source);
    __pyx_r = __pyx_v_source;
    goto __pyx_L0;
  }

  /* "metaphor/chem_gm/core/gmutils.py":384
 *     return res[3:] if res.startswith('lib') else res
 * 
 * def leftjustify(source, lens):             # <<<<<<<<<<<<<<
 *     """Justify by the left"""
 *     res = source
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.leftjustify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_nn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmutils.py":394
 * 
 * #-------------------------------------------------------------------
 * def fullsize(smiletk):             # <<<<<<<<<<<<<<
 *     # return size of a list recursively including sublists sizes
 *     S = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_23fullsize(PyObject *__pyx_self, PyObject *__pyx_v_smiletk); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_23fullsize = {"fullsize", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_23fullsize, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_23fullsize(PyObject *__pyx_self, PyObject *__pyx_v_smiletk) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fullsize (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_22fullsize(__pyx_self, ((PyObject *)__pyx_v_smiletk));

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_22fullsize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_smiletk) {
  PyObject *__pyx_v_S = NULL;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("fullsize", 0);

  /* "metaphor/chem_gm/core/gmutils.py":396
 * def fullsize(smiletk):
 *     # return size of a list recursively including sublists sizes
 *     S = 0             # <<<<<<<<<<<<<<
 *     for val in smiletk:
 *         if isinstance(val, list):
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_S = __pyx_int_0;

  /* "metaphor/chem_gm/core/gmutils.py":397
 *     # return size of a list recursively including sublists sizes
 *     S = 0
 *     for val in smiletk:             # <<<<<<<<<<<<<<
 *         if isinstance(val, list):
 *             S += fullsize(val)
 */
  if (likely(PyList_CheckExact(__pyx_v_smiletk)) || PyTuple_CheckExact(__pyx_v_smiletk)) {
    __pyx_t_1 = __pyx_v_smiletk; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_smiletk); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 397, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      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_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 397, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 397, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= 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_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 397, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 397, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__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, 397, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":398
 *     S = 0
 *     for val in smiletk:
 *         if isinstance(val, list):             # <<<<<<<<<<<<<<
 *             S += fullsize(val)
 *         else:
 */
    __pyx_t_5 = PyList_Check(__pyx_v_val); 
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (__pyx_t_6) {

      /* "metaphor/chem_gm/core/gmutils.py":399
 *     for val in smiletk:
 *         if isinstance(val, list):
 *             S += fullsize(val)             # <<<<<<<<<<<<<<
 *         else:
 *             S += 1
 */
      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_fullsize); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 399, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(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_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_val); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 399, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_val};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 399, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_val};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 399, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        {
          __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 399, __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_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 399, __pyx_L1_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_t_7 = PyNumber_InPlaceAdd(__pyx_v_S, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 399, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_S, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":398
 *     S = 0
 *     for val in smiletk:
 *         if isinstance(val, list):             # <<<<<<<<<<<<<<
 *             S += fullsize(val)
 *         else:
 */
      goto __pyx_L5;
    }

    /* "metaphor/chem_gm/core/gmutils.py":401
 *             S += fullsize(val)
 *         else:
 *             S += 1             # <<<<<<<<<<<<<<
 *     return S
 * 
 */
    /*else*/ {
      __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_v_S, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 401, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF_SET(__pyx_v_S, __pyx_t_7);
      __pyx_t_7 = 0;
    }
    __pyx_L5:;

    /* "metaphor/chem_gm/core/gmutils.py":397
 *     # return size of a list recursively including sublists sizes
 *     S = 0
 *     for val in smiletk:             # <<<<<<<<<<<<<<
 *         if isinstance(val, list):
 *             S += fullsize(val)
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":402
 *         else:
 *             S += 1
 *     return S             # <<<<<<<<<<<<<<
 * 
 * def findinlist(lst, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_S);
  __pyx_r = __pyx_v_S;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmutils.py":394
 * 
 * #-------------------------------------------------------------------
 * def fullsize(smiletk):             # <<<<<<<<<<<<<<
 *     # return size of a list recursively including sublists sizes
 *     S = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.fullsize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_S);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmutils.py":404
 *     return S
 * 
 * def findinlist(lst, value):             # <<<<<<<<<<<<<<
 *     try:
 *         return lst.index(value)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_25findinlist(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_25findinlist = {"findinlist", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_25findinlist, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_25findinlist(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_lst = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("findinlist (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lst,&__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_lst)) != 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("findinlist", 1, 2, 2, 1); __PYX_ERR(0, 404, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "findinlist") < 0)) __PYX_ERR(0, 404, __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_lst = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("findinlist", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 404, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.findinlist", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_24findinlist(__pyx_self, __pyx_v_lst, __pyx_v_value);

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_24findinlist(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lst, 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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("findinlist", 0);

  /* "metaphor/chem_gm/core/gmutils.py":405
 * 
 * def findinlist(lst, value):
 *     try:             # <<<<<<<<<<<<<<
 *         return lst.index(value)
 *     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/gmutils.py":406
 * def findinlist(lst, value):
 *     try:
 *         return lst.index(value)             # <<<<<<<<<<<<<<
 *     except:
 *         return -1
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_lst, __pyx_n_s_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 406, __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_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 406, __pyx_L3_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_value};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 406, __pyx_L3_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_value};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 406, __pyx_L3_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        {
          __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 406, __pyx_L3_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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_value);
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 406, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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/gmutils.py":405
 * 
 * def findinlist(lst, value):
 *     try:             # <<<<<<<<<<<<<<
 *         return lst.index(value)
 *     except:
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":407
 *     try:
 *         return lst.index(value)
 *     except:             # <<<<<<<<<<<<<<
 *         return -1
 * 
 */
    /*except:*/ {
      __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.findinlist", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_7) < 0) __PYX_ERR(0, 407, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_7);

      /* "metaphor/chem_gm/core/gmutils.py":408
 *         return lst.index(value)
 *     except:
 *         return -1             # <<<<<<<<<<<<<<
 * 
 * #--------------------------------------------------------------
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_int_neg_1);
      __pyx_r = __pyx_int_neg_1;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_except_return;
    }
    __pyx_L5_except_error:;

    /* "metaphor/chem_gm/core/gmutils.py":405
 * 
 * def findinlist(lst, value):
 *     try:             # <<<<<<<<<<<<<<
 *         return lst.index(value)
 *     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/gmutils.py":404
 *     return S
 * 
 * def findinlist(lst, value):             # <<<<<<<<<<<<<<
 *     try:
 *         return lst.index(value)
 */

  /* 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_AddTraceback("metaphor.chem_gm.core.gmutils.findinlist", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmutils.py":411
 * 
 * #--------------------------------------------------------------
 * def chargekey(value, islong=False):             # <<<<<<<<<<<<<<
 *     if islong:
 *         if value > 0:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_27chargekey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_27chargekey = {"chargekey", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_27chargekey, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_27chargekey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_islong = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("chargekey (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_islong,0};
    PyObject* values[2] = {0,0};
    values[1] = ((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  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_value)) != 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_islong);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chargekey") < 0)) __PYX_ERR(0, 411, __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_value = values[0];
    __pyx_v_islong = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("chargekey", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 411, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.chargekey", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_26chargekey(__pyx_self, __pyx_v_value, __pyx_v_islong);

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_26chargekey(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_islong) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("chargekey", 0);

  /* "metaphor/chem_gm/core/gmutils.py":412
 * #--------------------------------------------------------------
 * def chargekey(value, islong=False):
 *     if islong:             # <<<<<<<<<<<<<<
 *         if value > 0:
 *             return "charge(+%d)"% value
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_islong); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 412, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/chem_gm/core/gmutils.py":413
 * def chargekey(value, islong=False):
 *     if islong:
 *         if value > 0:             # <<<<<<<<<<<<<<
 *             return "charge(+%d)"% value
 *         return "charge(%d)"% value
 */
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_value, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 413, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 413, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "metaphor/chem_gm/core/gmutils.py":414
 *     if islong:
 *         if value > 0:
 *             return "charge(+%d)"% value             # <<<<<<<<<<<<<<
 *         return "charge(%d)"% value
 *     if value > 0:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_charge_d, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 414, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "metaphor/chem_gm/core/gmutils.py":413
 * def chargekey(value, islong=False):
 *     if islong:
 *         if value > 0:             # <<<<<<<<<<<<<<
 *             return "charge(+%d)"% value
 *         return "charge(%d)"% value
 */
    }

    /* "metaphor/chem_gm/core/gmutils.py":415
 *         if value > 0:
 *             return "charge(+%d)"% value
 *         return "charge(%d)"% value             # <<<<<<<<<<<<<<
 *     if value > 0:
 *         return "qp%d"% value
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_charge_d_2, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmutils.py":412
 * #--------------------------------------------------------------
 * def chargekey(value, islong=False):
 *     if islong:             # <<<<<<<<<<<<<<
 *         if value > 0:
 *             return "charge(+%d)"% value
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":416
 *             return "charge(+%d)"% value
 *         return "charge(%d)"% value
 *     if value > 0:             # <<<<<<<<<<<<<<
 *         return "qp%d"% value
 *     return "qm%d"% (-value)
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_value, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 416, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "metaphor/chem_gm/core/gmutils.py":417
 *         return "charge(%d)"% value
 *     if value > 0:
 *         return "qp%d"% value             # <<<<<<<<<<<<<<
 *     return "qm%d"% (-value)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_qp_d, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmutils.py":416
 *             return "charge(+%d)"% value
 *         return "charge(%d)"% value
 *     if value > 0:             # <<<<<<<<<<<<<<
 *         return "qp%d"% value
 *     return "qm%d"% (-value)
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":418
 *     if value > 0:
 *         return "qp%d"% value
 *     return "qm%d"% (-value)             # <<<<<<<<<<<<<<
 * 
 * def gradekey(index, islong=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyNumber_Negative(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_qm_d, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmutils.py":411
 * 
 * #--------------------------------------------------------------
 * def chargekey(value, islong=False):             # <<<<<<<<<<<<<<
 *     if islong:
 *         if value > 0:
 */

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

/* "metaphor/chem_gm/core/gmutils.py":420
 *     return "qm%d"% (-value)
 * 
 * def gradekey(index, islong=False):             # <<<<<<<<<<<<<<
 *     if index:
 *         if islong:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_29gradekey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_29gradekey = {"gradekey", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_29gradekey, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_29gradekey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_v_islong = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gradekey (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_islong,0};
    PyObject* values[2] = {0,0};
    values[1] = ((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  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_index)) != 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_islong);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "gradekey") < 0)) __PYX_ERR(0, 420, __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_index = values[0];
    __pyx_v_islong = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("gradekey", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 420, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.gradekey", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_28gradekey(__pyx_self, __pyx_v_index, __pyx_v_islong);

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_28gradekey(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index, PyObject *__pyx_v_islong) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("gradekey", 0);

  /* "metaphor/chem_gm/core/gmutils.py":421
 * 
 * def gradekey(index, islong=False):
 *     if index:             # <<<<<<<<<<<<<<
 *         if islong:
 *             return "degree(%d)"% index
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_index); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 421, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/chem_gm/core/gmutils.py":422
 * def gradekey(index, islong=False):
 *     if index:
 *         if islong:             # <<<<<<<<<<<<<<
 *             return "degree(%d)"% index
 *         return "dgr%d"% index
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_islong); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "metaphor/chem_gm/core/gmutils.py":423
 *     if index:
 *         if islong:
 *             return "degree(%d)"% index             # <<<<<<<<<<<<<<
 *         return "dgr%d"% index
 *     if islong:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_degree_d, __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 423, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "metaphor/chem_gm/core/gmutils.py":422
 * def gradekey(index, islong=False):
 *     if index:
 *         if islong:             # <<<<<<<<<<<<<<
 *             return "degree(%d)"% index
 *         return "dgr%d"% index
 */
    }

    /* "metaphor/chem_gm/core/gmutils.py":424
 *         if islong:
 *             return "degree(%d)"% index
 *         return "dgr%d"% index             # <<<<<<<<<<<<<<
 *     if islong:
 *         return "degree"
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_dgr_d, __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmutils.py":421
 * 
 * def gradekey(index, islong=False):
 *     if index:             # <<<<<<<<<<<<<<
 *         if islong:
 *             return "degree(%d)"% index
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":425
 *             return "degree(%d)"% index
 *         return "dgr%d"% index
 *     if islong:             # <<<<<<<<<<<<<<
 *         return "degree"
 *     return "dgr"
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_islong); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 425, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/chem_gm/core/gmutils.py":426
 *         return "dgr%d"% index
 *     if islong:
 *         return "degree"             # <<<<<<<<<<<<<<
 *     return "dgr"
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_u_degree);
    __pyx_r = __pyx_n_u_degree;
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmutils.py":425
 *             return "degree(%d)"% index
 *         return "dgr%d"% index
 *     if islong:             # <<<<<<<<<<<<<<
 *         return "degree"
 *     return "dgr"
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":427
 *     if islong:
 *         return "degree"
 *     return "dgr"             # <<<<<<<<<<<<<<
 * 
 * def isokey(index, islong=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_n_u_dgr);
  __pyx_r = __pyx_n_u_dgr;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmutils.py":420
 *     return "qm%d"% (-value)
 * 
 * def gradekey(index, islong=False):             # <<<<<<<<<<<<<<
 *     if index:
 *         if islong:
 */

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

/* "metaphor/chem_gm/core/gmutils.py":429
 *     return "dgr"
 * 
 * def isokey(index, islong=False):             # <<<<<<<<<<<<<<
 *     if index:
 *         if islong:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_31isokey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_31isokey = {"isokey", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_31isokey, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_31isokey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_v_islong = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isokey (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_islong,0};
    PyObject* values[2] = {0,0};
    values[1] = ((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  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_index)) != 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_islong);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isokey") < 0)) __PYX_ERR(0, 429, __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_index = values[0];
    __pyx_v_islong = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("isokey", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 429, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.isokey", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_30isokey(__pyx_self, __pyx_v_index, __pyx_v_islong);

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_30isokey(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index, PyObject *__pyx_v_islong) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("isokey", 0);

  /* "metaphor/chem_gm/core/gmutils.py":430
 * 
 * def isokey(index, islong=False):
 *     if index:             # <<<<<<<<<<<<<<
 *         if islong:
 *             return "isomer(%d)"% index
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_index); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 430, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/chem_gm/core/gmutils.py":431
 * def isokey(index, islong=False):
 *     if index:
 *         if islong:             # <<<<<<<<<<<<<<
 *             return "isomer(%d)"% index
 *         return "iso%s"% index
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_islong); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 431, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "metaphor/chem_gm/core/gmutils.py":432
 *     if index:
 *         if islong:
 *             return "isomer(%d)"% index             # <<<<<<<<<<<<<<
 *         return "iso%s"% index
 *     if islong:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_isomer_d, __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 432, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "metaphor/chem_gm/core/gmutils.py":431
 * def isokey(index, islong=False):
 *     if index:
 *         if islong:             # <<<<<<<<<<<<<<
 *             return "isomer(%d)"% index
 *         return "iso%s"% index
 */
    }

    /* "metaphor/chem_gm/core/gmutils.py":433
 *         if islong:
 *             return "isomer(%d)"% index
 *         return "iso%s"% index             # <<<<<<<<<<<<<<
 *     if islong:
 *         return "isomer"
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_iso_s, __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmutils.py":430
 * 
 * def isokey(index, islong=False):
 *     if index:             # <<<<<<<<<<<<<<
 *         if islong:
 *             return "isomer(%d)"% index
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":434
 *             return "isomer(%d)"% index
 *         return "iso%s"% index
 *     if islong:             # <<<<<<<<<<<<<<
 *         return "isomer"
 *     return "iso"
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_islong); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 434, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/chem_gm/core/gmutils.py":435
 *         return "iso%s"% index
 *     if islong:
 *         return "isomer"             # <<<<<<<<<<<<<<
 *     return "iso"
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_u_isomer);
    __pyx_r = __pyx_n_u_isomer;
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmutils.py":434
 *             return "isomer(%d)"% index
 *         return "iso%s"% index
 *     if islong:             # <<<<<<<<<<<<<<
 *         return "isomer"
 *     return "iso"
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":436
 *     if islong:
 *         return "isomer"
 *     return "iso"             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_n_u_iso);
  __pyx_r = __pyx_n_u_iso;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmutils.py":429
 *     return "dgr"
 * 
 * def isokey(index, islong=False):             # <<<<<<<<<<<<<<
 *     if index:
 *         if islong:
 */

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

/* "metaphor/chem_gm/core/gmutils.py":439
 * 
 * 
 * def chikey(index, islong=False):             # <<<<<<<<<<<<<<
 *     if islong:
 *         return "chiral(%d)"% index
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_33chikey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_33chikey = {"chikey", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_33chikey, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_33chikey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_v_islong = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("chikey (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_islong,0};
    PyObject* values[2] = {0,0};
    values[1] = ((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  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_index)) != 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_islong);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chikey") < 0)) __PYX_ERR(0, 439, __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_index = values[0];
    __pyx_v_islong = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("chikey", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 439, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.chikey", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_32chikey(__pyx_self, __pyx_v_index, __pyx_v_islong);

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_32chikey(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index, PyObject *__pyx_v_islong) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("chikey", 0);

  /* "metaphor/chem_gm/core/gmutils.py":440
 * 
 * def chikey(index, islong=False):
 *     if islong:             # <<<<<<<<<<<<<<
 *         return "chiral(%d)"% index
 *     return "chi%s"% index
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_islong); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 440, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/chem_gm/core/gmutils.py":441
 * def chikey(index, islong=False):
 *     if islong:
 *         return "chiral(%d)"% index             # <<<<<<<<<<<<<<
 *     return "chi%s"% index
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_chiral_d, __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmutils.py":440
 * 
 * def chikey(index, islong=False):
 *     if islong:             # <<<<<<<<<<<<<<
 *         return "chiral(%d)"% index
 *     return "chi%s"% index
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":442
 *     if islong:
 *         return "chiral(%d)"% index
 *     return "chi%s"% index             # <<<<<<<<<<<<<<
 * 
 * def cyclekey(index, islong=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_chi_s, __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmutils.py":439
 * 
 * 
 * def chikey(index, islong=False):             # <<<<<<<<<<<<<<
 *     if islong:
 *         return "chiral(%d)"% index
 */

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

/* "metaphor/chem_gm/core/gmutils.py":444
 *     return "chi%s"% index
 * 
 * def cyclekey(index, islong=False):             # <<<<<<<<<<<<<<
 *     if islong:
 *         return "cycle(%d)"% index
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_35cyclekey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_35cyclekey = {"cyclekey", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_35cyclekey, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_35cyclekey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_v_islong = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cyclekey (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_islong,0};
    PyObject* values[2] = {0,0};
    values[1] = ((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  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_index)) != 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_islong);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cyclekey") < 0)) __PYX_ERR(0, 444, __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_index = values[0];
    __pyx_v_islong = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cyclekey", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 444, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.cyclekey", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_34cyclekey(__pyx_self, __pyx_v_index, __pyx_v_islong);

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_34cyclekey(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index, PyObject *__pyx_v_islong) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("cyclekey", 0);

  /* "metaphor/chem_gm/core/gmutils.py":445
 * 
 * def cyclekey(index, islong=False):
 *     if islong:             # <<<<<<<<<<<<<<
 *         return "cycle(%d)"% index
 *     return "ccl%d"% index
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_islong); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 445, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/chem_gm/core/gmutils.py":446
 * def cyclekey(index, islong=False):
 *     if islong:
 *         return "cycle(%d)"% index             # <<<<<<<<<<<<<<
 *     return "ccl%d"% index
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_cycle_d, __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmutils.py":445
 * 
 * def cyclekey(index, islong=False):
 *     if islong:             # <<<<<<<<<<<<<<
 *         return "cycle(%d)"% index
 *     return "ccl%d"% index
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":447
 *     if islong:
 *         return "cycle(%d)"% index
 *     return "ccl%d"% index             # <<<<<<<<<<<<<<
 * 
 * structkeysgradeless = [isokey(index, True) for index in [1, 2]] + \
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_ccl_d, __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmutils.py":444
 *     return "chi%s"% index
 * 
 * def cyclekey(index, islong=False):             # <<<<<<<<<<<<<<
 *     if islong:
 *         return "cycle(%d)"% index
 */

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

/* "metaphor/chem_gm/core/gmutils.py":470
 * connectdef = defaultdict(lambda: -1, {val: 0 for val in structkeysgradeless})
 * 
 * def connectdefault(full_0=False):             # <<<<<<<<<<<<<<
 *     """Dictionhaire des connexions par dfaut. Tous les lments non
 *     explicitement affects sont affectes par dfaut a -1.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_37connectdefault(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8metaphor_7chem_gm_4core_7gmutils_36connectdefault[] = "Dictionhaire des connexions par d\303\251faut. Tous les \303\251l\303\251ments non \n    explicitement affect\303\251s sont affectes par d\303\251faut a -1.\n    Si Full_0 est vrai, c'est le d\303\251faut des mod\303\250les avec hydrogene.\n    Sinon, c'est le d\303\251faut cdes mod\303\250les sans hydrigene.\n    ";
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_37connectdefault = {"connectdefault", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_37connectdefault, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8metaphor_7chem_gm_4core_7gmutils_36connectdefault};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_37connectdefault(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_full_0 = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("connectdefault (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_full_0,0};
    PyObject* values[1] = {0};
    values[0] = ((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  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_full_0);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "connectdefault") < 0)) __PYX_ERR(0, 470, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_full_0 = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("connectdefault", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 470, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.connectdefault", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_36connectdefault(__pyx_self, __pyx_v_full_0);

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

/* "metaphor/chem_gm/core/gmutils.py":477
 *     """
 *     if full_0:
 *         return defaultdict(lambda: -1, {val: 0 for val in structkeys})             # <<<<<<<<<<<<<<
 *     else:
 *         return defaultdict(lambda: -1, {val: 0 for val in structkeysgradeless})
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_14connectdefault_lambda1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_14connectdefault_lambda1 = {"lambda1", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_14connectdefault_lambda1, METH_NOARGS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_14connectdefault_lambda1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self);

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

static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda1", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_neg_1);
  __pyx_r = __pyx_int_neg_1;
  goto __pyx_L0;

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

/* "metaphor/chem_gm/core/gmutils.py":479
 *         return defaultdict(lambda: -1, {val: 0 for val in structkeys})
 *     else:
 *         return defaultdict(lambda: -1, {val: 0 for val in structkeysgradeless})             # <<<<<<<<<<<<<<
 * #         val = connectdef.copy()
 * #         val.update( {
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_14connectdefault_1lambda2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_14connectdefault_1lambda2 = {"lambda2", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_14connectdefault_1lambda2, METH_NOARGS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_14connectdefault_1lambda2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self);

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

static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda2", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_neg_1);
  __pyx_r = __pyx_int_neg_1;
  goto __pyx_L0;

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

/* "metaphor/chem_gm/core/gmutils.py":470
 * connectdef = defaultdict(lambda: -1, {val: 0 for val in structkeysgradeless})
 * 
 * def connectdefault(full_0=False):             # <<<<<<<<<<<<<<
 *     """Dictionhaire des connexions par dfaut. Tous les lments non
 *     explicitement affects sont affectes par dfaut a -1.
 */

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_36connectdefault(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_full_0) {
  PyObject *__pyx_9genexpr15__pyx_v_val = NULL;
  PyObject *__pyx_9genexpr16__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;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("connectdefault", 0);

  /* "metaphor/chem_gm/core/gmutils.py":476
 *     Sinon, c'est le dfaut cdes modles sans hydrigene.
 *     """
 *     if full_0:             # <<<<<<<<<<<<<<
 *         return defaultdict(lambda: -1, {val: 0 for val in structkeys})
 *     else:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_full_0); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 476, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "metaphor/chem_gm/core/gmutils.py":477
 *     """
 *     if full_0:
 *         return defaultdict(lambda: -1, {val: 0 for val in structkeys})             # <<<<<<<<<<<<<<
 *     else:
 *         return defaultdict(lambda: -1, {val: 0 for val in structkeysgradeless})
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 477, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_14connectdefault_lambda1, 0, __pyx_n_s_connectdefault_locals_lambda, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 477, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    { /* enter inner scope */
      __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 477, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_structkeys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 477, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
        __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
      } else {
        __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 477, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 477, __pyx_L6_error)
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      for (;;) {
        if (likely(!__pyx_t_9)) {
          if (likely(PyList_CheckExact(__pyx_t_7))) {
            if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 477, __pyx_L6_error)
            #else
            __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 477, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_6);
            #endif
          } else {
            if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 477, __pyx_L6_error)
            #else
            __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 477, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_6);
            #endif
          }
        } else {
          __pyx_t_6 = __pyx_t_9(__pyx_t_7);
          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, 477, __pyx_L6_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_6);
        }
        __Pyx_XDECREF_SET(__pyx_9genexpr15__pyx_v_val, __pyx_t_6);
        __pyx_t_6 = 0;
        if (unlikely(PyDict_SetItem(__pyx_t_5, (PyObject*)__pyx_9genexpr15__pyx_v_val, (PyObject*)__pyx_int_0))) __PYX_ERR(0, 477, __pyx_L6_error)
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_val); __pyx_9genexpr15__pyx_v_val = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_val); __pyx_9genexpr15__pyx_v_val = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_7 = NULL;
    __pyx_t_10 = 0;
    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);
        __pyx_t_10 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_4, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 477, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __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[3] = {__pyx_t_7, __pyx_t_4, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 477, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 477, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_10, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_10, __pyx_t_5);
      __pyx_t_4 = 0;
      __pyx_t_5 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 477, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmutils.py":476
 *     Sinon, c'est le dfaut cdes modles sans hydrigene.
 *     """
 *     if full_0:             # <<<<<<<<<<<<<<
 *         return defaultdict(lambda: -1, {val: 0 for val in structkeys})
 *     else:
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":479
 *         return defaultdict(lambda: -1, {val: 0 for val in structkeys})
 *     else:
 *         return defaultdict(lambda: -1, {val: 0 for val in structkeysgradeless})             # <<<<<<<<<<<<<<
 * #         val = connectdef.copy()
 * #         val.update( {
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 479, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_14connectdefault_1lambda2, 0, __pyx_n_s_connectdefault_locals_lambda, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 479, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    { /* enter inner scope */
      __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 479, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_structkeysgradeless); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 479, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
        __pyx_t_7 = __pyx_t_4; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
      } else {
        __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 479, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 479, __pyx_L12_error)
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (likely(!__pyx_t_9)) {
          if (likely(PyList_CheckExact(__pyx_t_7))) {
            if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 479, __pyx_L12_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 479, __pyx_L12_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          } else {
            if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 479, __pyx_L12_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 479, __pyx_L12_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          }
        } else {
          __pyx_t_4 = __pyx_t_9(__pyx_t_7);
          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, 479, __pyx_L12_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_XDECREF_SET(__pyx_9genexpr16__pyx_v_val, __pyx_t_4);
        __pyx_t_4 = 0;
        if (unlikely(PyDict_SetItem(__pyx_t_5, (PyObject*)__pyx_9genexpr16__pyx_v_val, (PyObject*)__pyx_int_0))) __PYX_ERR(0, 479, __pyx_L12_error)
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_val); __pyx_9genexpr16__pyx_v_val = 0;
      goto __pyx_L15_exit_scope;
      __pyx_L12_error:;
      __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_val); __pyx_9genexpr16__pyx_v_val = 0;
      goto __pyx_L1_error;
      __pyx_L15_exit_scope:;
    } /* exit inner scope */
    __pyx_t_7 = NULL;
    __pyx_t_10 = 0;
    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);
        __pyx_t_10 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 479, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __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[3] = {__pyx_t_7, __pyx_t_6, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 479, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 479, __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_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_10, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_10, __pyx_t_5);
      __pyx_t_6 = 0;
      __pyx_t_5 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 479, __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_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "metaphor/chem_gm/core/gmutils.py":470
 * connectdef = defaultdict(lambda: -1, {val: 0 for val in structkeysgradeless})
 * 
 * def connectdefault(full_0=False):             # <<<<<<<<<<<<<<
 *     """Dictionhaire des connexions par dfaut. Tous les lments non
 *     explicitement affects sont affectes par dfaut a -1.
 */

  /* 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_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.connectdefault", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_val);
  __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmutils.py":546
 * #
 * #--------------------------------------------------------------
 * def symbolFromNodeName(name):             # <<<<<<<<<<<<<<
 *     import re
 *     cc = re.compile(r'[a-zA-Z]{1,2}')
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_39symbolFromNodeName(PyObject *__pyx_self, PyObject *__pyx_v_name); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_39symbolFromNodeName = {"symbolFromNodeName", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_39symbolFromNodeName, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_39symbolFromNodeName(PyObject *__pyx_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("symbolFromNodeName (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_38symbolFromNodeName(__pyx_self, ((PyObject *)__pyx_v_name));

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_38symbolFromNodeName(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_v_re = NULL;
  PyObject *__pyx_v_cc = NULL;
  PyObject *__pyx_v_lmatch = 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;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("symbolFromNodeName", 0);

  /* "metaphor/chem_gm/core/gmutils.py":547
 * #--------------------------------------------------------------
 * def symbolFromNodeName(name):
 *     import re             # <<<<<<<<<<<<<<
 *     cc = re.compile(r'[a-zA-Z]{1,2}')
 *     lmatch = cc.findall(name)
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_re, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_re = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":548
 * def symbolFromNodeName(name):
 *     import re
 *     cc = re.compile(r'[a-zA-Z]{1,2}')             # <<<<<<<<<<<<<<
 *     lmatch = cc.findall(name)
 *     if len(lmatch) is not None:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_re, __pyx_n_s_compile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_cc = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":549
 *     import re
 *     cc = re.compile(r'[a-zA-Z]{1,2}')
 *     lmatch = cc.findall(name)             # <<<<<<<<<<<<<<
 *     if len(lmatch) is not None:
 *         return lmatch[0]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cc, __pyx_n_s_findall); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __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_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 549, __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_3, __pyx_v_name};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 549, __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_1)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_name};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 549, __pyx_L1_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, 549, __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_name);
      __Pyx_GIVEREF(__pyx_v_name);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_name);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 549, __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;
  __pyx_v_lmatch = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":550
 *     cc = re.compile(r'[a-zA-Z]{1,2}')
 *     lmatch = cc.findall(name)
 *     if len(lmatch) is not None:             # <<<<<<<<<<<<<<
 *         return lmatch[0]
 *     else:
 */
  __pyx_t_5 = PyObject_Length(__pyx_v_lmatch); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 550, __pyx_L1_error)
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = (__pyx_t_2 != Py_None);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {

    /* "metaphor/chem_gm/core/gmutils.py":551
 *     lmatch = cc.findall(name)
 *     if len(lmatch) is not None:
 *         return lmatch[0]             # <<<<<<<<<<<<<<
 *     else:
 *         return ""
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_lmatch, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 551, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmutils.py":550
 *     cc = re.compile(r'[a-zA-Z]{1,2}')
 *     lmatch = cc.findall(name)
 *     if len(lmatch) is not None:             # <<<<<<<<<<<<<<
 *         return lmatch[0]
 *     else:
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":553
 *         return lmatch[0]
 *     else:
 *         return ""             # <<<<<<<<<<<<<<
 * 
 * #--------------------------------------------------------------
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u_);
    __pyx_r = __pyx_kp_u_;
    goto __pyx_L0;
  }

  /* "metaphor/chem_gm/core/gmutils.py":546
 * #
 * #--------------------------------------------------------------
 * def symbolFromNodeName(name):             # <<<<<<<<<<<<<<
 *     import re
 *     cc = re.compile(r'[a-zA-Z]{1,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_AddTraceback("metaphor.chem_gm.core.gmutils.symbolFromNodeName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_re);
  __Pyx_XDECREF(__pyx_v_cc);
  __Pyx_XDECREF(__pyx_v_lmatch);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmutils.py":556
 * 
 * #--------------------------------------------------------------
 * def sniffFile(filename):             # <<<<<<<<<<<<<<
 *     # analyse du contenu csv
 *     if not filename:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_41sniffFile(PyObject *__pyx_self, PyObject *__pyx_v_filename); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_41sniffFile = {"sniffFile", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_41sniffFile, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_41sniffFile(PyObject *__pyx_self, PyObject *__pyx_v_filename) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sniffFile (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_40sniffFile(__pyx_self, ((PyObject *)__pyx_v_filename));

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_40sniffFile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename) {
  PyObject *__pyx_v_csv = NULL;
  PyObject *__pyx_v_numlist = NULL;
  PyObject *__pyx_v_csvfile = NULL;
  PyObject *__pyx_v_rr = NULL;
  PyObject *__pyx_v_dialect = NULL;
  PyObject *__pyx_v_reader = NULL;
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_v_row2 = NULL;
  PyObject *__pyx_v_smileIndex = NULL;
  PyObject *__pyx_v_propertyIndex = NULL;
  long __pyx_v_skipline;
  PyObject *__pyx_v_indsmi = NULL;
  PyObject *__pyx_v_nameIndex = NULL;
  PyObject *__pyx_v_ind = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_value2 = NULL;
  PyObject *__pyx_v_vallo = NULL;
  double __pyx_v_val;
  PyObject *__pyx_v_i0 = NULL;
  PyObject *__pyx_v_i = NULL;
  CYTHON_UNUSED double __pyx_v__;
  int __pyx_v_isnum;
  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;
  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;
  Py_ssize_t __pyx_t_18;
  PyObject *(*__pyx_t_19)(PyObject *);
  PyObject *(*__pyx_t_20)(PyObject *);
  double __pyx_t_21;
  int __pyx_t_22;
  __Pyx_RefNannySetupContext("sniffFile", 0);

  /* "metaphor/chem_gm/core/gmutils.py":558
 * def sniffFile(filename):
 *     # analyse du contenu csv
 *     if not filename:             # <<<<<<<<<<<<<<
 *         return None
 *     import csv
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 558, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "metaphor/chem_gm/core/gmutils.py":559
 *     # analyse du contenu csv
 *     if not filename:
 *         return None             # <<<<<<<<<<<<<<
 *     import csv
 *     numlist = []
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "metaphor/chem_gm/core/gmutils.py":558
 * def sniffFile(filename):
 *     # analyse du contenu csv
 *     if not filename:             # <<<<<<<<<<<<<<
 *         return None
 *     import csv
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":560
 *     if not filename:
 *         return None
 *     import csv             # <<<<<<<<<<<<<<
 *     numlist = []
 *     with open(filename, 'rb') as csvfile:
 */
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_csv, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_csv = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":561
 *         return None
 *     import csv
 *     numlist = []             # <<<<<<<<<<<<<<
 *     with open(filename, 'rb') as csvfile:
 *         rr = csvfile.read(1024)
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_numlist = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":562
 *     import csv
 *     numlist = []
 *     with open(filename, 'rb') as csvfile:             # <<<<<<<<<<<<<<
 *         rr = csvfile.read(1024)
 *         dialect = csv.Sniffer().sniff(rr, delimiters=",;")  # dialect ou self.dialect.delimiter  , delimiters="; "
 */
  /*with:*/ {
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_filename);
    __Pyx_INCREF(__pyx_n_u_rb);
    __Pyx_GIVEREF(__pyx_n_u_rb);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_u_rb);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_4, __pyx_n_s_exit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_4, __pyx_n_s_enter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 562, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    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);
      }
    }
    if (__pyx_t_7) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L4_error)
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __pyx_t_3;
    __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    /*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:*/ {
          __pyx_v_csvfile = __pyx_t_6;
          __pyx_t_6 = 0;

          /* "metaphor/chem_gm/core/gmutils.py":563
 *     numlist = []
 *     with open(filename, 'rb') as csvfile:
 *         rr = csvfile.read(1024)             # <<<<<<<<<<<<<<
 *         dialect = csv.Sniffer().sniff(rr, delimiters=",;")  # dialect ou self.dialect.delimiter  , delimiters="; "
 *         csvfile.seek(0)
 */
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_csvfile, __pyx_n_s_read); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 563, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 563, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_v_rr = __pyx_t_4;
          __pyx_t_4 = 0;

          /* "metaphor/chem_gm/core/gmutils.py":564
 *     with open(filename, 'rb') as csvfile:
 *         rr = csvfile.read(1024)
 *         dialect = csv.Sniffer().sniff(rr, delimiters=",;")  # dialect ou self.dialect.delimiter  , delimiters="; "             # <<<<<<<<<<<<<<
 *         csvfile.seek(0)
 *         reader = csv.reader(csvfile, dialect)
 */
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_csv, __pyx_n_s_Sniffer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 564, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_3 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
            if (likely(__pyx_t_3)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_6, function);
            }
          }
          if (__pyx_t_3) {
            __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 564, __pyx_L8_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          } else {
            __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 564, __pyx_L8_error)
          }
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sniff); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 564, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 564, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_v_rr);
          __Pyx_GIVEREF(__pyx_v_rr);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_rr);
          __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 564, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_3);
          if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_delimiters, __pyx_kp_u__61) < 0) __PYX_ERR(0, 564, __pyx_L8_error)
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 564, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_v_dialect = __pyx_t_7;
          __pyx_t_7 = 0;

          /* "metaphor/chem_gm/core/gmutils.py":565
 *         rr = csvfile.read(1024)
 *         dialect = csv.Sniffer().sniff(rr, delimiters=",;")  # dialect ou self.dialect.delimiter  , delimiters="; "
 *         csvfile.seek(0)             # <<<<<<<<<<<<<<
 *         reader = csv.reader(csvfile, dialect)
 *         try:
 */
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_csvfile, __pyx_n_s_seek); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 565, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 565, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "metaphor/chem_gm/core/gmutils.py":566
 *         dialect = csv.Sniffer().sniff(rr, delimiters=",;")  # dialect ou self.dialect.delimiter  , delimiters="; "
 *         csvfile.seek(0)
 *         reader = csv.reader(csvfile, dialect)             # <<<<<<<<<<<<<<
 *         try:
 *             row = reader.next()                                 # row (1st)
 */
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_csv, __pyx_n_s_reader); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 566, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_4 = NULL;
          __pyx_t_11 = 0;
          if (CYTHON_UNPACK_METHODS && likely(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);
              __pyx_t_11 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_7)) {
            PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_csvfile, __pyx_v_dialect};
            __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 566, __pyx_L8_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_7)) {
            PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_csvfile, __pyx_v_dialect};
            __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 566, __pyx_L8_error)
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_GOTREF(__pyx_t_3);
          } else
          #endif
          {
            __pyx_t_6 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 566, __pyx_L8_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_csvfile);
            __Pyx_GIVEREF(__pyx_v_csvfile);
            PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_11, __pyx_v_csvfile);
            __Pyx_INCREF(__pyx_v_dialect);
            __Pyx_GIVEREF(__pyx_v_dialect);
            PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_11, __pyx_v_dialect);
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 566, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          }
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_v_reader = __pyx_t_3;
          __pyx_t_3 = 0;

          /* "metaphor/chem_gm/core/gmutils.py":567
 *         csvfile.seek(0)
 *         reader = csv.reader(csvfile, dialect)
 *         try:             # <<<<<<<<<<<<<<
 *             row = reader.next()                                 # row (1st)
 *             row2 = reader.next()                               # row (1st)
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
            __Pyx_XGOTREF(__pyx_t_12);
            __Pyx_XGOTREF(__pyx_t_13);
            __Pyx_XGOTREF(__pyx_t_14);
            /*try:*/ {

              /* "metaphor/chem_gm/core/gmutils.py":568
 *         reader = csv.reader(csvfile, dialect)
 *         try:
 *             row = reader.next()                                 # row (1st)             # <<<<<<<<<<<<<<
 *             row2 = reader.next()                               # row (1st)
 *             row2 = reader.next()                               # row (1st)
 */
              __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_reader, __pyx_n_s_next); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 568, __pyx_L14_error)
              __Pyx_GOTREF(__pyx_t_7);
              __pyx_t_6 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(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_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 568, __pyx_L14_error)
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              } else {
                __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 568, __pyx_L14_error)
              }
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              __pyx_v_row = __pyx_t_3;
              __pyx_t_3 = 0;

              /* "metaphor/chem_gm/core/gmutils.py":569
 *         try:
 *             row = reader.next()                                 # row (1st)
 *             row2 = reader.next()                               # row (1st)             # <<<<<<<<<<<<<<
 *             row2 = reader.next()                               # row (1st)
 *         except:
 */
              __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_reader, __pyx_n_s_next); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 569, __pyx_L14_error)
              __Pyx_GOTREF(__pyx_t_7);
              __pyx_t_6 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(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_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 569, __pyx_L14_error)
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              } else {
                __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 569, __pyx_L14_error)
              }
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              __pyx_v_row2 = __pyx_t_3;
              __pyx_t_3 = 0;

              /* "metaphor/chem_gm/core/gmutils.py":570
 *             row = reader.next()                                 # row (1st)
 *             row2 = reader.next()                               # row (1st)
 *             row2 = reader.next()                               # row (1st)             # <<<<<<<<<<<<<<
 *         except:
 *             #reader = csv.reader(csvfile, quoting=csv.QUOTE_NONE, delimiter=";")
 */
              __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_reader, __pyx_n_s_next); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 570, __pyx_L14_error)
              __Pyx_GOTREF(__pyx_t_7);
              __pyx_t_6 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(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_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 570, __pyx_L14_error)
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              } else {
                __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 570, __pyx_L14_error)
              }
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_DECREF_SET(__pyx_v_row2, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "metaphor/chem_gm/core/gmutils.py":567
 *         csvfile.seek(0)
 *         reader = csv.reader(csvfile, dialect)
 *         try:             # <<<<<<<<<<<<<<
 *             row = reader.next()                                 # row (1st)
 *             row2 = reader.next()                               # row (1st)
 */
            }
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            goto __pyx_L19_try_end;
            __pyx_L14_error:;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

            /* "metaphor/chem_gm/core/gmutils.py":571
 *             row2 = reader.next()                               # row (1st)
 *             row2 = reader.next()                               # row (1st)
 *         except:             # <<<<<<<<<<<<<<
 *             #reader = csv.reader(csvfile, quoting=csv.QUOTE_NONE, delimiter=";")
 *             reader = csv.reader(csvfile)
 */
            /*except:*/ {
              __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.sniffFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
              if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 571, __pyx_L16_except_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_GOTREF(__pyx_t_7);
              __Pyx_GOTREF(__pyx_t_6);

              /* "metaphor/chem_gm/core/gmutils.py":573
 *         except:
 *             #reader = csv.reader(csvfile, quoting=csv.QUOTE_NONE, delimiter=";")
 *             reader = csv.reader(csvfile)             # <<<<<<<<<<<<<<
 *             #row = reader.next()
 *             row = []
 */
              __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_csv, __pyx_n_s_reader); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 573, __pyx_L16_except_error)
              __Pyx_GOTREF(__pyx_t_15);
              __pyx_t_16 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
                __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_15);
                if (likely(__pyx_t_16)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
                  __Pyx_INCREF(__pyx_t_16);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_15, function);
                }
              }
              if (!__pyx_t_16) {
                __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_v_csvfile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 573, __pyx_L16_except_error)
                __Pyx_GOTREF(__pyx_t_4);
              } else {
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_15)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_v_csvfile};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 573, __pyx_L16_except_error)
                  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_v_csvfile};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 573, __pyx_L16_except_error)
                  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_17 = PyTuple_New(1+1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 573, __pyx_L16_except_error)
                  __Pyx_GOTREF(__pyx_t_17);
                  __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_16); __pyx_t_16 = NULL;
                  __Pyx_INCREF(__pyx_v_csvfile);
                  __Pyx_GIVEREF(__pyx_v_csvfile);
                  PyTuple_SET_ITEM(__pyx_t_17, 0+1, __pyx_v_csvfile);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_17, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 573, __pyx_L16_except_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
                }
              }
              __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
              __Pyx_DECREF_SET(__pyx_v_reader, __pyx_t_4);
              __pyx_t_4 = 0;

              /* "metaphor/chem_gm/core/gmutils.py":575
 *             reader = csv.reader(csvfile)
 *             #row = reader.next()
 *             row = []             # <<<<<<<<<<<<<<
 *             row2 = []
 *             smileIndex = -1
 */
              __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 575, __pyx_L16_except_error)
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_4);
              __pyx_t_4 = 0;

              /* "metaphor/chem_gm/core/gmutils.py":576
 *             #row = reader.next()
 *             row = []
 *             row2 = []             # <<<<<<<<<<<<<<
 *             smileIndex = -1
 *             propertyIndex = -1
 */
              __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 576, __pyx_L16_except_error)
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_XDECREF_SET(__pyx_v_row2, __pyx_t_4);
              __pyx_t_4 = 0;

              /* "metaphor/chem_gm/core/gmutils.py":577
 *             row = []
 *             row2 = []
 *             smileIndex = -1             # <<<<<<<<<<<<<<
 *             propertyIndex = -1
 *         skipline = 0                                   # skipline
 */
              __Pyx_INCREF(__pyx_int_neg_1);
              __pyx_v_smileIndex = __pyx_int_neg_1;

              /* "metaphor/chem_gm/core/gmutils.py":578
 *             row2 = []
 *             smileIndex = -1
 *             propertyIndex = -1             # <<<<<<<<<<<<<<
 *         skipline = 0                                   # skipline
 *         indsmi = 0
 */
              __Pyx_INCREF(__pyx_int_neg_1);
              __pyx_v_propertyIndex = __pyx_int_neg_1;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              goto __pyx_L15_exception_handled;
            }
            __pyx_L16_except_error:;

            /* "metaphor/chem_gm/core/gmutils.py":567
 *         csvfile.seek(0)
 *         reader = csv.reader(csvfile, dialect)
 *         try:             # <<<<<<<<<<<<<<
 *             row = reader.next()                                 # row (1st)
 *             row2 = reader.next()                               # row (1st)
 */
            __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);
            goto __pyx_L8_error;
            __pyx_L15_exception_handled:;
            __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_L19_try_end:;
          }

          /* "metaphor/chem_gm/core/gmutils.py":579
 *             smileIndex = -1
 *             propertyIndex = -1
 *         skipline = 0                                   # skipline             # <<<<<<<<<<<<<<
 *         indsmi = 0
 *         nameIndex = -1
 */
          __pyx_v_skipline = 0;

          /* "metaphor/chem_gm/core/gmutils.py":580
 *             propertyIndex = -1
 *         skipline = 0                                   # skipline
 *         indsmi = 0             # <<<<<<<<<<<<<<
 *         nameIndex = -1
 *         for ind, (value, value2) in enumerate(zip(row, row2)):
 */
          __Pyx_INCREF(__pyx_int_0);
          __pyx_v_indsmi = __pyx_int_0;

          /* "metaphor/chem_gm/core/gmutils.py":581
 *         skipline = 0                                   # skipline
 *         indsmi = 0
 *         nameIndex = -1             # <<<<<<<<<<<<<<
 *         for ind, (value, value2) in enumerate(zip(row, row2)):
 *             vallo = value.lower()
 */
          __Pyx_INCREF(__pyx_int_neg_1);
          __pyx_v_nameIndex = __pyx_int_neg_1;

          /* "metaphor/chem_gm/core/gmutils.py":582
 *         indsmi = 0
 *         nameIndex = -1
 *         for ind, (value, value2) in enumerate(zip(row, row2)):             # <<<<<<<<<<<<<<
 *             vallo = value.lower()
 *             if vallo.startswith("smi"):
 */
          __Pyx_INCREF(__pyx_int_0);
          __pyx_t_6 = __pyx_int_0;
          __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 582, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_INCREF(__pyx_v_row);
          __Pyx_GIVEREF(__pyx_v_row);
          PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_row);
          __Pyx_INCREF(__pyx_v_row2);
          __Pyx_GIVEREF(__pyx_v_row2);
          PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_row2);
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 582, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
            __pyx_t_7 = __pyx_t_3; __Pyx_INCREF(__pyx_t_7); __pyx_t_18 = 0;
            __pyx_t_19 = NULL;
          } else {
            __pyx_t_18 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 582, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_19 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 582, __pyx_L8_error)
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          for (;;) {
            if (likely(!__pyx_t_19)) {
              if (likely(PyList_CheckExact(__pyx_t_7))) {
                if (__pyx_t_18 >= PyList_GET_SIZE(__pyx_t_7)) break;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_3 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_18); __Pyx_INCREF(__pyx_t_3); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 582, __pyx_L8_error)
                #else
                __pyx_t_3 = PySequence_ITEM(__pyx_t_7, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 582, __pyx_L8_error)
                __Pyx_GOTREF(__pyx_t_3);
                #endif
              } else {
                if (__pyx_t_18 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_18); __Pyx_INCREF(__pyx_t_3); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 582, __pyx_L8_error)
                #else
                __pyx_t_3 = PySequence_ITEM(__pyx_t_7, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 582, __pyx_L8_error)
                __Pyx_GOTREF(__pyx_t_3);
                #endif
              }
            } else {
              __pyx_t_3 = __pyx_t_19(__pyx_t_7);
              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, 582, __pyx_L8_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, 582, __pyx_L8_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_15 = PyTuple_GET_ITEM(sequence, 1); 
              } else {
                __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
                __pyx_t_15 = PyList_GET_ITEM(sequence, 1); 
              }
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_15);
              #else
              __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 582, __pyx_L8_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_15 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 582, __pyx_L8_error)
              __Pyx_GOTREF(__pyx_t_15);
              #endif
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            } else {
              Py_ssize_t index = -1;
              __pyx_t_17 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 582, __pyx_L8_error)
              __Pyx_GOTREF(__pyx_t_17);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_20 = Py_TYPE(__pyx_t_17)->tp_iternext;
              index = 0; __pyx_t_4 = __pyx_t_20(__pyx_t_17); if (unlikely(!__pyx_t_4)) goto __pyx_L24_unpacking_failed;
              __Pyx_GOTREF(__pyx_t_4);
              index = 1; __pyx_t_15 = __pyx_t_20(__pyx_t_17); if (unlikely(!__pyx_t_15)) goto __pyx_L24_unpacking_failed;
              __Pyx_GOTREF(__pyx_t_15);
              if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_17), 2) < 0) __PYX_ERR(0, 582, __pyx_L8_error)
              __pyx_t_20 = NULL;
              __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
              goto __pyx_L25_unpacking_done;
              __pyx_L24_unpacking_failed:;
              __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
              __pyx_t_20 = NULL;
              if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
              __PYX_ERR(0, 582, __pyx_L8_error)
              __pyx_L25_unpacking_done:;
            }
            __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4);
            __pyx_t_4 = 0;
            __Pyx_XDECREF_SET(__pyx_v_value2, __pyx_t_15);
            __pyx_t_15 = 0;
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_6);
            __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_6, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 582, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_6);
            __pyx_t_6 = __pyx_t_3;
            __pyx_t_3 = 0;

            /* "metaphor/chem_gm/core/gmutils.py":583
 *         nameIndex = -1
 *         for ind, (value, value2) in enumerate(zip(row, row2)):
 *             vallo = value.lower()             # <<<<<<<<<<<<<<
 *             if vallo.startswith("smi"):
 *                 indsmi = ind + 1
 */
            __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_lower); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 583, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_15);
            __pyx_t_4 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
              __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_15);
              if (likely(__pyx_t_4)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
                __Pyx_INCREF(__pyx_t_4);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_15, function);
              }
            }
            if (__pyx_t_4) {
              __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 583, __pyx_L8_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            } else {
              __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_15); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 583, __pyx_L8_error)
            }
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_XDECREF_SET(__pyx_v_vallo, __pyx_t_3);
            __pyx_t_3 = 0;

            /* "metaphor/chem_gm/core/gmutils.py":584
 *         for ind, (value, value2) in enumerate(zip(row, row2)):
 *             vallo = value.lower()
 *             if vallo.startswith("smi"):             # <<<<<<<<<<<<<<
 *                 indsmi = ind + 1
 *                 smileIndex = ind                         # smileIndex
 */
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_vallo, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 584, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 584, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_15);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 584, __pyx_L8_error)
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            if (__pyx_t_2) {

              /* "metaphor/chem_gm/core/gmutils.py":585
 *             vallo = value.lower()
 *             if vallo.startswith("smi"):
 *                 indsmi = ind + 1             # <<<<<<<<<<<<<<
 *                 smileIndex = ind                         # smileIndex
 *                 skipline = 1
 */
              __pyx_t_15 = __Pyx_PyInt_AddObjC(__pyx_v_ind, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 585, __pyx_L8_error)
              __Pyx_GOTREF(__pyx_t_15);
              __Pyx_DECREF_SET(__pyx_v_indsmi, __pyx_t_15);
              __pyx_t_15 = 0;

              /* "metaphor/chem_gm/core/gmutils.py":586
 *             if vallo.startswith("smi"):
 *                 indsmi = ind + 1
 *                 smileIndex = ind                         # smileIndex             # <<<<<<<<<<<<<<
 *                 skipline = 1
 *             elif vallo.startswith("nom") or  vallo.startswith("nam") or  vallo.startswith("mol"):
 */
              __Pyx_INCREF(__pyx_v_ind);
              __Pyx_XDECREF_SET(__pyx_v_smileIndex, __pyx_v_ind);

              /* "metaphor/chem_gm/core/gmutils.py":587
 *                 indsmi = ind + 1
 *                 smileIndex = ind                         # smileIndex
 *                 skipline = 1             # <<<<<<<<<<<<<<
 *             elif vallo.startswith("nom") or  vallo.startswith("nam") or  vallo.startswith("mol"):
 *                 nameIndex = ind                           # nameIndex
 */
              __pyx_v_skipline = 1;

              /* "metaphor/chem_gm/core/gmutils.py":584
 *         for ind, (value, value2) in enumerate(zip(row, row2)):
 *             vallo = value.lower()
 *             if vallo.startswith("smi"):             # <<<<<<<<<<<<<<
 *                 indsmi = ind + 1
 *                 smileIndex = ind                         # smileIndex
 */
              goto __pyx_L26;
            }

            /* "metaphor/chem_gm/core/gmutils.py":588
 *                 smileIndex = ind                         # smileIndex
 *                 skipline = 1
 *             elif vallo.startswith("nom") or  vallo.startswith("nam") or  vallo.startswith("mol"):             # <<<<<<<<<<<<<<
 *                 nameIndex = ind                           # nameIndex
 *             elif indsmi and (indsmi == ind):
 */
            __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_vallo, __pyx_n_s_startswith); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 588, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_15);
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 588, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 588, __pyx_L8_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (!__pyx_t_1) {
            } else {
              __pyx_t_2 = __pyx_t_1;
              goto __pyx_L27_bool_binop_done;
            }
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_vallo, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 588, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 588, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_15);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 588, __pyx_L8_error)
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            if (!__pyx_t_1) {
            } else {
              __pyx_t_2 = __pyx_t_1;
              goto __pyx_L27_bool_binop_done;
            }
            __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_vallo, __pyx_n_s_startswith); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 588, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_15);
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 588, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 588, __pyx_L8_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_2 = __pyx_t_1;
            __pyx_L27_bool_binop_done:;
            if (__pyx_t_2) {

              /* "metaphor/chem_gm/core/gmutils.py":589
 *                 skipline = 1
 *             elif vallo.startswith("nom") or  vallo.startswith("nam") or  vallo.startswith("mol"):
 *                 nameIndex = ind                           # nameIndex             # <<<<<<<<<<<<<<
 *             elif indsmi and (indsmi == ind):
 *                 propertyIndex = ind #  propertyIndex
 */
              __Pyx_INCREF(__pyx_v_ind);
              __Pyx_DECREF_SET(__pyx_v_nameIndex, __pyx_v_ind);

              /* "metaphor/chem_gm/core/gmutils.py":588
 *                 smileIndex = ind                         # smileIndex
 *                 skipline = 1
 *             elif vallo.startswith("nom") or  vallo.startswith("nam") or  vallo.startswith("mol"):             # <<<<<<<<<<<<<<
 *                 nameIndex = ind                           # nameIndex
 *             elif indsmi and (indsmi == ind):
 */
              goto __pyx_L26;
            }

            /* "metaphor/chem_gm/core/gmutils.py":590
 *             elif vallo.startswith("nom") or  vallo.startswith("nam") or  vallo.startswith("mol"):
 *                 nameIndex = ind                           # nameIndex
 *             elif indsmi and (indsmi == ind):             # <<<<<<<<<<<<<<
 *                 propertyIndex = ind #  propertyIndex
 *             try:
 */
            __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_indsmi); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 590, __pyx_L8_error)
            if (__pyx_t_1) {
            } else {
              __pyx_t_2 = __pyx_t_1;
              goto __pyx_L30_bool_binop_done;
            }
            __pyx_t_3 = PyObject_RichCompare(__pyx_v_indsmi, __pyx_v_ind, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 590, __pyx_L8_error)
            __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 590, __pyx_L8_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_2 = __pyx_t_1;
            __pyx_L30_bool_binop_done:;
            if (__pyx_t_2) {

              /* "metaphor/chem_gm/core/gmutils.py":591
 *                 nameIndex = ind                           # nameIndex
 *             elif indsmi and (indsmi == ind):
 *                 propertyIndex = ind #  propertyIndex             # <<<<<<<<<<<<<<
 *             try:
 *                 val = float(value2)
 */
              __Pyx_INCREF(__pyx_v_ind);
              __Pyx_XDECREF_SET(__pyx_v_propertyIndex, __pyx_v_ind);

              /* "metaphor/chem_gm/core/gmutils.py":590
 *             elif vallo.startswith("nom") or  vallo.startswith("nam") or  vallo.startswith("mol"):
 *                 nameIndex = ind                           # nameIndex
 *             elif indsmi and (indsmi == ind):             # <<<<<<<<<<<<<<
 *                 propertyIndex = ind #  propertyIndex
 *             try:
 */
            }
            __pyx_L26:;

            /* "metaphor/chem_gm/core/gmutils.py":592
 *             elif indsmi and (indsmi == ind):
 *                 propertyIndex = ind #  propertyIndex
 *             try:             # <<<<<<<<<<<<<<
 *                 val = float(value2)
 *                 if not isnan(val):
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);
              __Pyx_XGOTREF(__pyx_t_14);
              __Pyx_XGOTREF(__pyx_t_13);
              __Pyx_XGOTREF(__pyx_t_12);
              /*try:*/ {

                /* "metaphor/chem_gm/core/gmutils.py":593
 *                 propertyIndex = ind #  propertyIndex
 *             try:
 *                 val = float(value2)             # <<<<<<<<<<<<<<
 *                 if not isnan(val):
 *                     numlist.append(value)
 */
                __pyx_t_21 = __Pyx_PyObject_AsDouble(__pyx_v_value2); if (unlikely(__pyx_t_21 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 593, __pyx_L32_error)
                __pyx_v_val = __pyx_t_21;

                /* "metaphor/chem_gm/core/gmutils.py":594
 *             try:
 *                 val = float(value2)
 *                 if not isnan(val):             # <<<<<<<<<<<<<<
 *                     numlist.append(value)
 *             except ValueError: pass
 */
                __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_isnan); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 594, __pyx_L32_error)
                __Pyx_GOTREF(__pyx_t_15);
                __pyx_t_4 = PyFloat_FromDouble(__pyx_v_val); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 594, __pyx_L32_error)
                __Pyx_GOTREF(__pyx_t_4);
                __pyx_t_17 = NULL;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
                  __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_15);
                  if (likely(__pyx_t_17)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
                    __Pyx_INCREF(__pyx_t_17);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_15, function);
                  }
                }
                if (!__pyx_t_17) {
                  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 594, __pyx_L32_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_15)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_17, __pyx_t_4};
                    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 594, __pyx_L32_error)
                    __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 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_15)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_17, __pyx_t_4};
                    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 594, __pyx_L32_error)
                    __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
                    __Pyx_GOTREF(__pyx_t_3);
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  } else
                  #endif
                  {
                    __pyx_t_16 = PyTuple_New(1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 594, __pyx_L32_error)
                    __Pyx_GOTREF(__pyx_t_16);
                    __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_17); __pyx_t_17 = NULL;
                    __Pyx_GIVEREF(__pyx_t_4);
                    PyTuple_SET_ITEM(__pyx_t_16, 0+1, __pyx_t_4);
                    __pyx_t_4 = 0;
                    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_16, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 594, __pyx_L32_error)
                    __Pyx_GOTREF(__pyx_t_3);
                    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
                  }
                }
                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 594, __pyx_L32_error)
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_1 = ((!__pyx_t_2) != 0);
                if (__pyx_t_1) {

                  /* "metaphor/chem_gm/core/gmutils.py":595
 *                 val = float(value2)
 *                 if not isnan(val):
 *                     numlist.append(value)             # <<<<<<<<<<<<<<
 *             except ValueError: pass
 *         if not skipline:
 */
                  __pyx_t_22 = __Pyx_PyList_Append(__pyx_v_numlist, __pyx_v_value); if (unlikely(__pyx_t_22 == ((int)-1))) __PYX_ERR(0, 595, __pyx_L32_error)

                  /* "metaphor/chem_gm/core/gmutils.py":594
 *             try:
 *                 val = float(value2)
 *                 if not isnan(val):             # <<<<<<<<<<<<<<
 *                     numlist.append(value)
 *             except ValueError: pass
 */
                }

                /* "metaphor/chem_gm/core/gmutils.py":592
 *             elif indsmi and (indsmi == ind):
 *                 propertyIndex = ind #  propertyIndex
 *             try:             # <<<<<<<<<<<<<<
 *                 val = float(value2)
 *                 if not isnan(val):
 */
              }
              __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
              __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              goto __pyx_L39_try_end;
              __pyx_L32_error:;
              __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
              __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
              __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

              /* "metaphor/chem_gm/core/gmutils.py":596
 *                 if not isnan(val):
 *                     numlist.append(value)
 *             except ValueError: pass             # <<<<<<<<<<<<<<
 *         if not skipline:
 *             i0 = 255
 */
              __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
              if (__pyx_t_11) {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L33_exception_handled;
              }
              goto __pyx_L34_except_error;
              __pyx_L34_except_error:;

              /* "metaphor/chem_gm/core/gmutils.py":592
 *             elif indsmi and (indsmi == ind):
 *                 propertyIndex = ind #  propertyIndex
 *             try:             # <<<<<<<<<<<<<<
 *                 val = float(value2)
 *                 if not isnan(val):
 */
              __Pyx_XGIVEREF(__pyx_t_14);
              __Pyx_XGIVEREF(__pyx_t_13);
              __Pyx_XGIVEREF(__pyx_t_12);
              __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12);
              goto __pyx_L8_error;
              __pyx_L33_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_14);
              __Pyx_XGIVEREF(__pyx_t_13);
              __Pyx_XGIVEREF(__pyx_t_12);
              __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12);
              __pyx_L39_try_end:;
            }

            /* "metaphor/chem_gm/core/gmutils.py":582
 *         indsmi = 0
 *         nameIndex = -1
 *         for ind, (value, value2) in enumerate(zip(row, row2)):             # <<<<<<<<<<<<<<
 *             vallo = value.lower()
 *             if vallo.startswith("smi"):
 */
          }
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

          /* "metaphor/chem_gm/core/gmutils.py":597
 *                     numlist.append(value)
 *             except ValueError: pass
 *         if not skipline:             # <<<<<<<<<<<<<<
 *             i0 = 255
 *             skipline = 1
 */
          __pyx_t_1 = ((!(__pyx_v_skipline != 0)) != 0);
          if (__pyx_t_1) {

            /* "metaphor/chem_gm/core/gmutils.py":598
 *             except ValueError: pass
 *         if not skipline:
 *             i0 = 255             # <<<<<<<<<<<<<<
 *             skipline = 1
 *             for i, value in enumerate(row):
 */
            __Pyx_INCREF(__pyx_int_255);
            __pyx_v_i0 = __pyx_int_255;

            /* "metaphor/chem_gm/core/gmutils.py":599
 *         if not skipline:
 *             i0 = 255
 *             skipline = 1             # <<<<<<<<<<<<<<
 *             for i, value in enumerate(row):
 *                 try:
 */
            __pyx_v_skipline = 1;

            /* "metaphor/chem_gm/core/gmutils.py":600
 *             i0 = 255
 *             skipline = 1
 *             for i, value in enumerate(row):             # <<<<<<<<<<<<<<
 *                 try:
 *                     _ = float(value)
 */
            __Pyx_INCREF(__pyx_int_0);
            __pyx_t_6 = __pyx_int_0;
            if (likely(PyList_CheckExact(__pyx_v_row)) || PyTuple_CheckExact(__pyx_v_row)) {
              __pyx_t_7 = __pyx_v_row; __Pyx_INCREF(__pyx_t_7); __pyx_t_18 = 0;
              __pyx_t_19 = NULL;
            } else {
              __pyx_t_18 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_row); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 600, __pyx_L8_error)
              __Pyx_GOTREF(__pyx_t_7);
              __pyx_t_19 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 600, __pyx_L8_error)
            }
            for (;;) {
              if (likely(!__pyx_t_19)) {
                if (likely(PyList_CheckExact(__pyx_t_7))) {
                  if (__pyx_t_18 >= PyList_GET_SIZE(__pyx_t_7)) break;
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_18); __Pyx_INCREF(__pyx_t_3); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 600, __pyx_L8_error)
                  #else
                  __pyx_t_3 = PySequence_ITEM(__pyx_t_7, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 600, __pyx_L8_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  #endif
                } else {
                  if (__pyx_t_18 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_18); __Pyx_INCREF(__pyx_t_3); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 600, __pyx_L8_error)
                  #else
                  __pyx_t_3 = PySequence_ITEM(__pyx_t_7, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 600, __pyx_L8_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  #endif
                }
              } else {
                __pyx_t_3 = __pyx_t_19(__pyx_t_7);
                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, 600, __pyx_L8_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_3);
              }
              __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3);
              __pyx_t_3 = 0;
              __Pyx_INCREF(__pyx_t_6);
              __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6);
              __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_6, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 600, __pyx_L8_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_6);
              __pyx_t_6 = __pyx_t_3;
              __pyx_t_3 = 0;

              /* "metaphor/chem_gm/core/gmutils.py":601
 *             skipline = 1
 *             for i, value in enumerate(row):
 *                 try:             # <<<<<<<<<<<<<<
 *                     _ = float(value)
 *                     isnum = True
 */
              {
                __Pyx_PyThreadState_declare
                __Pyx_PyThreadState_assign
                __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
                __Pyx_XGOTREF(__pyx_t_12);
                __Pyx_XGOTREF(__pyx_t_13);
                __Pyx_XGOTREF(__pyx_t_14);
                /*try:*/ {

                  /* "metaphor/chem_gm/core/gmutils.py":602
 *             for i, value in enumerate(row):
 *                 try:
 *                     _ = float(value)             # <<<<<<<<<<<<<<
 *                     isnum = True
 *                 except:
 */
                  __pyx_t_21 = __Pyx_PyObject_AsDouble(__pyx_v_value); if (unlikely(__pyx_t_21 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 602, __pyx_L44_error)
                  __pyx_v__ = __pyx_t_21;

                  /* "metaphor/chem_gm/core/gmutils.py":603
 *                 try:
 *                     _ = float(value)
 *                     isnum = True             # <<<<<<<<<<<<<<
 *                 except:
 *                     isnum = False
 */
                  __pyx_v_isnum = 1;

                  /* "metaphor/chem_gm/core/gmutils.py":601
 *             skipline = 1
 *             for i, value in enumerate(row):
 *                 try:             # <<<<<<<<<<<<<<
 *                     _ = float(value)
 *                     isnum = True
 */
                }
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
                __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
                goto __pyx_L51_try_end;
                __pyx_L44_error:;
                __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
                __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
                __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "metaphor/chem_gm/core/gmutils.py":604
 *                     _ = float(value)
 *                     isnum = True
 *                 except:             # <<<<<<<<<<<<<<
 *                     isnum = False
 *                     i0 = i
 */
                /*except:*/ {
                  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.sniffFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_15, &__pyx_t_16) < 0) __PYX_ERR(0, 604, __pyx_L46_except_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_GOTREF(__pyx_t_15);
                  __Pyx_GOTREF(__pyx_t_16);

                  /* "metaphor/chem_gm/core/gmutils.py":605
 *                     isnum = True
 *                 except:
 *                     isnum = False             # <<<<<<<<<<<<<<
 *                     i0 = i
 *                 if isnum and (i > i0):
 */
                  __pyx_v_isnum = 0;

                  /* "metaphor/chem_gm/core/gmutils.py":606
 *                 except:
 *                     isnum = False
 *                     i0 = i             # <<<<<<<<<<<<<<
 *                 if isnum and (i > i0):
 *                     skipline = 0
 */
                  __Pyx_INCREF(__pyx_v_i);
                  __Pyx_DECREF_SET(__pyx_v_i0, __pyx_v_i);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
                  goto __pyx_L45_exception_handled;
                }
                __pyx_L46_except_error:;

                /* "metaphor/chem_gm/core/gmutils.py":601
 *             skipline = 1
 *             for i, value in enumerate(row):
 *                 try:             # <<<<<<<<<<<<<<
 *                     _ = float(value)
 *                     isnum = True
 */
                __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);
                goto __pyx_L8_error;
                __pyx_L45_exception_handled:;
                __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_L51_try_end:;
              }

              /* "metaphor/chem_gm/core/gmutils.py":607
 *                     isnum = False
 *                     i0 = i
 *                 if isnum and (i > i0):             # <<<<<<<<<<<<<<
 *                     skipline = 0
 *                     break;
 */
              __pyx_t_2 = (__pyx_v_isnum != 0);
              if (__pyx_t_2) {
              } else {
                __pyx_t_1 = __pyx_t_2;
                goto __pyx_L55_bool_binop_done;
              }
              __pyx_t_16 = PyObject_RichCompare(__pyx_v_i, __pyx_v_i0, Py_GT); __Pyx_XGOTREF(__pyx_t_16); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 607, __pyx_L8_error)
              __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 607, __pyx_L8_error)
              __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
              __pyx_t_1 = __pyx_t_2;
              __pyx_L55_bool_binop_done:;
              if (__pyx_t_1) {

                /* "metaphor/chem_gm/core/gmutils.py":608
 *                     i0 = i
 *                 if isnum and (i > i0):
 *                     skipline = 0             # <<<<<<<<<<<<<<
 *                     break;
 *         #self.EditSkipLine.SetValue(str(self.skipline))
 */
                __pyx_v_skipline = 0;

                /* "metaphor/chem_gm/core/gmutils.py":609
 *                 if isnum and (i > i0):
 *                     skipline = 0
 *                     break;             # <<<<<<<<<<<<<<
 *         #self.EditSkipLine.SetValue(str(self.skipline))
 *     return (skipline, row, nameIndex, smileIndex, propertyIndex, dialect, numlist)
 */
                goto __pyx_L43_break;

                /* "metaphor/chem_gm/core/gmutils.py":607
 *                     isnum = False
 *                     i0 = i
 *                 if isnum and (i > i0):             # <<<<<<<<<<<<<<
 *                     skipline = 0
 *                     break;
 */
              }

              /* "metaphor/chem_gm/core/gmutils.py":600
 *             i0 = 255
 *             skipline = 1
 *             for i, value in enumerate(row):             # <<<<<<<<<<<<<<
 *                 try:
 *                     _ = float(value)
 */
            }
            __pyx_L43_break:;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

            /* "metaphor/chem_gm/core/gmutils.py":597
 *                     numlist.append(value)
 *             except ValueError: pass
 *         if not skipline:             # <<<<<<<<<<<<<<
 *             i0 = 255
 *             skipline = 1
 */
          }

          /* "metaphor/chem_gm/core/gmutils.py":562
 *     import csv
 *     numlist = []
 *     with open(filename, 'rb') as csvfile:             # <<<<<<<<<<<<<<
 *         rr = csvfile.read(1024)
 *         dialect = csv.Sniffer().sniff(rr, delimiters=",;")  # dialect ou self.dialect.delimiter  , delimiters="; "
 */
        }
        __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;
        goto __pyx_L13_try_end;
        __pyx_L8_error:;
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.sniffFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_16) < 0) __PYX_ERR(0, 562, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GOTREF(__pyx_t_16);
          __pyx_t_15 = PyTuple_Pack(3, __pyx_t_6, __pyx_t_7, __pyx_t_16); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 562, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_15, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 562, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (__pyx_t_1 < 0) __PYX_ERR(0, 562, __pyx_L10_except_error)
          __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
          if (__pyx_t_2) {
            __Pyx_GIVEREF(__pyx_t_6);
            __Pyx_GIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_16);
            __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_7, __pyx_t_16);
            __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_16 = 0; 
            __PYX_ERR(0, 562, __pyx_L10_except_error)
          }
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          goto __pyx_L9_exception_handled;
        }
        __pyx_L10_except_error:;
        __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_L9_exception_handled:;
        __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);
        __pyx_L13_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_5) {
          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__67, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 562, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
        goto __pyx_L7;
      }
      __pyx_L7:;
    }
    goto __pyx_L60;
    __pyx_L4_error:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L1_error;
    __pyx_L60:;
  }

  /* "metaphor/chem_gm/core/gmutils.py":611
 *                     break;
 *         #self.EditSkipLine.SetValue(str(self.skipline))
 *     return (skipline, row, nameIndex, smileIndex, propertyIndex, dialect, numlist)             # <<<<<<<<<<<<<<
 * 
 * #--------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_16 = __Pyx_PyInt_From_long(__pyx_v_skipline); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  if (unlikely(!__pyx_v_row)) { __Pyx_RaiseUnboundLocalError("row"); __PYX_ERR(0, 611, __pyx_L1_error) }
  if (unlikely(!__pyx_v_nameIndex)) { __Pyx_RaiseUnboundLocalError("nameIndex"); __PYX_ERR(0, 611, __pyx_L1_error) }
  if (unlikely(!__pyx_v_smileIndex)) { __Pyx_RaiseUnboundLocalError("smileIndex"); __PYX_ERR(0, 611, __pyx_L1_error) }
  if (unlikely(!__pyx_v_propertyIndex)) { __Pyx_RaiseUnboundLocalError("propertyIndex"); __PYX_ERR(0, 611, __pyx_L1_error) }
  if (unlikely(!__pyx_v_dialect)) { __Pyx_RaiseUnboundLocalError("dialect"); __PYX_ERR(0, 611, __pyx_L1_error) }
  __pyx_t_7 = PyTuple_New(7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_16);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_16);
  __Pyx_INCREF(__pyx_v_row);
  __Pyx_GIVEREF(__pyx_v_row);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_row);
  __Pyx_INCREF(__pyx_v_nameIndex);
  __Pyx_GIVEREF(__pyx_v_nameIndex);
  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_nameIndex);
  __Pyx_INCREF(__pyx_v_smileIndex);
  __Pyx_GIVEREF(__pyx_v_smileIndex);
  PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_v_smileIndex);
  __Pyx_INCREF(__pyx_v_propertyIndex);
  __Pyx_GIVEREF(__pyx_v_propertyIndex);
  PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_v_propertyIndex);
  __Pyx_INCREF(__pyx_v_dialect);
  __Pyx_GIVEREF(__pyx_v_dialect);
  PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_v_dialect);
  __Pyx_INCREF(__pyx_v_numlist);
  __Pyx_GIVEREF(__pyx_v_numlist);
  PyTuple_SET_ITEM(__pyx_t_7, 6, __pyx_v_numlist);
  __pyx_t_16 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmutils.py":556
 * 
 * #--------------------------------------------------------------
 * def sniffFile(filename):             # <<<<<<<<<<<<<<
 *     # analyse du contenu csv
 *     if not filename:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.sniffFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_csv);
  __Pyx_XDECREF(__pyx_v_numlist);
  __Pyx_XDECREF(__pyx_v_csvfile);
  __Pyx_XDECREF(__pyx_v_rr);
  __Pyx_XDECREF(__pyx_v_dialect);
  __Pyx_XDECREF(__pyx_v_reader);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_row2);
  __Pyx_XDECREF(__pyx_v_smileIndex);
  __Pyx_XDECREF(__pyx_v_propertyIndex);
  __Pyx_XDECREF(__pyx_v_indsmi);
  __Pyx_XDECREF(__pyx_v_nameIndex);
  __Pyx_XDECREF(__pyx_v_ind);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_value2);
  __Pyx_XDECREF(__pyx_v_vallo);
  __Pyx_XDECREF(__pyx_v_i0);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmutils.py":614
 * 
 * #--------------------------------------------------------------
 * def getcsvdelimiter(filename, suggested=',', quotechar='"', nrow=2):             # <<<<<<<<<<<<<<
 *     import csv
 *     lenrow = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_43getcsvdelimiter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_43getcsvdelimiter = {"getcsvdelimiter", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_43getcsvdelimiter, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_43getcsvdelimiter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_filename = 0;
  PyObject *__pyx_v_suggested = 0;
  PyObject *__pyx_v_quotechar = 0;
  PyObject *__pyx_v_nrow = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getcsvdelimiter (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_suggested,&__pyx_n_s_quotechar,&__pyx_n_s_nrow,0};
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_kp_u__45));
    values[2] = ((PyObject *)((PyObject*)__pyx_kp_u__68));
    values[3] = ((PyObject *)((PyObject *)__pyx_int_2));
    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 (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_suggested);
          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_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_nrow);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getcsvdelimiter") < 0)) __PYX_ERR(0, 614, __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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_filename = values[0];
    __pyx_v_suggested = values[1];
    __pyx_v_quotechar = values[2];
    __pyx_v_nrow = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getcsvdelimiter", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 614, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.getcsvdelimiter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_42getcsvdelimiter(__pyx_self, __pyx_v_filename, __pyx_v_suggested, __pyx_v_quotechar, __pyx_v_nrow);

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_42getcsvdelimiter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_suggested, PyObject *__pyx_v_quotechar, PyObject *__pyx_v_nrow) {
  PyObject *__pyx_v_csv = NULL;
  Py_ssize_t __pyx_v_lenrow;
  PyObject *__pyx_v_sep = NULL;
  PyObject *__pyx_v_test = NULL;
  PyObject *__pyx_v_tt = NULL;
  Py_ssize_t __pyx_v_lenloc;
  PyObject *__pyx_v_source = NULL;
  PyObject *__pyx_v_datareader = NULL;
  PyObject *__pyx_v_ii = NULL;
  PyObject *__pyx_v_row = 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;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  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;
  Py_ssize_t __pyx_t_17;
  PyObject *(*__pyx_t_18)(PyObject *);
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  PyObject *__pyx_t_22 = NULL;
  __Pyx_RefNannySetupContext("getcsvdelimiter", 0);

  /* "metaphor/chem_gm/core/gmutils.py":615
 * #--------------------------------------------------------------
 * def getcsvdelimiter(filename, suggested=',', quotechar='"', nrow=2):
 *     import csv             # <<<<<<<<<<<<<<
 *     lenrow = 0
 *     sep = suggested
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_csv, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_csv = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":616
 * def getcsvdelimiter(filename, suggested=',', quotechar='"', nrow=2):
 *     import csv
 *     lenrow = 0             # <<<<<<<<<<<<<<
 *     sep = suggested
 *     try:
 */
  __pyx_v_lenrow = 0;

  /* "metaphor/chem_gm/core/gmutils.py":617
 *     import csv
 *     lenrow = 0
 *     sep = suggested             # <<<<<<<<<<<<<<
 *     try:
 *         test = [suggested]
 */
  __Pyx_INCREF(__pyx_v_suggested);
  __pyx_v_sep = __pyx_v_suggested;

  /* "metaphor/chem_gm/core/gmutils.py":618
 *     lenrow = 0
 *     sep = suggested
 *     try:             # <<<<<<<<<<<<<<
 *         test = [suggested]
 *         for tt in [',', ';', '\t', ' ']:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "metaphor/chem_gm/core/gmutils.py":619
 *     sep = suggested
 *     try:
 *         test = [suggested]             # <<<<<<<<<<<<<<
 *         for tt in [',', ';', '\t', ' ']:
 *             if not tt in test:
 */
      __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_suggested);
      __Pyx_GIVEREF(__pyx_v_suggested);
      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_suggested);
      __pyx_v_test = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":620
 *     try:
 *         test = [suggested]
 *         for tt in [',', ';', '\t', ' ']:             # <<<<<<<<<<<<<<
 *             if not tt in test:
 *                 test.append(tt)
 */
      __pyx_t_1 = __pyx_tuple__71; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
      for (;;) {
        if (__pyx_t_5 >= 4) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 620, __pyx_L3_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 620, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
        __Pyx_XDECREF_SET(__pyx_v_tt, ((PyObject*)__pyx_t_6));
        __pyx_t_6 = 0;

        /* "metaphor/chem_gm/core/gmutils.py":621
 *         test = [suggested]
 *         for tt in [',', ';', '\t', ' ']:
 *             if not tt in test:             # <<<<<<<<<<<<<<
 *                 test.append(tt)
 *         for sep in test:
 */
        __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_tt, __pyx_v_test, Py_NE)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 621, __pyx_L3_error)
        __pyx_t_8 = (__pyx_t_7 != 0);
        if (__pyx_t_8) {

          /* "metaphor/chem_gm/core/gmutils.py":622
 *         for tt in [',', ';', '\t', ' ']:
 *             if not tt in test:
 *                 test.append(tt)             # <<<<<<<<<<<<<<
 *         for sep in test:
 *             lenloc = 0
 */
          __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_test, __pyx_v_tt); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 622, __pyx_L3_error)

          /* "metaphor/chem_gm/core/gmutils.py":621
 *         test = [suggested]
 *         for tt in [',', ';', '\t', ' ']:
 *             if not tt in test:             # <<<<<<<<<<<<<<
 *                 test.append(tt)
 *         for sep in test:
 */
        }

        /* "metaphor/chem_gm/core/gmutils.py":620
 *     try:
 *         test = [suggested]
 *         for tt in [',', ';', '\t', ' ']:             # <<<<<<<<<<<<<<
 *             if not tt in test:
 *                 test.append(tt)
 */
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":623
 *             if not tt in test:
 *                 test.append(tt)
 *         for sep in test:             # <<<<<<<<<<<<<<
 *             lenloc = 0
 *             with open(filename, "rb") as source:
 */
      __pyx_t_1 = __pyx_v_test; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
      for (;;) {
        if (__pyx_t_5 >= 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_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 623, __pyx_L3_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 623, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
        __Pyx_DECREF_SET(__pyx_v_sep, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "metaphor/chem_gm/core/gmutils.py":624
 *                 test.append(tt)
 *         for sep in test:
 *             lenloc = 0             # <<<<<<<<<<<<<<
 *             with open(filename, "rb") as source:
 *                 datareader = csv.reader(source, delimiter=sep, quotechar=quotechar)
 */
        __pyx_v_lenloc = 0;

        /* "metaphor/chem_gm/core/gmutils.py":625
 *         for sep in test:
 *             lenloc = 0
 *             with open(filename, "rb") as source:             # <<<<<<<<<<<<<<
 *                 datareader = csv.reader(source, delimiter=sep, quotechar=quotechar)
 *                 for ii, row in enumerate(datareader):
 */
        /*with:*/ {
          __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 625, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_INCREF(__pyx_v_filename);
          __Pyx_GIVEREF(__pyx_v_filename);
          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_filename);
          __Pyx_INCREF(__pyx_n_u_rb);
          __Pyx_GIVEREF(__pyx_n_u_rb);
          PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_u_rb);
          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_6, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 625, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_11 = __Pyx_PyObject_LookupSpecial(__pyx_t_10, __pyx_n_s_exit); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 625, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_12 = __Pyx_PyObject_LookupSpecial(__pyx_t_10, __pyx_n_s_enter); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 625, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_13 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
            __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
            if (likely(__pyx_t_13)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
              __Pyx_INCREF(__pyx_t_13);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_12, function);
            }
          }
          if (__pyx_t_13) {
            __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 625, __pyx_L14_error)
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          } else {
            __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 625, __pyx_L14_error)
          }
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_12 = __pyx_t_6;
          __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 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_XDECREF_SET(__pyx_v_source, __pyx_t_12);
                __pyx_t_12 = 0;

                /* "metaphor/chem_gm/core/gmutils.py":626
 *             lenloc = 0
 *             with open(filename, "rb") as source:
 *                 datareader = csv.reader(source, delimiter=sep, quotechar=quotechar)             # <<<<<<<<<<<<<<
 *                 for ii, row in enumerate(datareader):
 *                     if not ii: continue
 */
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_csv, __pyx_n_s_reader); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 626, __pyx_L20_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 626, __pyx_L20_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_INCREF(__pyx_v_source);
                __Pyx_GIVEREF(__pyx_v_source);
                PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_source);
                __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 626, __pyx_L20_error)
                __Pyx_GOTREF(__pyx_t_6);
                if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_delimiter, __pyx_v_sep) < 0) __PYX_ERR(0, 626, __pyx_L20_error)
                if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_quotechar, __pyx_v_quotechar) < 0) __PYX_ERR(0, 626, __pyx_L20_error)
                __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, __pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 626, __pyx_L20_error)
                __Pyx_GOTREF(__pyx_t_13);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                __Pyx_XDECREF_SET(__pyx_v_datareader, __pyx_t_13);
                __pyx_t_13 = 0;

                /* "metaphor/chem_gm/core/gmutils.py":627
 *             with open(filename, "rb") as source:
 *                 datareader = csv.reader(source, delimiter=sep, quotechar=quotechar)
 *                 for ii, row in enumerate(datareader):             # <<<<<<<<<<<<<<
 *                     if not ii: continue
 *                     lenloc = max(lenloc, len(row))
 */
                __Pyx_INCREF(__pyx_int_0);
                __pyx_t_13 = __pyx_int_0;
                if (likely(PyList_CheckExact(__pyx_v_datareader)) || PyTuple_CheckExact(__pyx_v_datareader)) {
                  __pyx_t_6 = __pyx_v_datareader; __Pyx_INCREF(__pyx_t_6); __pyx_t_17 = 0;
                  __pyx_t_18 = NULL;
                } else {
                  __pyx_t_17 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_datareader); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 627, __pyx_L20_error)
                  __Pyx_GOTREF(__pyx_t_6);
                  __pyx_t_18 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 627, __pyx_L20_error)
                }
                for (;;) {
                  if (likely(!__pyx_t_18)) {
                    if (likely(PyList_CheckExact(__pyx_t_6))) {
                      if (__pyx_t_17 >= PyList_GET_SIZE(__pyx_t_6)) break;
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      __pyx_t_10 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_17); __Pyx_INCREF(__pyx_t_10); __pyx_t_17++; if (unlikely(0 < 0)) __PYX_ERR(0, 627, __pyx_L20_error)
                      #else
                      __pyx_t_10 = PySequence_ITEM(__pyx_t_6, __pyx_t_17); __pyx_t_17++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 627, __pyx_L20_error)
                      __Pyx_GOTREF(__pyx_t_10);
                      #endif
                    } else {
                      if (__pyx_t_17 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_17); __Pyx_INCREF(__pyx_t_10); __pyx_t_17++; if (unlikely(0 < 0)) __PYX_ERR(0, 627, __pyx_L20_error)
                      #else
                      __pyx_t_10 = PySequence_ITEM(__pyx_t_6, __pyx_t_17); __pyx_t_17++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 627, __pyx_L20_error)
                      __Pyx_GOTREF(__pyx_t_10);
                      #endif
                    }
                  } else {
                    __pyx_t_10 = __pyx_t_18(__pyx_t_6);
                    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, 627, __pyx_L20_error)
                      }
                      break;
                    }
                    __Pyx_GOTREF(__pyx_t_10);
                  }
                  __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_10);
                  __pyx_t_10 = 0;
                  __Pyx_INCREF(__pyx_t_13);
                  __Pyx_XDECREF_SET(__pyx_v_ii, __pyx_t_13);
                  __pyx_t_10 = __Pyx_PyInt_AddObjC(__pyx_t_13, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 627, __pyx_L20_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  __Pyx_DECREF(__pyx_t_13);
                  __pyx_t_13 = __pyx_t_10;
                  __pyx_t_10 = 0;

                  /* "metaphor/chem_gm/core/gmutils.py":628
 *                 datareader = csv.reader(source, delimiter=sep, quotechar=quotechar)
 *                 for ii, row in enumerate(datareader):
 *                     if not ii: continue             # <<<<<<<<<<<<<<
 *                     lenloc = max(lenloc, len(row))
 *                     if ii > 4:
 */
                  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_ii); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 628, __pyx_L20_error)
                  __pyx_t_7 = ((!__pyx_t_8) != 0);
                  if (__pyx_t_7) {
                    goto __pyx_L28_continue;
                  }

                  /* "metaphor/chem_gm/core/gmutils.py":629
 *                 for ii, row in enumerate(datareader):
 *                     if not ii: continue
 *                     lenloc = max(lenloc, len(row))             # <<<<<<<<<<<<<<
 *                     if ii > 4:
 *                         break
 */
                  __pyx_t_19 = PyObject_Length(__pyx_v_row); if (unlikely(__pyx_t_19 == ((Py_ssize_t)-1))) __PYX_ERR(0, 629, __pyx_L20_error)
                  __pyx_t_20 = __pyx_v_lenloc;
                  if (((__pyx_t_19 > __pyx_t_20) != 0)) {
                    __pyx_t_21 = __pyx_t_19;
                  } else {
                    __pyx_t_21 = __pyx_t_20;
                  }
                  __pyx_v_lenloc = __pyx_t_21;

                  /* "metaphor/chem_gm/core/gmutils.py":630
 *                     if not ii: continue
 *                     lenloc = max(lenloc, len(row))
 *                     if ii > 4:             # <<<<<<<<<<<<<<
 *                         break
 *             lenrow = max(lenrow, lenloc)
 */
                  __pyx_t_10 = PyObject_RichCompare(__pyx_v_ii, __pyx_int_4, Py_GT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 630, __pyx_L20_error)
                  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 630, __pyx_L20_error)
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                  if (__pyx_t_7) {

                    /* "metaphor/chem_gm/core/gmutils.py":631
 *                     lenloc = max(lenloc, len(row))
 *                     if ii > 4:
 *                         break             # <<<<<<<<<<<<<<
 *             lenrow = max(lenrow, lenloc)
 *             if lenrow >nrow:
 */
                    goto __pyx_L29_break;

                    /* "metaphor/chem_gm/core/gmutils.py":630
 *                     if not ii: continue
 *                     lenloc = max(lenloc, len(row))
 *                     if ii > 4:             # <<<<<<<<<<<<<<
 *                         break
 *             lenrow = max(lenrow, lenloc)
 */
                  }

                  /* "metaphor/chem_gm/core/gmutils.py":627
 *             with open(filename, "rb") as source:
 *                 datareader = csv.reader(source, delimiter=sep, quotechar=quotechar)
 *                 for ii, row in enumerate(datareader):             # <<<<<<<<<<<<<<
 *                     if not ii: continue
 *                     lenloc = max(lenloc, len(row))
 */
                  __pyx_L28_continue:;
                }
                __pyx_L29_break:;
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

                /* "metaphor/chem_gm/core/gmutils.py":625
 *         for sep in test:
 *             lenloc = 0
 *             with open(filename, "rb") as source:             # <<<<<<<<<<<<<<
 *                 datareader = csv.reader(source, delimiter=sep, quotechar=quotechar)
 *                 for ii, row in enumerate(datareader):
 */
              }
              __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_L27_try_end;
              __pyx_L20_error:;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
              /*except:*/ {
                __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.getcsvdelimiter", __pyx_clineno, __pyx_lineno, __pyx_filename);
                if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_6, &__pyx_t_10) < 0) __PYX_ERR(0, 625, __pyx_L22_except_error)
                __Pyx_GOTREF(__pyx_t_13);
                __Pyx_GOTREF(__pyx_t_6);
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_12 = PyTuple_Pack(3, __pyx_t_13, __pyx_t_6, __pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 625, __pyx_L22_except_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_12, NULL);
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 625, __pyx_L22_except_error)
                __Pyx_GOTREF(__pyx_t_22);
                __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_22);
                __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
                if (__pyx_t_7 < 0) __PYX_ERR(0, 625, __pyx_L22_except_error)
                __pyx_t_8 = ((!(__pyx_t_7 != 0)) != 0);
                if (__pyx_t_8) {
                  __Pyx_GIVEREF(__pyx_t_13);
                  __Pyx_GIVEREF(__pyx_t_6);
                  __Pyx_XGIVEREF(__pyx_t_10);
                  __Pyx_ErrRestoreWithState(__pyx_t_13, __pyx_t_6, __pyx_t_10);
                  __pyx_t_13 = 0; __pyx_t_6 = 0; __pyx_t_10 = 0; 
                  __PYX_ERR(0, 625, __pyx_L22_except_error)
                }
                __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                goto __pyx_L21_exception_handled;
              }
              __pyx_L22_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_L3_error;
              __pyx_L21_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_L27_try_end:;
            }
          }
          /*finally:*/ {
            /*normal exit:*/{
              if (__pyx_t_11) {
                __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__72, NULL);
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 625, __pyx_L3_error)
                __Pyx_GOTREF(__pyx_t_16);
                __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
              }
              goto __pyx_L19;
            }
            __pyx_L19:;
          }
          goto __pyx_L35;
          __pyx_L14_error:;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          goto __pyx_L3_error;
          __pyx_L35:;
        }

        /* "metaphor/chem_gm/core/gmutils.py":632
 *                     if ii > 4:
 *                         break
 *             lenrow = max(lenrow, lenloc)             # <<<<<<<<<<<<<<
 *             if lenrow >nrow:
 *                 break
 */
        __pyx_t_17 = __pyx_v_lenloc;
        __pyx_t_21 = __pyx_v_lenrow;
        if (((__pyx_t_17 > __pyx_t_21) != 0)) {
          __pyx_t_19 = __pyx_t_17;
        } else {
          __pyx_t_19 = __pyx_t_21;
        }
        __pyx_v_lenrow = __pyx_t_19;

        /* "metaphor/chem_gm/core/gmutils.py":633
 *                         break
 *             lenrow = max(lenrow, lenloc)
 *             if lenrow >nrow:             # <<<<<<<<<<<<<<
 *                 break
 *     except:
 */
        __pyx_t_10 = PyInt_FromSsize_t(__pyx_v_lenrow); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 633, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_6 = PyObject_RichCompare(__pyx_t_10, __pyx_v_nrow, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 633, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 633, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (__pyx_t_8) {

          /* "metaphor/chem_gm/core/gmutils.py":634
 *             lenrow = max(lenrow, lenloc)
 *             if lenrow >nrow:
 *                 break             # <<<<<<<<<<<<<<
 *     except:
 *         sep = suggested
 */
          goto __pyx_L13_break;

          /* "metaphor/chem_gm/core/gmutils.py":633
 *                         break
 *             lenrow = max(lenrow, lenloc)
 *             if lenrow >nrow:             # <<<<<<<<<<<<<<
 *                 break
 *     except:
 */
        }

        /* "metaphor/chem_gm/core/gmutils.py":623
 *             if not tt in test:
 *                 test.append(tt)
 *         for sep in test:             # <<<<<<<<<<<<<<
 *             lenloc = 0
 *             with open(filename, "rb") as source:
 */
      }
      __pyx_L13_break:;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":618
 *     lenrow = 0
 *     sep = suggested
 *     try:             # <<<<<<<<<<<<<<
 *         test = [suggested]
 *         for tt in [',', ';', '\t', ' ']:
 */
    }
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":635
 *             if lenrow >nrow:
 *                 break
 *     except:             # <<<<<<<<<<<<<<
 *         sep = suggested
 *     return sep
 */
    /*except:*/ {
      __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.getcsvdelimiter", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_10) < 0) __PYX_ERR(0, 635, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_10);

      /* "metaphor/chem_gm/core/gmutils.py":636
 *                 break
 *     except:
 *         sep = suggested             # <<<<<<<<<<<<<<
 *     return sep
 * 
 */
      __Pyx_INCREF(__pyx_v_suggested);
      __Pyx_DECREF_SET(__pyx_v_sep, __pyx_v_suggested);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;

    /* "metaphor/chem_gm/core/gmutils.py":618
 *     lenrow = 0
 *     sep = suggested
 *     try:             # <<<<<<<<<<<<<<
 *         test = [suggested]
 *         for tt in [',', ';', '\t', ' ']:
 */
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    __pyx_L8_try_end:;
  }

  /* "metaphor/chem_gm/core/gmutils.py":637
 *     except:
 *         sep = suggested
 *     return sep             # <<<<<<<<<<<<<<
 * 
 * #--------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_sep);
  __pyx_r = __pyx_v_sep;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmutils.py":614
 * 
 * #--------------------------------------------------------------
 * def getcsvdelimiter(filename, suggested=',', quotechar='"', nrow=2):             # <<<<<<<<<<<<<<
 *     import csv
 *     lenrow = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.getcsvdelimiter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_csv);
  __Pyx_XDECREF(__pyx_v_sep);
  __Pyx_XDECREF(__pyx_v_test);
  __Pyx_XDECREF(__pyx_v_tt);
  __Pyx_XDECREF(__pyx_v_source);
  __Pyx_XDECREF(__pyx_v_datareader);
  __Pyx_XDECREF(__pyx_v_ii);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmutils.py":640
 * 
 * #--------------------------------------------------------------
 * def isNum(value):             # <<<<<<<<<<<<<<
 *     try:
 *         float(decmark_reg.sub('.', value))
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_45isNum(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_45isNum = {"isNum", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_45isNum, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_45isNum(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isNum (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_44isNum(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_44isNum(CYTHON_UNUSED PyObject *__pyx_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;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  double __pyx_t_9;
  __Pyx_RefNannySetupContext("isNum", 0);

  /* "metaphor/chem_gm/core/gmutils.py":641
 * #--------------------------------------------------------------
 * def isNum(value):
 *     try:             # <<<<<<<<<<<<<<
 *         float(decmark_reg.sub('.', value))
 *         return True
 */
  {
    __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/gmutils.py":642
 * def isNum(value):
 *     try:
 *         float(decmark_reg.sub('.', value))             # <<<<<<<<<<<<<<
 *         return True
 *     except:
 */
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decmark_reg); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 642, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sub); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 642, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_7 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_u__73, __pyx_v_value};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 642, __pyx_L3_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_6)) {
        PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_u__73, __pyx_v_value};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 642, __pyx_L3_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 642, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (__pyx_t_5) {
          __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
        }
        __Pyx_INCREF(__pyx_kp_u__73);
        __Pyx_GIVEREF(__pyx_kp_u__73);
        PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_kp_u__73);
        __Pyx_INCREF(__pyx_v_value);
        __Pyx_GIVEREF(__pyx_v_value);
        PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_value);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 642, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_9 = __Pyx_PyObject_AsDouble(__pyx_t_4); if (unlikely(__pyx_t_9 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 642, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":643
 *     try:
 *         float(decmark_reg.sub('.', value))
 *         return True             # <<<<<<<<<<<<<<
 *     except:
 *         return False
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L7_try_return;

      /* "metaphor/chem_gm/core/gmutils.py":641
 * #--------------------------------------------------------------
 * def isNum(value):
 *     try:             # <<<<<<<<<<<<<<
 *         float(decmark_reg.sub('.', value))
 *         return True
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":644
 *         float(decmark_reg.sub('.', value))
 *         return True
 *     except:             # <<<<<<<<<<<<<<
 *         return False
 * 
 */
    /*except:*/ {
      __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.isNum", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 644, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_8);

      /* "metaphor/chem_gm/core/gmutils.py":645
 *         return True
 *     except:
 *         return False             # <<<<<<<<<<<<<<
 * 
 * def floatex(value, keppexcept=False):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_except_return;
    }
    __pyx_L5_except_error:;

    /* "metaphor/chem_gm/core/gmutils.py":641
 * #--------------------------------------------------------------
 * def isNum(value):
 *     try:             # <<<<<<<<<<<<<<
 *         float(decmark_reg.sub('.', value))
 *         return True
 */
    __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/gmutils.py":640
 * 
 * #--------------------------------------------------------------
 * def isNum(value):             # <<<<<<<<<<<<<<
 *     try:
 *         float(decmark_reg.sub('.', value))
 */

  /* 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_8);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.isNum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmutils.py":647
 *         return False
 * 
 * def floatex(value, keppexcept=False):             # <<<<<<<<<<<<<<
 *     #===========================================================================
 *     # try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_47floatex(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_47floatex = {"floatex", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_47floatex, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_47floatex(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_keppexcept = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("floatex (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_keppexcept,0};
    PyObject* values[2] = {0,0};
    values[1] = ((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  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_value)) != 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_keppexcept);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "floatex") < 0)) __PYX_ERR(0, 647, __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_value = values[0];
    __pyx_v_keppexcept = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("floatex", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 647, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.floatex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_46floatex(__pyx_self, __pyx_v_value, __pyx_v_keppexcept);

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_46floatex(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_keppexcept) {
  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;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  __Pyx_RefNannySetupContext("floatex", 0);

  /* "metaphor/chem_gm/core/gmutils.py":654
 *     #   return NAN
 *     #===========================================================================
 *     try: return float(value)             # <<<<<<<<<<<<<<
 *     except:
 *         try: return float(value.replace(',', '.'))
 */
  {
    __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:*/ {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = __Pyx_PyNumber_Float(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 654, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":655
 *     #===========================================================================
 *     try: return float(value)
 *     except:             # <<<<<<<<<<<<<<
 *         try: return float(value.replace(',', '.'))
 *         except:
 */
    /*except:*/ {
      __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.floatex", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 655, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);

      /* "metaphor/chem_gm/core/gmutils.py":656
 *     try: return float(value)
 *     except:
 *         try: return float(value.replace(',', '.'))             # <<<<<<<<<<<<<<
 *         except:
 *             if keppexcept:
 */
      {
        __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_XDECREF(__pyx_r);
          __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_replace); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 656, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 656, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __pyx_t_10 = __Pyx_PyNumber_Float(__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 656, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_r = __pyx_t_10;
          __pyx_t_10 = 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_L15_try_return;
        }
        __pyx_L11_error:;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;

        /* "metaphor/chem_gm/core/gmutils.py":657
 *     except:
 *         try: return float(value.replace(',', '.'))
 *         except:             # <<<<<<<<<<<<<<
 *             if keppexcept:
 *                 raise
 */
        /*except:*/ {
          __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.floatex", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0) __PYX_ERR(0, 657, __pyx_L13_except_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_GOTREF(__pyx_t_12);

          /* "metaphor/chem_gm/core/gmutils.py":658
 *         try: return float(value.replace(',', '.'))
 *         except:
 *             if keppexcept:             # <<<<<<<<<<<<<<
 *                 raise
 *             return float('nan')
 */
          __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_keppexcept); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 658, __pyx_L13_except_error)
          if (unlikely(__pyx_t_13)) {

            /* "metaphor/chem_gm/core/gmutils.py":659
 *         except:
 *             if keppexcept:
 *                 raise             # <<<<<<<<<<<<<<
 *             return float('nan')
 * 
 */
            __Pyx_GIVEREF(__pyx_t_10);
            __Pyx_GIVEREF(__pyx_t_11);
            __Pyx_XGIVEREF(__pyx_t_12);
            __Pyx_ErrRestoreWithState(__pyx_t_10, __pyx_t_11, __pyx_t_12);
            __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; 
            __PYX_ERR(0, 659, __pyx_L13_except_error)

            /* "metaphor/chem_gm/core/gmutils.py":658
 *         try: return float(value.replace(',', '.'))
 *         except:
 *             if keppexcept:             # <<<<<<<<<<<<<<
 *                 raise
 *             return float('nan')
 */
          }

          /* "metaphor/chem_gm/core/gmutils.py":660
 *             if keppexcept:
 *                 raise
 *             return float('nan')             # <<<<<<<<<<<<<<
 * 
 * #--------------------------------------------------------------
 */
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_14 = __Pyx_PyNumber_Float(__pyx_n_u_nan); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 660, __pyx_L13_except_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_r = __pyx_t_14;
          __pyx_t_14 = 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;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          goto __pyx_L14_except_return;
        }
        __pyx_L13_except_error:;

        /* "metaphor/chem_gm/core/gmutils.py":656
 *     try: return float(value)
 *     except:
 *         try: return float(value.replace(',', '.'))             # <<<<<<<<<<<<<<
 *         except:
 *             if keppexcept:
 */
        __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_L5_except_error;
        __pyx_L15_try_return:;
        __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_L6_except_return;
        __pyx_L14_except_return:;
        __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_L6_except_return;
      }
    }
    __pyx_L5_except_error:;

    /* "metaphor/chem_gm/core/gmutils.py":654
 *     #   return NAN
 *     #===========================================================================
 *     try: return float(value)             # <<<<<<<<<<<<<<
 *     except:
 *         try: return float(value.replace(',', '.'))
 */
    __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/gmutils.py":647
 *         return False
 * 
 * def floatex(value, keppexcept=False):             # <<<<<<<<<<<<<<
 *     #===========================================================================
 *     # try:
 */

  /* 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_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.floatex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmutils.py":663
 * 
 * #--------------------------------------------------------------
 * def getParameterListFomFile(weightFile):             # <<<<<<<<<<<<<<
 *     res = []
 *     ok = False
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_49getParameterListFomFile(PyObject *__pyx_self, PyObject *__pyx_v_weightFile); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_49getParameterListFomFile = {"getParameterListFomFile", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_49getParameterListFomFile, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_49getParameterListFomFile(PyObject *__pyx_self, PyObject *__pyx_v_weightFile) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getParameterListFomFile (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_48getParameterListFomFile(__pyx_self, ((PyObject *)__pyx_v_weightFile));

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_48getParameterListFomFile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_weightFile) {
  PyObject *__pyx_v_res = NULL;
  int __pyx_v_ok;
  PyObject *__pyx_v_source = NULL;
  PyObject *__pyx_v_line = NULL;
  PyObject *__pyx_v_lst = 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;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_t_11;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  Py_ssize_t __pyx_t_15;
  int __pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  __Pyx_RefNannySetupContext("getParameterListFomFile", 0);

  /* "metaphor/chem_gm/core/gmutils.py":664
 * #--------------------------------------------------------------
 * def getParameterListFomFile(weightFile):
 *     res = []             # <<<<<<<<<<<<<<
 *     ok = False
 *     with open(weightFile, "rb") as source:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_res = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":665
 * def getParameterListFomFile(weightFile):
 *     res = []
 *     ok = False             # <<<<<<<<<<<<<<
 *     with open(weightFile, "rb") as source:
 *         for line in iter(source.readline, ''):
 */
  __pyx_v_ok = 0;

  /* "metaphor/chem_gm/core/gmutils.py":666
 *     res = []
 *     ok = False
 *     with open(weightFile, "rb") as source:             # <<<<<<<<<<<<<<
 *         for line in iter(source.readline, ''):
 *             line = line.strip()
 */
  /*with:*/ {
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_weightFile);
    __Pyx_GIVEREF(__pyx_v_weightFile);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_weightFile);
    __Pyx_INCREF(__pyx_n_u_rb);
    __Pyx_GIVEREF(__pyx_n_u_rb);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_rb);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 666, __pyx_L3_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_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L3_error)
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __pyx_t_1;
    __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    /*try:*/ {
      {
        __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:*/ {
          __pyx_v_source = __pyx_t_4;
          __pyx_t_4 = 0;

          /* "metaphor/chem_gm/core/gmutils.py":667
 *     ok = False
 *     with open(weightFile, "rb") as source:
 *         for line in iter(source.readline, ''):             # <<<<<<<<<<<<<<
 *             line = line.strip()
 *             if line == "weights":
 */
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_readline); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_2 = PyCallIter_New(__pyx_t_4, __pyx_kp_u_); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L7_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_9 = 0;
            __pyx_t_10 = NULL;
          } else {
            __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 667, __pyx_L7_error)
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          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_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 667, __pyx_L7_error)
                #else
                __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_2);
                #endif
              } else {
                if (__pyx_t_9 >= 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_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 667, __pyx_L7_error)
                #else
                __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_2);
                #endif
              }
            } else {
              __pyx_t_2 = __pyx_t_10(__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, 667, __pyx_L7_error)
                }
                break;
              }
              __Pyx_GOTREF(__pyx_t_2);
            }
            __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2);
            __pyx_t_2 = 0;

            /* "metaphor/chem_gm/core/gmutils.py":668
 *     with open(weightFile, "rb") as source:
 *         for line in iter(source.readline, ''):
 *             line = line.strip()             # <<<<<<<<<<<<<<
 *             if line == "weights":
 *                 ok = True
 */
            __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_strip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L7_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_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 668, __pyx_L7_error)
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            } else {
              __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 668, __pyx_L7_error)
            }
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF_SET(__pyx_v_line, __pyx_t_2);
            __pyx_t_2 = 0;

            /* "metaphor/chem_gm/core/gmutils.py":669
 *         for line in iter(source.readline, ''):
 *             line = line.strip()
 *             if line == "weights":             # <<<<<<<<<<<<<<
 *                 ok = True
 *             elif ok:
 */
            __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_line, __pyx_n_u_weights, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 669, __pyx_L7_error)
            if (__pyx_t_11) {

              /* "metaphor/chem_gm/core/gmutils.py":670
 *             line = line.strip()
 *             if line == "weights":
 *                 ok = True             # <<<<<<<<<<<<<<
 *             elif ok:
 *                 if line in ["student", "stddev", "dispersion", "resampling"]:
 */
              __pyx_v_ok = 1;

              /* "metaphor/chem_gm/core/gmutils.py":669
 *         for line in iter(source.readline, ''):
 *             line = line.strip()
 *             if line == "weights":             # <<<<<<<<<<<<<<
 *                 ok = True
 *             elif ok:
 */
              goto __pyx_L15;
            }

            /* "metaphor/chem_gm/core/gmutils.py":671
 *             if line == "weights":
 *                 ok = True
 *             elif ok:             # <<<<<<<<<<<<<<
 *                 if line in ["student", "stddev", "dispersion", "resampling"]:
 *                     ok = False
 */
            __pyx_t_11 = (__pyx_v_ok != 0);
            if (__pyx_t_11) {

              /* "metaphor/chem_gm/core/gmutils.py":672
 *                 ok = True
 *             elif ok:
 *                 if line in ["student", "stddev", "dispersion", "resampling"]:             # <<<<<<<<<<<<<<
 *                     ok = False
 *                     break
 */
              __Pyx_INCREF(__pyx_v_line);
              __pyx_t_2 = __pyx_v_line;
              __pyx_t_12 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_student, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 672, __pyx_L7_error)
              if (!__pyx_t_12) {
              } else {
                __pyx_t_11 = __pyx_t_12;
                goto __pyx_L17_bool_binop_done;
              }
              __pyx_t_12 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_stddev, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 672, __pyx_L7_error)
              if (!__pyx_t_12) {
              } else {
                __pyx_t_11 = __pyx_t_12;
                goto __pyx_L17_bool_binop_done;
              }
              __pyx_t_12 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_dispersion, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 672, __pyx_L7_error)
              if (!__pyx_t_12) {
              } else {
                __pyx_t_11 = __pyx_t_12;
                goto __pyx_L17_bool_binop_done;
              }
              __pyx_t_12 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_resampling, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 672, __pyx_L7_error)
              __pyx_t_11 = __pyx_t_12;
              __pyx_L17_bool_binop_done:;
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __pyx_t_12 = (__pyx_t_11 != 0);
              if (__pyx_t_12) {

                /* "metaphor/chem_gm/core/gmutils.py":673
 *             elif ok:
 *                 if line in ["student", "stddev", "dispersion", "resampling"]:
 *                     ok = False             # <<<<<<<<<<<<<<
 *                     break
 *                 elif not line.startswith('count'):
 */
                __pyx_v_ok = 0;

                /* "metaphor/chem_gm/core/gmutils.py":674
 *                 if line in ["student", "stddev", "dispersion", "resampling"]:
 *                     ok = False
 *                     break             # <<<<<<<<<<<<<<
 *                 elif not line.startswith('count'):
 *                     lst = line.split(";")
 */
                goto __pyx_L14_break;

                /* "metaphor/chem_gm/core/gmutils.py":672
 *                 ok = True
 *             elif ok:
 *                 if line in ["student", "stddev", "dispersion", "resampling"]:             # <<<<<<<<<<<<<<
 *                     ok = False
 *                     break
 */
              }

              /* "metaphor/chem_gm/core/gmutils.py":675
 *                     ok = False
 *                     break
 *                 elif not line.startswith('count'):             # <<<<<<<<<<<<<<
 *                     lst = line.split(";")
 *                     if isNum(lst[0]):
 */
              __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 675, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 675, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 675, __pyx_L7_error)
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __pyx_t_11 = ((!__pyx_t_12) != 0);
              if (__pyx_t_11) {

                /* "metaphor/chem_gm/core/gmutils.py":676
 *                     break
 *                 elif not line.startswith('count'):
 *                     lst = line.split(";")             # <<<<<<<<<<<<<<
 *                     if isNum(lst[0]):
 *                         res.append("W_%d"% len(res))
 */
                __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_1);
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 676, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                __Pyx_XDECREF_SET(__pyx_v_lst, __pyx_t_2);
                __pyx_t_2 = 0;

                /* "metaphor/chem_gm/core/gmutils.py":677
 *                 elif not line.startswith('count'):
 *                     lst = line.split(";")
 *                     if isNum(lst[0]):             # <<<<<<<<<<<<<<
 *                         res.append("W_%d"% len(res))
 *                     else:
 */
                __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_isNum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_1);
                __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_lst, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 677, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_13 = NULL;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
                  __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_1);
                  if (likely(__pyx_t_13)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                    __Pyx_INCREF(__pyx_t_13);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_1, function);
                  }
                }
                if (!__pyx_t_13) {
                  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L7_error)
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                  __Pyx_GOTREF(__pyx_t_2);
                } else {
                  #if CYTHON_FAST_PYCALL
                  if (PyFunction_Check(__pyx_t_1)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_5};
                    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L7_error)
                    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
                    __Pyx_GOTREF(__pyx_t_2);
                    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                  } else
                  #endif
                  #if CYTHON_FAST_PYCCALL
                  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
                    PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_5};
                    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L7_error)
                    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
                    __Pyx_GOTREF(__pyx_t_2);
                    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                  } else
                  #endif
                  {
                    __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 677, __pyx_L7_error)
                    __Pyx_GOTREF(__pyx_t_14);
                    __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL;
                    __Pyx_GIVEREF(__pyx_t_5);
                    PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_5);
                    __pyx_t_5 = 0;
                    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L7_error)
                    __Pyx_GOTREF(__pyx_t_2);
                    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                  }
                }
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 677, __pyx_L7_error)
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                if (__pyx_t_11) {

                  /* "metaphor/chem_gm/core/gmutils.py":678
 *                     lst = line.split(";")
 *                     if isNum(lst[0]):
 *                         res.append("W_%d"% len(res))             # <<<<<<<<<<<<<<
 *                     else:
 *                         res.append(lst[0])
 */
                  __pyx_t_15 = PyList_GET_SIZE(__pyx_v_res); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 678, __pyx_L7_error)
                  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L7_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_W__d, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L7_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                  __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_1); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 678, __pyx_L7_error)
                  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                  /* "metaphor/chem_gm/core/gmutils.py":677
 *                 elif not line.startswith('count'):
 *                     lst = line.split(";")
 *                     if isNum(lst[0]):             # <<<<<<<<<<<<<<
 *                         res.append("W_%d"% len(res))
 *                     else:
 */
                  goto __pyx_L21;
                }

                /* "metaphor/chem_gm/core/gmutils.py":680
 *                         res.append("W_%d"% len(res))
 *                     else:
 *                         res.append(lst[0])             # <<<<<<<<<<<<<<
 *     return res
 * 
 */
                /*else*/ {
                  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_lst, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L7_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_1); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 680, __pyx_L7_error)
                  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                }
                __pyx_L21:;

                /* "metaphor/chem_gm/core/gmutils.py":675
 *                     ok = False
 *                     break
 *                 elif not line.startswith('count'):             # <<<<<<<<<<<<<<
 *                     lst = line.split(";")
 *                     if isNum(lst[0]):
 */
              }

              /* "metaphor/chem_gm/core/gmutils.py":671
 *             if line == "weights":
 *                 ok = True
 *             elif ok:             # <<<<<<<<<<<<<<
 *                 if line in ["student", "stddev", "dispersion", "resampling"]:
 *                     ok = False
 */
            }
            __pyx_L15:;

            /* "metaphor/chem_gm/core/gmutils.py":667
 *     ok = False
 *     with open(weightFile, "rb") as source:
 *         for line in iter(source.readline, ''):             # <<<<<<<<<<<<<<
 *             line = line.strip()
 *             if line == "weights":
 */
          }
          __pyx_L14_break:;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "metaphor/chem_gm/core/gmutils.py":666
 *     res = []
 *     ok = False
 *     with open(weightFile, "rb") as source:             # <<<<<<<<<<<<<<
 *         for line in iter(source.readline, ''):
 *             line = line.strip()
 */
        }
        __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_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.getParameterListFomFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 666, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_14 = PyTuple_Pack(3, __pyx_t_4, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 666, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_14, NULL);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 666, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_17);
          __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_17);
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
          if (__pyx_t_11 < 0) __PYX_ERR(0, 666, __pyx_L9_except_error)
          __pyx_t_12 = ((!(__pyx_t_11 != 0)) != 0);
          if (__pyx_t_12) {
            __Pyx_GIVEREF(__pyx_t_4);
            __Pyx_GIVEREF(__pyx_t_1);
            __Pyx_XGIVEREF(__pyx_t_2);
            __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_1, __pyx_t_2);
            __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_t_2 = 0; 
            __PYX_ERR(0, 666, __pyx_L9_except_error)
          }
          __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;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __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_L8_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_L12_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_3) {
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__77, NULL);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 666, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L25;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L1_error;
    __pyx_L25:;
  }

  /* "metaphor/chem_gm/core/gmutils.py":681
 *                     else:
 *                         res.append(lst[0])
 *     return res             # <<<<<<<<<<<<<<
 * 
 * # def Cchar Only(source, sub="+-"):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmutils.py":663
 * 
 * #--------------------------------------------------------------
 * def getParameterListFomFile(weightFile):             # <<<<<<<<<<<<<<
 *     res = []
 *     ok = False
 */

  /* function exit code */
  __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_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.getParameterListFomFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_source);
  __Pyx_XDECREF(__pyx_v_line);
  __Pyx_XDECREF(__pyx_v_lst);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmutils.py":689
 * #     return res
 * 
 * def formatted(value, decimal=3, length=10):             # <<<<<<<<<<<<<<
 *     form = "%0." + str(decimal) + "f"
 *     return (form % value).rjust(length)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_51formatted(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_51formatted = {"formatted", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_51formatted, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_51formatted(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_decimal = 0;
  PyObject *__pyx_v_length = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("formatted (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_decimal,&__pyx_n_s_length,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)__pyx_int_3));
    values[2] = ((PyObject *)((PyObject *)__pyx_int_10));
    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_value)) != 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_decimal);
          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_length);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "formatted") < 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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_value = values[0];
    __pyx_v_decimal = values[1];
    __pyx_v_length = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("formatted", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 689, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.formatted", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_50formatted(__pyx_self, __pyx_v_value, __pyx_v_decimal, __pyx_v_length);

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_50formatted(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_decimal, PyObject *__pyx_v_length) {
  PyObject *__pyx_v_form = 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("formatted", 0);

  /* "metaphor/chem_gm/core/gmutils.py":690
 * 
 * def formatted(value, decimal=3, length=10):
 *     form = "%0." + str(decimal) + "f"             # <<<<<<<<<<<<<<
 *     return (form % value).rjust(length)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_decimal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_0_2, __pyx_t_1); 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_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_n_u_f); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_form = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":691
 * def formatted(value, decimal=3, length=10):
 *     form = "%0." + str(decimal) + "f"
 *     return (form % value).rjust(length)             # <<<<<<<<<<<<<<
 * 
 * def splitindexedname(name):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyNumber_Remainder(__pyx_v_form, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_rjust); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 691, __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_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __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_length};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __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_length};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __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, 691, __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_length);
      __Pyx_GIVEREF(__pyx_v_length);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_length);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __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;

  /* "metaphor/chem_gm/core/gmutils.py":689
 * #     return res
 * 
 * def formatted(value, decimal=3, length=10):             # <<<<<<<<<<<<<<
 *     form = "%0." + str(decimal) + "f"
 *     return (form % value).rjust(length)
 */

  /* 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.gmutils.formatted", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_form);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "metaphor/chem_gm/core/gmutils.py":693
 *     return (form % value).rjust(length)
 * 
 * def splitindexedname(name):             # <<<<<<<<<<<<<<
 *     corename = name
 *     index = -1
 */

/* Python wrapper */
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_53splitindexedname(PyObject *__pyx_self, PyObject *__pyx_v_name); /*proto*/
static PyMethodDef __pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_53splitindexedname = {"splitindexedname", (PyCFunction)__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_53splitindexedname, METH_O, 0};
static PyObject *__pyx_pw_8metaphor_7chem_gm_4core_7gmutils_53splitindexedname(PyObject *__pyx_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("splitindexedname (wrapper)", 0);
  __pyx_r = __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_52splitindexedname(__pyx_self, ((PyObject *)__pyx_v_name));

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

static PyObject *__pyx_pf_8metaphor_7chem_gm_4core_7gmutils_52splitindexedname(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_v_corename = NULL;
  PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_v_N = NULL;
  PyObject *__pyx_v_sindex = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("splitindexedname", 0);

  /* "metaphor/chem_gm/core/gmutils.py":694
 * 
 * def splitindexedname(name):
 *     corename = name             # <<<<<<<<<<<<<<
 *     index = -1
 *     if name.endswith(')'):
 */
  __Pyx_INCREF(__pyx_v_name);
  __pyx_v_corename = __pyx_v_name;

  /* "metaphor/chem_gm/core/gmutils.py":695
 * def splitindexedname(name):
 *     corename = name
 *     index = -1             # <<<<<<<<<<<<<<
 *     if name.endswith(')'):
 *         N = name.index('(')
 */
  __Pyx_INCREF(__pyx_int_neg_1);
  __pyx_v_index = __pyx_int_neg_1;

  /* "metaphor/chem_gm/core/gmutils.py":696
 *     corename = name
 *     index = -1
 *     if name.endswith(')'):             # <<<<<<<<<<<<<<
 *         N = name.index('(')
 *         corename = name[:N]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __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, 696, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "metaphor/chem_gm/core/gmutils.py":697
 *     index = -1
 *     if name.endswith(')'):
 *         N = name.index('(')             # <<<<<<<<<<<<<<
 *         corename = name[:N]
 *         sindex = name[N+1:-1]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_N = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":698
 *     if name.endswith(')'):
 *         N = name.index('(')
 *         corename = name[:N]             # <<<<<<<<<<<<<<
 *         sindex = name[N+1:-1]
 *         index = int(sindex)
 */
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_name, 0, 0, NULL, &__pyx_v_N, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_corename, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":699
 *         N = name.index('(')
 *         corename = name[:N]
 *         sindex = name[N+1:-1]             # <<<<<<<<<<<<<<
 *         index = int(sindex)
 *     return corename, index
 */
    __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_N, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 699, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_name, 0, -1L, &__pyx_t_1, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 699, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_sindex = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":700
 *         corename = name[:N]
 *         sindex = name[N+1:-1]
 *         index = int(sindex)             # <<<<<<<<<<<<<<
 *     return corename, index
 * 
 */
    __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_sindex); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 700, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":696
 *     corename = name
 *     index = -1
 *     if name.endswith(')'):             # <<<<<<<<<<<<<<
 *         N = name.index('(')
 *         corename = name[:N]
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":701
 *         sindex = name[N+1:-1]
 *         index = int(sindex)
 *     return corename, index             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_corename);
  __Pyx_GIVEREF(__pyx_v_corename);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_corename);
  __Pyx_INCREF(__pyx_v_index);
  __Pyx_GIVEREF(__pyx_v_index);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_index);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "metaphor/chem_gm/core/gmutils.py":693
 *     return (form % value).rjust(length)
 * 
 * def splitindexedname(name):             # <<<<<<<<<<<<<<
 *     corename = name
 *     index = -1
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("metaphor.chem_gm.core.gmutils.splitindexedname", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_corename);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_N);
  __Pyx_XDECREF(__pyx_v_sindex);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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_gmutils(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_gmutils},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "gmutils",
    __pyx_k_Module_graphmachine_chem_gm_core, /* 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_n_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 1},
  {&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0},
  {&__pyx_kp_u_0, __pyx_k_0, sizeof(__pyx_k_0), 0, 1, 0, 0},
  {&__pyx_kp_u_0_2, __pyx_k_0_2, sizeof(__pyx_k_0_2), 0, 1, 0, 0},
  {&__pyx_kp_u_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 1, 0, 0},
  {&__pyx_kp_u_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 1, 0, 0},
  {&__pyx_n_s_Atomes, __pyx_k_Atomes, sizeof(__pyx_k_Atomes), 0, 0, 1, 1},
  {&__pyx_n_s_AtomsLower, __pyx_k_AtomsLower, sizeof(__pyx_k_AtomsLower), 0, 0, 1, 1},
  {&__pyx_n_s_C, __pyx_k_C, sizeof(__pyx_k_C), 0, 0, 1, 1},
  {&__pyx_n_s_Chaine, __pyx_k_Chaine, sizeof(__pyx_k_Chaine), 0, 0, 1, 1},
  {&__pyx_kp_u_Configurattion, __pyx_k_Configurattion, sizeof(__pyx_k_Configurattion), 0, 1, 0, 0},
  {&__pyx_n_u_D, __pyx_k_D, sizeof(__pyx_k_D), 0, 1, 0, 1},
  {&__pyx_n_s_Event, __pyx_k_Event, sizeof(__pyx_k_Event), 0, 0, 1, 1},
  {&__pyx_n_u_F, __pyx_k_F, sizeof(__pyx_k_F), 0, 1, 0, 1},
  {&__pyx_n_u_False, __pyx_k_False, sizeof(__pyx_k_False), 0, 1, 0, 1},
  {&__pyx_n_u_H, __pyx_k_H, sizeof(__pyx_k_H), 0, 1, 0, 1},
  {&__pyx_n_s_Hydrogenes, __pyx_k_Hydrogenes, sizeof(__pyx_k_Hydrogenes), 0, 0, 1, 1},
  {&__pyx_n_s_IndexFilename, __pyx_k_IndexFilename, sizeof(__pyx_k_IndexFilename), 0, 0, 1, 1},
  {&__pyx_n_s_Item, __pyx_k_Item, sizeof(__pyx_k_Item), 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_OrderedDict, __pyx_k_OrderedDict, sizeof(__pyx_k_OrderedDict), 0, 0, 1, 1},
  {&__pyx_n_s_ReverseConfigString, __pyx_k_ReverseConfigString, sizeof(__pyx_k_ReverseConfigString), 0, 0, 1, 1},
  {&__pyx_n_s_ReverseConfigString2String, __pyx_k_ReverseConfigString2String, sizeof(__pyx_k_ReverseConfigString2String), 0, 0, 1, 1},
  {&__pyx_n_s_S, __pyx_k_S, sizeof(__pyx_k_S), 0, 0, 1, 1},
  {&__pyx_n_s_Sniffer, __pyx_k_Sniffer, sizeof(__pyx_k_Sniffer), 0, 0, 1, 1},
  {&__pyx_n_u_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 1, 0, 1},
  {&__pyx_n_s_Thread, __pyx_k_Thread, sizeof(__pyx_k_Thread), 0, 0, 1, 1},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_kp_u_W__d, __pyx_k_W__d, sizeof(__pyx_k_W__d), 0, 1, 0, 0},
  {&__pyx_kp_u__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0, 0},
  {&__pyx_kp_u__45, __pyx_k__45, sizeof(__pyx_k__45), 0, 1, 0, 0},
  {&__pyx_kp_u__47, __pyx_k__47, sizeof(__pyx_k__47), 0, 1, 0, 0},
  {&__pyx_kp_u__48, __pyx_k__48, sizeof(__pyx_k__48), 0, 1, 0, 0},
  {&__pyx_kp_u__49, __pyx_k__49, sizeof(__pyx_k__49), 0, 1, 0, 0},
  {&__pyx_kp_u__50, __pyx_k__50, sizeof(__pyx_k__50), 0, 1, 0, 0},
  {&__pyx_kp_u__51, __pyx_k__51, sizeof(__pyx_k__51), 0, 1, 0, 0},
  {&__pyx_kp_u__58, __pyx_k__58, sizeof(__pyx_k__58), 0, 1, 0, 0},
  {&__pyx_kp_u__61, __pyx_k__61, sizeof(__pyx_k__61), 0, 1, 0, 0},
  {&__pyx_kp_u__68, __pyx_k__68, sizeof(__pyx_k__68), 0, 1, 0, 0},
  {&__pyx_kp_u__69, __pyx_k__69, sizeof(__pyx_k__69), 0, 1, 0, 0},
  {&__pyx_n_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 1},
  {&__pyx_n_u__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 1, 0, 1},
  {&__pyx_kp_u__70, __pyx_k__70, sizeof(__pyx_k__70), 0, 1, 0, 0},
  {&__pyx_kp_u__73, __pyx_k__73, sizeof(__pyx_k__73), 0, 1, 0, 0},
  {&__pyx_kp_u__78, __pyx_k__78, sizeof(__pyx_k__78), 0, 1, 0, 0},
  {&__pyx_kp_u__80, __pyx_k__80, sizeof(__pyx_k__80), 0, 1, 0, 0},
  {&__pyx_kp_u_a_zA_Z_1_2, __pyx_k_a_zA_Z_1_2, sizeof(__pyx_k_a_zA_Z_1_2), 0, 1, 0, 0},
  {&__pyx_n_s_addcentral, __pyx_k_addcentral, sizeof(__pyx_k_addcentral), 0, 0, 1, 1},
  {&__pyx_n_s_already, __pyx_k_already, sizeof(__pyx_k_already), 0, 0, 1, 1},
  {&__pyx_n_s_analyseProjectName, __pyx_k_analyseProjectName, sizeof(__pyx_k_analyseProjectName), 0, 0, 1, 1},
  {&__pyx_n_s_argv, __pyx_k_argv, sizeof(__pyx_k_argv), 0, 0, 1, 1},
  {&__pyx_n_s_atomlist, __pyx_k_atomlist, sizeof(__pyx_k_atomlist), 0, 0, 1, 1},
  {&__pyx_n_s_atoms, __pyx_k_atoms, sizeof(__pyx_k_atoms), 0, 0, 1, 1},
  {&__pyx_n_s_basename, __pyx_k_basename, sizeof(__pyx_k_basename), 0, 0, 1, 1},
  {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
  {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 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_candidatelist, __pyx_k_candidatelist, sizeof(__pyx_k_candidatelist), 0, 0, 1, 1},
  {&__pyx_n_s_capitalize, __pyx_k_capitalize, sizeof(__pyx_k_capitalize), 0, 0, 1, 1},
  {&__pyx_n_s_cc, __pyx_k_cc, sizeof(__pyx_k_cc), 0, 0, 1, 1},
  {&__pyx_n_u_ccl, __pyx_k_ccl, sizeof(__pyx_k_ccl), 0, 1, 0, 1},
  {&__pyx_kp_u_ccl_d, __pyx_k_ccl_d, sizeof(__pyx_k_ccl_d), 0, 1, 0, 0},
  {&__pyx_n_u_ccls, __pyx_k_ccls, sizeof(__pyx_k_ccls), 0, 1, 0, 1},
  {&__pyx_n_u_ce, __pyx_k_ce, sizeof(__pyx_k_ce), 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_central_s, __pyx_k_central_s, sizeof(__pyx_k_central_s), 0, 1, 0, 0},
  {&__pyx_kp_u_charge_d, __pyx_k_charge_d, sizeof(__pyx_k_charge_d), 0, 1, 0, 0},
  {&__pyx_kp_u_charge_d_2, __pyx_k_charge_d_2, sizeof(__pyx_k_charge_d_2), 0, 1, 0, 0},
  {&__pyx_n_s_chargekey, __pyx_k_chargekey, sizeof(__pyx_k_chargekey), 0, 0, 1, 1},
  {&__pyx_n_s_chem_gmversion, __pyx_k_chem_gmversion, sizeof(__pyx_k_chem_gmversion), 0, 0, 1, 1},
  {&__pyx_n_u_chi, __pyx_k_chi, sizeof(__pyx_k_chi), 0, 1, 0, 1},
  {&__pyx_kp_u_chi_s, __pyx_k_chi_s, sizeof(__pyx_k_chi_s), 0, 1, 0, 0},
  {&__pyx_n_s_chikey, __pyx_k_chikey, sizeof(__pyx_k_chikey), 0, 0, 1, 1},
  {&__pyx_kp_u_chiral_d, __pyx_k_chiral_d, sizeof(__pyx_k_chiral_d), 0, 1, 0, 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_kp_u_classif_True, __pyx_k_classif_True, sizeof(__pyx_k_classif_True), 0, 1, 0, 0},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
  {&__pyx_n_s_compile, __pyx_k_compile, sizeof(__pyx_k_compile), 0, 0, 1, 1},
  {&__pyx_n_s_cond, __pyx_k_cond, sizeof(__pyx_k_cond), 0, 0, 1, 1},
  {&__pyx_kp_u_conf_03d_cfg, __pyx_k_conf_03d_cfg, sizeof(__pyx_k_conf_03d_cfg), 0, 1, 0, 0},
  {&__pyx_n_s_config, __pyx_k_config, sizeof(__pyx_k_config), 0, 0, 1, 1},
  {&__pyx_n_s_configTmpl, __pyx_k_configTmpl, sizeof(__pyx_k_configTmpl), 0, 0, 1, 1},
  {&__pyx_n_s_configstr, __pyx_k_configstr, sizeof(__pyx_k_configstr), 0, 0, 1, 1},
  {&__pyx_n_s_connect, __pyx_k_connect, sizeof(__pyx_k_connect), 0, 0, 1, 1},
  {&__pyx_n_s_connectdef, __pyx_k_connectdef, sizeof(__pyx_k_connectdef), 0, 0, 1, 1},
  {&__pyx_n_s_connectdefault, __pyx_k_connectdefault, sizeof(__pyx_k_connectdefault), 0, 0, 1, 1},
  {&__pyx_n_s_connectdefault_locals_lambda, __pyx_k_connectdefault_locals_lambda, sizeof(__pyx_k_connectdefault_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_connectivities, __pyx_k_connectivities, sizeof(__pyx_k_connectivities), 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_kp_u_connectivity_2, __pyx_k_connectivity_2, sizeof(__pyx_k_connectivity_2), 0, 1, 0, 0},
  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
  {&__pyx_n_s_corename, __pyx_k_corename, sizeof(__pyx_k_corename), 0, 0, 1, 1},
  {&__pyx_n_u_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 1, 0, 1},
  {&__pyx_n_s_csv, __pyx_k_csv, sizeof(__pyx_k_csv), 0, 0, 1, 1},
  {&__pyx_n_s_csvfile, __pyx_k_csvfile, sizeof(__pyx_k_csvfile), 0, 0, 1, 1},
  {&__pyx_n_s_ctypes, __pyx_k_ctypes, sizeof(__pyx_k_ctypes), 0, 0, 1, 1},
  {&__pyx_kp_u_cycle_d, __pyx_k_cycle_d, sizeof(__pyx_k_cycle_d), 0, 1, 0, 0},
  {&__pyx_n_s_cyclekey, __pyx_k_cyclekey, sizeof(__pyx_k_cyclekey), 0, 0, 1, 1},
  {&__pyx_kp_u_d_d, __pyx_k_d_d, sizeof(__pyx_k_d_d), 0, 1, 0, 0},
  {&__pyx_n_s_datareader, __pyx_k_datareader, sizeof(__pyx_k_datareader), 0, 0, 1, 1},
  {&__pyx_n_s_decimal, __pyx_k_decimal, sizeof(__pyx_k_decimal), 0, 0, 1, 1},
  {&__pyx_n_s_decmark_reg, __pyx_k_decmark_reg, sizeof(__pyx_k_decmark_reg), 0, 0, 1, 1},
  {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
  {&__pyx_n_s_defaultConnect, __pyx_k_defaultConnect, sizeof(__pyx_k_defaultConnect), 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_degree, __pyx_k_degree, sizeof(__pyx_k_degree), 0, 1, 0, 1},
  {&__pyx_kp_u_degree_d, __pyx_k_degree_d, sizeof(__pyx_k_degree_d), 0, 1, 0, 0},
  {&__pyx_n_s_delimiter, __pyx_k_delimiter, sizeof(__pyx_k_delimiter), 0, 0, 1, 1},
  {&__pyx_n_s_delimiters, __pyx_k_delimiters, sizeof(__pyx_k_delimiters), 0, 0, 1, 1},
  {&__pyx_n_u_dgr, __pyx_k_dgr, sizeof(__pyx_k_dgr), 0, 1, 0, 1},
  {&__pyx_kp_u_dgr_d, __pyx_k_dgr_d, sizeof(__pyx_k_dgr_d), 0, 1, 0, 0},
  {&__pyx_n_s_dialect, __pyx_k_dialect, sizeof(__pyx_k_dialect), 0, 0, 1, 1},
  {&__pyx_n_s_directory, __pyx_k_directory, sizeof(__pyx_k_directory), 0, 0, 1, 1},
  {&__pyx_n_u_dispersion, __pyx_k_dispersion, sizeof(__pyx_k_dispersion), 0, 1, 0, 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_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
  {&__pyx_n_u_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 1, 0, 1},
  {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1},
  {&__pyx_n_s_findall, __pyx_k_findall, sizeof(__pyx_k_findall), 0, 0, 1, 1},
  {&__pyx_n_s_findinlist, __pyx_k_findinlist, sizeof(__pyx_k_findinlist), 0, 0, 1, 1},
  {&__pyx_n_s_floatex, __pyx_k_floatex, sizeof(__pyx_k_floatex), 0, 0, 1, 1},
  {&__pyx_n_s_form, __pyx_k_form, sizeof(__pyx_k_form), 0, 0, 1, 1},
  {&__pyx_n_s_formatted, __pyx_k_formatted, sizeof(__pyx_k_formatted), 0, 0, 1, 1},
  {&__pyx_n_s_full, __pyx_k_full, sizeof(__pyx_k_full), 0, 0, 1, 1},
  {&__pyx_n_s_fullH, __pyx_k_fullH, sizeof(__pyx_k_fullH), 0, 0, 1, 1},
  {&__pyx_n_s_full_0, __pyx_k_full_0, sizeof(__pyx_k_full_0), 0, 0, 1, 1},
  {&__pyx_n_s_fullsize, __pyx_k_fullsize, sizeof(__pyx_k_fullsize), 0, 0, 1, 1},
  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
  {&__pyx_n_s_getConfigHash, __pyx_k_getConfigHash, sizeof(__pyx_k_getConfigHash), 0, 0, 1, 1},
  {&__pyx_n_s_getConfigString, __pyx_k_getConfigString, sizeof(__pyx_k_getConfigString), 0, 0, 1, 1},
  {&__pyx_n_s_getParameterListFomFile, __pyx_k_getParameterListFomFile, sizeof(__pyx_k_getParameterListFomFile), 0, 0, 1, 1},
  {&__pyx_n_s_getSectionDict, __pyx_k_getSectionDict, sizeof(__pyx_k_getSectionDict), 0, 0, 1, 1},
  {&__pyx_n_s_getcsvdelimiter, __pyx_k_getcsvdelimiter, sizeof(__pyx_k_getcsvdelimiter), 0, 0, 1, 1},
  {&__pyx_n_s_getdefault, __pyx_k_getdefault, sizeof(__pyx_k_getdefault), 0, 0, 1, 1},
  {&__pyx_n_s_gmconst, __pyx_k_gmconst, sizeof(__pyx_k_gmconst), 0, 0, 1, 1},
  {&__pyx_n_s_gmmTmpl, __pyx_k_gmmTmpl, sizeof(__pyx_k_gmmTmpl), 0, 0, 1, 1},
  {&__pyx_n_s_gmxFileName, __pyx_k_gmxFileName, sizeof(__pyx_k_gmxFileName), 0, 0, 1, 1},
  {&__pyx_n_s_gmxTmpl, __pyx_k_gmxTmpl, sizeof(__pyx_k_gmxTmpl), 0, 0, 1, 1},
  {&__pyx_n_s_gradekey, __pyx_k_gradekey, sizeof(__pyx_k_gradekey), 0, 0, 1, 1},
  {&__pyx_n_u_grd, __pyx_k_grd, sizeof(__pyx_k_grd), 0, 1, 0, 1},
  {&__pyx_n_u_grds, __pyx_k_grds, sizeof(__pyx_k_grds), 0, 1, 0, 1},
  {&__pyx_n_u_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 1, 0, 1},
  {&__pyx_n_s_hasOneOf, __pyx_k_hasOneOf, sizeof(__pyx_k_hasOneOf), 0, 0, 1, 1},
  {&__pyx_n_s_hex, __pyx_k_hex, sizeof(__pyx_k_hex), 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_kp_u_hidden_s, __pyx_k_hidden_s, sizeof(__pyx_k_hidden_s), 0, 1, 0, 0},
  {&__pyx_n_s_hiddenout, __pyx_k_hiddenout, sizeof(__pyx_k_hiddenout), 0, 0, 1, 1},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_s_i0, __pyx_k_i0, sizeof(__pyx_k_i0), 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_indsmi, __pyx_k_indsmi, sizeof(__pyx_k_indsmi), 0, 0, 1, 1},
  {&__pyx_n_s_inn, __pyx_k_inn, sizeof(__pyx_k_inn), 0, 0, 1, 1},
  {&__pyx_n_s_intersect, __pyx_k_intersect, sizeof(__pyx_k_intersect), 0, 0, 1, 1},
  {&__pyx_n_s_isNum, __pyx_k_isNum, sizeof(__pyx_k_isNum), 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_isnan, __pyx_k_isnan, sizeof(__pyx_k_isnan), 0, 0, 1, 1},
  {&__pyx_n_s_isnum, __pyx_k_isnum, sizeof(__pyx_k_isnum), 0, 0, 1, 1},
  {&__pyx_n_u_iso, __pyx_k_iso, sizeof(__pyx_k_iso), 0, 1, 0, 1},
  {&__pyx_kp_u_iso_s, __pyx_k_iso_s, sizeof(__pyx_k_iso_s), 0, 1, 0, 0},
  {&__pyx_n_s_isokey, __pyx_k_isokey, sizeof(__pyx_k_isokey), 0, 0, 1, 1},
  {&__pyx_n_u_isomer, __pyx_k_isomer, sizeof(__pyx_k_isomer), 0, 1, 0, 1},
  {&__pyx_kp_u_isomer_d, __pyx_k_isomer_d, sizeof(__pyx_k_isomer_d), 0, 1, 0, 0},
  {&__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_iterTmpl, __pyx_k_iterTmpl, sizeof(__pyx_k_iterTmpl), 0, 0, 1, 1},
  {&__pyx_kp_u_iter_03d_txt, __pyx_k_iter_03d_txt, sizeof(__pyx_k_iter_03d_txt), 0, 1, 0, 0},
  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {&__pyx_n_s_keppexcept, __pyx_k_keppexcept, sizeof(__pyx_k_keppexcept), 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_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
  {&__pyx_n_s_lambda, __pyx_k_lambda, sizeof(__pyx_k_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_leftjustify, __pyx_k_leftjustify, sizeof(__pyx_k_leftjustify), 0, 0, 1, 1},
  {&__pyx_n_s_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1},
  {&__pyx_n_s_lenloc, __pyx_k_lenloc, sizeof(__pyx_k_lenloc), 0, 0, 1, 1},
  {&__pyx_n_s_lenrow, __pyx_k_lenrow, sizeof(__pyx_k_lenrow), 0, 0, 1, 1},
  {&__pyx_n_s_lens, __pyx_k_lens, sizeof(__pyx_k_lens), 0, 0, 1, 1},
  {&__pyx_n_u_lib, __pyx_k_lib, sizeof(__pyx_k_lib), 0, 1, 0, 1},
  {&__pyx_n_s_line, __pyx_k_line, sizeof(__pyx_k_line), 0, 0, 1, 1},
  {&__pyx_n_s_lmatch, __pyx_k_lmatch, sizeof(__pyx_k_lmatch), 0, 0, 1, 1},
  {&__pyx_n_s_lower, __pyx_k_lower, sizeof(__pyx_k_lower), 0, 0, 1, 1},
  {&__pyx_n_s_lres, __pyx_k_lres, sizeof(__pyx_k_lres), 0, 0, 1, 1},
  {&__pyx_n_s_lst, __pyx_k_lst, sizeof(__pyx_k_lst), 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_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
  {&__pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_k_metaphor_chem_gm_core_gmutils, sizeof(__pyx_k_metaphor_chem_gm_core_gmutils), 0, 0, 1, 1},
  {&__pyx_kp_s_metaphor_chem_gm_core_gmutils_py, __pyx_k_metaphor_chem_gm_core_gmutils_py, sizeof(__pyx_k_metaphor_chem_gm_core_gmutils_py), 0, 0, 1, 0},
  {&__pyx_n_u_model, __pyx_k_model, sizeof(__pyx_k_model), 0, 1, 0, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_module2short, __pyx_k_module2short, sizeof(__pyx_k_module2short), 0, 0, 1, 1},
  {&__pyx_n_u_mol, __pyx_k_mol, sizeof(__pyx_k_mol), 0, 1, 0, 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_util, __pyx_k_monal_util, sizeof(__pyx_k_monal_util), 0, 0, 1, 1},
  {&__pyx_n_s_monalconst, __pyx_k_monalconst, sizeof(__pyx_k_monalconst), 0, 0, 1, 1},
  {&__pyx_n_s_monalversion, __pyx_k_monalversion, sizeof(__pyx_k_monalversion), 0, 0, 1, 1},
  {&__pyx_n_u_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 1, 0, 1},
  {&__pyx_n_u_nam, __pyx_k_nam, sizeof(__pyx_k_nam), 0, 1, 0, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_nameIndex, __pyx_k_nameIndex, sizeof(__pyx_k_nameIndex), 0, 0, 1, 1},
  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
  {&__pyx_n_u_nan, __pyx_k_nan, sizeof(__pyx_k_nan), 0, 1, 0, 1},
  {&__pyx_n_s_nc, __pyx_k_nc, sizeof(__pyx_k_nc), 0, 0, 1, 1},
  {&__pyx_n_s_next, __pyx_k_next, sizeof(__pyx_k_next), 0, 0, 1, 1},
  {&__pyx_n_s_nn, __pyx_k_nn, sizeof(__pyx_k_nn), 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_u_nom, __pyx_k_nom, sizeof(__pyx_k_nom), 0, 1, 0, 1},
  {&__pyx_n_s_nonASCIICharsConvert, __pyx_k_nonASCIICharsConvert, sizeof(__pyx_k_nonASCIICharsConvert), 0, 0, 1, 1},
  {&__pyx_n_s_nrow, __pyx_k_nrow, sizeof(__pyx_k_nrow), 0, 0, 1, 1},
  {&__pyx_n_s_numlist, __pyx_k_numlist, sizeof(__pyx_k_numlist), 0, 0, 1, 1},
  {&__pyx_n_s_ok, __pyx_k_ok, sizeof(__pyx_k_ok), 0, 0, 1, 1},
  {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
  {&__pyx_n_s_option, __pyx_k_option, sizeof(__pyx_k_option), 0, 0, 1, 1},
  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
  {&__pyx_n_s_otherlist, __pyx_k_otherlist, sizeof(__pyx_k_otherlist), 0, 0, 1, 1},
  {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
  {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
  {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
  {&__pyx_n_s_prlist, __pyx_k_prlist, sizeof(__pyx_k_prlist), 0, 0, 1, 1},
  {&__pyx_n_s_propertyIndex, __pyx_k_propertyIndex, sizeof(__pyx_k_propertyIndex), 0, 0, 1, 1},
  {&__pyx_n_u_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 1, 0, 1},
  {&__pyx_kp_u_qm_d, __pyx_k_qm_d, sizeof(__pyx_k_qm_d), 0, 1, 0, 0},
  {&__pyx_kp_u_qp_d, __pyx_k_qp_d, sizeof(__pyx_k_qp_d), 0, 1, 0, 0},
  {&__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_u_rb, __pyx_k_rb, sizeof(__pyx_k_rb), 0, 1, 0, 1},
  {&__pyx_n_s_re, __pyx_k_re, sizeof(__pyx_k_re), 0, 0, 1, 1},
  {&__pyx_n_s_read, __pyx_k_read, sizeof(__pyx_k_read), 0, 0, 1, 1},
  {&__pyx_n_s_reader, __pyx_k_reader, sizeof(__pyx_k_reader), 0, 0, 1, 1},
  {&__pyx_n_s_readline, __pyx_k_readline, sizeof(__pyx_k_readline), 0, 0, 1, 1},
  {&__pyx_n_s_readoption, __pyx_k_readoption, sizeof(__pyx_k_readoption), 0, 0, 1, 1},
  {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1},
  {&__pyx_n_s_res, __pyx_k_res, sizeof(__pyx_k_res), 0, 0, 1, 1},
  {&__pyx_kp_u_res_03d_gmm, __pyx_k_res_03d_gmm, sizeof(__pyx_k_res_03d_gmm), 0, 1, 0, 0},
  {&__pyx_kp_u_res_03d_gmx, __pyx_k_res_03d_gmx, sizeof(__pyx_k_res_03d_gmx), 0, 1, 0, 0},
  {&__pyx_n_u_resampling, __pyx_k_resampling, sizeof(__pyx_k_resampling), 0, 1, 0, 1},
  {&__pyx_n_s_reshash, __pyx_k_reshash, sizeof(__pyx_k_reshash), 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_rg, __pyx_k_rg, sizeof(__pyx_k_rg), 0, 0, 1, 1},
  {&__pyx_n_s_rjust, __pyx_k_rjust, sizeof(__pyx_k_rjust), 0, 0, 1, 1},
  {&__pyx_n_s_row, __pyx_k_row, sizeof(__pyx_k_row), 0, 0, 1, 1},
  {&__pyx_n_s_row2, __pyx_k_row2, sizeof(__pyx_k_row2), 0, 0, 1, 1},
  {&__pyx_n_s_rr, __pyx_k_rr, sizeof(__pyx_k_rr), 0, 0, 1, 1},
  {&__pyx_kp_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 0},
  {&__pyx_kp_u_sN, __pyx_k_sN, sizeof(__pyx_k_sN), 0, 1, 0, 0},
  {&__pyx_n_s_seek, __pyx_k_seek, sizeof(__pyx_k_seek), 0, 0, 1, 1},
  {&__pyx_n_s_sep, __pyx_k_sep, sizeof(__pyx_k_sep), 0, 0, 1, 1},
  {&__pyx_n_s_short, __pyx_k_short, sizeof(__pyx_k_short), 0, 0, 1, 1},
  {&__pyx_n_s_sindex, __pyx_k_sindex, sizeof(__pyx_k_sindex), 0, 0, 1, 1},
  {&__pyx_n_s_six, __pyx_k_six, sizeof(__pyx_k_six), 0, 0, 1, 1},
  {&__pyx_n_s_skipline, __pyx_k_skipline, sizeof(__pyx_k_skipline), 0, 0, 1, 1},
  {&__pyx_n_u_smi, __pyx_k_smi, sizeof(__pyx_k_smi), 0, 1, 0, 1},
  {&__pyx_n_s_smileIndex, __pyx_k_smileIndex, sizeof(__pyx_k_smileIndex), 0, 0, 1, 1},
  {&__pyx_n_s_smiletk, __pyx_k_smiletk, sizeof(__pyx_k_smiletk), 0, 0, 1, 1},
  {&__pyx_n_s_sniff, __pyx_k_sniff, sizeof(__pyx_k_sniff), 0, 0, 1, 1},
  {&__pyx_n_s_sniffFile, __pyx_k_sniffFile, sizeof(__pyx_k_sniffFile), 0, 0, 1, 1},
  {&__pyx_n_s_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 0, 1, 1},
  {&__pyx_n_s_source2, __pyx_k_source2, sizeof(__pyx_k_source2), 0, 0, 1, 1},
  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {&__pyx_n_s_splitext, __pyx_k_splitext, sizeof(__pyx_k_splitext), 0, 0, 1, 1},
  {&__pyx_n_s_splitindexedname, __pyx_k_splitindexedname, sizeof(__pyx_k_splitindexedname), 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_u_stddev, __pyx_k_stddev, sizeof(__pyx_k_stddev), 0, 1, 0, 1},
  {&__pyx_n_s_string_types, __pyx_k_string_types, sizeof(__pyx_k_string_types), 0, 0, 1, 1},
  {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1},
  {&__pyx_n_s_structkeys, __pyx_k_structkeys, sizeof(__pyx_k_structkeys), 0, 0, 1, 1},
  {&__pyx_n_s_structkeysgradeless, __pyx_k_structkeysgradeless, sizeof(__pyx_k_structkeysgradeless), 0, 0, 1, 1},
  {&__pyx_n_s_structkeysgradelessshort, __pyx_k_structkeysgradelessshort, sizeof(__pyx_k_structkeysgradelessshort), 0, 0, 1, 1},
  {&__pyx_n_s_structkeysshort, __pyx_k_structkeysshort, sizeof(__pyx_k_structkeysshort), 0, 0, 1, 1},
  {&__pyx_n_u_student, __pyx_k_student, sizeof(__pyx_k_student), 0, 1, 0, 1},
  {&__pyx_n_s_sub, __pyx_k_sub, sizeof(__pyx_k_sub), 0, 0, 1, 1},
  {&__pyx_n_s_suggested, __pyx_k_suggested, sizeof(__pyx_k_suggested), 0, 0, 1, 1},
  {&__pyx_n_s_symbolFromNodeName, __pyx_k_symbolFromNodeName, sizeof(__pyx_k_symbolFromNodeName), 0, 0, 1, 1},
  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
  {&__pyx_n_s_tb, __pyx_k_tb, sizeof(__pyx_k_tb), 0, 0, 1, 1},
  {&__pyx_n_s_temp, __pyx_k_temp, sizeof(__pyx_k_temp), 0, 0, 1, 1},
  {&__pyx_n_s_tempkeys, __pyx_k_tempkeys, sizeof(__pyx_k_tempkeys), 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_threading, __pyx_k_threading, sizeof(__pyx_k_threading), 0, 0, 1, 1},
  {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
  {&__pyx_n_s_tmpl, __pyx_k_tmpl, sizeof(__pyx_k_tmpl), 0, 0, 1, 1},
  {&__pyx_n_s_tmplfile, __pyx_k_tmplfile, sizeof(__pyx_k_tmplfile), 0, 0, 1, 1},
  {&__pyx_n_s_toLong, __pyx_k_toLong, sizeof(__pyx_k_toLong), 0, 0, 1, 1},
  {&__pyx_n_s_toolbox, __pyx_k_toolbox, sizeof(__pyx_k_toolbox), 0, 0, 1, 1},
  {&__pyx_n_s_tt, __pyx_k_tt, sizeof(__pyx_k_tt), 0, 0, 1, 1},
  {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1},
  {&__pyx_n_s_valint, __pyx_k_valint, sizeof(__pyx_k_valint), 0, 0, 1, 1},
  {&__pyx_n_s_vallo, __pyx_k_vallo, sizeof(__pyx_k_vallo), 0, 0, 1, 1},
  {&__pyx_n_s_valst, __pyx_k_valst, sizeof(__pyx_k_valst), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_value2, __pyx_k_value2, sizeof(__pyx_k_value2), 0, 0, 1, 1},
  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
  {&__pyx_n_s_weightFile, __pyx_k_weightFile, sizeof(__pyx_k_weightFile), 0, 0, 1, 1},
  {&__pyx_n_s_weightTmpl, __pyx_k_weightTmpl, sizeof(__pyx_k_weightTmpl), 0, 0, 1, 1},
  {&__pyx_kp_u_weight_03d, __pyx_k_weight_03d, sizeof(__pyx_k_weight_03d), 0, 1, 0, 0},
  {&__pyx_n_u_weights, __pyx_k_weights, sizeof(__pyx_k_weights), 0, 1, 0, 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_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 708, __pyx_L1_error)
  __pyx_builtin_hex = __Pyx_GetBuiltinName(__pyx_n_s_hex); if (!__pyx_builtin_hex) __PYX_ERR(0, 144, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 174, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 322, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 451, __pyx_L1_error)
  __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) __PYX_ERR(0, 562, __pyx_L1_error)
  __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 582, __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/gmutils.py":145
 *         else:
 *             st = hex(nn)
 *             lst.append('\\%s'%st[1:])             # <<<<<<<<<<<<<<
 *     return "".join(lst)
 * 
 */
  __pyx_slice__2 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__2)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__2);
  __Pyx_GIVEREF(__pyx_slice__2);

  /* "metaphor/chem_gm/core/gmutils.py":151
 *     nc = -1
 *     try:
 *         nn = source.index('-')             # <<<<<<<<<<<<<<
 *         lst = source.split('-')
 *         source2 = "-".join(lst[1:])
 */
  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u__3); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "metaphor/chem_gm/core/gmutils.py":152
 *     try:
 *         nn = source.index('-')
 *         lst = source.split('-')             # <<<<<<<<<<<<<<
 *         source2 = "-".join(lst[1:])
 *     except:
 */
  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u__3); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "metaphor/chem_gm/core/gmutils.py":153
 *         nn = source.index('-')
 *         lst = source.split('-')
 *         source2 = "-".join(lst[1:])             # <<<<<<<<<<<<<<
 *     except:
 *         source2 = source
 */
  __pyx_slice__6 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__6)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__6);
  __Pyx_GIVEREF(__pyx_slice__6);

  /* "metaphor/chem_gm/core/gmutils.py":158
 *     #lst = source.split('-')
 *     #source2 =
 *     prlist = source2.lower().split('_')[-1::-1]             # <<<<<<<<<<<<<<
 *     already = []
 *     lres = []
 */
  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_n_u__7); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);
  __pyx_slice__9 = PySlice_New(__pyx_int_neg_1, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__9)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__9);
  __Pyx_GIVEREF(__pyx_slice__9);

  /* "metaphor/chem_gm/core/gmutils.py":163
 *     for val in prlist:
 *         if 'n' in val.lower():
 *             inn = val.lower().index('n') + 1             # <<<<<<<<<<<<<<
 *             if (inn != 1) and val[inn:]:
 *                 lres.append(val[inn:])
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_n_u_n); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "metaphor/chem_gm/core/gmutils.py":175
 *     res = {"central":3, "mol1":True, "grds": -1}
 *     for index, val in enumerate(prlist):
 *         if (val[:4] == "ccls") and not ("ccls" in already):             # <<<<<<<<<<<<<<
 *             already.append("ccls")
 *             res["ccl"] = val[4:]
 */
  __pyx_slice__11 = PySlice_New(Py_None, __pyx_int_4, Py_None); if (unlikely(!__pyx_slice__11)) __PYX_ERR(0, 175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__11);
  __Pyx_GIVEREF(__pyx_slice__11);

  /* "metaphor/chem_gm/core/gmutils.py":177
 *         if (val[:4] == "ccls") and not ("ccls" in already):
 *             already.append("ccls")
 *             res["ccl"] = val[4:]             # <<<<<<<<<<<<<<
 *         elif (val[:4] == "grds") and not ("grds" in already):
 *             already.append("grds")
 */
  __pyx_slice__12 = PySlice_New(__pyx_int_4, Py_None, Py_None); if (unlikely(!__pyx_slice__12)) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__12);
  __Pyx_GIVEREF(__pyx_slice__12);

  /* "metaphor/chem_gm/core/gmutils.py":178
 *             already.append("ccls")
 *             res["ccl"] = val[4:]
 *         elif (val[:4] == "grds") and not ("grds" in already):             # <<<<<<<<<<<<<<
 *             already.append("grds")
 *             res["grds"] = val[4:]
 */
  __pyx_slice__13 = PySlice_New(Py_None, __pyx_int_4, Py_None); if (unlikely(!__pyx_slice__13)) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__13);
  __Pyx_GIVEREF(__pyx_slice__13);

  /* "metaphor/chem_gm/core/gmutils.py":180
 *         elif (val[:4] == "grds") and not ("grds" in already):
 *             already.append("grds")
 *             res["grds"] = val[4:]             # <<<<<<<<<<<<<<
 *         elif (val[:3] == "mol") and not ("mol" in already):
 *             res["mol1"] = int(val[3:])
 */
  __pyx_slice__14 = PySlice_New(__pyx_int_4, Py_None, Py_None); if (unlikely(!__pyx_slice__14)) __PYX_ERR(0, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__14);
  __Pyx_GIVEREF(__pyx_slice__14);

  /* "metaphor/chem_gm/core/gmutils.py":181
 *             already.append("grds")
 *             res["grds"] = val[4:]
 *         elif (val[:3] == "mol") and not ("mol" in already):             # <<<<<<<<<<<<<<
 *             res["mol1"] = int(val[3:])
 *             already.append("mol")
 */
  __pyx_slice__15 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__15)) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__15);
  __Pyx_GIVEREF(__pyx_slice__15);

  /* "metaphor/chem_gm/core/gmutils.py":182
 *             res["grds"] = val[4:]
 *         elif (val[:3] == "mol") and not ("mol" in already):
 *             res["mol1"] = int(val[3:])             # <<<<<<<<<<<<<<
 *             already.append("mol")
 *         elif (val[:3] == "ccl"):
 */
  __pyx_slice__16 = PySlice_New(__pyx_int_3, Py_None, Py_None); if (unlikely(!__pyx_slice__16)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__16);
  __Pyx_GIVEREF(__pyx_slice__16);

  /* "metaphor/chem_gm/core/gmutils.py":184
 *             res["mol1"] = int(val[3:])
 *             already.append("mol")
 *         elif (val[:3] == "ccl"):             # <<<<<<<<<<<<<<
 *             res["ccl"] = val[3:]
 *         elif (val[:3] == "grd") :
 */
  __pyx_slice__17 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__17)) __PYX_ERR(0, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__17);
  __Pyx_GIVEREF(__pyx_slice__17);

  /* "metaphor/chem_gm/core/gmutils.py":185
 *             already.append("mol")
 *         elif (val[:3] == "ccl"):
 *             res["ccl"] = val[3:]             # <<<<<<<<<<<<<<
 *         elif (val[:3] == "grd") :
 *             res["grd"] = val[3:]
 */
  __pyx_slice__18 = PySlice_New(__pyx_int_3, Py_None, Py_None); if (unlikely(!__pyx_slice__18)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__18);
  __Pyx_GIVEREF(__pyx_slice__18);

  /* "metaphor/chem_gm/core/gmutils.py":186
 *         elif (val[:3] == "ccl"):
 *             res["ccl"] = val[3:]
 *         elif (val[:3] == "grd") :             # <<<<<<<<<<<<<<
 *             res["grd"] = val[3:]
 *         elif (val[:3] == "chi") and not ("chi" in already):
 */
  __pyx_slice__19 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__19)) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__19);
  __Pyx_GIVEREF(__pyx_slice__19);

  /* "metaphor/chem_gm/core/gmutils.py":187
 *             res["ccl"] = val[3:]
 *         elif (val[:3] == "grd") :
 *             res["grd"] = val[3:]             # <<<<<<<<<<<<<<
 *         elif (val[:3] == "chi") and not ("chi" in already):
 *             already.append("chi")
 */
  __pyx_slice__20 = PySlice_New(__pyx_int_3, Py_None, Py_None); if (unlikely(!__pyx_slice__20)) __PYX_ERR(0, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__20);
  __Pyx_GIVEREF(__pyx_slice__20);

  /* "metaphor/chem_gm/core/gmutils.py":188
 *         elif (val[:3] == "grd") :
 *             res["grd"] = val[3:]
 *         elif (val[:3] == "chi") and not ("chi" in already):             # <<<<<<<<<<<<<<
 *             already.append("chi")
 *             res["chi"] = int(val[3:])
 */
  __pyx_slice__21 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__21)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__21);
  __Pyx_GIVEREF(__pyx_slice__21);

  /* "metaphor/chem_gm/core/gmutils.py":190
 *         elif (val[:3] == "chi") and not ("chi" in already):
 *             already.append("chi")
 *             res["chi"] = int(val[3:])             # <<<<<<<<<<<<<<
 *         elif (val[:3] == "iso") and not ("iso" in already):
 *             already.append("iso")
 */
  __pyx_slice__22 = PySlice_New(__pyx_int_3, Py_None, Py_None); if (unlikely(!__pyx_slice__22)) __PYX_ERR(0, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__22);
  __Pyx_GIVEREF(__pyx_slice__22);

  /* "metaphor/chem_gm/core/gmutils.py":191
 *             already.append("chi")
 *             res["chi"] = int(val[3:])
 *         elif (val[:3] == "iso") and not ("iso" in already):             # <<<<<<<<<<<<<<
 *             already.append("iso")
 *             res["iso"] = int(val[3:])
 */
  __pyx_slice__23 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__23)) __PYX_ERR(0, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__23);
  __Pyx_GIVEREF(__pyx_slice__23);

  /* "metaphor/chem_gm/core/gmutils.py":193
 *         elif (val[:3] == "iso") and not ("iso" in already):
 *             already.append("iso")
 *             res["iso"] = int(val[3:])             # <<<<<<<<<<<<<<
 *         elif (val[:2] == "ce") and not ("central" in  already):
 *             cond = (index == 1) if ("mol" in already) else (index == 0)
 */
  __pyx_slice__24 = PySlice_New(__pyx_int_3, Py_None, Py_None); if (unlikely(!__pyx_slice__24)) __PYX_ERR(0, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__24);
  __Pyx_GIVEREF(__pyx_slice__24);

  /* "metaphor/chem_gm/core/gmutils.py":194
 *             already.append("iso")
 *             res["iso"] = int(val[3:])
 *         elif (val[:2] == "ce") and not ("central" in  already):             # <<<<<<<<<<<<<<
 *             cond = (index == 1) if ("mol" in already) else (index == 0)
 *             if cond:
 */
  __pyx_slice__25 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__25)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__25);
  __Pyx_GIVEREF(__pyx_slice__25);

  /* "metaphor/chem_gm/core/gmutils.py":197
 *             cond = (index == 1) if ("mol" in already) else (index == 0)
 *             if cond:
 *                 nc = int(val[2:])             # <<<<<<<<<<<<<<
 *                 if nc > 0:
 *                     res["central"] = nc
 */
  __pyx_slice__26 = PySlice_New(__pyx_int_2, Py_None, Py_None); if (unlikely(!__pyx_slice__26)) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__26);
  __Pyx_GIVEREF(__pyx_slice__26);

  /* "metaphor/chem_gm/core/gmutils.py":204
 *             cond = (index == 1) if ("mol" in already) else (index == 0)
 *             if cond:
 *                 nc = int(val[1:])             # <<<<<<<<<<<<<<
 *                 if nc > 0:
 *                     res["central"] = nc
 */
  __pyx_slice__27 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__27)) __PYX_ERR(0, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__27);
  __Pyx_GIVEREF(__pyx_slice__27);

  /* "metaphor/chem_gm/core/gmutils.py":208
 *                     res["central"] = nc
 *                 already.append("central")
 *         elif (val[:1] == "q"): #             # <<<<<<<<<<<<<<
 *             res[val[:2]] = val[2:]
 *         elif (val[-1] == "n") and not ("hidden" in already):
 */
  __pyx_slice__28 = PySlice_New(Py_None, __pyx_int_1, Py_None); if (unlikely(!__pyx_slice__28)) __PYX_ERR(0, 208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__28);
  __Pyx_GIVEREF(__pyx_slice__28);

  /* "metaphor/chem_gm/core/gmutils.py":209
 *                 already.append("central")
 *         elif (val[:1] == "q"): #
 *             res[val[:2]] = val[2:]             # <<<<<<<<<<<<<<
 *         elif (val[-1] == "n") and not ("hidden" in already):
 *             res["hidden"] = int(val[:-1])
 */
  __pyx_slice__29 = PySlice_New(__pyx_int_2, Py_None, Py_None); if (unlikely(!__pyx_slice__29)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__29);
  __Pyx_GIVEREF(__pyx_slice__29);
  __pyx_slice__30 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__30)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__30);
  __Pyx_GIVEREF(__pyx_slice__30);

  /* "metaphor/chem_gm/core/gmutils.py":211
 *             res[val[:2]] = val[2:]
 *         elif (val[-1] == "n") and not ("hidden" in already):
 *             res["hidden"] = int(val[:-1])             # <<<<<<<<<<<<<<
 *             already.append("hidden")
 *         elif (val[:2] in AtomsLower()) and (isNum(val[2:])):
 */
  __pyx_slice__31 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__31)) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__31);
  __Pyx_GIVEREF(__pyx_slice__31);

  /* "metaphor/chem_gm/core/gmutils.py":213
 *             res["hidden"] = int(val[:-1])
 *             already.append("hidden")
 *         elif (val[:2] in AtomsLower()) and (isNum(val[2:])):             # <<<<<<<<<<<<<<
 *             ind = AtomsLower().index(val[:2])
 *             res[Atomes[ind]] = val[2:]
 */
  __pyx_slice__32 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__32)) __PYX_ERR(0, 213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__32);
  __Pyx_GIVEREF(__pyx_slice__32);
  __pyx_slice__33 = PySlice_New(__pyx_int_2, Py_None, Py_None); if (unlikely(!__pyx_slice__33)) __PYX_ERR(0, 213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__33);
  __Pyx_GIVEREF(__pyx_slice__33);

  /* "metaphor/chem_gm/core/gmutils.py":214
 *             already.append("hidden")
 *         elif (val[:2] in AtomsLower()) and (isNum(val[2:])):
 *             ind = AtomsLower().index(val[:2])             # <<<<<<<<<<<<<<
 *             res[Atomes[ind]] = val[2:]
 *         elif( val[:1] in AtomsLower()) and (isNum(val[1:])):
 */
  __pyx_slice__34 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__34)) __PYX_ERR(0, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__34);
  __Pyx_GIVEREF(__pyx_slice__34);

  /* "metaphor/chem_gm/core/gmutils.py":215
 *         elif (val[:2] in AtomsLower()) and (isNum(val[2:])):
 *             ind = AtomsLower().index(val[:2])
 *             res[Atomes[ind]] = val[2:]             # <<<<<<<<<<<<<<
 *         elif( val[:1] in AtomsLower()) and (isNum(val[1:])):
 *             ind = AtomsLower().index(val[:1])
 */
  __pyx_slice__35 = PySlice_New(__pyx_int_2, Py_None, Py_None); if (unlikely(!__pyx_slice__35)) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__35);
  __Pyx_GIVEREF(__pyx_slice__35);

  /* "metaphor/chem_gm/core/gmutils.py":216
 *             ind = AtomsLower().index(val[:2])
 *             res[Atomes[ind]] = val[2:]
 *         elif( val[:1] in AtomsLower()) and (isNum(val[1:])):             # <<<<<<<<<<<<<<
 *             ind = AtomsLower().index(val[:1])
 *             res[Atomes[ind]] = val[1:]
 */
  __pyx_slice__36 = PySlice_New(Py_None, __pyx_int_1, Py_None); if (unlikely(!__pyx_slice__36)) __PYX_ERR(0, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__36);
  __Pyx_GIVEREF(__pyx_slice__36);
  __pyx_slice__37 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__37)) __PYX_ERR(0, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__37);
  __Pyx_GIVEREF(__pyx_slice__37);

  /* "metaphor/chem_gm/core/gmutils.py":217
 *             res[Atomes[ind]] = val[2:]
 *         elif( val[:1] in AtomsLower()) and (isNum(val[1:])):
 *             ind = AtomsLower().index(val[:1])             # <<<<<<<<<<<<<<
 *             res[Atomes[ind]] = val[1:]
 *         elif val == "h":
 */
  __pyx_slice__38 = PySlice_New(Py_None, __pyx_int_1, Py_None); if (unlikely(!__pyx_slice__38)) __PYX_ERR(0, 217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__38);
  __Pyx_GIVEREF(__pyx_slice__38);

  /* "metaphor/chem_gm/core/gmutils.py":218
 *         elif( val[:1] in AtomsLower()) and (isNum(val[1:])):
 *             ind = AtomsLower().index(val[:1])
 *             res[Atomes[ind]] = val[1:]             # <<<<<<<<<<<<<<
 *         elif val == "h":
 *             res["h"] = True
 */
  __pyx_slice__39 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__39)) __PYX_ERR(0, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__39);
  __Pyx_GIVEREF(__pyx_slice__39);

  /* "metaphor/chem_gm/core/gmutils.py":238
 *     if isinstance(config, string_types):
 *         config = tb.defaultedConfigParser(config)
 *     hidden = config.get("model", "hidden")             # <<<<<<<<<<<<<<
 *     temp = config.getSectionDict("connectivity")
 *     tempkeys = list(temp.keys())
 */
  __pyx_tuple__40 = PyTuple_Pack(2, __pyx_n_u_model, __pyx_n_u_hidden); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);

  /* "metaphor/chem_gm/core/gmutils.py":239
 *         config = tb.defaultedConfigParser(config)
 *     hidden = config.get("model", "hidden")
 *     temp = config.getSectionDict("connectivity")             # <<<<<<<<<<<<<<
 *     tempkeys = list(temp.keys())
 *     tempkeys.sort()
 */
  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_n_u_connectivity); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "metaphor/chem_gm/core/gmutils.py":266
 * #     for item in lst:
 * #         connectivities[item] = config.get("connectivity", item)
 *     central = config.getdefault("model", "central", "3")             # <<<<<<<<<<<<<<
 *     classif = not config.getdefault("model", "classif", "False") in ["False", "0"]
 *     hidden = config.get("model", "hidden")
 */
  __pyx_tuple__42 = PyTuple_Pack(3, __pyx_n_u_model, __pyx_n_u_central, __pyx_kp_u_3); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);

  /* "metaphor/chem_gm/core/gmutils.py":267
 * #         connectivities[item] = config.get("connectivity", item)
 *     central = config.getdefault("model", "central", "3")
 *     classif = not config.getdefault("model", "classif", "False") in ["False", "0"]             # <<<<<<<<<<<<<<
 *     hidden = config.get("model", "hidden")
 *     if hiddenout:
 */
  __pyx_tuple__43 = PyTuple_Pack(3, __pyx_n_u_model, __pyx_n_u_classif, __pyx_n_u_False); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "metaphor/chem_gm/core/gmutils.py":268
 *     central = config.getdefault("model", "central", "3")
 *     classif = not config.getdefault("model", "classif", "False") in ["False", "0"]
 *     hidden = config.get("model", "hidden")             # <<<<<<<<<<<<<<
 *     if hiddenout:
 *         resst = getConfigString(atomlist, connectivity, central, classif, None)
 */
  __pyx_tuple__44 = PyTuple_Pack(2, __pyx_n_u_model, __pyx_n_u_hidden); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "metaphor/chem_gm/core/gmutils.py":323
 *                 central = candidatelist[:int(central)]
 *             except ValueError:
 *                 central = central.split(",")             # <<<<<<<<<<<<<<
 * #         addcentral = addcentral and len(central) != 3
 *         if addcentral:
 */
  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_u__45); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);

  /* "metaphor/chem_gm/core/gmutils.py":357
 *     if configstr:
 *         central = []
 *         lst = configstr.split("_")             # <<<<<<<<<<<<<<
 *         for value in lst:
 *             if not value:
 */
  __pyx_tuple__52 = PyTuple_Pack(1, __pyx_n_u__7); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);

  /* "metaphor/chem_gm/core/gmutils.py":366
 *                 fullH = True
 *             elif isint(value[0]) and value[-1]=="N":
 *                 hidden = int(value[:-1])             # <<<<<<<<<<<<<<
 *             elif isint(value[-1]):
 *                 test = value[:-1]
 */
  __pyx_slice__53 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__53)) __PYX_ERR(0, 366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__53);
  __Pyx_GIVEREF(__pyx_slice__53);

  /* "metaphor/chem_gm/core/gmutils.py":368
 *                 hidden = int(value[:-1])
 *             elif isint(value[-1]):
 *                 test = value[:-1]             # <<<<<<<<<<<<<<
 *                 val = int(value[-1])
 *                 #if test[:2] in ["gr", "is", "ch", "qm", "qp", "cc"]
 */
  __pyx_slice__54 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__54)) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__54);
  __Pyx_GIVEREF(__pyx_slice__54);

  /* "metaphor/chem_gm/core/gmutils.py":377
 *                 connect[key] = val
 *             else:
 *                 central = value.split("|")             # <<<<<<<<<<<<<<
 *     return connect, central, classif, hidden, fullH
 * 
 */
  __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_u__47); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);

  /* "metaphor/chem_gm/core/gmutils.py":382
 * def module2short(module):
 *     res = os.path.splitext(os.path.basename(module))[0]
 *     return res[3:] if res.startswith('lib') else res             # <<<<<<<<<<<<<<
 * 
 * def leftjustify(source, lens):
 */
  __pyx_tuple__56 = PyTuple_Pack(1, __pyx_n_u_lib); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);
  __pyx_slice__57 = PySlice_New(__pyx_int_3, Py_None, Py_None); if (unlikely(!__pyx_slice__57)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__57);
  __Pyx_GIVEREF(__pyx_slice__57);

  /* "metaphor/chem_gm/core/gmutils.py":548
 * def symbolFromNodeName(name):
 *     import re
 *     cc = re.compile(r'[a-zA-Z]{1,2}')             # <<<<<<<<<<<<<<
 *     lmatch = cc.findall(name)
 *     if len(lmatch) is not None:
 */
  __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_u_a_zA_Z_1_2); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);

  /* "metaphor/chem_gm/core/gmutils.py":563
 *     numlist = []
 *     with open(filename, 'rb') as csvfile:
 *         rr = csvfile.read(1024)             # <<<<<<<<<<<<<<
 *         dialect = csv.Sniffer().sniff(rr, delimiters=",;")  # dialect ou self.dialect.delimiter  , delimiters="; "
 *         csvfile.seek(0)
 */
  __pyx_tuple__60 = PyTuple_Pack(1, __pyx_int_1024); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);

  /* "metaphor/chem_gm/core/gmutils.py":565
 *         rr = csvfile.read(1024)
 *         dialect = csv.Sniffer().sniff(rr, delimiters=",;")  # dialect ou self.dialect.delimiter  , delimiters="; "
 *         csvfile.seek(0)             # <<<<<<<<<<<<<<
 *         reader = csv.reader(csvfile, dialect)
 *         try:
 */
  __pyx_tuple__62 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);

  /* "metaphor/chem_gm/core/gmutils.py":584
 *         for ind, (value, value2) in enumerate(zip(row, row2)):
 *             vallo = value.lower()
 *             if vallo.startswith("smi"):             # <<<<<<<<<<<<<<
 *                 indsmi = ind + 1
 *                 smileIndex = ind                         # smileIndex
 */
  __pyx_tuple__63 = PyTuple_Pack(1, __pyx_n_u_smi); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);

  /* "metaphor/chem_gm/core/gmutils.py":588
 *                 smileIndex = ind                         # smileIndex
 *                 skipline = 1
 *             elif vallo.startswith("nom") or  vallo.startswith("nam") or  vallo.startswith("mol"):             # <<<<<<<<<<<<<<
 *                 nameIndex = ind                           # nameIndex
 *             elif indsmi and (indsmi == ind):
 */
  __pyx_tuple__64 = PyTuple_Pack(1, __pyx_n_u_nom); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);
  __pyx_tuple__65 = PyTuple_Pack(1, __pyx_n_u_nam); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);
  __pyx_tuple__66 = PyTuple_Pack(1, __pyx_n_u_mol); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);

  /* "metaphor/chem_gm/core/gmutils.py":562
 *     import csv
 *     numlist = []
 *     with open(filename, 'rb') as csvfile:             # <<<<<<<<<<<<<<
 *         rr = csvfile.read(1024)
 *         dialect = csv.Sniffer().sniff(rr, delimiters=",;")  # dialect ou self.dialect.delimiter  , delimiters="; "
 */
  __pyx_tuple__67 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);

  /* "metaphor/chem_gm/core/gmutils.py":620
 *     try:
 *         test = [suggested]
 *         for tt in [',', ';', '\t', ' ']:             # <<<<<<<<<<<<<<
 *             if not tt in test:
 *                 test.append(tt)
 */
  __pyx_tuple__71 = PyTuple_Pack(4, __pyx_kp_u__45, __pyx_kp_u__69, __pyx_kp_u__70, __pyx_kp_u__58); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);

  /* "metaphor/chem_gm/core/gmutils.py":625
 *         for sep in test:
 *             lenloc = 0
 *             with open(filename, "rb") as source:             # <<<<<<<<<<<<<<
 *                 datareader = csv.reader(source, delimiter=sep, quotechar=quotechar)
 *                 for ii, row in enumerate(datareader):
 */
  __pyx_tuple__72 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);

  /* "metaphor/chem_gm/core/gmutils.py":656
 *     try: return float(value)
 *     except:
 *         try: return float(value.replace(',', '.'))             # <<<<<<<<<<<<<<
 *         except:
 *             if keppexcept:
 */
  __pyx_tuple__74 = PyTuple_Pack(2, __pyx_kp_u__45, __pyx_kp_u__73); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);

  /* "metaphor/chem_gm/core/gmutils.py":675
 *                     ok = False
 *                     break
 *                 elif not line.startswith('count'):             # <<<<<<<<<<<<<<
 *                     lst = line.split(";")
 *                     if isNum(lst[0]):
 */
  __pyx_tuple__75 = PyTuple_Pack(1, __pyx_n_u_count); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);

  /* "metaphor/chem_gm/core/gmutils.py":676
 *                     break
 *                 elif not line.startswith('count'):
 *                     lst = line.split(";")             # <<<<<<<<<<<<<<
 *                     if isNum(lst[0]):
 *                         res.append("W_%d"% len(res))
 */
  __pyx_tuple__76 = PyTuple_Pack(1, __pyx_kp_u__69); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);

  /* "metaphor/chem_gm/core/gmutils.py":666
 *     res = []
 *     ok = False
 *     with open(weightFile, "rb") as source:             # <<<<<<<<<<<<<<
 *         for line in iter(source.readline, ''):
 *             line = line.strip()
 */
  __pyx_tuple__77 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);

  /* "metaphor/chem_gm/core/gmutils.py":696
 *     corename = name
 *     index = -1
 *     if name.endswith(')'):             # <<<<<<<<<<<<<<
 *         N = name.index('(')
 *         corename = name[:N]
 */
  __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_u__78); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);

  /* "metaphor/chem_gm/core/gmutils.py":697
 *     index = -1
 *     if name.endswith(')'):
 *         N = name.index('(')             # <<<<<<<<<<<<<<
 *         corename = name[:N]
 *         sindex = name[N+1:-1]
 */
  __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_u__80); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);

  /* "metaphor/chem_gm/core/gmutils.py":68
 * gmxTmpl = "res%03d.gmx"
 * configTmpl = "conf%03d.cfg"
 * decmark_reg = re.compile('(?<=\d),(?=\d)')             # <<<<<<<<<<<<<<
 * 
 * # def getSqlFileNameFromConf(config, root, traintype):
 */
  __pyx_tuple__82 = PyTuple_Pack(1, __pyx_kp_u_d_d); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);

  /* "metaphor/chem_gm/core/gmutils.py":127
 * #     return dico
 * 
 * def readoption(argv=[], option="", default=0):             # <<<<<<<<<<<<<<
 *     rg = default
 *     if option in argv:
 */
  __pyx_tuple__83 = PyTuple_Pack(5, __pyx_n_s_argv, __pyx_n_s_option, __pyx_n_s_default, __pyx_n_s_rg, __pyx_n_s_nn); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);
  __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmutils_py, __pyx_n_s_readoption, 127, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 127, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmutils.py":137
 *     return rg
 * 
 * def nonASCIICharsConvert(Chaine):             # <<<<<<<<<<<<<<
 *     lst = []
 *     for c in Chaine:
 */
  __pyx_tuple__85 = PyTuple_Pack(5, __pyx_n_s_Chaine, __pyx_n_s_lst, __pyx_n_s_c, __pyx_n_s_nn, __pyx_n_s_st); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);
  __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmutils_py, __pyx_n_s_nonASCIICharsConvert, 137, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 137, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmutils.py":148
 *     return "".join(lst)
 * 
 * def analyseProjectName(source):             # <<<<<<<<<<<<<<
 *     nc = -1
 *     try:
 */
  __pyx_tuple__87 = PyTuple_Pack(14, __pyx_n_s_source, __pyx_n_s_nc, __pyx_n_s_nn, __pyx_n_s_lst, __pyx_n_s_source2, __pyx_n_s_prlist, __pyx_n_s_already, __pyx_n_s_lres, __pyx_n_s_val, __pyx_n_s_inn, __pyx_n_s_res, __pyx_n_s_index, __pyx_n_s_cond, __pyx_n_s_ind); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);
  __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(1, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmutils_py, __pyx_n_s_analyseProjectName, 148, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(0, 148, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmutils.py":226
 *     # todo completer
 * 
 * def tmplfile(tmpl, index, directory=""):             # <<<<<<<<<<<<<<
 *     if directory:
 *         return os.path.join(directory, tmpl% (index))
 */
  __pyx_tuple__89 = PyTuple_Pack(3, __pyx_n_s_tmpl, __pyx_n_s_index, __pyx_n_s_directory); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__89);
  __Pyx_GIVEREF(__pyx_tuple__89);
  __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmutils_py, __pyx_n_s_tmplfile, 226, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 226, __pyx_L1_error)
  __pyx_tuple__91 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_u_)); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__91);
  __Pyx_GIVEREF(__pyx_tuple__91);

  /* "metaphor/chem_gm/core/gmutils.py":232
 *         return tmpl% (index)
 * 
 * def gmxFileName(index, directory=""):             # <<<<<<<<<<<<<<
 *     return tmplfile(gmxTmpl, index, directory)
 * 
 */
  __pyx_tuple__92 = PyTuple_Pack(2, __pyx_n_s_index, __pyx_n_s_directory); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);
  __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmutils_py, __pyx_n_s_gmxFileName, 232, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 232, __pyx_L1_error)
  __pyx_tuple__94 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_u_)); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);

  /* "metaphor/chem_gm/core/gmutils.py":235
 *     return tmplfile(gmxTmpl, index, directory)
 * 
 * def getConfigHash(config, full=False, hiddenout=False):             # <<<<<<<<<<<<<<
 *     if isinstance(config, string_types):
 *         config = tb.defaultedConfigParser(config)
 */
  __pyx_tuple__95 = PyTuple_Pack(18, __pyx_n_s_config, __pyx_n_s_full, __pyx_n_s_hiddenout, __pyx_n_s_hidden, __pyx_n_s_temp, __pyx_n_s_tempkeys, __pyx_n_s_atomlist, __pyx_n_s_otherlist, __pyx_n_s_connectivity, __pyx_n_s_key, __pyx_n_s_val, __pyx_n_s_central, __pyx_n_s_classif, __pyx_n_s_resst, __pyx_n_s_reslong, __pyx_n_s_reshash, __pyx_n_s_val, __pyx_n_s_val); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);
  __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(3, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmutils_py, __pyx_n_s_getConfigHash, 235, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 235, __pyx_L1_error)
  __pyx_tuple__97 = PyTuple_Pack(2, ((PyObject *)Py_False), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);

  /* "metaphor/chem_gm/core/gmutils.py":282
 *     return reshash
 * 
 * def getConfigString(atomlist, connectivities, central, classif, hidden, fullH=False, short=False):             # <<<<<<<<<<<<<<
 *     """Creation de la chaine de configuration caracteristique de la structure.
 *     connectivities: dictionnaire des connectivites
 */
  __pyx_tuple__98 = PyTuple_Pack(17, __pyx_n_s_atomlist, __pyx_n_s_connectivities, __pyx_n_s_central, __pyx_n_s_classif, __pyx_n_s_hidden, __pyx_n_s_fullH, __pyx_n_s_short, __pyx_n_s_lst, __pyx_n_s_item, __pyx_n_s_valst, __pyx_n_s_valint, __pyx_n_s_Item, __pyx_n_s_cond, __pyx_n_s_intersect, __pyx_n_s_candidatelist, __pyx_n_s_val, __pyx_n_s_addcentral); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);
  __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(7, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__98, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmutils_py, __pyx_n_s_getConfigString, 282, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 282, __pyx_L1_error)
  __pyx_tuple__100 = PyTuple_Pack(2, ((PyObject *)Py_False), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__100);
  __Pyx_GIVEREF(__pyx_tuple__100);

  /* "metaphor/chem_gm/core/gmutils.py":334
 *     return "_".join(lst)
 * 
 * def ReverseConfigString2String(configstr):             # <<<<<<<<<<<<<<
 *     lst = ["Configurattion:"]
 *     connect, central, classif, hidden, fullH = ReverseConfigString(configstr)
 */
  __pyx_tuple__101 = PyTuple_Pack(9, __pyx_n_s_configstr, __pyx_n_s_lst, __pyx_n_s_connect, __pyx_n_s_central, __pyx_n_s_classif, __pyx_n_s_hidden, __pyx_n_s_fullH, __pyx_n_s_key, __pyx_n_s_val); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);
  __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmutils_py, __pyx_n_s_ReverseConfigString2String, 334, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 334, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmutils.py":349
 *     return "\n".join(lst)
 * 
 * def ReverseConfigString(configstr, toLong=True):             # <<<<<<<<<<<<<<
 *     connect = OrderedDict()
 *     central = 3
 */
  __pyx_tuple__103 = PyTuple_Pack(12, __pyx_n_s_configstr, __pyx_n_s_toLong, __pyx_n_s_connect, __pyx_n_s_central, __pyx_n_s_classif, __pyx_n_s_hidden, __pyx_n_s_fullH, __pyx_n_s_lst, __pyx_n_s_value, __pyx_n_s_test, __pyx_n_s_val, __pyx_n_s_key); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__103);
  __Pyx_GIVEREF(__pyx_tuple__103);
  __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__103, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmutils_py, __pyx_n_s_ReverseConfigString, 349, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 349, __pyx_L1_error)
  __pyx_tuple__105 = PyTuple_Pack(1, ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__105);
  __Pyx_GIVEREF(__pyx_tuple__105);

  /* "metaphor/chem_gm/core/gmutils.py":380
 *     return connect, central, classif, hidden, fullH
 * 
 * def module2short(module):             # <<<<<<<<<<<<<<
 *     res = os.path.splitext(os.path.basename(module))[0]
 *     return res[3:] if res.startswith('lib') else res
 */
  __pyx_tuple__106 = PyTuple_Pack(2, __pyx_n_s_module, __pyx_n_s_res); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__106);
  __Pyx_GIVEREF(__pyx_tuple__106);
  __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmutils_py, __pyx_n_s_module2short, 380, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 380, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmutils.py":384
 *     return res[3:] if res.startswith('lib') else res
 * 
 * def leftjustify(source, lens):             # <<<<<<<<<<<<<<
 *     """Justify by the left"""
 *     res = source
 */
  __pyx_tuple__108 = PyTuple_Pack(4, __pyx_n_s_source, __pyx_n_s_lens, __pyx_n_s_res, __pyx_n_s_nn); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 384, __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_gmutils_py, __pyx_n_s_leftjustify, 384, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 384, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmutils.py":394
 * 
 * #-------------------------------------------------------------------
 * def fullsize(smiletk):             # <<<<<<<<<<<<<<
 *     # return size of a list recursively including sublists sizes
 *     S = 0
 */
  __pyx_tuple__110 = PyTuple_Pack(3, __pyx_n_s_smiletk, __pyx_n_s_S, __pyx_n_s_val); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__110);
  __Pyx_GIVEREF(__pyx_tuple__110);
  __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmutils_py, __pyx_n_s_fullsize, 394, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 394, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmutils.py":404
 *     return S
 * 
 * def findinlist(lst, value):             # <<<<<<<<<<<<<<
 *     try:
 *         return lst.index(value)
 */
  __pyx_tuple__112 = PyTuple_Pack(2, __pyx_n_s_lst, __pyx_n_s_value); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__112);
  __Pyx_GIVEREF(__pyx_tuple__112);
  __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_gmutils_py, __pyx_n_s_findinlist, 404, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(0, 404, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmutils.py":411
 * 
 * #--------------------------------------------------------------
 * def chargekey(value, islong=False):             # <<<<<<<<<<<<<<
 *     if islong:
 *         if value > 0:
 */
  __pyx_tuple__114 = PyTuple_Pack(2, __pyx_n_s_value, __pyx_n_s_islong); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);
  __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmutils_py, __pyx_n_s_chargekey, 411, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 411, __pyx_L1_error)
  __pyx_tuple__116 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__116);
  __Pyx_GIVEREF(__pyx_tuple__116);

  /* "metaphor/chem_gm/core/gmutils.py":420
 *     return "qm%d"% (-value)
 * 
 * def gradekey(index, islong=False):             # <<<<<<<<<<<<<<
 *     if index:
 *         if islong:
 */
  __pyx_tuple__117 = PyTuple_Pack(2, __pyx_n_s_index, __pyx_n_s_islong); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(0, 420, __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_gmutils_py, __pyx_n_s_gradekey, 420, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(0, 420, __pyx_L1_error)
  __pyx_tuple__119 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__119);
  __Pyx_GIVEREF(__pyx_tuple__119);

  /* "metaphor/chem_gm/core/gmutils.py":429
 *     return "dgr"
 * 
 * def isokey(index, islong=False):             # <<<<<<<<<<<<<<
 *     if index:
 *         if islong:
 */
  __pyx_tuple__120 = PyTuple_Pack(2, __pyx_n_s_index, __pyx_n_s_islong); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__120);
  __Pyx_GIVEREF(__pyx_tuple__120);
  __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_gmutils_py, __pyx_n_s_isokey, 429, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 429, __pyx_L1_error)
  __pyx_tuple__122 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__122);
  __Pyx_GIVEREF(__pyx_tuple__122);

  /* "metaphor/chem_gm/core/gmutils.py":439
 * 
 * 
 * def chikey(index, islong=False):             # <<<<<<<<<<<<<<
 *     if islong:
 *         return "chiral(%d)"% index
 */
  __pyx_tuple__123 = PyTuple_Pack(2, __pyx_n_s_index, __pyx_n_s_islong); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(0, 439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__123);
  __Pyx_GIVEREF(__pyx_tuple__123);
  __pyx_codeobj__124 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__123, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmutils_py, __pyx_n_s_chikey, 439, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__124)) __PYX_ERR(0, 439, __pyx_L1_error)
  __pyx_tuple__125 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(0, 439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__125);
  __Pyx_GIVEREF(__pyx_tuple__125);

  /* "metaphor/chem_gm/core/gmutils.py":444
 *     return "chi%s"% index
 * 
 * def cyclekey(index, islong=False):             # <<<<<<<<<<<<<<
 *     if islong:
 *         return "cycle(%d)"% index
 */
  __pyx_tuple__126 = PyTuple_Pack(2, __pyx_n_s_index, __pyx_n_s_islong); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 444, __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_gmutils_py, __pyx_n_s_cyclekey, 444, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) __PYX_ERR(0, 444, __pyx_L1_error)
  __pyx_tuple__128 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__128);
  __Pyx_GIVEREF(__pyx_tuple__128);

  /* "metaphor/chem_gm/core/gmutils.py":449
 *     return "ccl%d"% index
 * 
 * structkeysgradeless = [isokey(index, True) for index in [1, 2]] + \             # <<<<<<<<<<<<<<
 *     [chikey(index, True) for index in [1, 2]] + \
 *     [chargekey(index, True) for index in range(-4, 0)] + \
 */
  __pyx_tuple__129 = PyTuple_Pack(2, __pyx_int_1, __pyx_int_2); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__129);
  __Pyx_GIVEREF(__pyx_tuple__129);

  /* "metaphor/chem_gm/core/gmutils.py":450
 * 
 * structkeysgradeless = [isokey(index, True) for index in [1, 2]] + \
 *     [chikey(index, True) for index in [1, 2]] + \             # <<<<<<<<<<<<<<
 *     [chargekey(index, True) for index in range(-4, 0)] + \
 *     [chargekey(index, True) for index in range(1, 5)] + \
 */
  __pyx_tuple__130 = PyTuple_Pack(2, __pyx_int_1, __pyx_int_2); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__130);
  __Pyx_GIVEREF(__pyx_tuple__130);

  /* "metaphor/chem_gm/core/gmutils.py":459
 *     structkeysgradeless
 * 
 * structkeysgradelessshort = [isokey(index) for index in [1, 2]] + \             # <<<<<<<<<<<<<<
 *     [chikey(index) for index in [1, 2]] + \
 *     [chargekey(index) for index in range(-4, 0)] + \
 */
  __pyx_tuple__131 = PyTuple_Pack(2, __pyx_int_1, __pyx_int_2); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__131);
  __Pyx_GIVEREF(__pyx_tuple__131);

  /* "metaphor/chem_gm/core/gmutils.py":460
 * 
 * structkeysgradelessshort = [isokey(index) for index in [1, 2]] + \
 *     [chikey(index) for index in [1, 2]] + \             # <<<<<<<<<<<<<<
 *     [chargekey(index) for index in range(-4, 0)] + \
 *     [chargekey(index) for index in range(1, 5)] + \
 */
  __pyx_tuple__132 = PyTuple_Pack(2, __pyx_int_1, __pyx_int_2); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__132);
  __Pyx_GIVEREF(__pyx_tuple__132);

  /* "metaphor/chem_gm/core/gmutils.py":470
 * connectdef = defaultdict(lambda: -1, {val: 0 for val in structkeysgradeless})
 * 
 * def connectdefault(full_0=False):             # <<<<<<<<<<<<<<
 *     """Dictionhaire des connexions par dfaut. Tous les lments non
 *     explicitement affects sont affectes par dfaut a -1.
 */
  __pyx_tuple__133 = PyTuple_Pack(3, __pyx_n_s_full_0, __pyx_n_s_val, __pyx_n_s_val); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__133);
  __Pyx_GIVEREF(__pyx_tuple__133);
  __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 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_gmutils_py, __pyx_n_s_connectdefault, 470, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(0, 470, __pyx_L1_error)
  __pyx_tuple__135 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__135);
  __Pyx_GIVEREF(__pyx_tuple__135);

  /* "metaphor/chem_gm/core/gmutils.py":546
 * #
 * #--------------------------------------------------------------
 * def symbolFromNodeName(name):             # <<<<<<<<<<<<<<
 *     import re
 *     cc = re.compile(r'[a-zA-Z]{1,2}')
 */
  __pyx_tuple__136 = PyTuple_Pack(4, __pyx_n_s_name, __pyx_n_s_re, __pyx_n_s_cc, __pyx_n_s_lmatch); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__136);
  __Pyx_GIVEREF(__pyx_tuple__136);
  __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 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_gmutils_py, __pyx_n_s_symbolFromNodeName, 546, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) __PYX_ERR(0, 546, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmutils.py":556
 * 
 * #--------------------------------------------------------------
 * def sniffFile(filename):             # <<<<<<<<<<<<<<
 *     # analyse du contenu csv
 *     if not filename:
 */
  __pyx_tuple__138 = PyTuple_Pack(23, __pyx_n_s_filename, __pyx_n_s_csv, __pyx_n_s_numlist, __pyx_n_s_csvfile, __pyx_n_s_rr, __pyx_n_s_dialect, __pyx_n_s_reader, __pyx_n_s_row, __pyx_n_s_row2, __pyx_n_s_smileIndex, __pyx_n_s_propertyIndex, __pyx_n_s_skipline, __pyx_n_s_indsmi, __pyx_n_s_nameIndex, __pyx_n_s_ind, __pyx_n_s_value, __pyx_n_s_value2, __pyx_n_s_vallo, __pyx_n_s_val, __pyx_n_s_i0, __pyx_n_s_i, __pyx_n_s__7, __pyx_n_s_isnum); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__138);
  __Pyx_GIVEREF(__pyx_tuple__138);
  __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(1, 0, 23, 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_gmutils_py, __pyx_n_s_sniffFile, 556, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 556, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmutils.py":614
 * 
 * #--------------------------------------------------------------
 * def getcsvdelimiter(filename, suggested=',', quotechar='"', nrow=2):             # <<<<<<<<<<<<<<
 *     import csv
 *     lenrow = 0
 */
  __pyx_tuple__140 = PyTuple_Pack(14, __pyx_n_s_filename, __pyx_n_s_suggested, __pyx_n_s_quotechar, __pyx_n_s_nrow, __pyx_n_s_csv, __pyx_n_s_lenrow, __pyx_n_s_sep, __pyx_n_s_test, __pyx_n_s_tt, __pyx_n_s_lenloc, __pyx_n_s_source, __pyx_n_s_datareader, __pyx_n_s_ii, __pyx_n_s_row); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__140);
  __Pyx_GIVEREF(__pyx_tuple__140);
  __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmutils_py, __pyx_n_s_getcsvdelimiter, 614, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(0, 614, __pyx_L1_error)
  __pyx_tuple__142 = PyTuple_Pack(3, ((PyObject*)__pyx_kp_u__45), ((PyObject*)__pyx_kp_u__68), ((PyObject *)__pyx_int_2)); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__142);
  __Pyx_GIVEREF(__pyx_tuple__142);

  /* "metaphor/chem_gm/core/gmutils.py":640
 * 
 * #--------------------------------------------------------------
 * def isNum(value):             # <<<<<<<<<<<<<<
 *     try:
 *         float(decmark_reg.sub('.', value))
 */
  __pyx_tuple__143 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(0, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__143);
  __Pyx_GIVEREF(__pyx_tuple__143);
  __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_gmutils_py, __pyx_n_s_isNum, 640, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(0, 640, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmutils.py":647
 *         return False
 * 
 * def floatex(value, keppexcept=False):             # <<<<<<<<<<<<<<
 *     #===========================================================================
 *     # try:
 */
  __pyx_tuple__145 = PyTuple_Pack(2, __pyx_n_s_value, __pyx_n_s_keppexcept); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__145);
  __Pyx_GIVEREF(__pyx_tuple__145);
  __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(2, 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_gmutils_py, __pyx_n_s_floatex, 647, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(0, 647, __pyx_L1_error)
  __pyx_tuple__147 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__147);
  __Pyx_GIVEREF(__pyx_tuple__147);

  /* "metaphor/chem_gm/core/gmutils.py":663
 * 
 * #--------------------------------------------------------------
 * def getParameterListFomFile(weightFile):             # <<<<<<<<<<<<<<
 *     res = []
 *     ok = False
 */
  __pyx_tuple__148 = PyTuple_Pack(6, __pyx_n_s_weightFile, __pyx_n_s_res, __pyx_n_s_ok, __pyx_n_s_source, __pyx_n_s_line, __pyx_n_s_lst); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(0, 663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__148);
  __Pyx_GIVEREF(__pyx_tuple__148);
  __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_metaphor_chem_gm_core_gmutils_py, __pyx_n_s_getParameterListFomFile, 663, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(0, 663, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmutils.py":689
 * #     return res
 * 
 * def formatted(value, decimal=3, length=10):             # <<<<<<<<<<<<<<
 *     form = "%0." + str(decimal) + "f"
 *     return (form % value).rjust(length)
 */
  __pyx_tuple__150 = PyTuple_Pack(4, __pyx_n_s_value, __pyx_n_s_decimal, __pyx_n_s_length, __pyx_n_s_form); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(0, 689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__150);
  __Pyx_GIVEREF(__pyx_tuple__150);
  __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 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_gmutils_py, __pyx_n_s_formatted, 689, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(0, 689, __pyx_L1_error)
  __pyx_tuple__152 = PyTuple_Pack(2, ((PyObject *)__pyx_int_3), ((PyObject *)__pyx_int_10)); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(0, 689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__152);
  __Pyx_GIVEREF(__pyx_tuple__152);

  /* "metaphor/chem_gm/core/gmutils.py":693
 *     return (form % value).rjust(length)
 * 
 * def splitindexedname(name):             # <<<<<<<<<<<<<<
 *     corename = name
 *     index = -1
 */
  __pyx_tuple__153 = PyTuple_Pack(5, __pyx_n_s_name, __pyx_n_s_corename, __pyx_n_s_index, __pyx_n_s_N, __pyx_n_s_sindex); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__153);
  __Pyx_GIVEREF(__pyx_tuple__153);
  __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(1, 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_gmutils_py, __pyx_n_s_splitindexedname, 693, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 693, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  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_255 = PyInt_FromLong(255); if (unlikely(!__pyx_int_255)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1024 = PyInt_FromLong(1024); if (unlikely(!__pyx_int_1024)) __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)
  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_8genexpr2__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index = Py_None; Py_INCREF(Py_None);
  __pyx_8genexpr3__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index = Py_None; Py_INCREF(Py_None);
  __pyx_8genexpr4__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index = Py_None; Py_INCREF(Py_None);
  __pyx_8genexpr5__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index = Py_None; Py_INCREF(Py_None);
  __pyx_8genexpr6__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index = Py_None; Py_INCREF(Py_None);
  __pyx_8genexpr7__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index = Py_None; Py_INCREF(Py_None);
  __pyx_8genexpr8__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index = Py_None; Py_INCREF(Py_None);
  __pyx_8genexpr9__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index = Py_None; Py_INCREF(Py_None);
  __pyx_9genexpr10__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index = Py_None; Py_INCREF(Py_None);
  __pyx_9genexpr11__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index = Py_None; Py_INCREF(Py_None);
  __pyx_9genexpr12__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index = Py_None; Py_INCREF(Py_None);
  __pyx_9genexpr13__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index = Py_None; Py_INCREF(Py_None);
  __pyx_9genexpr14__pyx_v_8metaphor_7chem_gm_4core_7gmutils_val = Py_None; Py_INCREF(Py_None);
  __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 ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

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 initgmutils(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initgmutils(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_gmutils(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_gmutils(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_gmutils(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  long __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  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_gmutils(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("gmutils", __pyx_methods, __pyx_k_Module_graphmachine_chem_gm_core, 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__gmutils) {
    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.gmutils")) {
      if (unlikely(PyDict_SetItemString(modules, "metaphor.chem_gm.core.gmutils", __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();
  (void)__Pyx_modinit_type_init_code();
  (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/gmutils.py":29
 * Utilitaires divers
 * """
 * from math import isnan             # <<<<<<<<<<<<<<
 * import sys, os, re, time
 * from threading import Thread, Event
 */
  __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_isnan);
  __Pyx_GIVEREF(__pyx_n_s_isnan);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_isnan);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_math, __pyx_t_1, 0); 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_isnan); 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_isnan, __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/gmutils.py":30
 * """
 * from math import isnan
 * import sys, os, re, time             # <<<<<<<<<<<<<<
 * from threading import Thread, Event
 * from collections import OrderedDict, defaultdict
 */
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_sys, 0, 0); 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_sys, __pyx_t_2) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_os, 0, 0); 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_os, __pyx_t_2) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_re, 0, 0); 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_re, __pyx_t_2) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_time, 0, 0); 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_time, __pyx_t_2) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":31
 * from math import isnan
 * import sys, os, re, time
 * from threading import Thread, Event             # <<<<<<<<<<<<<<
 * from collections import OrderedDict, defaultdict
 * import ctypes
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Thread);
  __Pyx_GIVEREF(__pyx_n_s_Thread);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Thread);
  __Pyx_INCREF(__pyx_n_s_Event);
  __Pyx_GIVEREF(__pyx_n_s_Event);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_Event);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_threading, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __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_Thread); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Thread, __pyx_t_2) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Event); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Event, __pyx_t_2) < 0) __PYX_ERR(0, 31, __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/gmutils.py":32
 * import sys, os, re, time
 * from threading import Thread, Event
 * from collections import OrderedDict, defaultdict             # <<<<<<<<<<<<<<
 * import ctypes
 * from six import string_types
 */
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_OrderedDict);
  __Pyx_GIVEREF(__pyx_n_s_OrderedDict);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_OrderedDict);
  __Pyx_INCREF(__pyx_n_s_defaultdict);
  __Pyx_GIVEREF(__pyx_n_s_defaultdict);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_defaultdict);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __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_OrderedDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OrderedDict, __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_defaultdict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_defaultdict, __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/gmutils.py":33
 * from threading import Thread, Event
 * from collections import OrderedDict, defaultdict
 * import ctypes             # <<<<<<<<<<<<<<
 * from six import string_types
 * 
 */
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_ctypes, 0, 0); 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_ctypes, __pyx_t_2) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":34
 * from collections import OrderedDict, defaultdict
 * import ctypes
 * from six import string_types             # <<<<<<<<<<<<<<
 * 
 * from .gmconst import defaultConnect
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_string_types);
  __Pyx_GIVEREF(__pyx_n_s_string_types);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_string_types);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_six, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __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_string_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_string_types, __pyx_t_2) < 0) __PYX_ERR(0, 34, __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/gmutils.py":36
 * from six import string_types
 * 
 * from .gmconst import defaultConnect             # <<<<<<<<<<<<<<
 * from .atoms import Atomes, AtomsLower, Hydrogenes
 * from .. import __version__ as chem_gmversion
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __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, 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_defaultConnect); 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_defaultConnect, __pyx_t_1) < 0) __PYX_ERR(0, 36, __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/gmutils.py":37
 * 
 * from .gmconst import defaultConnect
 * from .atoms import Atomes, AtomsLower, Hydrogenes             # <<<<<<<<<<<<<<
 * from .. import __version__ as chem_gmversion
 * from ...monal import __version__ as monalversion
 */
  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Atomes);
  __Pyx_GIVEREF(__pyx_n_s_Atomes);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Atomes);
  __Pyx_INCREF(__pyx_n_s_AtomsLower);
  __Pyx_GIVEREF(__pyx_n_s_AtomsLower);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_AtomsLower);
  __Pyx_INCREF(__pyx_n_s_Hydrogenes);
  __Pyx_GIVEREF(__pyx_n_s_Hydrogenes);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_Hydrogenes);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_atoms, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __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_Atomes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Atomes, __pyx_t_2) < 0) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_AtomsLower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_AtomsLower, __pyx_t_2) < 0) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Hydrogenes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Hydrogenes, __pyx_t_2) < 0) __PYX_ERR(0, 37, __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/gmutils.py":38
 * from .gmconst import defaultConnect
 * from .atoms import Atomes, AtomsLower, Hydrogenes
 * from .. import __version__ as chem_gmversion             # <<<<<<<<<<<<<<
 * from ...monal import __version__ as monalversion
 * from ...monal.util import toolbox as tb
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_version);
  __Pyx_GIVEREF(__pyx_n_s_version);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_version);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_, __pyx_t_1, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __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_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_chem_gmversion, __pyx_t_1) < 0) __PYX_ERR(0, 38, __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/gmutils.py":39
 * from .atoms import Atomes, AtomsLower, Hydrogenes
 * from .. import __version__ as chem_gmversion
 * from ...monal import __version__ as monalversion             # <<<<<<<<<<<<<<
 * from ...monal.util import toolbox as tb
 * from ...monal import monalconst as C
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_version);
  __Pyx_GIVEREF(__pyx_n_s_version);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_version);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_monal, __pyx_t_2, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __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_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_monalversion, __pyx_t_2) < 0) __PYX_ERR(0, 39, __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/gmutils.py":40
 * from .. import __version__ as chem_gmversion
 * from ...monal import __version__ as monalversion
 * from ...monal.util import toolbox as tb             # <<<<<<<<<<<<<<
 * from ...monal import monalconst as C
 * from ...nntoolbox.utils import isint, key2long, key2short
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_toolbox);
  __Pyx_GIVEREF(__pyx_n_s_toolbox);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_toolbox);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_monal_util, __pyx_t_1, 3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __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_toolbox); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tb, __pyx_t_1) < 0) __PYX_ERR(0, 40, __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/gmutils.py":41
 * from ...monal import __version__ as monalversion
 * from ...monal.util import toolbox as tb
 * from ...monal import monalconst as C             # <<<<<<<<<<<<<<
 * from ...nntoolbox.utils import isint, key2long, key2short
 * from ...nntoolbox.utils import hasOneOf
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __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, 41, __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, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_C, __pyx_t_2) < 0) __PYX_ERR(0, 41, __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/gmutils.py":42
 * from ...monal.util import toolbox as tb
 * from ...monal import monalconst as C
 * from ...nntoolbox.utils import isint, key2long, key2short             # <<<<<<<<<<<<<<
 * from ...nntoolbox.utils import hasOneOf
 * from ...nntoolbox.filetoolbox import IndexFilename
 */
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_isint);
  __Pyx_GIVEREF(__pyx_n_s_isint);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_isint);
  __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_t_2 = __Pyx_Import(__pyx_n_s_nntoolbox_utils, __pyx_t_1, 3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __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_isint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_isint, __pyx_t_1) < 0) __PYX_ERR(0, 42, __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, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_key2long, __pyx_t_1) < 0) __PYX_ERR(0, 42, __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, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_key2short, __pyx_t_1) < 0) __PYX_ERR(0, 42, __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/gmutils.py":43
 * from ...monal import monalconst as C
 * from ...nntoolbox.utils import isint, key2long, key2short
 * from ...nntoolbox.utils import hasOneOf             # <<<<<<<<<<<<<<
 * from ...nntoolbox.filetoolbox import IndexFilename
 * 
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_hasOneOf);
  __Pyx_GIVEREF(__pyx_n_s_hasOneOf);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_hasOneOf);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_nntoolbox_utils, __pyx_t_2, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __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_hasOneOf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_hasOneOf, __pyx_t_2) < 0) __PYX_ERR(0, 43, __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/gmutils.py":44
 * from ...nntoolbox.utils import isint, key2long, key2short
 * from ...nntoolbox.utils import hasOneOf
 * from ...nntoolbox.filetoolbox import IndexFilename             # <<<<<<<<<<<<<<
 * 
 * # DEMO_DEBUG_NONE = 0
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_IndexFilename);
  __Pyx_GIVEREF(__pyx_n_s_IndexFilename);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_IndexFilename);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_nntoolbox_filetoolbox, __pyx_t_1, 3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __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_IndexFilename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_IndexFilename, __pyx_t_1) < 0) __PYX_ERR(0, 44, __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/gmutils.py":63
 * #     DEMO_DEBUG_COST |DEMO_DEBUG_PRESS
 * 
 * weightTmpl = "weight%03d"             # <<<<<<<<<<<<<<
 * iterTmpl = "iter%03d.txt"
 * gmmTmpl = "res%03d.gmm"
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_weightTmpl, __pyx_kp_u_weight_03d) < 0) __PYX_ERR(0, 63, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmutils.py":64
 * 
 * weightTmpl = "weight%03d"
 * iterTmpl = "iter%03d.txt"             # <<<<<<<<<<<<<<
 * gmmTmpl = "res%03d.gmm"
 * gmxTmpl = "res%03d.gmx"
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_iterTmpl, __pyx_kp_u_iter_03d_txt) < 0) __PYX_ERR(0, 64, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmutils.py":65
 * weightTmpl = "weight%03d"
 * iterTmpl = "iter%03d.txt"
 * gmmTmpl = "res%03d.gmm"             # <<<<<<<<<<<<<<
 * gmxTmpl = "res%03d.gmx"
 * configTmpl = "conf%03d.cfg"
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_gmmTmpl, __pyx_kp_u_res_03d_gmm) < 0) __PYX_ERR(0, 65, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmutils.py":66
 * iterTmpl = "iter%03d.txt"
 * gmmTmpl = "res%03d.gmm"
 * gmxTmpl = "res%03d.gmx"             # <<<<<<<<<<<<<<
 * configTmpl = "conf%03d.cfg"
 * decmark_reg = re.compile('(?<=\d),(?=\d)')
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_gmxTmpl, __pyx_kp_u_res_03d_gmx) < 0) __PYX_ERR(0, 66, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmutils.py":67
 * gmmTmpl = "res%03d.gmm"
 * gmxTmpl = "res%03d.gmx"
 * configTmpl = "conf%03d.cfg"             # <<<<<<<<<<<<<<
 * decmark_reg = re.compile('(?<=\d),(?=\d)')
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_configTmpl, __pyx_kp_u_conf_03d_cfg) < 0) __PYX_ERR(0, 67, __pyx_L1_error)

  /* "metaphor/chem_gm/core/gmutils.py":68
 * gmxTmpl = "res%03d.gmx"
 * configTmpl = "conf%03d.cfg"
 * decmark_reg = re.compile('(?<=\d),(?=\d)')             # <<<<<<<<<<<<<<
 * 
 * # def getSqlFileNameFromConf(config, root, traintype):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_compile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __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_decmark_reg, __pyx_t_2) < 0) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":127
 * #     return dico
 * 
 * def readoption(argv=[], option="", default=0):             # <<<<<<<<<<<<<<
 *     rg = default
 *     if option in argv:
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_1readoption, 0, __pyx_n_s_readoption, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_2, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 127, __pyx_L1_error)
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_2)->__pyx_arg_argv = __pyx_t_1;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_2, __pyx_pf_8metaphor_7chem_gm_4core_7gmutils_55__defaults__);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_readoption, __pyx_t_2) < 0) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":137
 *     return rg
 * 
 * def nonASCIICharsConvert(Chaine):             # <<<<<<<<<<<<<<
 *     lst = []
 *     for c in Chaine:
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_3nonASCIICharsConvert, 0, __pyx_n_s_nonASCIICharsConvert, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nonASCIICharsConvert, __pyx_t_2) < 0) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":148
 *     return "".join(lst)
 * 
 * def analyseProjectName(source):             # <<<<<<<<<<<<<<
 *     nc = -1
 *     try:
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_5analyseProjectName, 0, __pyx_n_s_analyseProjectName, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__88)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_analyseProjectName, __pyx_t_2) < 0) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":226
 *     # todo completer
 * 
 * def tmplfile(tmpl, index, directory=""):             # <<<<<<<<<<<<<<
 *     if directory:
 *         return os.path.join(directory, tmpl% (index))
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_7tmplfile, 0, __pyx_n_s_tmplfile, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__91);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tmplfile, __pyx_t_2) < 0) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":232
 *         return tmpl% (index)
 * 
 * def gmxFileName(index, directory=""):             # <<<<<<<<<<<<<<
 *     return tmplfile(gmxTmpl, index, directory)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_9gmxFileName, 0, __pyx_n_s_gmxFileName, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__94);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_gmxFileName, __pyx_t_2) < 0) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":235
 *     return tmplfile(gmxTmpl, index, directory)
 * 
 * def getConfigHash(config, full=False, hiddenout=False):             # <<<<<<<<<<<<<<
 *     if isinstance(config, string_types):
 *         config = tb.defaultedConfigParser(config)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_11getConfigHash, 0, __pyx_n_s_getConfigHash, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__97);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getConfigHash, __pyx_t_2) < 0) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":282
 *     return reshash
 * 
 * def getConfigString(atomlist, connectivities, central, classif, hidden, fullH=False, short=False):             # <<<<<<<<<<<<<<
 *     """Creation de la chaine de configuration caracteristique de la structure.
 *     connectivities: dictionnaire des connectivites
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_13getConfigString, 0, __pyx_n_s_getConfigString, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__100);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getConfigString, __pyx_t_2) < 0) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":334
 *     return "_".join(lst)
 * 
 * def ReverseConfigString2String(configstr):             # <<<<<<<<<<<<<<
 *     lst = ["Configurattion:"]
 *     connect, central, classif, hidden, fullH = ReverseConfigString(configstr)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_15ReverseConfigString2String, 0, __pyx_n_s_ReverseConfigString2String, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReverseConfigString2String, __pyx_t_2) < 0) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":349
 *     return "\n".join(lst)
 * 
 * def ReverseConfigString(configstr, toLong=True):             # <<<<<<<<<<<<<<
 *     connect = OrderedDict()
 *     central = 3
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_17ReverseConfigString, 0, __pyx_n_s_ReverseConfigString, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__104)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__105);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReverseConfigString, __pyx_t_2) < 0) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":380
 *     return connect, central, classif, hidden, fullH
 * 
 * def module2short(module):             # <<<<<<<<<<<<<<
 *     res = os.path.splitext(os.path.basename(module))[0]
 *     return res[3:] if res.startswith('lib') else res
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_19module2short, 0, __pyx_n_s_module2short, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_module2short, __pyx_t_2) < 0) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":384
 *     return res[3:] if res.startswith('lib') else res
 * 
 * def leftjustify(source, lens):             # <<<<<<<<<<<<<<
 *     """Justify by the left"""
 *     res = source
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_21leftjustify, 0, __pyx_n_s_leftjustify, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_leftjustify, __pyx_t_2) < 0) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":394
 * 
 * #-------------------------------------------------------------------
 * def fullsize(smiletk):             # <<<<<<<<<<<<<<
 *     # return size of a list recursively including sublists sizes
 *     S = 0
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_23fullsize, 0, __pyx_n_s_fullsize, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_fullsize, __pyx_t_2) < 0) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":404
 *     return S
 * 
 * def findinlist(lst, value):             # <<<<<<<<<<<<<<
 *     try:
 *         return lst.index(value)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_25findinlist, 0, __pyx_n_s_findinlist, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_findinlist, __pyx_t_2) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":411
 * 
 * #--------------------------------------------------------------
 * def chargekey(value, islong=False):             # <<<<<<<<<<<<<<
 *     if islong:
 *         if value > 0:
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_27chargekey, 0, __pyx_n_s_chargekey, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__116);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_chargekey, __pyx_t_2) < 0) __PYX_ERR(0, 411, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":420
 *     return "qm%d"% (-value)
 * 
 * def gradekey(index, islong=False):             # <<<<<<<<<<<<<<
 *     if index:
 *         if islong:
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_29gradekey, 0, __pyx_n_s_gradekey, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__118)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__119);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_gradekey, __pyx_t_2) < 0) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":429
 *     return "dgr"
 * 
 * def isokey(index, islong=False):             # <<<<<<<<<<<<<<
 *     if index:
 *         if islong:
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_31isokey, 0, __pyx_n_s_isokey, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__122);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_isokey, __pyx_t_2) < 0) __PYX_ERR(0, 429, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":439
 * 
 * 
 * def chikey(index, islong=False):             # <<<<<<<<<<<<<<
 *     if islong:
 *         return "chiral(%d)"% index
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_33chikey, 0, __pyx_n_s_chikey, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__124)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__125);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_chikey, __pyx_t_2) < 0) __PYX_ERR(0, 439, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":444
 *     return "chi%s"% index
 * 
 * def cyclekey(index, islong=False):             # <<<<<<<<<<<<<<
 *     if islong:
 *         return "cycle(%d)"% index
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_35cyclekey, 0, __pyx_n_s_cyclekey, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__127)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__128);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cyclekey, __pyx_t_2) < 0) __PYX_ERR(0, 444, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":452
 *     [chikey(index, True) for index in [1, 2]] + \
 *     [chargekey(index, True) for index in range(-4, 0)] + \
 *     [chargekey(index, True) for index in range(1, 5)] + \             # <<<<<<<<<<<<<<
 *     [cyclekey(index, True) for index in range(1, 13)]
 * 
 */
  { /* enter inner scope */

    /* "metaphor/chem_gm/core/gmutils.py":449
 *     return "ccl%d"% index
 * 
 * structkeysgradeless = [isokey(index, True) for index in [1, 2]] + \             # <<<<<<<<<<<<<<
 *     [chikey(index, True) for index in [1, 2]] + \
 *     [chargekey(index, True) for index in range(-4, 0)] + \
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 449, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_tuple__129; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    for (;;) {
      if (__pyx_t_3 >= 2) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 449, __pyx_L4_error)
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 449, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_XGOTREF(__pyx_8genexpr2__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
      __Pyx_DECREF_SET(__pyx_8genexpr2__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_isokey); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 449, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      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);
          __pyx_t_7 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_8genexpr2__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_True};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 449, __pyx_L4_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_8genexpr2__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_True};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 449, __pyx_L4_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 449, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (__pyx_t_6) {
          __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
        }
        __Pyx_INCREF(__pyx_8genexpr2__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
        __Pyx_GIVEREF(__pyx_8genexpr2__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
        PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_8genexpr2__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
        __Pyx_INCREF(Py_True);
        __Pyx_GIVEREF(Py_True);
        PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, Py_True);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 449, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 449, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_8genexpr2__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
    __Pyx_DECREF_SET(__pyx_8genexpr2__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_None);
    goto __pyx_L7_exit_scope;
    __pyx_L4_error:;
    __Pyx_GOTREF(__pyx_8genexpr2__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
    __Pyx_DECREF_SET(__pyx_8genexpr2__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_None);
    goto __pyx_L1_error;
    __pyx_L7_exit_scope:;
  } /* exit inner scope */
  { /* enter inner scope */

    /* "metaphor/chem_gm/core/gmutils.py":450
 * 
 * structkeysgradeless = [isokey(index, True) for index in [1, 2]] + \
 *     [chikey(index, True) for index in [1, 2]] + \             # <<<<<<<<<<<<<<
 *     [chargekey(index, True) for index in range(-4, 0)] + \
 *     [chargekey(index, True) for index in range(1, 5)] + \
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L10_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __pyx_tuple__130; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = 0;
    for (;;) {
      if (__pyx_t_3 >= 2) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 450, __pyx_L10_error)
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 450, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_XGOTREF(__pyx_8genexpr3__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
      __Pyx_DECREF_SET(__pyx_8genexpr3__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_chikey); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 450, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(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);
          __pyx_t_7 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_8genexpr3__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_True};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 450, __pyx_L10_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_8)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_8genexpr3__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_True};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 450, __pyx_L10_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 450, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__pyx_t_6) {
          __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
        }
        __Pyx_INCREF(__pyx_8genexpr3__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
        __Pyx_GIVEREF(__pyx_8genexpr3__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
        PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_7, __pyx_8genexpr3__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
        __Pyx_INCREF(Py_True);
        __Pyx_GIVEREF(Py_True);
        PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_7, Py_True);
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 450, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 450, __pyx_L10_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_8genexpr3__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
    __Pyx_DECREF_SET(__pyx_8genexpr3__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_None);
    goto __pyx_L13_exit_scope;
    __pyx_L10_error:;
    __Pyx_GOTREF(__pyx_8genexpr3__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
    __Pyx_DECREF_SET(__pyx_8genexpr3__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_None);
    goto __pyx_L1_error;
    __pyx_L13_exit_scope:;
  } /* exit inner scope */

  /* "metaphor/chem_gm/core/gmutils.py":449
 *     return "ccl%d"% index
 * 
 * structkeysgradeless = [isokey(index, True) for index in [1, 2]] + \             # <<<<<<<<<<<<<<
 *     [chikey(index, True) for index in [1, 2]] + \
 *     [chargekey(index, True) for index in range(-4, 0)] + \
 */
  __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 449, __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;
  { /* enter inner scope */

    /* "metaphor/chem_gm/core/gmutils.py":451
 * structkeysgradeless = [isokey(index, True) for index in [1, 2]] + \
 *     [chikey(index, True) for index in [1, 2]] + \
 *     [chargekey(index, True) for index in range(-4, 0)] + \             # <<<<<<<<<<<<<<
 *     [chargekey(index, True) for index in range(1, 5)] + \
 *     [cyclekey(index, True) for index in range(1, 13)]
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L16_error)
    __Pyx_GOTREF(__pyx_t_1);
    for (__pyx_t_10 = -4L; __pyx_t_10 < 0; __pyx_t_10+=1) {
      __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_8genexpr4__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
      __Pyx_DECREF_SET(__pyx_8genexpr4__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_chargekey); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 451, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8 = NULL;
      __pyx_t_7 = 0;
      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);
          __pyx_t_7 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_8genexpr4__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_True};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L16_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_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_8genexpr4__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_True};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L16_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 451, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__pyx_t_8) {
          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        }
        __Pyx_INCREF(__pyx_8genexpr4__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
        __Pyx_GIVEREF(__pyx_8genexpr4__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
        PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_7, __pyx_8genexpr4__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
        __Pyx_INCREF(Py_True);
        __Pyx_GIVEREF(Py_True);
        PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_7, Py_True);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 451, __pyx_L16_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_GOTREF(__pyx_8genexpr4__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
    __Pyx_DECREF_SET(__pyx_8genexpr4__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_None);
    goto __pyx_L19_exit_scope;
    __pyx_L16_error:;
    __Pyx_GOTREF(__pyx_8genexpr4__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
    __Pyx_DECREF_SET(__pyx_8genexpr4__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_None);
    goto __pyx_L1_error;
    __pyx_L19_exit_scope:;
  } /* exit inner scope */

  /* "metaphor/chem_gm/core/gmutils.py":450
 * 
 * structkeysgradeless = [isokey(index, True) for index in [1, 2]] + \
 *     [chikey(index, True) for index in [1, 2]] + \             # <<<<<<<<<<<<<<
 *     [chargekey(index, True) for index in range(-4, 0)] + \
 *     [chargekey(index, True) for index in range(1, 5)] + \
 */
  __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 450, __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;
  { /* enter inner scope */

    /* "metaphor/chem_gm/core/gmutils.py":452
 *     [chikey(index, True) for index in [1, 2]] + \
 *     [chargekey(index, True) for index in range(-4, 0)] + \
 *     [chargekey(index, True) for index in range(1, 5)] + \             # <<<<<<<<<<<<<<
 *     [cyclekey(index, True) for index in range(1, 13)]
 * 
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 452, __pyx_L22_error)
    __Pyx_GOTREF(__pyx_t_1);
    for (__pyx_t_10 = 1; __pyx_t_10 < 5; __pyx_t_10+=1) {
      __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 452, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_8genexpr5__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
      __Pyx_DECREF_SET(__pyx_8genexpr5__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_chargekey); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 452, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = NULL;
      __pyx_t_7 = 0;
      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);
          __pyx_t_7 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_8genexpr5__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_True};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 452, __pyx_L22_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 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_9, __pyx_8genexpr5__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_True};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 452, __pyx_L22_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 452, __pyx_L22_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (__pyx_t_9) {
          __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __pyx_t_9 = NULL;
        }
        __Pyx_INCREF(__pyx_8genexpr5__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
        __Pyx_GIVEREF(__pyx_8genexpr5__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
        PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_8genexpr5__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
        __Pyx_INCREF(Py_True);
        __Pyx_GIVEREF(Py_True);
        PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, Py_True);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 452, __pyx_L22_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 452, __pyx_L22_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_GOTREF(__pyx_8genexpr5__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
    __Pyx_DECREF_SET(__pyx_8genexpr5__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_None);
    goto __pyx_L25_exit_scope;
    __pyx_L22_error:;
    __Pyx_GOTREF(__pyx_8genexpr5__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
    __Pyx_DECREF_SET(__pyx_8genexpr5__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_None);
    goto __pyx_L1_error;
    __pyx_L25_exit_scope:;
  } /* exit inner scope */

  /* "metaphor/chem_gm/core/gmutils.py":451
 * structkeysgradeless = [isokey(index, True) for index in [1, 2]] + \
 *     [chikey(index, True) for index in [1, 2]] + \
 *     [chargekey(index, True) for index in range(-4, 0)] + \             # <<<<<<<<<<<<<<
 *     [chargekey(index, True) for index in range(1, 5)] + \
 *     [cyclekey(index, True) for index in range(1, 13)]
 */
  __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 451, __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;
  { /* enter inner scope */

    /* "metaphor/chem_gm/core/gmutils.py":453
 *     [chargekey(index, True) for index in range(-4, 0)] + \
 *     [chargekey(index, True) for index in range(1, 5)] + \
 *     [cyclekey(index, True) for index in range(1, 13)]             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L28_error)
    __Pyx_GOTREF(__pyx_t_1);
    for (__pyx_t_10 = 1; __pyx_t_10 < 13; __pyx_t_10+=1) {
      __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L28_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_8genexpr6__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
      __Pyx_DECREF_SET(__pyx_8genexpr6__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_cyclekey); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 453, __pyx_L28_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8 = NULL;
      __pyx_t_7 = 0;
      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);
          __pyx_t_7 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_8genexpr6__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_True};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L28_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_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_8genexpr6__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_True};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L28_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 453, __pyx_L28_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__pyx_t_8) {
          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        }
        __Pyx_INCREF(__pyx_8genexpr6__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
        __Pyx_GIVEREF(__pyx_8genexpr6__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
        PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_7, __pyx_8genexpr6__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
        __Pyx_INCREF(Py_True);
        __Pyx_GIVEREF(Py_True);
        PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_7, Py_True);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L28_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 453, __pyx_L28_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_GOTREF(__pyx_8genexpr6__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
    __Pyx_DECREF_SET(__pyx_8genexpr6__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_None);
    goto __pyx_L31_exit_scope;
    __pyx_L28_error:;
    __Pyx_GOTREF(__pyx_8genexpr6__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
    __Pyx_DECREF_SET(__pyx_8genexpr6__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_None);
    goto __pyx_L1_error;
    __pyx_L31_exit_scope:;
  } /* exit inner scope */

  /* "metaphor/chem_gm/core/gmutils.py":452
 *     [chikey(index, True) for index in [1, 2]] + \
 *     [chargekey(index, True) for index in range(-4, 0)] + \
 *     [chargekey(index, True) for index in range(1, 5)] + \             # <<<<<<<<<<<<<<
 *     [cyclekey(index, True) for index in range(1, 13)]
 * 
 */
  __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 452, __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 (PyDict_SetItem(__pyx_d, __pyx_n_s_structkeysgradeless, __pyx_t_2) < 0) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":456
 * 
 * 
 * structkeys = [gradekey(index, True) for index in range(1, 7)] + \             # <<<<<<<<<<<<<<
 *     structkeysgradeless
 * 
 */
  { /* enter inner scope */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 456, __pyx_L34_error)
    __Pyx_GOTREF(__pyx_t_2);
    for (__pyx_t_10 = 1; __pyx_t_10 < 7; __pyx_t_10+=1) {
      __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __pyx_L34_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_8genexpr7__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
      __Pyx_DECREF_SET(__pyx_8genexpr7__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_gradekey); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 456, __pyx_L34_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = NULL;
      __pyx_t_7 = 0;
      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);
          __pyx_t_7 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_8genexpr7__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_True};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __pyx_L34_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_4)) {
        PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_8genexpr7__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_True};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __pyx_L34_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 456, __pyx_L34_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__pyx_t_5) {
          __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL;
        }
        __Pyx_INCREF(__pyx_8genexpr7__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
        __Pyx_GIVEREF(__pyx_8genexpr7__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
        PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_7, __pyx_8genexpr7__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
        __Pyx_INCREF(Py_True);
        __Pyx_GIVEREF(Py_True);
        PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_7, Py_True);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __pyx_L34_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 456, __pyx_L34_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_GOTREF(__pyx_8genexpr7__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
    __Pyx_DECREF_SET(__pyx_8genexpr7__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_None);
    goto __pyx_L37_exit_scope;
    __pyx_L34_error:;
    __Pyx_GOTREF(__pyx_8genexpr7__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
    __Pyx_DECREF_SET(__pyx_8genexpr7__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_None);
    goto __pyx_L1_error;
    __pyx_L37_exit_scope:;
  } /* exit inner scope */

  /* "metaphor/chem_gm/core/gmutils.py":457
 * 
 * structkeys = [gradekey(index, True) for index in range(1, 7)] + \
 *     structkeysgradeless             # <<<<<<<<<<<<<<
 * 
 * structkeysgradelessshort = [isokey(index) for index in [1, 2]] + \
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_structkeysgradeless); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "metaphor/chem_gm/core/gmutils.py":456
 * 
 * 
 * structkeys = [gradekey(index, True) for index in range(1, 7)] + \             # <<<<<<<<<<<<<<
 *     structkeysgradeless
 * 
 */
  __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 456, __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;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_structkeys, __pyx_t_4) < 0) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":462
 *     [chikey(index) for index in [1, 2]] + \
 *     [chargekey(index) for index in range(-4, 0)] + \
 *     [chargekey(index) for index in range(1, 5)] + \             # <<<<<<<<<<<<<<
 *     [cyclekey(index) for index in range(1, 13)]
 * 
 */
  { /* enter inner scope */

    /* "metaphor/chem_gm/core/gmutils.py":459
 *     structkeysgradeless
 * 
 * structkeysgradelessshort = [isokey(index) for index in [1, 2]] + \             # <<<<<<<<<<<<<<
 *     [chikey(index) for index in [1, 2]] + \
 *     [chargekey(index) for index in range(-4, 0)] + \
 */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 459, __pyx_L40_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __pyx_tuple__131; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    for (;;) {
      if (__pyx_t_3 >= 2) 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, 459, __pyx_L40_error)
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 459, __pyx_L40_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_XGOTREF(__pyx_8genexpr8__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
      __Pyx_DECREF_SET(__pyx_8genexpr8__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_isokey); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 459, __pyx_L40_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_8genexpr8__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 459, __pyx_L40_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_8genexpr8__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 459, __pyx_L40_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_9)) {
          PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_8genexpr8__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 459, __pyx_L40_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 459, __pyx_L40_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
          __Pyx_INCREF(__pyx_8genexpr8__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
          __Pyx_GIVEREF(__pyx_8genexpr8__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
          PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_8genexpr8__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 459, __pyx_L40_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 459, __pyx_L40_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_8genexpr8__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
    __Pyx_DECREF_SET(__pyx_8genexpr8__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_None);
    goto __pyx_L43_exit_scope;
    __pyx_L40_error:;
    __Pyx_GOTREF(__pyx_8genexpr8__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
    __Pyx_DECREF_SET(__pyx_8genexpr8__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_None);
    goto __pyx_L1_error;
    __pyx_L43_exit_scope:;
  } /* exit inner scope */
  { /* enter inner scope */

    /* "metaphor/chem_gm/core/gmutils.py":460
 * 
 * structkeysgradelessshort = [isokey(index) for index in [1, 2]] + \
 *     [chikey(index) for index in [1, 2]] + \             # <<<<<<<<<<<<<<
 *     [chargekey(index) for index in range(-4, 0)] + \
 *     [chargekey(index) for index in range(1, 5)] + \
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 460, __pyx_L46_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_tuple__132; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    for (;;) {
      if (__pyx_t_3 >= 2) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_9); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 460, __pyx_L46_error)
      #else
      __pyx_t_9 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 460, __pyx_L46_error)
      __Pyx_GOTREF(__pyx_t_9);
      #endif
      __Pyx_XGOTREF(__pyx_8genexpr9__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
      __Pyx_DECREF_SET(__pyx_8genexpr9__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, __pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_chikey); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 460, __pyx_L46_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_8genexpr9__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 460, __pyx_L46_error)
        __Pyx_GOTREF(__pyx_t_9);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_8genexpr9__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index};
          __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 460, __pyx_L46_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_9);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_8genexpr9__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index};
          __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 460, __pyx_L46_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_9);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 460, __pyx_L46_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_8genexpr9__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
          __Pyx_GIVEREF(__pyx_8genexpr9__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
          PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_8genexpr9__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 460, __pyx_L46_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 460, __pyx_L46_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_8genexpr9__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
    __Pyx_DECREF_SET(__pyx_8genexpr9__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_None);
    goto __pyx_L49_exit_scope;
    __pyx_L46_error:;
    __Pyx_GOTREF(__pyx_8genexpr9__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
    __Pyx_DECREF_SET(__pyx_8genexpr9__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_None);
    goto __pyx_L1_error;
    __pyx_L49_exit_scope:;
  } /* exit inner scope */

  /* "metaphor/chem_gm/core/gmutils.py":459
 *     structkeysgradeless
 * 
 * structkeysgradelessshort = [isokey(index) for index in [1, 2]] + \             # <<<<<<<<<<<<<<
 *     [chikey(index) for index in [1, 2]] + \
 *     [chargekey(index) for index in range(-4, 0)] + \
 */
  __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 459, __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;
  { /* enter inner scope */

    /* "metaphor/chem_gm/core/gmutils.py":461
 * structkeysgradelessshort = [isokey(index) for index in [1, 2]] + \
 *     [chikey(index) for index in [1, 2]] + \
 *     [chargekey(index) for index in range(-4, 0)] + \             # <<<<<<<<<<<<<<
 *     [chargekey(index) for index in range(1, 5)] + \
 *     [cyclekey(index) for index in range(1, 13)]
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __pyx_L52_error)
    __Pyx_GOTREF(__pyx_t_1);
    for (__pyx_t_10 = -4L; __pyx_t_10 < 0; __pyx_t_10+=1) {
      __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 461, __pyx_L52_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_9genexpr10__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
      __Pyx_DECREF_SET(__pyx_9genexpr10__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_chargekey); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 461, __pyx_L52_error)
      __Pyx_GOTREF(__pyx_t_9);
      __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_4 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_9genexpr10__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 461, __pyx_L52_error)
        __Pyx_GOTREF(__pyx_t_4);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_9genexpr10__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 461, __pyx_L52_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_9genexpr10__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 461, __pyx_L52_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 461, __pyx_L52_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL;
          __Pyx_INCREF(__pyx_9genexpr10__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
          __Pyx_GIVEREF(__pyx_9genexpr10__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
          PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_9genexpr10__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 461, __pyx_L52_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 461, __pyx_L52_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_GOTREF(__pyx_9genexpr10__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
    __Pyx_DECREF_SET(__pyx_9genexpr10__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_None);
    goto __pyx_L55_exit_scope;
    __pyx_L52_error:;
    __Pyx_GOTREF(__pyx_9genexpr10__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
    __Pyx_DECREF_SET(__pyx_9genexpr10__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_None);
    goto __pyx_L1_error;
    __pyx_L55_exit_scope:;
  } /* exit inner scope */

  /* "metaphor/chem_gm/core/gmutils.py":460
 * 
 * structkeysgradelessshort = [isokey(index) for index in [1, 2]] + \
 *     [chikey(index) for index in [1, 2]] + \             # <<<<<<<<<<<<<<
 *     [chargekey(index) for index in range(-4, 0)] + \
 *     [chargekey(index) for index in range(1, 5)] + \
 */
  __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 460, __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;
  { /* enter inner scope */

    /* "metaphor/chem_gm/core/gmutils.py":462
 *     [chikey(index) for index in [1, 2]] + \
 *     [chargekey(index) for index in range(-4, 0)] + \
 *     [chargekey(index) for index in range(1, 5)] + \             # <<<<<<<<<<<<<<
 *     [cyclekey(index) for index in range(1, 13)]
 * 
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __pyx_L58_error)
    __Pyx_GOTREF(__pyx_t_1);
    for (__pyx_t_10 = 1; __pyx_t_10 < 5; __pyx_t_10+=1) {
      __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L58_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_9genexpr11__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
      __Pyx_DECREF_SET(__pyx_9genexpr11__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_chargekey); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 462, __pyx_L58_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      if (!__pyx_t_6) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_9genexpr11__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L58_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_9genexpr11__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L58_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_9)) {
          PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_9genexpr11__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L58_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 462, __pyx_L58_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
          __Pyx_INCREF(__pyx_9genexpr11__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
          __Pyx_GIVEREF(__pyx_9genexpr11__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
          PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_9genexpr11__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L58_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 462, __pyx_L58_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_GOTREF(__pyx_9genexpr11__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
    __Pyx_DECREF_SET(__pyx_9genexpr11__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_None);
    goto __pyx_L61_exit_scope;
    __pyx_L58_error:;
    __Pyx_GOTREF(__pyx_9genexpr11__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
    __Pyx_DECREF_SET(__pyx_9genexpr11__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_None);
    goto __pyx_L1_error;
    __pyx_L61_exit_scope:;
  } /* exit inner scope */

  /* "metaphor/chem_gm/core/gmutils.py":461
 * structkeysgradelessshort = [isokey(index) for index in [1, 2]] + \
 *     [chikey(index) for index in [1, 2]] + \
 *     [chargekey(index) for index in range(-4, 0)] + \             # <<<<<<<<<<<<<<
 *     [chargekey(index) for index in range(1, 5)] + \
 *     [cyclekey(index) for index in range(1, 13)]
 */
  __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __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;
  { /* enter inner scope */

    /* "metaphor/chem_gm/core/gmutils.py":463
 *     [chargekey(index) for index in range(-4, 0)] + \
 *     [chargekey(index) for index in range(1, 5)] + \
 *     [cyclekey(index) for index in range(1, 13)]             # <<<<<<<<<<<<<<
 * 
 * structkeysshort = [gradekey(index) for index in range(1, 7)] + \
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L64_error)
    __Pyx_GOTREF(__pyx_t_1);
    for (__pyx_t_10 = 1; __pyx_t_10 < 13; __pyx_t_10+=1) {
      __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 463, __pyx_L64_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_9genexpr12__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
      __Pyx_DECREF_SET(__pyx_9genexpr12__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_cyclekey); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 463, __pyx_L64_error)
      __Pyx_GOTREF(__pyx_t_9);
      __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_4 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_9genexpr12__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 463, __pyx_L64_error)
        __Pyx_GOTREF(__pyx_t_4);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_9genexpr12__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 463, __pyx_L64_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_9genexpr12__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 463, __pyx_L64_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 463, __pyx_L64_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL;
          __Pyx_INCREF(__pyx_9genexpr12__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
          __Pyx_GIVEREF(__pyx_9genexpr12__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
          PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_9genexpr12__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 463, __pyx_L64_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 463, __pyx_L64_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_GOTREF(__pyx_9genexpr12__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
    __Pyx_DECREF_SET(__pyx_9genexpr12__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_None);
    goto __pyx_L67_exit_scope;
    __pyx_L64_error:;
    __Pyx_GOTREF(__pyx_9genexpr12__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
    __Pyx_DECREF_SET(__pyx_9genexpr12__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_None);
    goto __pyx_L1_error;
    __pyx_L67_exit_scope:;
  } /* exit inner scope */

  /* "metaphor/chem_gm/core/gmutils.py":462
 *     [chikey(index) for index in [1, 2]] + \
 *     [chargekey(index) for index in range(-4, 0)] + \
 *     [chargekey(index) for index in range(1, 5)] + \             # <<<<<<<<<<<<<<
 *     [cyclekey(index) for index in range(1, 13)]
 * 
 */
  __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 462, __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;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_structkeysgradelessshort, __pyx_t_4) < 0) __PYX_ERR(0, 459, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":465
 *     [cyclekey(index) for index in range(1, 13)]
 * 
 * structkeysshort = [gradekey(index) for index in range(1, 7)] + \             # <<<<<<<<<<<<<<
 *     structkeysgradelessshort
 * 
 */
  { /* enter inner scope */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 465, __pyx_L70_error)
    __Pyx_GOTREF(__pyx_t_4);
    for (__pyx_t_10 = 1; __pyx_t_10 < 7; __pyx_t_10+=1) {
      __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __pyx_L70_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_9genexpr13__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
      __Pyx_DECREF_SET(__pyx_9genexpr13__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_gradekey); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L70_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      if (!__pyx_t_9) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_9genexpr13__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __pyx_L70_error)
        __Pyx_GOTREF(__pyx_t_1);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_9genexpr13__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __pyx_L70_error)
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 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_9, __pyx_9genexpr13__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __pyx_L70_error)
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 465, __pyx_L70_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); __pyx_t_9 = NULL;
          __Pyx_INCREF(__pyx_9genexpr13__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
          __Pyx_GIVEREF(__pyx_9genexpr13__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
          PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_9genexpr13__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __pyx_L70_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 465, __pyx_L70_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_GOTREF(__pyx_9genexpr13__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
    __Pyx_DECREF_SET(__pyx_9genexpr13__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_None);
    goto __pyx_L73_exit_scope;
    __pyx_L70_error:;
    __Pyx_GOTREF(__pyx_9genexpr13__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index);
    __Pyx_DECREF_SET(__pyx_9genexpr13__pyx_v_8metaphor_7chem_gm_4core_7gmutils_index, Py_None);
    goto __pyx_L1_error;
    __pyx_L73_exit_scope:;
  } /* exit inner scope */

  /* "metaphor/chem_gm/core/gmutils.py":466
 * 
 * structkeysshort = [gradekey(index) for index in range(1, 7)] + \
 *     structkeysgradelessshort             # <<<<<<<<<<<<<<
 * 
 * connectdef = defaultdict(lambda: -1, {val: 0 for val in structkeysgradeless})
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_structkeysgradelessshort); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "metaphor/chem_gm/core/gmutils.py":465
 *     [cyclekey(index) for index in range(1, 13)]
 * 
 * structkeysshort = [gradekey(index) for index in range(1, 7)] + \             # <<<<<<<<<<<<<<
 *     structkeysgradelessshort
 * 
 */
  __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __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 (PyDict_SetItem(__pyx_d, __pyx_n_s_structkeysshort, __pyx_t_2) < 0) __PYX_ERR(0, 465, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":468
 *     structkeysgradelessshort
 * 
 * connectdef = defaultdict(lambda: -1, {val: 0 for val in structkeysgradeless})             # <<<<<<<<<<<<<<
 * 
 * def connectdefault(full_0=False):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_54lambda, 0, __pyx_n_s_lambda, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  { /* enter inner scope */
    __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 468, __pyx_L76_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_structkeysgradeless); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 468, __pyx_L76_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_9 = __pyx_t_6; __Pyx_INCREF(__pyx_t_9); __pyx_t_3 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 468, __pyx_L76_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_11 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 468, __pyx_L76_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_11)) {
        if (likely(PyList_CheckExact(__pyx_t_9))) {
          if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_9)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 468, __pyx_L76_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_9, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 468, __pyx_L76_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 468, __pyx_L76_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_9, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 468, __pyx_L76_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_11(__pyx_t_9);
        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, 468, __pyx_L76_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XGOTREF(__pyx_9genexpr14__pyx_v_8metaphor_7chem_gm_4core_7gmutils_val);
      __Pyx_DECREF_SET(__pyx_9genexpr14__pyx_v_8metaphor_7chem_gm_4core_7gmutils_val, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      __pyx_t_6 = 0;
      if (unlikely(PyDict_SetItem(__pyx_t_4, (PyObject*)__pyx_9genexpr14__pyx_v_8metaphor_7chem_gm_4core_7gmutils_val, (PyObject*)__pyx_int_0))) __PYX_ERR(0, 468, __pyx_L76_error)
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_9genexpr14__pyx_v_8metaphor_7chem_gm_4core_7gmutils_val);
    __Pyx_DECREF_SET(__pyx_9genexpr14__pyx_v_8metaphor_7chem_gm_4core_7gmutils_val, Py_None);
    goto __pyx_L79_exit_scope;
    __pyx_L76_error:;
    __Pyx_GOTREF(__pyx_9genexpr14__pyx_v_8metaphor_7chem_gm_4core_7gmutils_val);
    __Pyx_DECREF_SET(__pyx_9genexpr14__pyx_v_8metaphor_7chem_gm_4core_7gmutils_val, Py_None);
    goto __pyx_L1_error;
    __pyx_L79_exit_scope:;
  } /* exit inner scope */
  __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_connectdef, __pyx_t_4) < 0) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":470
 * connectdef = defaultdict(lambda: -1, {val: 0 for val in structkeysgradeless})
 * 
 * def connectdefault(full_0=False):             # <<<<<<<<<<<<<<
 *     """Dictionhaire des connexions par dfaut. Tous les lments non
 *     explicitement affects sont affectes par dfaut a -1.
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_37connectdefault, 0, __pyx_n_s_connectdefault, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__135);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_connectdefault, __pyx_t_4) < 0) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":546
 * #
 * #--------------------------------------------------------------
 * def symbolFromNodeName(name):             # <<<<<<<<<<<<<<
 *     import re
 *     cc = re.compile(r'[a-zA-Z]{1,2}')
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_39symbolFromNodeName, 0, __pyx_n_s_symbolFromNodeName, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__137)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_symbolFromNodeName, __pyx_t_4) < 0) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":556
 * 
 * #--------------------------------------------------------------
 * def sniffFile(filename):             # <<<<<<<<<<<<<<
 *     # analyse du contenu csv
 *     if not filename:
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_41sniffFile, 0, __pyx_n_s_sniffFile, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__139)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sniffFile, __pyx_t_4) < 0) __PYX_ERR(0, 556, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":614
 * 
 * #--------------------------------------------------------------
 * def getcsvdelimiter(filename, suggested=',', quotechar='"', nrow=2):             # <<<<<<<<<<<<<<
 *     import csv
 *     lenrow = 0
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_43getcsvdelimiter, 0, __pyx_n_s_getcsvdelimiter, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__141)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__142);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getcsvdelimiter, __pyx_t_4) < 0) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":640
 * 
 * #--------------------------------------------------------------
 * def isNum(value):             # <<<<<<<<<<<<<<
 *     try:
 *         float(decmark_reg.sub('.', value))
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_45isNum, 0, __pyx_n_s_isNum, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_isNum, __pyx_t_4) < 0) __PYX_ERR(0, 640, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":647
 *         return False
 * 
 * def floatex(value, keppexcept=False):             # <<<<<<<<<<<<<<
 *     #===========================================================================
 *     # try:
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_47floatex, 0, __pyx_n_s_floatex, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__147);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_floatex, __pyx_t_4) < 0) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":663
 * 
 * #--------------------------------------------------------------
 * def getParameterListFomFile(weightFile):             # <<<<<<<<<<<<<<
 *     res = []
 *     ok = False
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_49getParameterListFomFile, 0, __pyx_n_s_getParameterListFomFile, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getParameterListFomFile, __pyx_t_4) < 0) __PYX_ERR(0, 663, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":689
 * #     return res
 * 
 * def formatted(value, decimal=3, length=10):             # <<<<<<<<<<<<<<
 *     form = "%0." + str(decimal) + "f"
 *     return (form % value).rjust(length)
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_51formatted, 0, __pyx_n_s_formatted, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__151)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__152);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_formatted, __pyx_t_4) < 0) __PYX_ERR(0, 689, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":693
 *     return (form % value).rjust(length)
 * 
 * def splitindexedname(name):             # <<<<<<<<<<<<<<
 *     corename = name
 *     index = -1
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8metaphor_7chem_gm_4core_7gmutils_53splitindexedname, 0, __pyx_n_s_splitindexedname, NULL, __pyx_n_s_metaphor_chem_gm_core_gmutils, __pyx_d, ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_splitindexedname, __pyx_t_4) < 0) __PYX_ERR(0, 693, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "metaphor/chem_gm/core/gmutils.py":706
 * #===============================================================================
 * 
 * if __name__ == "__main__":             # <<<<<<<<<<<<<<
 *     for val in structkeysshort:
 *         print(val)
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_main, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_12) {

    /* "metaphor/chem_gm/core/gmutils.py":707
 * 
 * if __name__ == "__main__":
 *     for val in structkeysshort:             # <<<<<<<<<<<<<<
 *         print(val)
 *     #test = r"[[Cr++]@@/2H, 2]"
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_structkeysshort); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
      __pyx_t_9 = __pyx_t_4; __Pyx_INCREF(__pyx_t_9); __pyx_t_3 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 707, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_11 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 707, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (likely(!__pyx_t_11)) {
        if (likely(PyList_CheckExact(__pyx_t_9))) {
          if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_9)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 707, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_9, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 707, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        } else {
          if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 707, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_9, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 707, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_11(__pyx_t_9);
        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, 707, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_val, __pyx_t_4) < 0) __PYX_ERR(0, 707, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":708
 * if __name__ == "__main__":
 *     for val in structkeysshort:
 *         print(val)             # <<<<<<<<<<<<<<
 *     #test = r"[[Cr++]@@/2H, 2]"
 *     #test = "Cr++"
 */
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_val); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 708, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 708, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "metaphor/chem_gm/core/gmutils.py":707
 * 
 * if __name__ == "__main__":
 *     for val in structkeysshort:             # <<<<<<<<<<<<<<
 *         print(val)
 *     #test = r"[[Cr++]@@/2H, 2]"
 */
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "metaphor/chem_gm/core/gmutils.py":706
 * #===============================================================================
 * 
 * if __name__ == "__main__":             # <<<<<<<<<<<<<<
 *     for val in structkeysshort:
 *         print(val)
 */
  }

  /* "metaphor/chem_gm/core/gmutils.py":1
 * #-*- coding: ISO-8859-15 -*-             # <<<<<<<<<<<<<<
 * #===============================================================================
 * # $Id: gmutils.py 4238 2016-09-27 11:27:39Z jeanluc $
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_9) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /*--- Wrapped vars code ---*/

  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_8);
  __Pyx_XDECREF(__pyx_t_9);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init metaphor.chem_gm.core.gmutils", 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.gmutils");
  }
  __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;
}

/* 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;
}

/* 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);
}

/* 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

/* 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

/* 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

/* 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

/* 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

/* 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;
}

/* UnicodeAsUCS4 */
  static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject* x) {
   Py_ssize_t length;
   #if CYTHON_PEP393_ENABLED
   length = PyUnicode_GET_LENGTH(x);
   if (likely(length == 1)) {
       return PyUnicode_READ_CHAR(x, 0);
   }
   #else
   length = PyUnicode_GET_SIZE(x);
   if (likely(length == 1)) {
       return PyUnicode_AS_UNICODE(x)[0];
   }
   #if Py_UNICODE_SIZE == 2
   else if (PyUnicode_GET_SIZE(x) == 2) {
       Py_UCS4 high_val = PyUnicode_AS_UNICODE(x)[0];
       if (high_val >= 0xD800 && high_val <= 0xDBFF) {
           Py_UCS4 low_val = PyUnicode_AS_UNICODE(x)[1];
           if (low_val >= 0xDC00 && low_val <= 0xDFFF) {
               return 0x10000 + (((high_val & ((1<<10)-1)) << 10) | (low_val & ((1<<10)-1)));
           }
       }
   }
   #endif
   #endif
   PyErr_Format(PyExc_ValueError,
                "only single character unicode strings can be converted to Py_UCS4, "
                "got length %" CYTHON_FORMAT_SSIZE_T "d", length);
   return (Py_UCS4)-1;
}

/* object_ord */
  static long __Pyx__PyObject_Ord(PyObject* c) {
    Py_ssize_t size;
    if (PyBytes_Check(c)) {
        size = PyBytes_GET_SIZE(c);
        if (likely(size == 1)) {
            return (unsigned char) PyBytes_AS_STRING(c)[0];
        }
#if PY_MAJOR_VERSION < 3
    } else if (PyUnicode_Check(c)) {
        return (long)__Pyx_PyUnicode_AsPy_UCS4(c);
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    } else if (PyByteArray_Check(c)) {
        size = PyByteArray_GET_SIZE(c);
        if (likely(size == 1)) {
            return (unsigned char) PyByteArray_AS_STRING(c)[0];
        }
#endif
    } else {
        PyErr_Format(PyExc_TypeError,
            "ord() expected string of length 1, but %.200s found", c->ob_type->tp_name);
        return (long)(Py_UCS4)-1;
    }
    PyErr_Format(PyExc_TypeError,
        "ord() expected a character, but string of length %zd found", size);
    return (long)(Py_UCS4)-1;
}

/* 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;
}

/* 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

/* 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
}

/* 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

/* 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;
}

/* 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;
}

/* 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
}

/* 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
}

/* 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;
}

/* 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");
}

/* 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);
}

/* 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;
}

/* 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;
}

/* 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

/* 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);
}

/* 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;
}

/* pyobject_as_double */
            static double __Pyx__PyObject_AsDouble(PyObject* obj) {
    PyObject* float_value;
#if !CYTHON_USE_TYPE_SLOTS
    float_value = PyNumber_Float(obj);  if (0) goto bad;
#else
    PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number;
    if (likely(nb) && likely(nb->nb_float)) {
        float_value = nb->nb_float(obj);
        if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) {
            PyErr_Format(PyExc_TypeError,
                "__float__ returned non-float (type %.200s)",
                Py_TYPE(float_value)->tp_name);
            Py_DECREF(float_value);
            goto bad;
        }
    } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) {
#if PY_MAJOR_VERSION >= 3
        float_value = PyFloat_FromString(obj);
#else
        float_value = PyFloat_FromString(obj, 0);
#endif
    } else {
        PyObject* args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        PyTuple_SET_ITEM(args, 0, obj);
        float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0);
        PyTuple_SET_ITEM(args, 0, 0);
        Py_DECREF(args);
    }
#endif
    if (likely(float_value)) {
        double value = PyFloat_AS_DOUBLE(float_value);
        Py_DECREF(float_value);
        return value;
    }
bad:
    return (double)-1;
}

/* 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

/* None */
            static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* 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;
}

/* 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 */
