Clean up allocated memory in system_geometry_t
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(system_geometry_t), | intent(inout) | :: | this |
subroutine system_destroy(this) !! Clean up allocated memory in system_geometry_t class(system_geometry_t), intent(inout) :: this if (allocated(this%element_numbers)) deallocate (this%element_numbers) if (allocated(this%coordinates)) deallocate (this%coordinates) if (allocated(this%fragment_sizes)) deallocate (this%fragment_sizes) if (allocated(this%fragment_atoms)) deallocate (this%fragment_atoms) if (allocated(this%fragment_charges)) deallocate (this%fragment_charges) if (allocated(this%fragment_multiplicities)) deallocate (this%fragment_multiplicities) if (allocated(this%bonds)) deallocate (this%bonds) this%n_monomers = 0 this%atoms_per_monomer = 0 this%total_atoms = 0 end subroutine system_destroy