~aakhtar/siesta/spglib-inclusion

« back to all changes in this revision

Viewing changes to Src/dhscf.F

  • Committer: Alberto Garcia
  • Date: 2016-06-23 10:02:59 UTC
  • mto: (462.26.1 4.1-ag)
  • mto: This revision was merged to the branch mainline in revision 469.
  • Revision ID: albertog@icmab.es-20160623100259-mewju7fsd2toyp1r
Tags: 4.0-release, v4.0
Release of siesta-4.0

* Update Docs/release_notes.4.0

* Update list of contributors.

* Add some more documentation and comments, and clarify notes in
  output for the recet electric-field/slab-dipole-correction fix.

* Remove Util/pseudo-xml

* Other minor changes in README files


  
                

        

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
 
38
38
      real(grid_p),   pointer :: rhopcc(:), rhoatm(:), Vna(:)
39
39
      real(dp)                :: Uharrs     ! Harris energy
40
 
      logical                 :: IsDiag, IsEfld, spiral
 
40
      logical                 :: IsDiag, spiral
41
41
      character(len=10)       :: shape
42
42
      integer                 :: nml(3), ntml(3), npcc,
43
43
     &                           nmpl, ntpl
635
635
C integer ip            : Point index
636
636
C integer is            : Species index
637
637
C logical IsDiag        : Is supercell diagonal?
638
 
C logical IsEfld        : Is there an external electric field?
639
638
C integer ispin         : Spin index
640
639
C integer j             : General-purpose index
641
640
#ifndef BSC_CELLXC
1071
1070
     $              'Electric field for dipole correction =',
1072
1071
     $              field, ' Ry/Bohr/e'
1073
1072
            end if
1074
 
            ! The dipole correction (internal electric field)
1075
 
            ! energy is half the 
1076
 
            ! external energy (thus this separation)
 
1073
            ! The dipole correction energy has an extra factor
 
1074
            ! of one half because the field involved is internal.
 
1075
            ! See the paper by Bengtsson DOI:10.1103/PhysRevB.59.12301
 
1076
            ! Hence we compute this part separately
1077
1077
            DUext = -0.5_dp * ddot(3,field,1,dipol,1)
1078
1078
         else
1079
1079
            field = 0._dp