21
21
use precision, only : dp, grid_p
22
use parallel, only : IOnode, Nodes, ParallelOverK
22
use parallel, only : IOnode, Nodes
24
24
use files, only : slabel
25
25
use files, only : filesOut_t ! derived type for output file names
27
27
use units, only : eV, Ang, Kelvin
28
use diagmemory, only: memoryfactor
30
29
use m_target_stress, only: set_target_stress
31
use m_spin, only: print_spin
30
use m_spin, only: print_spin_options
33
32
use m_charge_add, only : read_charge_add
34
33
use m_hartree_add, only : read_hartree_add
37
36
use m_mixing_scf, only: mixers_scf_print, mixers_scf_print_block
39
38
use m_cite, only: add_citation
40
use m_chess, only: set_CheSS_parameter
42
44
!----------------------------------------------------------- Input Variables
43
45
! integer na : Number of atoms
44
46
! integer ns : Number of species
45
47
! integer nspin : Number of spin-components
46
! 1=non-polarized, 2=polarized, 4=non-collinear
48
! 1=non-polarized, 2=polarized, 4=non-collinear,
48
51
integer, intent(in) :: na, ns, nspin
50
53
! This routine sets variables in the 'siesta_options' module
56
real(dp) :: chess_value
52
58
! The following are comment lines that should be merged into 'siesta_options'.
54
60
! real*8 charnet : Net charge (in units of |e|)
718
733
call write_debug( ' Solution Method: ' // method )
722
call cmlAddParameter( xf=mainXML, name='Diag.DivideAndConquer', &
723
value=DaC, dictRef='siesta:DaC' )
726
! Memory scaling factor for rdiag/cdiag - cannot be less than 1.0
727
MemoryFactor = fdf_get('Diag.Memory', 1.0_dp )
728
MemoryFactor = max(MemoryFactor,1.0_dp)
730
call cmlAddParameter( xf=mainXML, name='Diag.Memory', &
731
value=MemoryFactor, &
732
dictRef='siesta:MemoryFactor', &
733
units="cmlUnits:dimensionless" )
737
! Buffer for the density kernel within the CheSS calculation
738
chess_value = fdf_get('CheSS.Buffer.Kernel', 4.0_dp, 'Bohr')
739
call set_CheSS_parameter('chess_buffer_kernel', chess_value)
740
if (ionode) write(6,7), &
741
'redata: CheSS.Buffer.Kernel',chess_value
743
! Buffer for the matrix vector multiplication within the CheSS calculation
744
chess_value = fdf_get('CheSS.Buffer.Mult', 6.0_dp, 'Bohr')
745
call set_CheSS_parameter('chess_buffer_mult', chess_value)
746
if (ionode) write(6,7), &
747
'redata: CheSS.Buffer.Mult',chess_value
749
! Parameters for the penalty function used to determine the eigenvalue bounds
750
chess_value = fdf_get('CheSS.Betax', -1000.0_dp)
751
call set_CheSS_parameter('chess_betax', chess_value)
752
if (ionode) write(6,7), &
753
'redata: CheSS.Betax',chess_value
755
! Initial guess for the error function decay length
756
chess_value = fdf_get('CheSS.Fscale', 1.e-1_dp, 'Ry')
757
call set_CheSS_parameter('chess_fscale', chess_value)
758
if (ionode) write(6,7), &
759
'redata: CheSS.Fscale',chess_value
761
! Lower bound for the error function decay length
762
chess_value = fdf_get('CheSS.FscaleLowerbound', 1.e-2_dp, 'Ry')
763
call set_CheSS_parameter('chess_fscale_lowerbound', chess_value)
764
if (ionode) write(6,7), &
765
'redata: CheSS.FscaleLowerbound',chess_value
767
! Upper bound for the error function decay length
768
chess_value = fdf_get('CheSS.FscaleUpperbound', 1.e-1_dp, 'Ry')
769
call set_CheSS_parameter('chess_fscale_upperbound', chess_value)
770
if (ionode) write(6,7), &
771
'redata: CheSS.FscaleUpperbound',chess_value
773
! Initial guess for the lowest eigenvalue bound of the Hamiltonian
774
chess_value = fdf_get('CheSS.evlowH', -2.0_dp, 'Ry')
775
call set_CheSS_parameter('chess_evlow_h', chess_value)
776
if (ionode) write(6,7), &
777
'redata: CheSS.evlowH',chess_value
779
! Initial guess for the highest eigenvalue bound of the Hamiltonian
780
chess_value = fdf_get('CheSS.evhighH', 2.0_dp, 'Ry')
781
call set_CheSS_parameter('chess_evhigh_h', chess_value)
782
if (ionode) write(6,7), &
783
'redata: CheSS.evhighH',chess_value
785
! Initial guess for the lowest eigenvalue bound of the overlap matrix
786
chess_value = fdf_get('CheSS.evlowS', 0.5_dp)
787
call set_CheSS_parameter('chess_evlow_s', chess_value)
788
if (ionode) write(6,7), &
789
'redata: CheSS.evlowS',chess_value
791
! Initial guess for the highest eigenvalue bound of the overlap matrix
792
chess_value = fdf_get('CheSS.evhighS', 1.5_dp)
793
call set_CheSS_parameter('chess_evhigh_s', chess_value)
794
if (ionode) write(6,7), &
795
'redata: CheSS.evhighS',chess_value
736
799
! Electronic temperature for Fermi Smearing ...
737
800
temp = fdf_get('ElectronicTemperature',1.9e-3_dp,'Ry')