# NOTE: This documentation describes the old SVN version of `mp-dmrg`

. It needs to be updated for the git version of `mp-dmrg`

.

The `mp-dmrg`

program is intended for quick prototype calculations. For larger calculations, MpDmrgInitResume might be a better choice as it supports checkpoint-restart, automatic convergence criteria etc.

Matrix Product Toolkit version HEAD-0.7.4.0 (subversion tree rev 709:712)
Compiled on Jul 16 2007 at 21:23:57
usage: mp-dmrg [options]
Allowed options:
--help show this help message
-H [ --Hamiltonian ] arg operator to use for the Hamiltonian (wavefunction attribute "Hamiltonian")
-w [ --wavefunction ] arg wavefunction to apply DMRG (required)
-2 [ --two-site ] modify 2 neighboring sites at once (traditional DMRG)
-i [ --iter ] arg Number of Lanczos iterations per step [default 4]
-m [ --max-states ] arg Maximum number of states to keep [default 100000]
--min-states arg Minimum number of states to keep [default 50]
-r [ --trunc ] arg Truncation error cutoff [default 0]
-d [ --eigen-cutoff ] arg Cutoff threshold for density matrix eigenvalues (alternative to truncation error) [default -1]
-f [ --mix-factor ] arg Mixing coefficient for the density matrix [default 0.01]
-s [ --sweeps ] arg Number of half-sweeps to perform [default 2]
--orthogonal arg force the wavefunction to be orthogonal to this state

The only required option is `--wavefunction`

. This wavefunction is used as both input and output, so you should make a copy of it if you want to keep the original. Also, if you interrupt the calculation the wavefunction file will be corrupted, so it is always a good idea to have a backup of the wavefunction anyway.

In addition, you need to specify the Hamiltonian, either via the `--Hamiltonian`

option, or you can set the *Hamiltonian* attribute of the initial wavefunction (see MpAttr).

The number of states to keep is specified by a bound on the truncation error per sweep, supplied by the `min-trunc`

parameter. For this to be meaningful, the maximum number of states to keep (`max-states`

) needs to be set to some value that is very large; the only purpose of the `max-states`

in this scenario is to prevent the calculation from going haywire in the case that the truncation error is unreasonably small.

The program will try to keep at least `min-states`

states, and never more than `max-states`

, thus you can fix the number of states simply by ignoring the `min-trunc`

parameter (ie. using the default value of zero), and using the `max-states`

option.

The `mix-factor`

option uses the density matrix mixing scheme suggested by White (cond-mat/0508709), where only a single site is optimized at a time and instead a mixing term is added to the density matrix. For most cases, the default value seems to work fine. The traditional DMRG style of optimizing two sites at a time can be reproduced by the `two-site`

option, and setting the `mix-factor`

to zero. There isn't much reason to do this, however the truncation error might sometimes be more stable with the `two-site`

variation.

## Examples

To evolve the wavefunction `initial.psi`

towards the groundstate of the Hamiltonian operator supplied by the lattice file `spinchain.lattice`

, with at most 100 states kept, and 4 half-sweeps:

`mp-dmrg -H spinchain.lattice:H -w initial.psi -m 100 -s 4`

To do the same, but now with a bound on the truncation error per half-sweep of 1.0E-6:

`mp-dmrg -H spinchain.lattice:H -w initial.psi -m 10000 -t 1e-6 -s 4`

Assuming `groundstate.psi`

is an approximation of the groundstate, we can evolve a state towards the first excited state:

`mp-dmrg -H spinchain.lattice:H -w initial.psi --orthogonal groundstate.psi`