~jose-soler/siesta/unfolding

« back to all changes in this revision

Viewing changes to Util/TBTrans/fdf/sample.f

TS manual and updates. Building rationalization. Hsparse speedup

* Added TranSIESTA sections to the manual (Docs/siesta.tex) (by
  J.A. Torres).

* TranSIESTA and TBTrans updates (by F.D. Novaes):

- Reimplementation of getGF_Tri, that obtains the Green's Function
 using the fact that the Hamiltonian is tridiagonal.

- Fixed the generation of listudg in the transiesta routine
 (m_ts_in_siesta.F).  Now, when the TS.UpdateDMCR is set to
 .false. the cross terms between the electrodes and the contact region
 of the density matrix are also updated in the TS iteration
 process. If set to .true., only the elements of the contact region
 are changed during the self consistent cycle.

- In weightDM and weightDMC (m_ts_scattering.F), changed the weights
 of the cross terms elements, since when using Tri_Diag the
 non-equilibrium contributions are zero the way it used to be.

- In new_dm.F, added a condition that does not sets the energy-density
 matrix to zero in the first iteration of the SCF cycle.

- (with A. Garcia) New building scheme for TBTrans.

* Building rationalization (by A. Garcia):

- Move auxiliary programs from Src to individual directories in Util

 -- gen-basis and ioncat now live in Util/Gen-basis
 -- mixps and fractional have been moved to Util/VCA
 -- The programs to test the MPI installation are now in Util/MPI_test

- Update building mechanisms in Util/STM

(Some of the above building improvements use new functionality in
the fdf and MPI makefiles that allows these modules to be compiled in
"private subdirectories" anywhere: see Denchar and TBTrans for examples.)

* Hsparse has been dramatically speeded-up by removing a superfluous
  inner loop (by A. Garcia).

* Other updates to the manual by A. Garcia
 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
      program sample
2
 
c
3
 
c     Shows fdf capabilities..
4
 
c
5
 
 
6
 
      implicit none
7
 
      integer  maxa
8
 
      parameter ( maxa = 100 )
9
 
 
10
 
      character         fname*20, symbol(maxa)*2
11
 
      integer           i, ia, isa(maxa), na, na_default, iblk
12
 
      real              wmix
13
 
      double precision  factor, xa(3,maxa), cutoff, phonon_energy
14
 
 
15
 
      logical doit, debug
16
 
 
17
 
      include 'fdfdefs.h'
18
 
c
19
 
      call fdf_init('sample.fdf','sample.out')
20
 
 
21
 
      if (fdf_defined('new-style')) write(6,*) 'New-style stuff'
22
 
 
23
 
      na_default = 0
24
 
      na = fdf_integer('NumberOfAtoms', na_default )
25
 
      write(6,*) 'examples: na =', na
26
 
 
27
 
      fname = fdf_string('NameOfFile','calimero')
28
 
      write(6,*) fname
29
 
 
30
 
      cutoff = fdf_physical('MeshCutoff',8.d0,'Ry')
31
 
      write(6,*) cutoff
32
 
 
33
 
      phonon_energy = fdf_physical('phonon-energy',0.01d0,'eV')
34
 
      write(6,*) phonon_energy
35
 
 
36
 
      i = fdf_integer('SomeInt',34)
37
 
      write(6,*) i
38
 
 
39
 
      wmix = fdf_single('WmixValue',0.55)
40
 
      write(6,*) wmix
41
 
 
42
 
      factor = fdf_double('FactorValue',1.d-10)
43
 
      write(6,*) factor
44
 
 
45
 
      debug = fdf_boolean('Debug',.true.)
46
 
      write(6,*) debug
47
 
 
48
 
      doit = fdf_boolean('DoIt',.false.)
49
 
      write(6,*) doit
50
 
      
51
 
      if (fdf_block('AtomicCoordinatesAndAtomicSpecies',iblk)) then
52
 
        do ia = 1,na
53
 
          read(iblk,*) (xa(i,ia),i=1,3), isa(ia)
54
 
        enddo
55
 
      endif
56
 
      
57
 
      if (fdf_block('AtomicSymbolsAndAtomicCoordinates',iblk)) then
58
 
         do ia = 1,na
59
 
          read(iblk,*) symbol(ia), (xa(i,ia),i=1,3)
60
 
        enddo
61
 
      endif
62
 
 
63
 
      do ia = 1,na
64
 
         write(6,*) (xa(i,ia),i=1,3)
65
 
      enddo
66
 
 
67
 
      if (fdf_block('AtomicInfo',iblk)) then
68
 
        do ia = 1,na
69
 
          read(iblk,*) (xa(i,ia),i=1,3)
70
 
        enddo
71
 
      endif
72
 
 
73
 
      do ia = 1,na
74
 
         write(6,*) (xa(i,ia),i=1,3)
75
 
      enddo
76
 
 
77
 
      end
78
 
 
79
 
 
80
 
 
81
 
 
82
 
 
83