TABLE OF CONTENTS


ABINIT/m_CtqmcoffdiagInterface [ Modules ]

[ Top ] [ Modules ]

NAME

  m_CtqmcoffdiagInterface

FUNCTION

  Manage a ctqmc simulation. 
  friendly interface for the user

COPYRIGHT

  Copyright (C) 2013 ABINIT group (J. Bieder, B. Amadon, J. Denier)
  This file is distributed under the terms of the
  GNU General Public License, see ~abinit/COPYING
  or http://www.gnu.org/copyleft/gpl.txt .

NOTES

PARENTS

  Will be filled automatically by the parent script

CHILDREN

  Will be filled automatically by the parent script

SOURCE

29 #include "defs.h"
30 MODULE m_CtqmcoffdiagInterface
31 USE m_Ctqmcoffdiag
32 
33 IMPLICIT NONE

ABINIT/m_CtqmcoffdiagInterface/CtqmcoffdiagInterface_finalize [ Functions ]

[ Top ] [ Functions ]

NAME

  CtqmcoffdiagInterface_finalize

FUNCTION

  Destroy simulation

COPYRIGHT

  Copyright (C) 2013 ABINIT group (J. Bieder)
  This file is distributed under the terms of the
  GNU General Public License, see ~abinit/COPYING
  or http://www.gnu.org/copyleft/gpl.txt .

INPUTS

  op=ctqmcinterface

OUTPUT

SIDE EFFECTS

NOTES

PARENTS

  Will be filled automatically by the parent script

CHILDREN

  Will be filled automatically by the parent script

SOURCE

456 SUBROUTINE CtqmcoffdiagInterface_finalize(op)
457 
458 !Arguments ------------------------------------
459 
460 !This section has been created automatically by the script Abilint (TD).
461 !Do not modify the following lines by hand.
462 #undef ABI_FUNC
463 #define ABI_FUNC 'CtqmcoffdiagInterface_finalize'
464 !End of the abilint section
465 
466   TYPE(CtqmcoffdiagInterface), INTENT(INOUT) :: op
467 
468   !IF ( op%Hybrid%init .EQV. .TRUE. ) THEN
469 !    CALL Ctqmcoffdiag_printAll(op%Hybrid)
470          !write(6,*) "before ctqmc_destroy in Ctqmcoffdiaginterface_finalize"
471     CALL Ctqmcoffdiag_destroy(op%Hybrid)
472   !END IF
473 
474 END SUBROUTINE CtqmcoffdiagInterface_finalize

ABINIT/m_CtqmcoffdiagInterface/CtqmcoffdiagInterface_init [ Functions ]

[ Top ] [ Functions ]

NAME

  CtqmcoffdiagInterface_init

FUNCTION

  Initialize with permanent parameters

COPYRIGHT

  Copyright (C) 2013 ABINIT group (J. Bieder)
  This file is distributed under the terms of the
  GNU General Public License, see ~abinit/COPYING
  or http://www.gnu.org/copyleft/gpl.txt .

INPUTS

  op=ctqmcinterface
  iseed=seed for rng
  sweeps=number of sweeps for the run
  thermalization=number of sweeps to thermalize
  measurements=how often we measure (modulo)
  flavors=number of orbitals (spin degenerated)
  samples=imaginary time slices
  beta=inverse temperature
  U=interaction parameter
  ostream=where to write output
  MPI_COMM=mpi communicator for the run

OUTPUT

SIDE EFFECTS

NOTES

PARENTS

  Will be filled automatically by the parent script

CHILDREN

  Will be filled automatically by the parent script

SOURCE

