pysb / pysb

Python framework for Systems Biology modeling
BSD 2-Clause "Simplified" License
166 stars 71 forks source link

Method in Monomer object to return strings specifying name and site states #21

Closed johnbachman closed 12 years ago

johnbachman commented 12 years ago

Right now the macro code is littered with the following type of statement, used to generate rule names:

r_namefwd = 'cat%s%sto%s%s' % (sub.monomer.name, ''.join(filter(lambda a: a != None, sub.site_conditions.values())), prod.monomer.name, ''.join(filter(lambda a: a != None, prod.site_conditions.values())))

Would be nice if monomer had an alternative kind of to_string method that would give information on site states in a string friendly way.

jmuhlich commented 12 years ago

There is something in pysb.macros that does this now.