def res_atom_graph(molecule_graph, residues):
    """returns the graph of atoms in residues

    :param molecule: molecule containing residue and atom graphs
    :type molecule: amber.Molecule
    :param residues: residues
    :type residues: amber.Residue
    :return: graph containing only atoms in residues
    :rtype: nx.Graph
    """
    res_atoms = []
    for res in residues:
        res_atoms += res.atoms
    return molecule_graph.atoms.subgraph(res_atoms)