def SaveXYZTrajectory(fname, atoms, comments=[]):
    """
    Save the animation on a XYZ file 
    ================================

    This function save on a file a list of structures containing the frames
    of the animation in the xyz file from fname.

    Parameters:
    -----------
        - fname : string
            Path to the xyz animation file
        - atoms : list
            A list of the Structure() object to be written
        - comments: list, optional
            A list of comments for each frame.
    
    """
    for i, atms in enumerate(atoms):
        overwrite = False
        if i == 0:
            overwrite = True
        comment = '%d' % i
        if len(comments) - 1 >= i:
            comment = comments[i]
        atms.save_xyz(fname, comment, overwrite)
