# # ALPS Project: Algorithms and Libraries for Physics Simulations # # ALPS Libraries # # Copyright (C) 2010 by Brigitte Surer # 2012-2013 by Jakub Imriska # # This software is part of the ALPS libraries, published under the ALPS # Library License; you can use, redistribute it and/or modify it under # the terms of the license, either version 1 or (at your option) any later # version. # # You should have received a copy of the ALPS Library License along with # the ALPS Libraries; see the file LICENSE.txt. If not, the license is also # available from http://alps.comp-phys.org/. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT # SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE # FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. # # **************************************************************************** import pyalps import numpy as np import matplotlib.pyplot as plt import pyalps.plot ## Please run the tutorial5a.py before this one listobs = ['0', '2'] # we look at convergence of a single flavor (=0) ## load all results data = pyalps.loadDMFTIterations(pyalps.getResultFiles(pattern='parm_u_*.h5'), measurements=listobs, verbose=True) ## create a figure for each BETA grouped = pyalps.groupSets(pyalps.flatten(data), ['U', 'observable']) for sim in grouped: common_props = pyalps.dict_intersect([ d.props for d in sim ]) ## rescale x-axis and set label for d in sim: d.x = d.x * d.props['BETA']/float(d.props['N']) d.y *= -1. d.props['label'] = 'it'+d.props['iteration'] ## plot all iterations for this BETA plt.figure() plt.xlabel(r'$\tau$') plt.ylabel(r'$-G_{flavor=%8s}(\tau)$' % common_props['observable']) plt.title('DMFT-05: Orbitally Selective Mott Transition on the Bethe lattice: ' + r'$U = %.4s$' % common_props['U']) pyalps.plot.plot(sim) plt.legend() plt.yscale("log") plt.show()