populate_unfragmented_json_data Subroutine

subroutine populate_unfragmented_json_data(json_data, result)

Uses

  • proc~~populate_unfragmented_json_data~~UsesGraph proc~populate_unfragmented_json_data populate_unfragmented_json_data module~mqc_json_output_types mqc_json_output_types proc~populate_unfragmented_json_data->module~mqc_json_output_types module~mqc_thermochemistry mqc_thermochemistry module~mqc_json_output_types->module~mqc_thermochemistry pic_types pic_types module~mqc_json_output_types->pic_types module~mqc_thermochemistry->pic_types module~mqc_elements mqc_elements module~mqc_thermochemistry->module~mqc_elements module~mqc_physical_constants mqc_physical_constants module~mqc_thermochemistry->module~mqc_physical_constants pic_io pic_io module~mqc_thermochemistry->pic_io pic_lapack_interfaces pic_lapack_interfaces module~mqc_thermochemistry->pic_lapack_interfaces pic_logger pic_logger module~mqc_thermochemistry->pic_logger module~mqc_elements->pic_types pic_ascii pic_ascii module~mqc_elements->pic_ascii module~mqc_physical_constants->pic_types

Populate json_data with basic unfragmented calculation results

Arguments

Type IntentOptional Attributes Name
type(json_output_data_t), intent(out) :: json_data
type(calculation_result_t), intent(in) :: result

Calls

proc~~populate_unfragmented_json_data~~CallsGraph proc~populate_unfragmented_json_data populate_unfragmented_json_data proc~energy_total energy_t%energy_total proc~populate_unfragmented_json_data->proc~energy_total proc~mp2_total mp2_energy_t%mp2_total proc~energy_total->proc~mp2_total

Called by

proc~~populate_unfragmented_json_data~~CalledByGraph proc~populate_unfragmented_json_data populate_unfragmented_json_data proc~hessian_coordinator hessian_coordinator proc~hessian_coordinator->proc~populate_unfragmented_json_data interface~hessian_coordinator hessian_coordinator interface~hessian_coordinator->proc~hessian_coordinator proc~distributed_unfragmented_hessian distributed_unfragmented_hessian proc~distributed_unfragmented_hessian->interface~hessian_coordinator interface~distributed_unfragmented_hessian distributed_unfragmented_hessian interface~distributed_unfragmented_hessian->proc~distributed_unfragmented_hessian proc~run_unfragmented_calculation run_unfragmented_calculation proc~run_unfragmented_calculation->interface~distributed_unfragmented_hessian

Source Code

   subroutine populate_unfragmented_json_data(json_data, result)
      !! Populate json_data with basic unfragmented calculation results
      use mqc_json_output_types, only: json_output_data_t, OUTPUT_MODE_UNFRAGMENTED

      type(json_output_data_t), intent(out) :: json_data
      type(calculation_result_t), intent(in) :: result

      json_data%output_mode = OUTPUT_MODE_UNFRAGMENTED
      json_data%total_energy = result%energy%total()
      json_data%has_energy = .true.

      ! Copy gradient if available
      if (result%has_gradient) then
         allocate (json_data%gradient(size(result%gradient, 1), size(result%gradient, 2)))
         json_data%gradient = result%gradient
         json_data%has_gradient = .true.
      end if

      ! Copy dipole if available
      if (result%has_dipole) then
         allocate (json_data%dipole(3))
         json_data%dipole = result%dipole
         json_data%has_dipole = .true.
      end if

      ! Copy Hessian if available
      if (result%has_hessian) then
         allocate (json_data%hessian(size(result%hessian, 1), size(result%hessian, 2)))
         json_data%hessian = result%hessian
         json_data%has_hessian = .true.
      end if

   end subroutine populate_unfragmented_json_data