configure_xtb Subroutine

private subroutine configure_xtb(method, config)

Configure an XTB method instance from config%xtb

Arguments

Type IntentOptional Attributes Name
class(qc_method_t), intent(inout) :: method
type(method_config_t), intent(in) :: config

Calls

proc~~configure_xtb~~CallsGraph proc~configure_xtb configure_xtb proc~method_type_to_string method_type_to_string proc~configure_xtb->proc~method_type_to_string proc~xtb_has_solvation xtb_config_t%xtb_has_solvation proc~configure_xtb->proc~xtb_has_solvation

Called by

proc~~configure_xtb~~CalledByGraph proc~configure_xtb configure_xtb proc~factory_create method_factory_t%factory_create proc~factory_create->proc~configure_xtb proc~create_method create_method proc~create_method->proc~factory_create proc~do_fragment_work do_fragment_work proc~do_fragment_work->proc~create_method proc~hessian_coordinator hessian_coordinator proc~hessian_coordinator->proc~create_method proc~hessian_worker hessian_worker proc~hessian_worker->proc~create_method interface~do_fragment_work do_fragment_work interface~do_fragment_work->proc~do_fragment_work interface~hessian_coordinator hessian_coordinator interface~hessian_coordinator->proc~hessian_coordinator interface~hessian_worker hessian_worker interface~hessian_worker->proc~hessian_worker proc~distributed_unfragmented_hessian distributed_unfragmented_hessian proc~distributed_unfragmented_hessian->interface~hessian_coordinator proc~distributed_unfragmented_hessian->interface~hessian_worker proc~node_worker node_worker proc~node_worker->interface~do_fragment_work proc~serial_fragment_processor serial_fragment_processor proc~serial_fragment_processor->interface~do_fragment_work proc~serial_gmbe_pie_processor serial_gmbe_pie_processor proc~serial_gmbe_pie_processor->interface~do_fragment_work proc~unfragmented_calculation unfragmented_calculation proc~unfragmented_calculation->interface~do_fragment_work

Source Code

   subroutine configure_xtb(method, config)
      !! Configure an XTB method instance from config%xtb
      class(qc_method_t), intent(inout) :: method
      type(method_config_t), intent(in) :: config

      select type (m => method)
      type is (xtb_method_t)
         ! Core settings
         m%variant = method_type_to_string(config%method_type)
         m%verbose = config%verbose
         m%accuracy = real(config%xtb%accuracy, wp)

         ! Electronic temperature (convert K to Hartree)
         ! kt = T * k_B, where k_B = 3.166808578545117e-06 Hartree/K
         m%kt = real(config%xtb%electronic_temp, wp)*3.166808578545117e-06_wp

         ! Solvation settings from config%xtb
         if (config%xtb%has_solvation()) then
            m%solvent = trim(config%xtb%solvent)
            if (len_trim(config%xtb%solvation_model) > 0) then
               m%solvation_model = trim(config%xtb%solvation_model)
            else
               m%solvation_model = "alpb"  ! Default
            end if
            m%use_cds = config%xtb%use_cds
            m%use_shift = config%xtb%use_shift
            m%dielectric = real(config%xtb%dielectric, wp)
            m%cpcm_nang = config%xtb%cpcm_nang
            m%cpcm_rscale = real(config%xtb%cpcm_rscale, wp)
         end if
      end select
   end subroutine configure_xtb