TABLE OF CONTENTS


ABINIT/m_CtqmcInterface [ Modules ]

[ Top ] [ Modules ]

NAME

  m_CtqmcInterface

FUNCTION

  Manage a ctqmc simulation. 
  friendly interface for the user

COPYRIGHT

  Copyright (C) 2013-2018 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 .

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_CtqmcInterface
31 USE m_Ctqmc
32 
33 IMPLICIT NONE

ABINIT/m_CtqmcInterface/CtqmcInterface_finalize [ Functions ]

[ Top ] [ Functions ]

NAME

  CtqmcInterface_finalize

FUNCTION

  Destroy simulation

COPYRIGHT

  Copyright (C) 2013-2018 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

  this=ctqmcinterface

OUTPUT

SIDE EFFECTS

NOTES

PARENTS

  Will be filled automatically by the parent script

CHILDREN

  Will be filled automatically by the parent script

SOURCE

454 SUBROUTINE CtqmcInterface_finalize(this)
455 
456 !Arguments ------------------------------------
457 
458 !This section has been created automatically by the script Abilint (TD).
459 !Do not modify the following lines by hand.
460 #undef ABI_FUNC
461 #define ABI_FUNC 'CtqmcInterface_finalize'
462 !End of the abilint section
463 
464   TYPE(CtqmcInterface), INTENT(INOUT) :: this
465 
466   !IF ( this%Hybrid%init .EQV. .TRUE. ) THEN
467 !    CALL Ctqmc_printAll(this%Hybrid)
468     CALL Ctqmc_destroy(this%Hybrid)
469   !END IF
470 
471 END SUBROUTINE CtqmcInterface_finalize

ABINIT/m_CtqmcInterface/CtqmcInterface_init [ Functions ]

[ Top ] [ Functions ]

NAME

  CtqmcInterface_init

FUNCTION

  Initialize with permanent parameters

COPYRIGHT

  Copyright (C) 2013-2018 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

  this=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

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

ABINIT/m_CtqmcInterface/CtqmcInterface_run [ Functions ]

[ Top ] [ Functions ]

NAME

  CtqmcInterface_run

FUNCTION

  run a ctqmc simu and get results

COPYRIGHT

  Copyright (C) 2013-2018 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

  this=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