108 SUBROUTINE CtqmcoffdiagInterface_init(op,iseed,sweeps,thermalization,&
109 &measurements,flavors,samples,beta,U,ostream,MPI_COMM,opt_nondiag)
110 
111 !Arguments ------------------------------------
112 
113 !This section has been created automatically by the script Abilint (TD).
114 !Do not modify the following lines by hand.
115 #undef ABI_FUNC
116 #define ABI_FUNC 'CtqmcoffdiagInterface_init'
117 !End of the abilint section
118 
119   TYPE(CtqmcoffdiagInterface), INTENT(INOUT) :: op
120   INTEGER, OPTIONAL, INTENT(IN) :: MPI_COMM
121   INTEGER, INTENT(IN) :: iseed
122   DOUBLE PRECISION, INTENT(IN) :: sweeps
123   INTEGER, INTENT(IN) :: thermalization
124   INTEGER, INTENT(IN) :: measurements
125   INTEGER, INTENT(IN) :: flavors
126   INTEGER, INTENT(IN) :: samples
127   !INTEGER, INTENT(IN) :: Wmax
128   INTEGER, INTENT(IN) :: ostream
129   INTEGER, INTENT(IN) :: opt_nondiag
130   DOUBLE PRECISION, INTENT(IN) :: beta
131   DOUBLE PRECISION, INTENT(IN) :: u
132   !DOUBLE PRECISION, INTENT(IN) :: mu
133 !Local arguements -----------------------------
134   INTEGER          :: ifstream
135   DOUBLE PRECISION, DIMENSION(1:10) :: buffer
136 
137   ifstream = 42
138 
139   buffer(1)=DBLE(iseed)
140   buffer(2)=sweeps
141   buffer(3)=DBLE(thermalization)
142   buffer(4)=DBLE(measurements)
143   buffer(5)=DBLE(flavors)
144   buffer(6)=DBLE(samples)
145   buffer(7)=beta
146   buffer(8)=U
147   buffer(9)=GREENHYB_TAU
148   buffer(10)=DBLE(opt_nondiag)
149   !buffer(9)=0.d0!mu
150   !buffer(9)=DBLE(Wmax)
151 
152   IF ( PRESENT( MPI_COMM ) ) THEN
153     CALL Ctqmcoffdiag_init(op%Hybrid, ostream, ifstream, .FALSE., MPI_COMM,buffer)
154   ELSE
155     CALL Ctqmcoffdiag_init(op%Hybrid, ostream, ifstream, .FALSE.,iBuffer=buffer)
156   END IF
157   op%opt_fk       = 0
158   op%opt_order    = 0
159   op%opt_movie    = 0
160   op%opt_analysis = 0
161   op%opt_check    = 0
162   op%opt_noise    = 0
163   op%opt_spectra  = 0
164 END SUBROUTINE CtqmcoffdiagInterface_init

ABINIT/m_CtqmcoffdiagInterface/CtqmcoffdiagInterface_run [ Functions ]

[ Top ] [ Functions ]

NAME

  CtqmcoffdiagInterface_run

FUNCTION

  run a ctqmc simu and get results

COPYRIGHT

  Copyright (C) 2013 ABINIT group (J. Bieder)
  This file is distributed under the terms of the
  GNU General Public License, see ~abinit/COPYING
  or http://www.gnu.org/copyleft/gpl.txt .

INPUTS

  op=ctqmcinterface
  G0omega=Gw0 (according to opt_Fk)
  matU=interaction matrice
  opt_sym=weight factors to symmetrise G
  opt_levels=energy for each level (with respect to fermi level)

OUTPUT

  Gtau=G(tau)
  Gw=fourier transform of Gtau
  D=full double occupancy
  E=Interaction energy
  Noise=Noise on E

SIDE EFFECTS

NOTES

PARENTS

  Will be filled automatically by the parent script

CHILDREN

  Will be filled automatically by the parent script

SOURCE

