コード例 #1
0
 def resting_complexes(self):
     """
     List of complexes enumerated that are within resting states.
     :py:meth:`.enumerate` must be called before access.
     """
     if self._resting_complexes is None:
         raise utils.PeppercornUsageError("enumerate not yet called!")
     return self._resting_complexes[:]
コード例 #2
0
 def complexes(self):
     """
     List of complexes enumerated. :py:meth:`.enumerate` must be
     called before access.
     """
     if self._complexes is None:
         raise utils.PeppercornUsageError("enumerate not yet called!")
     return self._complexes[:]
コード例 #3
0
 def resting_sets(self):
     """
     List of resting states enumerated. :py:meth:`.enumerate` must be
     called before access.
     """
     if self._resting_macrostates is None:
         raise utils.PeppercornUsageError("enumerate not yet called!")
     return self._resting_macrostates[:]
コード例 #4
0
    def __init__(self, initial_complexes, initial_reactions=None):
        """
        Initializes the enumerator with a list of initial complexes.

        Note: The optional arguments 'strands' and 'domains' are there for
        backwards-compatibility and will be remove at some point. Ignoring them
        below breaks unit-tests - why? (1) sometimes complementary domains are
        specified that are actually not present in any of the complexes, (2)
        conflicts with strand names in the original kernel format (where
        explicit strand specifications are supported).
        """
        # System initialization
        self._initial_complexes = initial_complexes
        for cplx in initial_complexes:
            if not cplx.is_connected:
                raise utils.PeppercornUsageError('Initial complex is not connected: {}'.format(cplx))
        self._domains = self.get_domains(self._initial_complexes)

        # list containing all detailed reactions after enumeration
        if initial_reactions:
            self._reactions = initial_reactions
        else :
            self._reactions = []

        self._complexes = None
        self._resting_complexes = None
        self._transient_complexes = None
        self._resting_macrostates = None

        self.DFS = True
        self.interruptible = True
        self.interactive = False
        
        # Polymerization settings to prevent infinite looping
        self.max_complex_size = 6
        self.max_complex_count = 200
        self.max_reaction_count = 1000

        #
        # Set separation of timescales for *unimolecular* reactions.
        #
        #  ignore-reaction | resting-set | transient-state
        # -----------------|---------------|---------------> rate
        #                k_slow          k_fast
        #
        # Default: All unimolecular reactions are transient, none are ignored.
        #
        self._k_slow = 0 
        self._k_fast = 0
        self._p_min = 0
        self._p_loc = 0

        # Settings for reaction enumeration. 
        self._max_helix = True
        self._remote = True
        self._release_11 = 6
        self._release_1N = 6
コード例 #5
0
 def transient_complexes(self):
     """
     List of complexes enumerated that are not within resting sets (e.g.
     complexes which are transient). :py:meth:`.enumerate` must be
     called before access.
     """
     if self._transient_complexes is None:
         raise utils.PeppercornUsageError("enumerate not yet called!")
     return self._transient_complexes[:]
コード例 #6
0
 def release_cutoff(self):
     if self._release_11 != self._release_1N :
         raise utils.PeppercornUsageError('Ambiguous release cutoff request.')
     return self._release_11