def ligand_specific_element_coordinates(ligand, element, complex=False):

    """
       Returns coordinates of ligand's atoms belong to specific element.

    Parameters:
       ligand (pandas dataframe):Pandas dataframe object extrated from mol2 file of ligand.
       element (str): Element name in string format.
       complex (bool): Use when ligand and protein are in a single pdb file.

    Returns:
       coordinates(numpy array):Numpy array contains ligand coordinates.
    """

    if complex:
        coordinates = ligand[ligand["element_symbol"] == element].loc[
            :, ["x_coord", "y_coord", "z_coord"]
        ]

    else:
        coordinates = ligand[ligand["element_symbol"] == element].loc[
            :, ["x", "y", "z"]
        ]

    return coordinates.to_numpy()