Dear ALPS developers, does ALPS ( and in particular the DMRG solver) support spin Hamiltonians with non-next interacting terms, e.g. Sz(i)Sz(i+3)? Many thanks.
Kindest regards.
Dear Emanuele,
That is no problem. You will need to add a bond of that distance to the unit cell, and can then assign a coupling to it.
Matthias
On Nov 26, 2012, at 5:30 AM, Emanuele Levi emanuele.levi@gmail.com wrote:
Dear ALPS developers, does ALPS ( and in particular the DMRG solver) support spin Hamiltonians with non-next interacting terms, e.g. Sz(i)Sz(i+3)? Many thanks.
Kindest regards.
-- Emanuele Levi
emanuele.levi@gmail.com
Dear ALPS developers, Thank you for your quick and very helpful reply. I might be doing something wrong as is the first time I define a lattice in ALPS by myself. I want to add to the Heisenberg Hamiltonian on a 1d spin chain the term
Sz(i)*Sz(i+2)
In the lattice file I set the basis as
<BASIS><VECTOR>1</VECTOR></BASIS>
and in the unit cell I put the two bonds
<EDGE type="0"><SOURCE vertex="1" offset="0"/><TARGET vertex="1" offset="1"/></EDGE> <EDGE type="1"><SOURCE vertex="1" offset="0"/><TARGET vertex="1" offset="2"/></EDGE>
which, as far I have understood connect respectively sites 1, and 2 lattice spacing far. Then in the model file I define the bond operators as
<BONDOPERATOR type="0" name="usual" source="x" target="y"> usual Heisenberg bond term... </BONDOPERATOR> <BONDOPERATOR type="1" name="test" source="x" target="y"> Sz(x)*Sz(y) </BONDOPERATOR>
and I put them in the Hamiltonian as
<BONDTERM type="0" source="i" target="j"> usual(i,j) </BONDTERM> <BONDTERM type="1" source="i" target="j"> Jtest*test(i,j) </BONDTERM>
But it gives me error. It creates the parameter file but doesn't manage to compute any simulations (fulldiag, dmrg, etc etc). I think is the way I have written it that has something wrong. Moreover I don't manage to use printgraph in any way to see if the lattice is correct. Do I have to use printgraph on the xml lattice file?
Many thanks in advance for your help. Kindest regards.
Hi,
can you send your complete set of input files as otherwise it is hard to help.
Matthias
On Nov 27, 2012, at 7:38 AM, Emanuele Levi emanuele.levi@gmail.com wrote:
Dear ALPS developers, Thank you for your quick and very helpful reply. I might be doing something wrong as is the first time I define a lattice in ALPS by myself. I want to add to the Heisenberg Hamiltonian on a 1d spin chain the term
Sz(i)*Sz(i+2)
In the lattice file I set the basis as
<BASIS><VECTOR>1</VECTOR></BASIS>
and in the unit cell I put the two bonds
<EDGE type="0"><SOURCE vertex="1" offset="0"/><TARGET vertex="1" offset="1"/></EDGE> <EDGE type="1"><SOURCE vertex="1" offset="0"/><TARGET vertex="1" offset="2"/></EDGE>
which, as far I have understood connect respectively sites 1, and 2 lattice spacing far. Then in the model file I define the bond operators as
<BONDOPERATOR type="0" name="usual" source="x" target="y"> usual Heisenberg bond term... </BONDOPERATOR> <BONDOPERATOR type="1" name="test" source="x" target="y"> Sz(x)*Sz(y) </BONDOPERATOR>
and I put them in the Hamiltonian as
<BONDTERM type="0" source="i" target="j"> usual(i,j) </BONDTERM> <BONDTERM type="1" source="i" target="j"> Jtest*test(i,j) </BONDTERM>
But it gives me error. It creates the parameter file but doesn't manage to compute any simulations (fulldiag, dmrg, etc etc). I think is the way I have written it that has something wrong. Moreover I don't manage to use printgraph in any way to see if the lattice is correct. Do I have to use printgraph on the xml lattice file?
Many thanks in advance for your help. Kindest regards.
-- Emanuele Levi
emanuele.levi@gmail.com
Dear Matthias, I attach to this mail the lattice and model files I am trying to use. test.py is then the python file which uses them.
Many thanks again. Regards.
On 27 November 2012 12:47, Matthias Troyer troyer@phys.ethz.ch wrote:
Hi,
can you send your complete set of input files as otherwise it is hard to help.
Matthias
On Nov 27, 2012, at 7:38 AM, Emanuele Levi emanuele.levi@gmail.com wrote:
Dear ALPS developers, Thank you for your quick and very helpful reply. I might be doing something wrong as is the first time I define a lattice in ALPS by myself. I want to add to the Heisenberg Hamiltonian on a 1d spin chain the term
Sz(i)*Sz(i+2)
In the lattice file I set the basis as
<BASIS><VECTOR>1</VECTOR></BASIS>
and in the unit cell I put the two bonds
<EDGE type="0"><SOURCE vertex="1" offset="0"/><TARGET vertex="1" offset="1"/></EDGE> <EDGE type="1"><SOURCE vertex="1" offset="0"/><TARGET vertex="1" offset="2"/></EDGE>
which, as far I have understood connect respectively sites 1, and 2 lattice spacing far. Then in the model file I define the bond operators as
<BONDOPERATOR type="0" name="usual" source="x" target="y"> usual Heisenberg bond term... </BONDOPERATOR> <BONDOPERATOR type="1" name="test" source="x" target="y"> Sz(x)*Sz(y) </BONDOPERATOR>
and I put them in the Hamiltonian as
<BONDTERM type="0" source="i" target="j"> usual(i,j) </BONDTERM> <BONDTERM type="1" source="i" target="j"> Jtest*test(i,j) </BONDTERM>
But it gives me error. It creates the parameter file but doesn't manage to compute any simulations (fulldiag, dmrg, etc etc). I think is the way I have written it that has something wrong. Moreover I don't manage to use printgraph in any way to see if the lattice is correct. Do I have to use printgraph on the xml lattice file?
Many thanks in advance for your help. Kindest regards.
-- Emanuele Levi
emanuele.levi@gmail.com
The problem is that wild cards (#) in variable names are allowed only for generic bond terms where you don't fix the type. IF you fix the type like you do then you have to explicitly write the coupling names, e.g. J0 and J2.
I have attached a modified model file that works.
Matthias
On Nov 27, 2012, at 8:51 AM, Emanuele Levi emanuele.levi@gmail.com wrote:
Dear Matthias, I attach to this mail the lattice and model files I am trying to use. test.py is then the python file which uses them.
Many thanks again. Regards.
On 27 November 2012 12:47, Matthias Troyer troyer@phys.ethz.ch wrote: Hi,
can you send your complete set of input files as otherwise it is hard to help.
Matthias
On Nov 27, 2012, at 7:38 AM, Emanuele Levi emanuele.levi@gmail.com wrote:
Dear ALPS developers, Thank you for your quick and very helpful reply. I might be doing something wrong as is the first time I define a lattice in ALPS by myself. I want to add to the Heisenberg Hamiltonian on a 1d spin chain the term
Sz(i)*Sz(i+2)
In the lattice file I set the basis as
<BASIS><VECTOR>1</VECTOR></BASIS>
and in the unit cell I put the two bonds
<EDGE type="0"><SOURCE vertex="1" offset="0"/><TARGET vertex="1" offset="1"/></EDGE> <EDGE type="1"><SOURCE vertex="1" offset="0"/><TARGET vertex="1" offset="2"/></EDGE>
which, as far I have understood connect respectively sites 1, and 2 lattice spacing far. Then in the model file I define the bond operators as
<BONDOPERATOR type="0" name="usual" source="x" target="y"> usual Heisenberg bond term... </BONDOPERATOR> <BONDOPERATOR type="1" name="test" source="x" target="y"> Sz(x)*Sz(y) </BONDOPERATOR>
and I put them in the Hamiltonian as
<BONDTERM type="0" source="i" target="j"> usual(i,j) </BONDTERM> <BONDTERM type="1" source="i" target="j"> Jtest*test(i,j) </BONDTERM>
But it gives me error. It creates the parameter file but doesn't manage to compute any simulations (fulldiag, dmrg, etc etc). I think is the way I have written it that has something wrong. Moreover I don't manage to use printgraph in any way to see if the lattice is correct. Do I have to use printgraph on the xml lattice file?
Many thanks in advance for your help. Kindest regards.
-- Emanuele Levi
emanuele.levi@gmail.com
-- Emanuele Levi
emanuele.levi@gmail.com
<lattice.xml><model.xml><test.py>
Dear Matthias, it works perfectly! You have been extremely kind.
Many thanks again. Kindest regards.
On 27 November 2012 14:03, Matthias Troyer troyer@phys.ethz.ch wrote:
The problem is that wild cards (#) in variable names are allowed only for generic bond terms where you don't fix the type. IF you fix the type like you do then you have to explicitly write the coupling names, e.g. J0 and J2.
I have attached a modified model file that works.
Matthias
On Nov 27, 2012, at 8:51 AM, Emanuele Levi emanuele.levi@gmail.com wrote:
Dear Matthias, I attach to this mail the lattice and model files I am trying to use. test.py is then the python file which uses them.
Many thanks again. Regards.
On 27 November 2012 12:47, Matthias Troyer troyer@phys.ethz.ch wrote:
Hi,
can you send your complete set of input files as otherwise it is hard to help.
Matthias
On Nov 27, 2012, at 7:38 AM, Emanuele Levi emanuele.levi@gmail.com wrote:
Dear ALPS developers, Thank you for your quick and very helpful reply. I might be doing something wrong as is the first time I define a lattice in ALPS by myself. I want to add to the Heisenberg Hamiltonian on a 1d spin chain the term
Sz(i)*Sz(i+2)
In the lattice file I set the basis as
<BASIS><VECTOR>1</VECTOR></BASIS>
and in the unit cell I put the two bonds
<EDGE type="0"><SOURCE vertex="1" offset="0"/><TARGET vertex="1" offset="1"/></EDGE> <EDGE type="1"><SOURCE vertex="1" offset="0"/><TARGET vertex="1" offset="2"/></EDGE>
which, as far I have understood connect respectively sites 1, and 2 lattice spacing far. Then in the model file I define the bond operators as
<BONDOPERATOR type="0" name="usual" source="x" target="y"> usual Heisenberg bond term... </BONDOPERATOR> <BONDOPERATOR type="1" name="test" source="x" target="y"> Sz(x)*Sz(y) </BONDOPERATOR>
and I put them in the Hamiltonian as
<BONDTERM type="0" source="i" target="j"> usual(i,j) </BONDTERM> <BONDTERM type="1" source="i" target="j"> Jtest*test(i,j) </BONDTERM>
But it gives me error. It creates the parameter file but doesn't manage to compute any simulations (fulldiag, dmrg, etc etc). I think is the way I have written it that has something wrong. Moreover I don't manage to use printgraph in any way to see if the lattice is correct. Do I have to use printgraph on the xml lattice file?
Many thanks in advance for your help. Kindest regards.
-- Emanuele Levi
emanuele.levi@gmail.com
-- Emanuele Levi
emanuele.levi@gmail.com
<lattice.xml><model.xml><test.py>
comp-phys-alps-users@lists.phys.ethz.ch