ecell / ecell4_base

An integrated software environment for multi-algorithm, multi-timescale, multi-spatial-representation simulation of various cellular phenomena
https://ecell4.e-cell.org/
GNU General Public License v3.0
62 stars 23 forks source link

Proceed #446

Closed kaizu closed 4 years ago

kaizu commented 4 years ago

Enable to proceed after matching in species_attributes.

m = NetworkModel()
sp = Species("_")
sp.set_attribute("radius", 0.005)
m.add_species_attribute(sp, True)
sp = Species("A")
sp.set_attribute("D", 1.0)
m.add_species_attribute(sp)

sp = m.apply_species_attributes(Species('A'))
print(sp.get_attribute("radius").magnitude)  # => 0.005
print(sp.get_attribute("D").magnitude)  # => 1.0

See https://github.com/ecell/ecell4_base/issues/444