In bulk crystals, crystals with defects, clusters, surfaces, etc. the phonons can be calculated from the Hellmann-Feynman (HF) forces by the direct method. The HF forces should be calculated with an ab initio program for a number of atoms displaced from equilibrium positions, one atom at a time. Program Phonon is able to extract the force constants from the HF forces in a symmetry controlled manner, build the dynamical matrix and provide the phonon dispersion relations, and total and partials phonon density of states. The thermodynamic functions in harmonic approximation, i.e. the internal and free energy, entropy and heat capacity, the Debye-Waller factor for diffraction peak intensities, the coherent and incoherent inelastic neutron, or X-ray scattering intensities on a single, or polycrystals, including the multiphonon contributions can be found. For polar crystals the LO/TO spliting can be included in a semi phenomenological way. The Phonon tool can be used to find the Raman and infrared absorption frequencies and their irreducible representations.
One may check a dynamical stability of an ab initio optimized supercell, serach for possible soft modes which might indicate stable lower symmetry phases. Within the quasiharmonic approximation the finite temperature properties of the system, including a phase transitions under temperature, can be studied. For more see: http://wolf.ifj.edu.pl/phonon/.