Dear all,
right now I'm working on a LDA+DMFT code and want to use the Hybridization Impurity Solver from the ALPS package. I have two questions regarding the implementation of the Impurity solver and would be very glad if you could provide me with some guidiance:
My first question is, what is the best way to implement the impurity solver in a C++ code? What I've done so far is the following: I'm using the newest ALPS code version 2.1.1-r6176. By modifying the CMakeLists.txt files I compiled the code from the hybridization2 folder into a static library libhybridization_impl2.a which I planned to use. I included the impurity.h header file in my code and added the following Include- and Library-paths into my makefile:
-L$(ALPS_DIR)/alps/src/boost -lboost \ -L$(ALPS_DIR)/alps/src/alps -lalps \ -L$(ALPS_DIR)/alps/applications/dmft/qmc -lhybridization_impl2 \ -L$(HOME)/local/lib/hdf5 -lsz \ -L$(HOME)/GotoBLAS2/current -lgoto2 \ -L/usr/lib/openmpi/lib -lmpi -lmpi_cxx \ -L/opt/intel/Compiler/11.1/046/lib/intel64 -limf -lirc -lifcore -lsvml
-I$(ALPS_DIR)/alps/src \ -I$(ALPS_DIR)/alps/src/alps/ngs/lib \ -I$(ALPS_DIR)/alps/applications/dmft/qmc \ -I$(ALPS_DIR)/alps/applications/dmft/qmc/hybridization2 \ -I/usr/lib/openmpi/include
As a reference I used the main.C file in the hybridization2 folder. Therefore, calling the impurity solver looks like this:
int main(int argc, char *argv[]) { ... #ifdef USE_MPI boost::mpi::environment env(argc, argv); boost::mpi::communicator world; #endif
... //Do all initalization, generate intial Weiss-Field/Bath-GF //Enter DMFT loop while(!converged) { //Save Weiss-Field/Bath-GF into HDF5 file for the solver ...
alps::mcoptions options(argc, argv); if (options.valid) { alps::parameters_type<hybridization>::type parms(alps::hdf5::archive(options.input_file, "r")); alps::parallel<hybridization> s(parms, world);
if(options.time_limit!=0) throw std::invalid_argument("time limit is passed in the parameter file!"); if(!parms.defined("MAX_TIME")) throw std::runtime_error("parameter MAX_TIME is not defined. How long do you want to run the code for? (in seconds)");
s.run(boost::bind(&stop_callback, boost::posix_time::second_clock::local_time() + boost::posix_time::seconds((int)parms["MAX_TIME"])));
if (world.rank()==0) { alps::results_type<hybridization>::type results = collect_results(s); save_results(results, parms, options.output_file, "/simulation/results"); }
... //Read the results from the output file and convert //the Impurity GF from Legendre representation to //Matsubara representation. }
//Do remaining DMFT steps: //Get Selfenergy //Hilbert-Transformation //Get new bath GF //check convergence
} //end of DMFT loop
}
Everything seems to work quite well but I would also like to use the functions that print information about the percentage of work done and I want to feed and read my data directly in/to the impurity solver without writing them into a file. So the way I currently do it is far away from optimal. Can you give me a general advice on how you intended the impurity solver to be used in a C++ code?
Another problem that I have, but want to adress after I resolved my first question, is that the GF from the Impurity Solver is not decaying like 1/w_n but with some factor ~ 1/1.5w_n. I'm using the Legendre representation of the GF and transform it back for further use in the DMFT cycle. Do you know a possible reason for this? Is this simply caused by too few Sweeps or Legendre coefficients?
I'd greatly appreciate your help.
Sincerely, Steffen Backes
Hi Steffen:
right now I'm working on a LDA+DMFT code and want to use the Hybridization Impurity Solver from the ALPS package.
great! Welcome!
I have two questions regarding the implementation of the Impurity solver and would be very glad if you could provide me with some guidiance:
My first question is, what is the best way to implement the impurity solver in a C++ code? What I've done so far is the following: I'm using the newest ALPS code version 2.1.1-r6176.
The current ALPS version is alps-2.1.1-r6560-src, available as the 'nightly' build on the homepage and via anonymous svn. If you're thinking of developing a code I would strongly recommend working with the svn version.
The old hybridization code with which you were working has been completely rewritten; that rewrite is now part of ALPS instead of the old code. You can find a documentation of it in doc/hybdoc.pdf.
Another problem that I have, but want to adress after I resolved my first question, is that the GF from the Impurity Solver is not decaying like 1/w_n but with some factor ~ 1/1.5w_n. I'm using the Legendre representation of the GF and transform it back for further use in the DMFT cycle. Do you know a possible reason for this? Is this simply caused by too few Sweeps or Legendre coefficients?
Probably not enough Legendre coefficients or too much noise on the coefficients. The error propagation with Legendre coefficients is a bit tricky: the Fourier transform means that Matsubara coefficients are highly correlated. To make sure: simulate twice as long and see if anything changes.
Cheers, Emanuel
By the way, where is the svn repository for the 2.1 version? In the website, I just could find the repository for the 1.x release.
Mauricio
2012/12/17 Emanuel Gull emanuel.gull@gmail.com
Hi Steffen:
right now I'm working on a LDA+DMFT code and want to use the
Hybridization
Impurity Solver from the ALPS package.
great! Welcome!
I have two questions regarding the implementation of the Impurity solver and would be very glad if you could provide me with some guidiance:
My first question is, what is the best way to implement the impurity solver in a C++ code? What I've done so far is the following: I'm using the newest ALPS code version 2.1.1-r6176.
The current ALPS version is alps-2.1.1-r6560-src, available as the 'nightly' build on the homepage and via anonymous svn. If you're thinking of developing a code I would strongly recommend working with the svn version.
The old hybridization code with which you were working has been completely rewritten; that rewrite is now part of ALPS instead of the old code. You can find a documentation of it in doc/hybdoc.pdf.
Another problem that I have, but want to adress after I resolved my first question, is that the GF from the Impurity Solver is not decaying like 1/w_n but with some factor ~ 1/1.5w_n. I'm using the Legendre representation of the GF and transform it back for further use in the
DMFT
cycle. Do you know a possible reason for this? Is this simply caused by too few Sweeps or Legendre coefficients?
Probably not enough Legendre coefficients or too much noise on the coefficients. The error propagation with Legendre coefficients is a bit tricky: the Fourier transform means that Matsubara coefficients are highly correlated. To make sure: simulate twice as long and see if anything changes.
Cheers, Emanuel
Hi Mauricio,
the alps svn repository and access to it is described here:
http://alps.comp-phys.org/mediawiki/index.php/ALPS_subversion_for_dummies
The svn url is: https://alps.comp-phys.org/svn/alps1/trunk/alps You can also get some information from this page:
https://alps.comp-phys.org/trac/wiki
Emanuel
On Feb 13, 2013, at 1:31 PM, jmm wrote:
By the way, where is the svn repository for the 2.1 version? In the website, I just could find the repository for the 1.x release.
Mauricio
2012/12/17 Emanuel Gull emanuel.gull@gmail.com Hi Steffen:
right now I'm working on a LDA+DMFT code and want to use the Hybridization Impurity Solver from the ALPS package.
great! Welcome!
I have two questions regarding the implementation of the Impurity solver and would be very glad if you could provide me with some guidiance:
My first question is, what is the best way to implement the impurity solver in a C++ code? What I've done so far is the following: I'm using the newest ALPS code version 2.1.1-r6176.
The current ALPS version is alps-2.1.1-r6560-src, available as the 'nightly' build on the homepage and via anonymous svn. If you're thinking of developing a code I would strongly recommend working with the svn version.
The old hybridization code with which you were working has been completely rewritten; that rewrite is now part of ALPS instead of the old code. You can find a documentation of it in doc/hybdoc.pdf.
Another problem that I have, but want to adress after I resolved my first question, is that the GF from the Impurity Solver is not decaying like 1/w_n but with some factor ~ 1/1.5w_n. I'm using the Legendre representation of the GF and transform it back for further use in the DMFT cycle. Do you know a possible reason for this? Is this simply caused by too few Sweeps or Legendre coefficients?
Probably not enough Legendre coefficients or too much noise on the coefficients. The error propagation with Legendre coefficients is a bit tricky: the Fourier transform means that Matsubara coefficients are highly correlated. To make sure: simulate twice as long and see if anything changes.
Cheers, Emanuel
comp-phys-alps-users@lists.phys.ethz.ch