def run_it(p): print('Running for parameters: {}'.format(p)) s = None if p.model == 'QcaBond': s = qca.QcaBond() elif p.model == 'QcaFixedCharge': s = qca.QcaFixedCharge() elif p.model == 'QcaGrandCanonical': s = qca.QcaGrandCanonical() elif p.model == 'QcaIsing': s = qca.QcaIsing() s.V0 = p.V0 s.mu = p.mu s.q = p.q s.T = 1 s.l = qca.Wire(p.N, p.V1, p.boa, 1) s.init() s.run() Es = np.array(s.energies()) Es.sort() Es = Es[:10000] # throw away high energy states s.results['energies'] = Es return s
def run_it(p): print('Running for parameters: {}'.format(p)) global last_s global last_ps if last_ps[:-1] == p.ps[:-1]: print('Changed T only') s = last_s s.T = p.T s.run(changedTonly=True) else: s = None if p.model == 'QcaBond': s = qca.QcaBond() elif p.model == 'QcaFixedCharge': s = qca.QcaFixedCharge() elif p.model == 'QcaGrandCanonical': s = qca.QcaGrandCanonical() s.V0 = p.V0 s.mu = 250 s.l = qca.Wire(p.N, p.V1, p.boa, 1) s.T = p.T s.init() s.run() last_s = s last_ps = p.ps return s
def run_it(p): print('Running for parameters: {}'.format(p)) s = None if p.model == 'QcaIsing': s = qca.QcaIsing() elif p.model == 'QcaBond': s = qca.QcaBond() elif p.model == 'QcaFixedCharge': s = qca.QcaFixedCharge() s.q = 0.5 s.t = 1 s.T = p.T s.V0 = 1E6 s.l = qca.Wire(p.N, p.V1, p.boa, p.P) s.init() s.run() return s
def run_it(p): print('Running for parameters: {}'.format(p)) s = None if p.model == 'QcaBond': s = qca.QcaBond() elif p.model == 'QcaFixedCharge': s = qca.QcaFixedCharge() elif p.model == 'QcaGrandCanonical': s = qca.QcaGrandCanonical() s.q = p.q s.V0 = 1E6 s.mu = 0 s.t = 1 s.T = p.T N, V1 = 3, 40 s.l = qca.Wire(N, V1, p.boa, p.P) s.init() s.run() return s