The aim of this paper is to study new classes of Riemannian manifolds endowed with a smooth potential function, including in a general framework classical canonical structures such as Einstein, harmonic curvature and Yamabe metrics, and, above all, gradient Ricci solitons. For the most rigid cases we give a complete classification, while for the others we provide rigidity and obstruction results, characterizations and nontrivial examples. In the final part of the paper we also describe the "nongradient" version of this construction.2010 Mathematics Subject Classification. 53C20, 53C25. 1 2 GIOVANNI CATINO AND PAOLO MASTROLIAOn the other hand, from the analytic point of view, the aim is to simplify the curvature by imposing some differential condition. A quite natural and not too restrictive way to do this is to consider curvature tensors belonging to the kernel of a first order linear differential operator. Some well known conditions of this type can be given by saying that (M, g) belongs to• LS if ∇(Riem) = 0 (locally symmetric metrics); • PR if ∇(Ric) = 0 (metrics with parallel Ricci curvature); • HC if div(Riem) = 0 (harmonic curvature metric).Note that, by Bianchi identities, we can redefine the class Y of Yamabe metrics using the condition div(Ric) = 0 or, equivalently, ∇R = 0. Here and in the rest of the paper div denotes the divergence operator (see Section 3 for the definition). Obviously, SF ⊂ LS ⊂ PR and, by Bianchi identities, PR ⊂ HC, E ⊂ HC ⊂ Y. Thus, we have the inclusionswhere, by definition, LSE := LS ∩ E (locally symmetric Einstein metrics). Note that, in dimension n ≥ 4, all the inclusions are strict.This classes of metrics certainly do not exhaust all the possible canonical metrics on a Riemannian manifold: our choice is essentially made in such a way that Einstein metrics (and Ricci solitons, as we will see) are the "cornerstone" of our construction, and the conditions that we impose are consequently focused on the Ricci tensor. We note that, in principle, one could also consider "higher order" conditions, such as ∇ k Riem = 0 or ∇ k Ric = 0, k ≥ 2, but these relations give rise again to LS and PR, respectively, by the results in [46,50]. However, one can consider other higher order analytic curvature conditions in order to generalize locally symmetric metrics, such as, for instance, the class of semi-symmetric spaces introduced by Cartan in [19].The class SF is the most rigid, since, up to quotients, it contains only S n , R n and H n with their standard metrics. Locally symmetric spaces LS were classified by Cartan [18], while, from the de Rham decomposition theorem ([6]), PR metrics are locally Riemannian products of Einstein metrics. On the other hand, given any compact manifold M, there always exists a Riemannian metric g such that (M, g) ∈ Y (see e.g. [41]). The remaining classes are more flexible. In particular E and HC, in the last decades, have been studied by many researchers, also for their connections with Physics in General Relativity and Yang-Mills Theory. In fact, these metrics ...