OK. Here's my python script: ---------------------------------------- import pyalps parms = [ { 'LATTICE' : "2 band sublattice open chain lattice", 'MODEL' : "boson Hubbard", 'CONSERVED_QUANTUMNUMBERS' : 'N', 'T' : 0, 't0' : 5, 't1' : 1, 'SWEEPS' : 30, 'NUMBER_EIGENVALUES' : 1, 'L' : 4, 'Nmax' : 1, 'MAXSTATES' : 300, 'N_total' : 2, 'MEASURE_LOCAL[n]' : 'n' } ] input_file = pyalps.writeInputFiles('ssh',parms) res = pyalps.runApplication('dmrg',input_file,writexml=True) ----------------------------------------- p.s. Since t' is a string literal, I changed it to t1. And I made the same change in my Model XML File. So it doesn't matter. (I used the command line until you taught me to check the lattice. And t' is supported in the command line tool. Now I can run the simulations using python.) Is there anything wrong in the python script?
Thanks,
Yulian
Hi Yulian,
The bug comes from your python script. If you use your custom LATTICE and MODEL libraries, the paths of the XML library files need to be given as the parameter (use 'LATTICE_LIBRARY' and 'MODEL_LIBRARY'). The python script is shown here: ------------------------------------------ import pyalps parms = [ { 'LATTICE' : "2 band sublattice open chain lattice", # 'LATTICE' : "open chain lattice", 'LATTICE_LIBRARY': './lattices.xml', 'MODEL' : "boson Hubbard", 'MODEL_LIBRARY': './models.xml', 'CONSERVED_QUANTUMNUMBERS' : 'N', 'T' : 0, 't0' : 5, 't1' : 1, 'SWEEPS' : 30, 'NUMBER_EIGENVALUES' : 1, 'L' : 4, 'Nmax' : 1, 'MAXSTATES' : 300, 'N_total' : 2, 'MEASURE_LOCAL[n]' : 'n' } ] input_file = pyalps.writeInputFiles('ssh',parms) res = pyalps.runApplication('dmrg',input_file,writexml=True) ------------------------------------------ Here I have assumed that the lattice lib is at './lattices.xml' and the model lib is at './models.xml'. Now, a different results are obtained using two kinds of lattices.
I also have some suggestions here: 1. The model name "boson Hubbard" is not suggested, because a model with the same name is already defined in the default model library. If you do not set the "MODEL_LIBRARY" parameter, the ALPS will search the "MODEL" in the default (like in your original python script) model library. So the default "boson Hubbard" model has been used in your python script, not your custom "boson Hubbard" model. 2. Use ALPS MPS library to do DMRG simulation. For more detail, see https://arxiv.org/abs/1407.0872 .
Best, RY
________________________________ From: Comp-phys-alps-users comp-phys-alps-users-bounces@lists.phys.ethz.ch on behalf of yulian chen cyl119zj@gmail.com Sent: Monday, October 22, 2018 20:21 To: comp-phys-alps-users@lists.phys.ethz.ch Subject: Re: [ALPS-users] parameter t' does not seem to work
OK. Here's my python script: ---------------------------------------- import pyalps parms = [ { 'LATTICE' : "2 band sublattice open chain lattice", 'MODEL' : "boson Hubbard", 'CONSERVED_QUANTUMNUMBERS' : 'N', 'T' : 0, 't0' : 5, 't1' : 1, 'SWEEPS' : 30, 'NUMBER_EIGENVALUES' : 1, 'L' : 4, 'Nmax' : 1, 'MAXSTATES' : 300, 'N_total' : 2, 'MEASURE_LOCAL[n]' : 'n' } ] input_file = pyalps.writeInputFiles('ssh',parms) res = pyalps.runApplication('dmrg',input_file,writexml=True) ----------------------------------------- p.s. Since t' is a string literal, I changed it to t1. And I made the same change in my Model XML File. So it doesn't matter. (I used the command line until you taught me to check the lattice. And t' is supported in the command line tool. Now I can run the simulations using python.) Is there anything wrong in the python script?
Thanks,
Yulian
comp-phys-alps-users@lists.phys.ethz.ch