288 SUBROUTINE CtqmcoffdiagInterface_run(op,G0omega, Gtau, Gw, D,E,Noise,matU,Docc,opt_sym,opt_levels,hybri_limit) 
289 
290 !Arguments ------------------------------------
291 
292 !This section has been created automatically by the script Abilint (TD).
293 !Do not modify the following lines by hand.
294 #undef ABI_FUNC
295 #define ABI_FUNC 'CtqmcoffdiagInterface_run'
296 !End of the abilint section
297 
298   TYPE(CtqmcoffdiagInterface), INTENT(INOUT) :: op
299   COMPLEX(KIND=8)      , DIMENSION(:,:,:), INTENT(IN ) :: G0omega
300   DOUBLE PRECISION, DIMENSION(:,:,:), OPTIONAL, INTENT(OUT) :: Gtau
301   COMPLEX(KIND=8)      , DIMENSION(:,:,:), OPTIONAL, INTENT(INOUT) :: Gw
302   DOUBLE PRECISION, OPTIONAL      , INTENT(OUT) :: D
303   DOUBLE PRECISION, OPTIONAL      , INTENT(OUT) :: E
304   DOUBLE PRECISION, OPTIONAL      , INTENT(OUT) :: Noise
305   DOUBLE PRECISION, DIMENSION(:,:),OPTIONAL,  INTENT(IN ) :: matU
306   DOUBLE PRECISION, DIMENSION(:,:),OPTIONAL,  INTENT(OUT ) :: Docc
307   DOUBLE PRECISION, DIMENSION(:,:),OPTIONAL,  INTENT(IN ) :: opt_sym
308   DOUBLE PRECISION, DIMENSION(:),OPTIONAL,  INTENT(IN ) :: opt_levels
309   COMPLEX(KIND=8) , DIMENSION(:,:),OPTIONAL,  INTENT(IN ) :: hybri_limit
310 
311   CALL Ctqmcoffdiag_reset(op%Hybrid)
312 
313 !  ifstream = 42
314 !
315 !  OPEN(UNIT=ifstream, FILE="Gw.dat")
316 !  CALL Ctqmcoffdiag_setG0w(Hybrid, ifstream)
317 !  CLOSE(ifstream)
318 !  
319 
320   IF ( PRESENT(opt_levels)) &
321     CALL Ctqmcoffdiag_setMu(op%Hybrid, opt_levels)
322 
323   IF ( PRESENT(hybri_limit)) &
324     CALL Ctqmcoffdiag_sethybri_limit(op%Hybrid, hybri_limit)
325 
326   CALL Ctqmcoffdiag_setG0wTab(op%Hybrid, G0omega,op%opt_fk)
327 
328   IF ( PRESENT(matU) ) &
329     CALL Ctqmcoffdiag_setU(op%Hybrid, matU)
330 
331   CALL Ctqmcoffdiag_run(op%Hybrid,opt_order=op%opt_order, &
332                            opt_movie=op%opt_movie, &
333                            opt_analysis=op%opt_analysis, &
334                            opt_check=op%opt_check, &
335                            opt_noise=op%opt_noise, &
336                            opt_spectra=op%opt_spectra, &
337                            opt_gMove=op%opt_gMove)
338 
339  ! write(6,*) "op%Hybrid%stats",op%Hybrid%stats
340  ! write(6,*) "opt_gMove",op%opt_gMove
341 
342   CALL Ctqmcoffdiag_getResult(op%Hybrid)
343 
344   IF ( PRESENT(opt_sym) ) THEN
345     CALL Ctqmcoffdiag_symmetrizeGreen(op%Hybrid,opt_sym)
346   END IF
347 
348  ! write(6,*) "op%Hybrid%stats",op%Hybrid%stats
349 
350   IF ( PRESENT(Gtau) .AND. PRESENT(Gw) ) THEN
351     CALL Ctqmcoffdiag_getGreen(op%Hybrid, Gtau=Gtau, Gw=Gw)
352   !      write(6,*) "size",size(Gw,dim=1),size(gw,dim=2)
353   !      IF ( hybrid%rank .EQ. 0 ) write(389,*) Gw(:,hybrid%flavors+1)
354   !      call flush(389)
355   ELSE IF ( PRESENT(Gtau) .AND. .NOT. PRESENT(Gw) ) THEN
356     CALL Ctqmcoffdiag_getGreen(op%Hybrid, Gtau=Gtau)
357   ELSE IF ( .NOT. PRESENT(Gtau) .AND. PRESENT(Gw) ) THEN
358     CALL Ctqmcoffdiag_getGreen(op%Hybrid, Gw=Gw)
359   END IF
360 
361   !write(6,*) "op%Hybrid%stats",op%Hybrid%stats
362 
363   IF ( PRESENT(D) ) &
364   CALL Ctqmcoffdiag_getD(op%Hybrid, D)
365   Docc=op%Hybrid%measDE
366 
367   !write(6,*) "op%Hybrid%stats",op%Hybrid%stats
368 
369   IF ( PRESENT(E) .AND. PRESENT(Noise) ) &
370   CALL Ctqmcoffdiag_getE(op%Hybrid, E, Noise)
371 
372   CALL Ctqmcoffdiag_printAll(op%Hybrid)
373   !CALL Ctqmcoffdiag_printQMC(op%Hybrid)
374 
375 END SUBROUTINE CtqmcoffdiagInterface_run

ABINIT/m_CtqmcoffdiagInterface/CtqmcoffdiagInterface_setOpts [ Functions ]

[ Top ] [ Functions ]

NAME

  CtqmcoffdiagInterface_setOpts

FUNCTION

  Set and save options for many runs

COPYRIGHT

  Copyright (C) 2013 ABINIT group (J. Bieder)
  This file is distributed under the terms of the
  GNU General Public License, see ~abinit/COPYING
  or http://www.gnu.org/copyleft/gpl.txt .

INPUTS

  op=ctqmcinterface
  opt_Fk=0 if we give us Gw0 and 1 if 1/Gw0+iwn
  opt_order=maximal perturbation order to scope(>0)
  opt_movie=print a latex file (0 or 1)
  opt_analysis=measure correlations (0 or 1)
  opt_check=check fast calculation :0 nothing
                                    1 Impurity
                                    2 Bath
                                    3 Both
  opt_noise=calculate noise ofr green functions(0 ro 1)
  opt_spectra=fourier transform of time evolution of number of electrons
               (0 or 1)
  opt_gMove=number of global moves (>0)

OUTPUT

SIDE EFFECTS

NOTES

PARENTS

  Will be filled automatically by the parent script

CHILDREN

  Will be filled automatically by the parent script

SOURCE

