Skip to content

Interaction Functions

This module contains different functions that can be applied as the influence of one node over another node (node-node interaction) when constructing an analytical model. These functions are intended to be used with symbolic computing (sympy).

f_acti_hill_s(cc, beta, nn)

Activator function based on a Hill function. The entity, cc, will be activating another node.

Parameters:

Name Type Description Default
cc float | ndarray | list

Concentration or set of concentrations at which to compute the function.

required
beta Symbol | Indexed

The network Hill coefficient, which is equal to the maximum rate of production of cc divided by the decay of cc multiplied by the standard Hill coefficient: (beta = r_max/(d_max*K_edge)).

required
nn float

The Hill exponent.

required
Source code in cellnition/science/network_models/interaction_functions.py
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
def f_acti_hill_s(cc: Symbol|Indexed, beta: Symbol|Indexed, nn: Symbol|Indexed):
    '''
    Activator function based on a Hill function.
    The entity, cc, will be activating another node.

    Parameters
    ----------
    cc : float|ndarray|list
        Concentration or set of concentrations at which
        to compute the function.
    beta: float
        The network Hill coefficient, which is equal to the
        maximum rate of production of cc divided by the
        decay of cc multiplied by the standard Hill coefficient:
        (beta = r_max/(d_max*K_edge)).
    nn : float
        The Hill exponent.

    '''
    return ((cc * beta) ** nn) / (1 + (cc * beta) ** nn)

f_acti_logi_s(cc, co, k)

Activator function based on a logistic function. The entity, cc, will be activating another node. This function can only be used in symbolic Sympy equations.

Parameters:

Name Type Description Default
cc float | ndarray | list

Concentration or set of concentrations at which to compute the function.

required
co Symbol | Indexed

The centre of the sigmoidal logistic curve.

required
k float

The coupling strength/rise function. Here k>0 to achieve an activator response.

required
Source code in cellnition/science/network_models/interaction_functions.py
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
def f_acti_logi_s(cc: Symbol|Indexed, co: Symbol|Indexed, k: Symbol|Indexed):
    '''
    Activator function based on a logistic function.
    The entity, cc, will be activating another node.
    This function can only be used in symbolic Sympy
    equations.

    Parameters
    ----------
    cc : float|ndarray|list
        Concentration or set of concentrations at which
        to compute the function.
    co: float
        The centre of the sigmoidal logistic curve.
    k : float
        The coupling strength/rise function. Here k>0 to
        achieve an activator response.

    '''
    return 1/(1 + sp.exp(-k*(cc - co)))

f_hill_s(i, j, pp, nn, beta)

Generic hill function.

Source code in cellnition/science/network_models/interaction_functions.py
18
19
20
21
22
23
def f_hill_s(i, j, pp: MatrixSymbol, nn: MatrixSymbol, beta: MatrixSymbol):
    '''
    Generic hill function.

    '''
    return 1/(1 + (beta[j,i] * pp[j,i]) ** -nn[j,i])

f_inhi_hill_s(cc, beta, nn)

Inhibitor function based on a Hill function. The entity, cc, will be inhibiting another node.

Parameters:

Name Type Description Default
cc float | ndarray | list

Concentration or set of concentrations at which to compute the function.

required
beta Symbol | Indexed

The network Hill coefficient, which is equal to the maximum rate of production of cc divided by the decay of cc multiplied by the standard Hill coefficient: (beta = r_max/(d_max*K_edge)).

required
nn float

The Hill exponent.

required
Source code in cellnition/science/network_models/interaction_functions.py
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
def f_inhi_hill_s(cc: Symbol|Indexed, beta: Symbol|Indexed, nn: Symbol|Indexed):
    '''
    Inhibitor function based on a Hill function.
    The entity, cc, will be inhibiting another node.

    Parameters
    ----------
    cc : float|ndarray|list
        Concentration or set of concentrations at which
        to compute the function.
    beta: float
        The network Hill coefficient, which is equal to the
        maximum rate of production of cc divided by the
        decay of cc multiplied by the standard Hill coefficient:
        (beta = r_max/(d_max*K_edge)).
    nn : float
        The Hill exponent.

    '''
    return 1 / (1 + (cc * beta) ** nn)

f_inhi_logi_s(cc, co, k)

Activator function based on a logistic function. The entity, cc, will be activating another node. This function can only be used in symbolic Sympy equations.

Parameters:

Name Type Description Default
cc float | ndarray | list

Concentration or set of concentrations at which to compute the function.

required
co Symbol | Indexed

The centre of the sigmoidal logistic curve.

required
k float

The coupling strength/rise function. Here k>0 to achieve an inhibition response.

required
Source code in cellnition/science/network_models/interaction_functions.py
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
def f_inhi_logi_s(cc: Symbol|Indexed, co: Symbol|Indexed, k: Symbol|Indexed):
    '''
    Activator function based on a logistic function.
    The entity, cc, will be activating another node.
    This function can only be used in symbolic Sympy
    equations.

    Parameters
    ----------
    cc : float|ndarray|list
        Concentration or set of concentrations at which
        to compute the function.
    co: float
        The centre of the sigmoidal logistic curve.
    k : float
        The coupling strength/rise function. Here k>0 to
        achieve an inhibition response.

    '''
    return 1/(1 + sp.exp(k*(cc - co)))

f_logi_s(i, j, pp, kk, mu)

Generic logistic function.

Source code in cellnition/science/network_models/interaction_functions.py
26
27
28
29
30
31
def f_logi_s(i, j, pp: MatrixSymbol, kk: MatrixSymbol, mu: MatrixSymbol):
    '''
    Generic logistic function.

    '''
    return 1 / (1 + sp.exp(-kk[j,i]*(pp[j,i] - mu[j,i])))

f_neut_s(cc, kk, nn)

Calculates a "neutral" edge interaction, where there is neither an activation nor inhibition response.

Source code in cellnition/science/network_models/interaction_functions.py
75
76
77
78
79
80
def f_neut_s(cc: Symbol|Indexed, kk: Symbol|Indexed, nn: Symbol|Indexed):
    '''
    Calculates a "neutral" edge interaction, where
    there is neither an activation nor inhibition response.
    '''
    return 1