clear_pops_pert Subroutine

public subroutine clear_pops_pert(perturbs)

Uses

Arguments

Type IntentOptional Attributes Name
type(perturbation), intent(inout), allocatable :: perturbs(:)

Contents

Source Code


Source Code

    subroutine clear_pops_pert(perturbs)
        use FciMCData, only: perturbation
        implicit none

        type(perturbation), intent(inout), allocatable :: perturbs(:)
        integer :: j

        if (allocated(perturbs)) then
            do j = 1, gf_count
                if (allocated(perturbs(j)%crtn_orbs)) deallocate(perturbs(j)%crtn_orbs)
                if (allocated(perturbs(j)%ann_orbs)) deallocate(perturbs(j)%ann_orbs)
                deallocate(perturbs)
            end do
        end if
    end subroutine clear_pops_pert