本文整理汇总了Python中Simulation.add_gradient方法的典型用法代码示例。如果您正苦于以下问题:Python Simulation.add_gradient方法的具体用法?Python Simulation.add_gradient怎么用?Python Simulation.add_gradient使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Simulation
的用法示例。
在下文中一共展示了Simulation.add_gradient方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Gradient
# 需要导入模块: import Simulation [as 别名]
# 或者: from Simulation import add_gradient [as 别名]
## D = 1.7e-9 / (1e-12) #um^2/sec
## consump_rate = (4.0e-17)#*(10**6) mols/cell/sec #umols/cell/sec
## #This value later gets normalized using the
## #set the outside concentration
## outside_c = 1.04e-4*10**6 #(umol/L) or uM
#from War-tenberg et al., 2001
D = 10.0 # um^2/sec
consump_rate = 2.0e-20 #mol/cell/sec
production_rate = 2.0e-20
## outside_c = .1 #umol/L or uM
outside_c = 0.0 #umol/L
tnf = Gradient("TNF", D, 700.0, 700.0, 700.0, 15, 15, 15,
outside_c = outside_c)
#add this to the simulation
sim.add_gradient(tnf)
lif = Gradient("LIF", D, 700.0, 700.0, 700.0, 15, 15, 15,
outside_c = outside_c)
#add this to the simulation
sim.add_gradient(lif)
## while(True):
## print(struct_path)
## print(sim_base_path)
## print(sim_id)
#find the only file in the dir
f = os.listdir(struct_path)
## while(True):
## print(struct_path + f[0])
#then load this file
#open the input structure file
net = nx.read_gpickle(struct_path + f[0])