def write_xyz(grid_obj, path_to_file):
    """ 
        Reads in the grid3D object after calculation and writes out the important details into an xyz file for visualization
        
        :type grid_obj: An instance of the class grid3D
        :param grid_obj: grid3D object after calculation

        :type path_to_folder: str
        :param path_to_folder: Path to the folder where you want the file to be written to.

        :raises:

        :rtype:
        """
    import pyIsoP.xyz as xyz_mod
    import numpy as np
    f1 = open(path_to_file, 'w')
    out_coord = grid_obj.coord + 0.5
    out_coord = np.dot(grid_obj.A, out_coord.T).T
    xyz_mod.write_xyz(f1, out_coord, title=path_to_file, atomtypes=grid_obj
        .mof_atm_names)
    f1.close()
