result_destroy Subroutine

private subroutine result_destroy(this)

Clean up allocated memory in calculation_result_t

Type Bound

calculation_result_t

Arguments

Type IntentOptional Attributes Name
class(calculation_result_t), intent(inout) :: this

Calls

proc~~result_destroy~~CallsGraph proc~result_destroy calculation_result_t%result_destroy proc~result_reset calculation_result_t%result_reset proc~result_destroy->proc~result_reset proc~energy_reset energy_t%energy_reset proc~result_reset->proc~energy_reset proc~error_clear error_t%error_clear proc~result_reset->proc~error_clear proc~mp2_reset mp2_energy_t%mp2_reset proc~energy_reset->proc~mp2_reset

Called by

proc~~result_destroy~~CalledByGraph proc~result_destroy calculation_result_t%result_destroy proc~compute_energy_and_forces compute_energy_and_forces proc~compute_energy_and_forces->proc~result_destroy proc~run_calculation run_calculation proc~compute_energy_and_forces->proc~run_calculation proc~hessian_coordinator hessian_coordinator proc~hessian_coordinator->proc~result_destroy proc~hessian_worker hessian_worker proc~hessian_worker->proc~result_destroy proc~unfragmented_calculation unfragmented_calculation proc~unfragmented_calculation->proc~result_destroy proc~xtb_calc_hessian xtb_method_t%xtb_calc_hessian proc~xtb_calc_hessian->proc~result_destroy interface~hessian_coordinator hessian_coordinator interface~hessian_coordinator->proc~hessian_coordinator interface~hessian_worker hessian_worker interface~hessian_worker->proc~hessian_worker interface~unfragmented_calculation unfragmented_calculation interface~unfragmented_calculation->proc~unfragmented_calculation proc~distributed_unfragmented_hessian distributed_unfragmented_hessian proc~distributed_unfragmented_hessian->interface~hessian_coordinator proc~distributed_unfragmented_hessian->interface~hessian_worker proc~run_unfragmented_calculation run_unfragmented_calculation proc~run_unfragmented_calculation->interface~unfragmented_calculation interface~distributed_unfragmented_hessian distributed_unfragmented_hessian proc~run_unfragmented_calculation->interface~distributed_unfragmented_hessian interface~distributed_unfragmented_hessian->proc~distributed_unfragmented_hessian proc~run_calculation->proc~run_unfragmented_calculation proc~run_multi_molecule_calculations run_multi_molecule_calculations proc~run_multi_molecule_calculations->proc~run_calculation program~main main program~main->proc~run_calculation

Source Code

   subroutine result_destroy(this)
      !! Clean up allocated memory in calculation_result_t
      class(calculation_result_t), intent(inout) :: this
      if (allocated(this%gradient)) deallocate (this%gradient)
      if (allocated(this%sigma)) deallocate (this%sigma)
      if (allocated(this%hessian)) deallocate (this%hessian)
      if (allocated(this%dipole)) deallocate (this%dipole)
      if (allocated(this%dipole_derivatives)) deallocate (this%dipole_derivatives)
      call this%reset()
   end subroutine result_destroy