delete_structure_api Subroutine

public subroutine delete_structure_api(vmol) bind(C, name=namespace//"delete_structure")

Delete molecular structure data

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: vmol

Source Code

subroutine delete_structure_api(vmol) &
      & bind(C, name=namespace//"delete_structure")
   !DEC$ ATTRIBUTES DLLEXPORT :: delete_structure_api
   type(c_ptr), intent(inout) :: vmol
   type(vp_structure), pointer :: mol

   if (debug) print'("[Info]",1x, a)', "delete_structure"

   if (c_associated(vmol)) then
      call c_f_pointer(vmol, mol)

      deallocate(mol)
      vmol = c_null_ptr
   end if

end subroutine delete_structure_api