diff --git a/source/KKRnano/source/datastructures/InputParamsNew.txt b/source/KKRnano/source/datastructures/InputParamsNew.txt index 6726ca822405e5ab93dbbf4839a4f0f3feca2440..4f4edb2cecbef3fb0c76f2cc022539d129ddfeda 100644 --- a/source/KKRnano/source/datastructures/InputParamsNew.txt +++ b/source/KKRnano/source/datastructures/InputParamsNew.txt @@ -124,3 +124,23 @@ d r_log 0.1D0 d a_log 0.025D0 ### unknown l enable_quad_prec .FALSE. +### [bfields] external magnetic field, non-collinear magnetic field (called lbfield in KKRhost code) +l noncobfield .FALSE. +### [bfields] constraining fields, non-collinear magnetic field (called lbfield_constr in KKRhost code) +l constr_field .FALSE. +### [bfields] apply same field to all atoms (True) or individual fields to each atom (called lbfield_all in KKRhost code) +l same_bfield .FALSE. +### [bfields] apply only transversal bfield (called lbfield_trans in KKRhost code) +l trans_bfield .FALSE. +### [bfields] apply magnetic field only in the muffin-tin (called lbfield_mt in KKRhost code) +l mt_bfield .FALSE. +### [bfields] calculate magnetic torque (called ltorque in KKRhost code) +l torque .FALSE. +### [bfields] spin (0), orbital (1), spin+orbial (2) fields (called ibfield in KKRhost code) +i ibfield 0 +### [bfields] type of contraint (0 = torque, 1 = magnetic moment) (called ibfield_constr in KKRhost code) +i iconstr 0 +### [bfields] start magnetic field at iteration itscf0 (called ibfield_itscf0 in KKRhost code) +i itbfield0 0 +### [bfields] stop applying magnetic field after iteration itscf1 (called ibfield_itscf1 in KKRhost code) +i itbfield1 10000 diff --git a/source/KKRnano/source/datastructures/InputParams_mod.F90 b/source/KKRnano/source/datastructures/InputParams_mod.F90 index dfbfc46029f29565b0a3b6d4db51e5af5037b7c0..73ebc527a28768c8bd95886b30f8f8af5d06ce50 100644 --- a/source/KKRnano/source/datastructures/InputParams_mod.F90 +++ b/source/KKRnano/source/datastructures/InputParams_mod.F90 @@ -78,6 +78,16 @@ module InputParams_mod double precision :: r_log double precision :: a_log logical :: enable_quad_prec + logical :: noncobfield + logical :: constr_field + logical :: same_bfield + logical :: trans_bfield + logical :: mt_bfield + logical :: torque + integer :: ibfield + integer :: iconstr + integer :: itbfield0 + integer :: itbfield1 endtype ! InputParams @@ -638,6 +648,96 @@ integer function getValues(filename, self) result(ierror) destroy_and_return endif + ierror = getValue(cr, "noncobfield", self%noncobfield , def=.FALSE.) + if (ierror == use_default) then + write(*,*) "WARNING: Bad/no value given for noncobfield. Set noncobfield to .FALSE." + ierror = 0 ! ok, no error + elseif (ierror /= 0) then + write(*,*) "Bad/no value given for noncobfield." + destroy_and_return + endif + + ierror = getValue(cr, "constr_field", self%constr_field , def=.FALSE.) + if (ierror == use_default) then + write(*,*) "WARNING: Bad/no value given for constr_field. Set constr_field to .FALSE." + ierror = 0 ! ok, no error + elseif (ierror /= 0) then + write(*,*) "Bad/no value given for constr_field." + destroy_and_return + endif + + ierror = getValue(cr, "same_bfield", self%same_bfield , def=.FALSE.) + if (ierror == use_default) then + write(*,*) "WARNING: Bad/no value given for same_bfield. Set same_bfield to .FALSE." + ierror = 0 ! ok, no error + elseif (ierror /= 0) then + write(*,*) "Bad/no value given for same_bfield." + destroy_and_return + endif + + ierror = getValue(cr, "trans_bfield", self%trans_bfield , def=.FALSE.) + if (ierror == use_default) then + write(*,*) "WARNING: Bad/no value given for trans_bfield. Set trans_bfield to .FALSE." + ierror = 0 ! ok, no error + elseif (ierror /= 0) then + write(*,*) "Bad/no value given for trans_bfield." + destroy_and_return + endif + + ierror = getValue(cr, "mt_bfield", self%mt_bfield , def=.FALSE.) + if (ierror == use_default) then + write(*,*) "WARNING: Bad/no value given for mt_bfield. Set mt_bfield to .FALSE." + ierror = 0 ! ok, no error + elseif (ierror /= 0) then + write(*,*) "Bad/no value given for mt_bfield." + destroy_and_return + endif + + ierror = getValue(cr, "torque", self%torque , def=.FALSE.) + if (ierror == use_default) then + write(*,*) "WARNING: Bad/no value given for torque. Set torque to .FALSE." + ierror = 0 ! ok, no error + elseif (ierror /= 0) then + write(*,*) "Bad/no value given for torque." + destroy_and_return + endif + + ierror = getValue(cr, "ibfield", self%ibfield , def=0) + if (ierror == use_default) then + write(*,*) "WARNING: Bad/no value given for ibfield. Set ibfield to 0" + ierror = 0 ! ok, no error + elseif (ierror /= 0) then + write(*,*) "Bad/no value given for ibfield." + destroy_and_return + endif + + ierror = getValue(cr, "iconstr", self%iconstr , def=0) + if (ierror == use_default) then + write(*,*) "WARNING: Bad/no value given for iconstr. Set iconstr to 0" + ierror = 0 ! ok, no error + elseif (ierror /= 0) then + write(*,*) "Bad/no value given for iconstr." + destroy_and_return + endif + + ierror = getValue(cr, "itbfield0", self%itbfield0 , def=0) + if (ierror == use_default) then + write(*,*) "WARNING: Bad/no value given for itbfield0. Set itbfield0 to 0" + ierror = 0 ! ok, no error + elseif (ierror /= 0) then + write(*,*) "Bad/no value given for itbfield0." + destroy_and_return + endif + + ierror = getValue(cr, "itbfield1", self%itbfield1 , def=10000) + if (ierror == use_default) then + write(*,*) "WARNING: Bad/no value given for itbfield1. Set itbfield1 to 10000" + ierror = 0 ! ok, no error + elseif (ierror /= 0) then + write(*,*) "Bad/no value given for itbfield1." + destroy_and_return + endif + write(*,*) "Finished reading information from input.conf" destroy_and_return #undef destroy_and_return