previous_runs = 0 previous_present = False del ar MPI.barrier() previous_runs = MPI.bcast(previous_runs) previous_present = MPI.bcast(previous_present) # Init the SumK class SK=SumK_LDA(HDFfile=LDAFilename+'.h5',UseLDABlocs=False) Norb = SK.corr_shells[0][3] l = SK.corr_shells[0][2] # Init the Solver: S = Solver_HubbardI(Beta = Beta, Uint = Uint, JHund = JHund, l = l, Verbosity=2) S.Nmoments=10 if (previous_present): # load previous data: MPI.report("Using stored data for initialisation") if (MPI.IS_MASTER_NODE()): ar = HDF_Archive(HDFfilename,'a') S.Sigma <<= ar['SigmaF'] del ar S.Sigma = MPI.bcast(S.Sigma) SK.load() # DMFT loop: for Iteration_Number in range(1,Loops+1):
# terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # TRIQS. If not, see <http://www.gnu.org/licenses/>. # ################################################################################ from pytriqs.Base.Archive import * from pytriqs.Solvers.HubbardI.Solver_HubbardI import Solver_HubbardI import numpy S = Solver_HubbardI(Beta=200, Uint=6.0, JHund=0.6, l=2, UseSpinOrbit=False) eal = {} eal['up'] = -1 * numpy.identity(5) eal['down'] = -1 * numpy.identity(5) S.set_atomic_levels(eal=eal) S.Solve() ar = HDF_Archive('HubbardI.output.h5') ar['G'] = S.G ar['Sigma'] = S.Sigma del ar
MPI.barrier() previous_runs = MPI.bcast(previous_runs) previous_present = MPI.bcast(previous_present) # if previous runs are present, no need for recalculating the bloc structure # It has to be commented, if you run this script for the first time, starting # from a converted h5 archive. # Init the SumK class SK=SumK_LDA_tools(HDFfile=LDAFilename+'.h5',UseLDABlocs=False) if (MPI.IS_MASTER_NODE()): print 'DC after reading SK: ',SK.dc_imp[SK.invshellmap[0]] N = SK.corr_shells[0][3] l = SK.corr_shells[0][2] # Init the Solver: S = Solver_HubbardI(Beta = Beta, Uint = Uint, JHund = JHund, l = l) S.Nmoments=10 # set atomic levels: eal = SK.eff_atomic_levels()[0] S.set_atomic_levels( eal = eal ) S.GF_realomega(ommin=ommin, ommax = ommax, N_om=N_om) S.Sigma.save('S.Sigma') SK.put_Sigma(Sigmaimp = [S.Sigma]) SK.DOSpartial(broadening=broadening)
# Foundation, either version 3 of the License, or (at your option) any later # version. # # TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # TRIQS. If not, see <http://www.gnu.org/licenses/>. # ################################################################################ from pytriqs.Base.Archive import * from pytriqs.Solvers.HubbardI.Solver_HubbardI import Solver_HubbardI import numpy S = Solver_HubbardI(Beta = 200, Uint = 6.0, JHund=0.6, l=2, UseSpinOrbit=False) eal={} eal['up'] = -1*numpy.identity(5) eal['down'] = -1*numpy.identity(5) S.set_atomic_levels(eal=eal) S.Solve() ar=HDF_Archive('HubbardI.output.h5') ar['G'] = S.G ar['Sigma'] = S.Sigma del ar
previous_runs = 0 previous_present = False del ar MPI.barrier() previous_runs = MPI.bcast(previous_runs) previous_present = MPI.bcast(previous_present) # Init the SumK class SK = SumK_LDA(HDFfile=LDAFilename + '.h5', UseLDABlocs=False) Norb = SK.corr_shells[0][3] l = SK.corr_shells[0][2] # Init the Solver: S = Solver_HubbardI(Beta=Beta, Uint=Uint, JHund=JHund, l=l, Verbosity=2) S.Nmoments = 10 if (previous_present): # load previous data: MPI.report("Using stored data for initialisation") if (MPI.IS_MASTER_NODE()): ar = HDF_Archive(HDFfilename, 'a') S.Sigma <<= ar['SigmaF'] del ar S.Sigma = MPI.bcast(S.Sigma) SK.load() # DMFT loop: for Iteration_Number in range(1, Loops + 1):