# Path: pygchem/utils/custom_decorators.py
# class mixedmethod(object):
#     """
#     This decorator mutates a function defined in a class into a 'mixed' class 
#     and instance method.
#     
#     Example
#     -------
#     class Spam:
# 
#     @mixedmethod
#     def egg(self, cls, *args, **kwargs):
#         if self is None:
#             pass # executed if egg was called as a class method
#         else:
#             pass # executed if egg was called as an instance method
# 
#     The decorated methods need 2 implicit arguments: self and cls, the former 
#     being None when there is no instance in the call. 
#     This follows the same rule as __get__ methods in python's 
#     descriptor protocol.
#     """
#     def __init__(self, func):
#         self.func = func
#     def __get__(self, instance, cls):
#         return partial(self.func, instance, cls)
# 
# class classproperty(property):
#     """
#     A class property
#     
#     class Foo(object):
#         _var = 5
# 
#         @ClassProperty
#         @classmethod
#         def var(cls):
#             return cls._var
# 
#         @var.setter
#         @classmethod
#         def var(cls, value):
#             cls._var = value
#     """
#     def __get__(self, cls, owner):
#         return self.fget.__get__(None, owner)()


import collections
import types
import numbers
import inspect
import copy
import pprint
import warnings
import math
import numpy as np
import pygchem.io.globchem as iogc
from pygchem.utils.custom_decorators import mixedmethod, classproperty
        products : list or any sequence of :class:`Species` ids
            list of products
        coefs : sequence of real numbers
            product coefficients
        rate : :class:`ReactionRate` object or dict
            used to compute the rate of the chemical reaction. If a dictionary
            (with reaction rate parameters) is given, a new
            :class:`ReactionRate` object is created (considering also the flag 
            value)
        status : string
            Reaction status (see :class:`Reaction`.valid_status for a
            more detailed description).
        flag : string
            used for special reactions (i.e., reactions that have to be treated
            specifically in the model)
        comment : string
            any comment about the reaction
        ord_n : int
            number used for reaction ordering
        """
        self.id = id
        self.reactants = reactants
        self.products = products
        self.coefs = coefs
        self.flag = flag       # set flag before rate
        self.rate = rate
        self.status = status
        self.comment = comment
        self.ord_n = ord_n


# Path: pygchem/utils/custom_decorators.py
# class mixedmethod(object):
#     """
#     This decorator mutates a function defined in a class into a 'mixed' class 
#     and instance method.
#     
#     Example
#     -------
#     class Spam:
# 
#     @mixedmethod
#     def egg(self, cls, *args, **kwargs):
#         if self is None:
#             pass # executed if egg was called as a class method
#         else:
#             pass # executed if egg was called as an instance method
# 
#     The decorated methods need 2 implicit arguments: self and cls, the former 
#     being None when there is no instance in the call. 
#     This follows the same rule as __get__ methods in python's 
#     descriptor protocol.
#     """
#     def __init__(self, func):
#         self.func = func
#     def __get__(self, instance, cls):
#         return partial(self.func, instance, cls)
# 
# class classproperty(property):
#     """
#     A class property
#     
#     class Foo(object):
#         _var = 5
# 
#         @ClassProperty
#         @classmethod
#         def var(cls):
#             return cls._var
# 
#         @var.setter
#         @classmethod
#         def var(cls, value):
#             cls._var = value
#     """
#     def __get__(self, cls, owner):
#         return self.fget.__get__(None, owner)()


# Path: pygchem/globchem.py
import collections
import types
import numbers
import inspect
import copy
import pprint
import warnings
import math
import numpy as np
import pygchem.io.globchem as iogc
from pygchem.utils.custom_decorators import mixedmethod, classproperty

        products : list or any sequence of :class:`Species` ids
            list of products
        coefs : sequence of real numbers
            product coefficients
        rate : :class:`ReactionRate` object or dict
            used to compute the rate of the chemical reaction. If a dictionary
            (with reaction rate parameters) is given, a new
            :class:`ReactionRate` object is created (considering also the flag 
            value)
        status : string
            Reaction status (see :class:`Reaction`.valid_status for a
            more detailed description).
        flag : string
            used for special reactions (i.e., reactions that have to be treated
            specifically in the model)
        comment : string
            any comment about the reaction
        ord_n : int
            number used for reaction ordering
        """
        self.id = id
        self.reactants = reactants
        self.products = products
        self.coefs = coefs
        self.flag = flag       # set flag before rate
        self.rate = rate
        self.status = status
        self.comment = comment
        self.ord_n = ord_n


    @classproperty