Clean up allocated memory in physical_fragment_t
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(physical_fragment_t), | intent(inout) | :: | this |
subroutine fragment_destroy(this) !! Clean up allocated memory in physical_fragment_t class(physical_fragment_t), intent(inout) :: this if (allocated(this%element_numbers)) deallocate (this%element_numbers) if (allocated(this%coordinates)) deallocate (this%coordinates) if (allocated(this%cap_replaces_atom)) deallocate (this%cap_replaces_atom) if (allocated(this%local_to_global)) deallocate (this%local_to_global) if (allocated(this%basis)) then call this%basis%destroy() deallocate (this%basis) end if this%n_atoms = 0 this%charge = 0 this%multiplicity = 1 this%nelec = 0 this%n_caps = 0 end subroutine fragment_destroy