295 SUBROUTINE CtqmcInterface_run(this,G0omega, Gtau, Gw, D,E,Noise,matU,opt_sym,opt_levels) 
296 
297 !Arguments ------------------------------------
298 
299 !This section has been created automatically by the script Abilint (TD).
300 !Do not modify the following lines by hand.
301 #undef ABI_FUNC
302 #define ABI_FUNC 'CtqmcInterface_run'
303 !End of the abilint section
304 
305   TYPE(CtqmcInterface), INTENT(INOUT) :: this
306   COMPLEX(KIND=8) , DIMENSION(:,:)          , INTENT(IN   ) :: G0omega
307   DOUBLE PRECISION, DIMENSION(:,:), OPTIONAL, INTENT(  OUT) :: Gtau
308   COMPLEX(KIND=8) , DIMENSION(:,:), OPTIONAL, INTENT(INOUT) :: Gw
309   DOUBLE PRECISION, DIMENSION(:,:), OPTIONAL, INTENT(  OUT) :: D
310   DOUBLE PRECISION                , OPTIONAL, INTENT(  OUT) :: E
311   DOUBLE PRECISION                , OPTIONAL, INTENT(  OUT) :: Noise
312   DOUBLE PRECISION, DIMENSION(:,:), OPTIONAL, INTENT(IN   ) :: matU
313   DOUBLE PRECISION, DIMENSION(:,:), OPTIONAL, INTENT(IN   ) :: opt_sym
314   DOUBLE PRECISION, DIMENSION(:  ), OPTIONAL, INTENT(IN   ) :: opt_levels
315 
316   CALL Ctqmc_reset(this%Hybrid)
317 
318 !  ifstream = 42
319 !
320 !  OPEN(UNIT=ifstream, FILE="Gw.dat")
321 !  CALL Ctqmc_setG0w(Hybrid, ifstream)
322 !  CLOSE(ifstream)
323 !  
324 
325   IF ( PRESENT(opt_levels) ) &
326     CALL Ctqmc_setMu(this%Hybrid, opt_levels)
327 
328   CALL Ctqmc_setG0wTab(this%Hybrid, G0omega,this%opt_fk)
329 
330   IF ( PRESENT(matU) ) &
331     CALL Ctqmc_setU(this%Hybrid, matU)
332 
333   CALL Ctqmc_run(this%Hybrid,opt_order=this%opt_order, &
334                            opt_movie=this%opt_movie, &
335                            opt_analysis=this%opt_analysis, &
336                            opt_check=this%opt_check, &
337                            opt_noise=this%opt_noise, &
338                            opt_spectra=this%opt_spectra, &
339                            opt_gMove=this%opt_gMove)
340 
341   CALL Ctqmc_getResult(this%Hybrid)
342 
343   IF ( PRESENT(opt_sym) ) THEN
344     CALL Ctqmc_symmetrizeGreen(this%Hybrid,opt_sym)
345   END IF
346 
347   IF ( PRESENT(Gtau) .AND. PRESENT(Gw) ) THEN
348     CALL Ctqmc_getGreen(this%Hybrid, Gtau=Gtau, Gw=Gw)
349   !      write(6,*) "size",size(Gw,dim=1),size(gw,dim=2)
350   !      IF ( hybrid%rank .EQ. 0 ) write(389,*) Gw(:,hybrid%flavors+1)
351   !      call flush(389)
352   ELSE IF ( PRESENT(Gtau) .AND. .NOT. PRESENT(Gw) ) THEN
353     CALL Ctqmc_getGreen(this%Hybrid, Gtau=Gtau)
354   ELSE IF ( .NOT. PRESENT(Gtau) .AND. PRESENT(Gw) ) THEN
355     CALL Ctqmc_getGreen(this%Hybrid, Gw=Gw)
356   END IF
357 
358   IF ( PRESENT(D) ) &
359   CALL Ctqmc_getD(this%Hybrid, D)
360 
361   IF ( PRESENT(E) .AND. PRESENT(Noise) ) THEN
362     CALL Ctqmc_getE(this%Hybrid, E=E, Noise=Noise)
363   ELSE IF ( PRESENT(E) .AND. .NOT. PRESENT(Noise) ) THEN
364     CALL Ctqmc_getE(this%Hybrid, E=E)
365   ELSE IF ( .NOT. PRESENT(E) .AND. PRESENT(Noise) ) THEN
366     CALL Ctqmc_getE(this%Hybrid, Noise=noise)
367   END IF
368 
369 
370   CALL Ctqmc_printAll(this%Hybrid)
371   !CALL Ctqmc_printQMC(this%Hybrid)
372 
373 END SUBROUTINE CtqmcInterface_run

ABINIT/m_CtqmcInterface/CtqmcInterface_setOpts [ Functions ]

[ Top ] [ Functions ]

NAME

  CtqmcInterface_setOpts

FUNCTION

  Set and save options for many runs

COPYRIGHT

  Copyright (C) 2013-2018 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

  this=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

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

ABINIT/m_CtqmcInterface/CtqmcInterface_setSweeps [ Functions ]

[ Top ] [ Functions ]

NAME

  CtqmcInterface_setSweeps

FUNCTION

  change sweeps on the fly

COPYRIGHT

  Copyright (C) 2013-2018 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

  this=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

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

m_CtqmcInterface/CtqmcInterface [ Types ]

[ Top ] [ m_CtqmcInterface ] [ Types ]

NAME

  CtqmcInterface

FUNCTION

  This structured datatype contains the necessary data

COPYRIGHT

  Copyright (C) 2013-2018 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

54 TYPE, PUBLIC :: CtqmcInterface
55   TYPE(Ctqmc)         :: Hybrid
56   INTEGER _PRIVATE :: opt_fk       = 0
57   INTEGER _PRIVATE :: opt_order    = 0
58   INTEGER _PRIVATE :: opt_movie    = 0
59   INTEGER _PRIVATE :: opt_analysis = 0
60   INTEGER _PRIVATE :: opt_check    = 0
61   INTEGER _PRIVATE :: opt_spectra  = 0
62   INTEGER _PRIVATE :: opt_noise    = 0
63   INTEGER _PRIVATE :: opt_gMove    = 0
64 END TYPE CtqmcInterface