209 SUBROUTINE CtqmcoffdiagInterface_setOpts(op,opt_Fk,opt_order,opt_movie,opt_analysis,opt_check, opt_noise, opt_spectra, opt_gMove) 
210 
211 !Arguments ------------------------------------
212 
213 !This section has been created automatically by the script Abilint (TD).
214 !Do not modify the following lines by hand.
215 #undef ABI_FUNC
216 #define ABI_FUNC 'CtqmcoffdiagInterface_setOpts'
217 !End of the abilint section
218 
219   TYPE(CtqmcoffdiagInterface), INTENT(INOUT) :: op
220   INTEGER , OPTIONAL  , INTENT(IN   ) :: opt_Fk
221   INTEGER , OPTIONAL  , INTENT(IN   ) :: opt_order
222   INTEGER , OPTIONAL  , INTENT(IN   ) :: opt_movie
223   INTEGER , OPTIONAL  , INTENT(IN   ) :: opt_analysis
224   INTEGER , OPTIONAL  , INTENT(IN   ) :: opt_check
225   INTEGER , OPTIONAL  , INTENT(IN   ) :: opt_noise
226   INTEGER , OPTIONAL  , INTENT(IN   ) :: opt_spectra
227   INTEGER , OPTIONAL  , INTENT(IN   ) :: opt_gMove
228 
229   IF ( PRESENT(opt_Fk) ) &
230     op%opt_Fk = opt_fk
231   IF ( PRESENT(opt_order) ) &
232     op%opt_order = opt_order
233   IF ( PRESENT(opt_analysis) ) &
234     op%opt_analysis = opt_analysis
235   IF ( PRESENT(opt_check) ) &
236     op%opt_check = opt_check
237   IF ( PRESENT(opt_movie) ) &
238     op%opt_movie = opt_movie
239   IF ( PRESENT(opt_noise) ) &
240     op%opt_noise = opt_noise
241   IF ( PRESENT(opt_spectra) ) &
242     op%opt_spectra = opt_spectra
243   IF ( PRESENT(opt_gMove) ) &
244     op%opt_gMove = opt_gMove
245 
246 END SUBROUTINE CtqmcoffdiagInterface_setOpts

ABINIT/m_CtqmcoffdiagInterface/CtqmcoffdiagInterface_setSweeps [ Functions ]

[ Top ] [ Functions ]

NAME

  CtqmcoffdiagInterface_setSweeps

FUNCTION

  change sweeps on the fly

COPYRIGHT

  Copyright (C) 2013 ABINIT group (J. Bieder)
  This file is distributed under the terms of the
  GNU General Public License, see ~abinit/COPYING
  or http://www.gnu.org/copyleft/gpl.txt .

INPUTS

  op=ctqmcinterface
  sweeps=new number of sweeps

OUTPUT

SIDE EFFECTS

NOTES

PARENTS

  Will be filled automatically by the parent script

CHILDREN

  Will be filled automatically by the parent script

SOURCE

409 SUBROUTINE CtqmcoffdiagInterface_setSweeps(op, sweeps)
410 
411 !Arguments ------------------------------------
412 
413 !This section has been created automatically by the script Abilint (TD).
414 !Do not modify the following lines by hand.
415 #undef ABI_FUNC
416 #define ABI_FUNC 'CtqmcoffdiagInterface_setSweeps'
417 !End of the abilint section
418 
419   TYPE(CtqmcoffdiagInterface), INTENT(INOUT) :: op
420   DOUBLE PRECISION, INTENT(IN) :: sweeps
421 
422   CALL Ctqmcoffdiag_setSweeps(op%Hybrid,sweeps)
423 END SUBROUTINE CtqmcoffdiagInterface_setSweeps

m_CtqmcoffdiagInterface/CtqmcoffdiagInterface [ Types ]

[ Top ] [ m_CtqmcoffdiagInterface ] [ Types ]

NAME

  CtqmcoffdiagInterface

FUNCTION

  This structured datatype contains the necessary data

COPYRIGHT

  Copyright (C) 2013 ABINIT group (J. Bieder)
  This file is distributed under the terms of the
  GNU General Public License, see ~abinit/COPYING
  or http://www.gnu.org/copyleft/gpl.txt .

SOURCE

52 TYPE CtqmcoffdiagInterface
53   TYPE(Ctqmcoffdiag) :: Hybrid
54   INTEGER :: opt_fk       = 0
55   INTEGER :: opt_order    = 0
56   INTEGER :: opt_movie    = 0
57   INTEGER :: opt_analysis = 0
58   INTEGER :: opt_check    = 0
59   INTEGER :: opt_spectra  = 0
60   INTEGER :: opt_noise    = 0
61   INTEGER :: opt_gMove    = 0
62 END TYPE CtqmcoffdiagInterface