Beispiel #1
0
import matplotlib.pyplot as plt
import pyalps.plot

#prepare the input parameters
parms = [{
    'LATTICE': "simple cubic lattice",
    'MODEL': "spin",
    'local_S': 0.5,
    'L': 4,
    'J': 1,
    'CUTOFF': 500
}]

#write the input file and run the simulation
input_file = pyalps.writeInputFiles('parm6c', parms)
res = pyalps.runApplication('qwl', input_file)

#run the evaluation and load all the plots
data = pyalps.evaluateQWL(pyalps.getResultFiles(prefix='parm6c'),
                          DELTA_T=0.05,
                          T_MIN=0.5,
                          T_MAX=5.0)

#make plot
for s in pyalps.flatten(data):
    plt.figure()
    plt.title("Cubic lattice Heisenberg antiferromagnet L=4")
    pyalps.plot.plot(s)

plt.show()
Beispiel #2
0
import matplotlib.pyplot as plt
import pyalps.plot

#prepare the input parameters
parms = [{
    'LATTICE': "chain lattice",
    'MODEL': "spin",
    'local_S': 0.5,
    'L': 40,
    'J': -1,
    'CUTOFF': 1000
}]

#write the input file and run the simulation
input_file = pyalps.writeInputFiles('parm6a', parms)
res = pyalps.runApplication('qwl', input_file)

#run the evaluation and load all the plots
data = pyalps.evaluateQWL(pyalps.getResultFiles(prefix='parm6a'),
                          DELTA_T=0.1,
                          T_MIN=0.1,
                          T_MAX=10.0)

#make plot
for s in pyalps.flatten(data):
    plt.figure()
    plt.title("Ferromagnetic Heisenberg chain")
    pyalps.plot.plot(s)

plt.show()
Beispiel #3
0
    parms.append({
        'LATTICE': "simple cubic lattice",
        'MODEL': "spin",
        'local_S': 0.5,
        'L': l,
        'J': 1,
        'CUTOFF': c
    })

#write the input file and run the simulation
input_file = pyalps.writeInputFiles('mc06d', parms)
pyalps.runApplication('qwl', input_file)

#run the evaluation and load all the plots
results = pyalps.evaluateQWL(pyalps.getResultFiles(prefix='mc06d'),
                             DELTA_T=0.05,
                             T_MIN=0.5,
                             T_MAX=1.5)

#extract just the staggered structure factor S(Q) and rescale it by L^{-2+\eta}
data = []
for s in pyalps.flatten(results):
    if s.props['ylabel'] == 'Staggered Structure Factor per Site':
        print 'yes'
        d = copy.deepcopy(s)  # make a deep copy to not change the original
        l = s.props['L']
        d.props['label'] = 'L=' + str(l)
        d.y = d.y * pow(float(l), -1.97)
        data.append(d)

#make plot
plt.figure()