def step(self, mcs): # #### Write bionetwork state variable names of external oscillators to output file bionetAPI.writeBionetworkStateToFile(mcs, "ExternalOscillatorA", "SimpleExample", self.oscillatorAFileName, "a") bionetAPI.writeBionetworkStateToFile(mcs, "ExternalOscillatorB", "SimpleExample", self.oscillatorBFileName, "a") # ######### Update integrator(s) for all bionetworks ########### bionetAPI.timestepBionetworks() # ######## Modify k1 and k2 as a function of time (MCS) ########## k1 = self.k1_init * (1 + math.sin(2 * math.pi * mcs / self.mcsPeriod)) k2 = self.k2_init * (1 - math.sin(2 * math.pi * mcs / self.mcsPeriod)) bionetAPI.setBionetworkValue("SE_k1", 0.2 * k1, "ExternalOscillatorA") bionetAPI.setBionetworkValue("SE_k2", 0.2 * k2, "ExternalOscillatorA") k1 = self.k1_init * (1 - math.sin(2 * math.pi * mcs / self.mcsPeriod)) k2 = self.k2_init * (1 + math.sin(2 * math.pi * mcs / self.mcsPeriod)) bionetAPI.setBionetworkValue("SE_k1", 0.2 * k1, "ExternalOscillatorB") bionetAPI.setBionetworkValue("SE_k2", 0.2 * k2, "ExternalOscillatorB") # ####### Set "Blue-Blue" and "Green-Green" adhesion energies ######### BB_offset = bionetAPI.getBionetworkValue("SE_S1", "ExternalOscillatorA") GG_offset = bionetAPI.getBionetworkValue("SE_S1", "ExternalOscillatorB") self.modifyContactEnergies(BB_offset, GG_offset, self.steadyState) # ############## Write adhesion data to an output file ################ self.writeContactEnergies(mcs, self.contactEnergyOutputFile, "a")
def step(self, mcs): # #### Write bionetwork state variable names of external oscillators to output file bionetAPI.writeBionetworkStateToFile( mcs, "ExternalOscillatorA", "SimpleExample", self.oscillatorAFileName, "a" ) bionetAPI.writeBionetworkStateToFile( mcs, "ExternalOscillatorB", "SimpleExample", self.oscillatorBFileName, "a" ) # ######### Update integrator(s) for all bionetworks ########### bionetAPI.timestepBionetworks() # ######## Modify k1 and k2 as a function of time (MCS) ########## k1 = self.k1_init * ( 1 + math.sin( 2*math.pi*mcs/self.mcsPeriod ) ) k2 = self.k2_init * ( 1 - math.sin( 2*math.pi*mcs/self.mcsPeriod ) ) bionetAPI.setBionetworkValue( "SE_k1", 0.2*k1, "ExternalOscillatorA" ) bionetAPI.setBionetworkValue( "SE_k2", 0.2*k2, "ExternalOscillatorA" ) k1 = self.k1_init * ( 1 - math.sin( 2*math.pi*mcs/self.mcsPeriod ) ) k2 = self.k2_init * ( 1 + math.sin( 2*math.pi*mcs/self.mcsPeriod ) ) bionetAPI.setBionetworkValue( "SE_k1", 0.2*k1, "ExternalOscillatorB" ) bionetAPI.setBionetworkValue( "SE_k2", 0.2*k2, "ExternalOscillatorB" ) # ####### Set "Blue-Blue" and "Green-Green" adhesion energies ######### BB_offset = bionetAPI.getBionetworkValue( "SE_S1", "ExternalOscillatorA" ) GG_offset = bionetAPI.getBionetworkValue( "SE_S1", "ExternalOscillatorB" ) self.modifyContactEnergies( BB_offset, GG_offset, self.steadyState ) # ############## Write adhesion data to an output file ################ self.writeContactEnergies( mcs, self.contactEnergyOutputFile, "a" )
def step(self, mcs): # #### Write bionetwork state variable names of external oscillators to output file bionetAPI.writeBionetworkStateToFile(mcs, "ExternalOscillatorA", "SimpleExample", self.oscillatorAFileName, "a") bionetAPI.writeBionetworkStateToFile(mcs, "ExternalOscillatorB", "SimpleExample", self.oscillatorBFileName, "a") # ######### Update integrator(s) for all bionetworks ########### bionetAPI.timestepBionetworks() # ######## Modify k1 and k2 as a function of time (MCS) ########## k1 = self.k1_init * (1 + math.sin(2 * math.pi * mcs / self.mcsPeriod)) k2 = self.k2_init * (1 - math.sin(2 * math.pi * mcs / self.mcsPeriod)) bionetAPI.setBionetworkValue("SE_k1", 0.2 * k1, "ExternalOscillatorA") bionetAPI.setBionetworkValue("SE_k2", 0.2 * k2, "ExternalOscillatorA") k1 = self.k1_init * (1 - math.sin(2 * math.pi * mcs / self.mcsPeriod)) k2 = self.k2_init * (1 + math.sin(2 * math.pi * mcs / self.mcsPeriod)) bionetAPI.setBionetworkValue("SE_k1", 0.2 * k1, "ExternalOscillatorB") bionetAPI.setBionetworkValue("SE_k2", 0.2 * k2, "ExternalOscillatorB") # ####### Set "Blue-Blue" and "Green-Green" adhesion energies ######### BB_offset = bionetAPI.getBionetworkValue("SE_S1", "ExternalOscillatorA") GG_offset = bionetAPI.getBionetworkValue("SE_S1", "ExternalOscillatorB") self.modifyContactEnergies(BB_offset, GG_offset, self.steadyState) # ############## Write adhesion data to an output file ################ self.writeContactEnergies(mcs, self.contactEnergyOutputFile, "a") if not (mcs % 10): for cell in self.cellList: pixelList = self.getCellPixelList(cell) for pixelTrackerData in pixelList: self.cellField.set(pixelTrackerData.pixel, None) break if mcs > 200: for cell in self.cellList: cell.targetVolume = 0.0 cell.lambdaVolume = 200.0 cell.targetSurface = 0.0 cell.lambdaSurface = 200.0
def step(self, mcs): # #### Write bionetwork state variable names of external oscillators to output file bionetAPI.writeBionetworkStateToFile( mcs, "ExternalOscillatorA", "SimpleExample", self.oscillatorAFileName, "a" ) bionetAPI.writeBionetworkStateToFile( mcs, "ExternalOscillatorB", "SimpleExample", self.oscillatorBFileName, "a" ) # ######### Update integrator(s) for all bionetworks ########### bionetAPI.timestepBionetworks() # ######## Modify k1 and k2 as a function of time (MCS) ########## k1 = self.k1_init * ( 1 + math.sin( 2*math.pi*mcs/self.mcsPeriod ) ) k2 = self.k2_init * ( 1 - math.sin( 2*math.pi*mcs/self.mcsPeriod ) ) bionetAPI.setBionetworkValue( "SE_k1", 0.2*k1, "ExternalOscillatorA" ) bionetAPI.setBionetworkValue( "SE_k2", 0.2*k2, "ExternalOscillatorA" ) k1 = self.k1_init * ( 1 - math.sin( 2*math.pi*mcs/self.mcsPeriod ) ) k2 = self.k2_init * ( 1 + math.sin( 2*math.pi*mcs/self.mcsPeriod ) ) bionetAPI.setBionetworkValue( "SE_k1", 0.2*k1, "ExternalOscillatorB" ) bionetAPI.setBionetworkValue( "SE_k2", 0.2*k2, "ExternalOscillatorB" ) # ####### Set "Blue-Blue" and "Green-Green" adhesion energies ######### BB_offset = bionetAPI.getBionetworkValue( "SE_S1", "ExternalOscillatorA" ) GG_offset = bionetAPI.getBionetworkValue( "SE_S1", "ExternalOscillatorB" ) self.modifyContactEnergies( BB_offset, GG_offset, self.steadyState ) # ############## Write adhesion data to an output file ################ self.writeContactEnergies( mcs, self.contactEnergyOutputFile, "a" ) if not (mcs %10): for cell in self.cellList: pixelList=self.getCellPixelList(cell) for pixelTrackerData in pixelList: self.cellField.set(pixelTrackerData.pixel,None) break if mcs >200: for cell in self.cellList: cell.targetVolume=0.0 cell.lambdaVolume=200.0 cell.targetSurface=0.0 cell.lambdaSurface=200.0