package affectors; import main.Globals; import main.Node; import main.Cell; /** This is one half of a dimerization where the ligand and receptor can bind within the same membrane as well as across different faces. All Nodes, including the dimer, must be membrane-bound. Use the A version of this affector for the undimerized species. Use the B version for the dimer. The node_scale (max) for each of the singleton proteins is the scaling factor for the >other< singleton.

Formula
dSINGLE_NODE1/dt = - r * max * SINGLE_NODE1 * SINGLE_NODE2

Parameters
Membrane Node [SINGLE_NODE1] One undimerized Node
Cytoplasmic Node [SINGLE_NODE2] The other undimerized Node
Dimerization rate [r_DIMER] The rate of the dimerization reaction.
Maximum Cyto [max] The maximum relative concentration of the >other< undimerized Node.

Usage
&SINGLE_NODE

&DimerizeAllMembrane_AAff SINGLE_NODE1 SINGLE_NODE2 r_DIMER max
&endSINGLE_NODE */ public class DimerizeAllMembrane_AAff extends Affector { /** The rate of the dimerization reaction. */ int kParam; /** The scaling factor of the other undimerized node in this reaction (i.e. max for second input node). */ int nodeScaleParam; static final String desc = "Dimerize membrane-bound nodes; version A for monomers"; static final String [] nodeDescriptions = {"Target node", "Other node"}; static final String [] paramDescriptions = {"Second-order reaction rate constant", "Scale factor (max value) for other node"}; static final int [] whichSides = {-1, -1, 1}; public DimerizeAllMembrane_AAff() {} protected void setLabelsAndTypes() { setDescriptions(this.desc, nodeDescriptions, paramDescriptions); setSided(true, whichSides); setContainsTarget(true); this.Type[GUI_CAPABLE] = 1; this.Type[CERTIFICATION] = Affector.RETURNS_DERIV; this.Type[MATHTYPE] = Affector.GG; this.Type[TERMTYPE] = Affector.CONVERSION; } public void setParameterNumbers(int [] param_nums) { kParam = param_nums[0]; nodeScaleParam = param_nums[1]; } /** Overridden because this affector uses the same node in two places. */ public void fixNodes(Cell cell, String [] node_names) throws Exception { String [] new_node_names = new String[3]; new_node_names[0] = node_names[0]; new_node_names[1] = new_node_names[2] = node_names[1]; sides = new int[3]; sides[0] = sides[1] = -1; sides[2] = side; super.fixNodes(cell, new_node_names); } public float getValue(Node which_node) { return -Globals.characteristicTime * params[kParam] * params[nodeScaleParam] * Nodes[0].getIntegrationValue(side) * (Nodes[1].getIntegrationValue(side) + Nodes[2].getIntegrationValue(otherSide)); } public float getNCValue(Node which_node) { return -Globals.characteristicTime * params[kParam] * params[nodeScaleParam] * (Nodes[1].getIntegrationValue(side) + Nodes[2].getIntegrationValue(otherSide)); } }