Rational abelian groups, that is, torsion-free abelian groups of rank one, are characterized by their types. This paper characterizes rational nilpotent groups of class two, that is, nilpotent groups of class two in which the center and central factor group are direct sums of rational abelian groups. This characterization is done according to the types of the summands of the center and the central factor group. Using these types and some cohomological techniques it is possible to determine the automorphism group of the nilpotent group in question by performing essentially matrix computations.
In particular, the automorphism groups of rational nilpotent groups of class two and rank three are completely described. Specific examples are given of semicomplete and pseudocomplete nilpotent groups.