def select(structure, string):
    """Uses the Prody select function with string as command

    Makes you easily extract some parts of a structure

    Parameters
    --------------
    structure : prody.AtomGroup
    string : str
        this is the command that will be passed to prody select

    Returns
    ---------
    new_structure : prody.AtomGroup
    """

    new_structure = structure.select(string)

    return new_structure