Dear All,
I am using the following code (file anal.py) to read ALPS results.
When I run the simulation using run.py (v1) (file below), then I am
getting some result, when I am using run.py (v2) then I am getting no
results and output file read error.
The v1 and v2 of run.py differ by a single byte: in v1 the boseHubbard
hopping in 0.02 while in the other it is 0.2.
lattice.xml and models.xml are standard files (I planned to change
them, but first I wanted some test data from a starndard BH).
Does anyone know what I am doing wrong? I am using alps revision 7650.
Best,
Mateusz Łącki
************************************ anal.py ***************
import pyalps
bin_dir = '/nfs/andy2/home/lacki/alps/install22b4/bin/'
# Setting graphical output
import matplotlib as mpl
mpl.use('agg')
# Evaluating the simulation and preparing plots using Python
import pyalps
import matplotlib.pyplot as plt
import pyalps.plot as aplt
results = pyalps.getResultFiles(prefix='parm1a')
print(results)
data = pyalps.loadMeasurements(results,what=['Local Density^2',])
rhos = pyalps.collectXY(data,x='t',y='Local Density^2')
print('rhos',rhos)
***************************************************************************
************************************ run.py (v1) ***************
import pyalps
bin_dir = '/nfs/andy2/home/lacki/alps/install22b4/bin/'
parms = []
for t in [0.02, ]:
parms.append(
{
'LATTICE_LIBRARY' : "lattices.xml",
'MODEL_LIBRARY' : "models.xml",
'LATTICE' : "square lattice",
'MODEL' : "boson Hubbard",
'T' : 0.1,
'L' : 4 ,
't' : t ,
'mu' : 0.5,
'U' : 1.0 ,
'Nmax' : 5 ,
'THERMALIZATION' : 10000,
'SWEEPS' : 2000000,
'SKIP' : 10,
'MEASURE[Winding Number]': 1,
'MEASURE[Local Density^2]': 1,
'RESTRICT_MEASUREMENTS[N]': 16
}
)
input_file = pyalps.writeInputFiles('parm1a', parms)
res = pyalps.runApplication(bin_dir+'dwa', input_file, Tmin=5,
writexml=True)
**************************************************************
************************************ run.py (v2) ***************
import pyalps
bin_dir = '/nfs/andy2/home/lacki/alps/install22b4/bin/'
parms = []
for t in [0.2, ]:
parms.append(
{
'LATTICE_LIBRARY' : "lattices.xml",
'MODEL_LIBRARY' : "models.xml",
'LATTICE' : "square lattice",
'MODEL' : "boson Hubbard",
'T' : 0.1,
'L' : 4 ,
't' : t ,
'mu' : 0.5,
'U' : 1.0 ,
'Nmax' : 5 ,
'THERMALIZATION' : 10000,
'SWEEPS' : 2000000,
'SKIP' : 10,
'MEASURE[Winding Number]': 1,
'MEASURE[Local Density^2]': 1,
'RESTRICT_MEASUREMENTS[N]': 16
}
)
input_file = pyalps.writeInputFiles('parm1a', parms)
res = pyalps.runApplication(bin_dir+'dwa', input_file, Tmin=5,
writexml=True)
**************************************************************