def load(filename, simConfig=None, output=False, instantiate=True,
    createNEURONObj=True):
    """ Sequence of commands load, simulate and analyse network """
    from .. import sim
    sim.initialize()
    sim.cfg.createNEURONObj = createNEURONObj
    sim.loadAll(filename, instantiate=instantiate, createNEURONObj=
        createNEURONObj)
    if simConfig:
        sim.setSimCfg(simConfig)
    if len(sim.net.cells) == 0 and instantiate:
        pops = sim.net.createPops()
        cells = sim.net.createCells()
        conns = sim.net.connectCells()
        stims = sim.net.addStims()
        rxd = sim.net.addRxD()
    simData = sim.setupRecording()
    if output:
        try:
            return pops, cells, conns, stims, rxd, simData
        except:
            pass
