I've attached the input file with this mail.
Copied and pasted below:
import pyalps
import numpy as np
import matplotlib.pyplot as plt
import pyalps.plot
import cmath
#prepare the input parameters
parms = []
for D in [80]:
parms.append( {
'LATTICE' : 'open chain lattice',
'MODEL' : 'spin',
'CONSERVED_QUANTUMNUMBERS' : 'N,Sz',
'COMPLEX' : 1,
'Jz' : 4.5,
'Jxy' : 1.0,
# 'E' : 1.0,
'SWEEPS' : 8,
'NUMBER_EIGENVALUES' : 1,
'L' : 32,
'MAXSTATES' : D,
'MEASURE_CORRELATIONS[Sx_Sy]' : 'Sx:Sy',
'MEASURE_CORRELATIONS[Sy_Sx]' : 'Sy:Sx',
} )
#write the input file and run the simulation
input_file = pyalps.writeInputFiles('parm_MP',parms)
res = pyalps.runApplication('dmrg',input_file,writexml=True)
#load all measurements for all states
data = pyalps.loadEigenstateMeasurements(pyalps.getResultFiles(prefix='parm_MP'))
# extract diagonal and offdiagonal correlation data
offdiag_curves1 = []
offdiag_curves2 = []
expectation_of_offdiag_corr1 = []
expectation_of_offdiag_corr2 = []
local_polarization = []
b = open('values.dat','a+')
for run in data:
for s in run:
if s.props['observable'] == 'Sx_Sy':
od1 = pyalps.DataSet()
od1.props['observable'] = 'Sx:Sy correlations'
od1.props['label'] = 'D = '+str(s.props['MAXSTATES'])
L = int(s.props['L'])
od1.x = np.arange(L-1)
site1 = np.array([l for l in range(0,L-1)])
site2 = np.array([l for l in range(1,L)])
indices_offdiag1 = L*site1 + site2
od1.y = s.y[0][indices_offdiag1]
print>>b, '\nSx:Sy correlations with L=32,D=80, E=0\n'
expectation_of_offdiag_corr1 = od1.y
offdiag_curves1.append(od1)
print>>b, expectation_of_offdiag_corr1
print>>b, indices_offdiag1
elif s.props['observable'] == 'Sy_Sx':
od2 = pyalps.DataSet()
od2.props['observable'] = 'Sy:Sx correlations'
od2.props['label'] = 'D = '+str(s.props['MAXSTATES'])
L = int(s.props['L'])
od2.x = np.arange(L-1)
site1 = np.array([l for l in range(0,L-1)])
site2 = np.array([l for l in range(1,L)])
indices_offdiag2 = L*site1 + site2
od2.y = s.y[0][indices_offdiag2]
print>>b, '\nSy:Sx correlations with L = 32 & D = 80\n'
expectation_of_offdiag_corr2 = od2.y
offdiag_curves2.append(od2)
print>>b, expectation_of_offdiag_corr2
print>>b, indices_offdiag2
b.close()
The output I got was:
"
dmrg parm_MP.in.xml --write-xml
ALPS DMRG temporary files will be written to .
ALPS/dmrg version 1.0.0 (2006/10/02)
Density Matrix Renormalization Group algorithm
for low-dimensional interacting systems.
available from http://alps.comp-phys.org/
copyright (c) 2006-2013 by Adrian E. Feiguin
for details see the publication:
A.F. Albuquerque et al., J. of Magn. and Magn. Materials 310, 1187 (2007).
using the ALPS parallelizing scheduler
copyright (c) 1994-2006 by Matthias Troyer <troyer@comp-phys.org>.
see Lecture Notes in Computer Science, Vol. 1505, p. 191 (1998).
based on the ALPS libraries version 2.1.1
available from http://alps.comp-phys.org/
copyright (c) 1994-2012 by the ALPS collaboration.
Consult the web page for license details.
For details see the publication:
B. Bauer et al., J. Stat. Mech. (2011) P05001.
parsing task files ...
ALPS DMRG temporary files will be written to /tmp
ALPS DMRG temporary files will be written to /tmp
Starting task 1.
Cannot evaluate expression Sy(i)"