  An effective Hamiltonian for the ferroelectric transition in $PbTiO_3$ is
constructed from first-principles density-functional-theory total-energy and
linear-response calculations through the use of a localized, symmetrized basis
set of ``lattice Wannier functions.'' Preliminary results of Monte Carlo
simulations for this system show a first-order cubic-tetragonal transition at
660 K. The involvement of the Pb atom in the lattice instability and the
coupling of local distortions to strain are found to be particularly important
in producing the behavior characteristic of the $PbTiO_3$ transition. A
tentative explanation for the presence of local distortions experimentally
observed above $T_c$ is suggested. Further applications of this method to a
variety of systems and structures are proposed for first-principles study of
finite-temperature structural properties in individual materials.
