Example #1
0
def run():
    print dump_reaction_rules(m)

    s.initialize()
    for i in range(N_STEPS):
        try:
            if VTK_LOGGER == True:
                vtklogger.log()
            if LOGGER == True and s.last_reaction:
                l.log(s, s.t)
            s.step()
        except Exception, message:
            print 'Exception at step = ', i
            print message
            if VTK_LOGGER == True:
                vtklogger.stop()
            s.print_report()
            raise
Example #2
0
        try:
            if VTK_LOGGER == True:
                vtklogger.log()
            if LOGGER == True and s.last_reaction:
                l.log(s, s.t)
            s.step()
        except Exception, message:
            print 'Exception at step = ', i
            print message
            if VTK_LOGGER == True:
                vtklogger.stop()
            s.print_report()
            raise

    if VTK_LOGGER == True:
        vtklogger.stop()

    s.print_report()


    #Todo: add test for this stuff, because it keeps breaking.
    '''
    for x in dump_domains(s):
        print x
    for x in dump_species(s):
        print x
        for y in dump_particles_by_sid(s, x.id):
            print y
    for x in dump_particles(s):
        print x
    '''