Modeling of vibrations of a building equipped with shape memory alloy (SMA) devices for protection against earthquakes and decreasing the energy of vibrations are carried out. The calculations are based on the use of a micro-structural model, which allows describing the variation of the deformation of the SMA parts serving as working elements for damping of the vibrations of the building. The use of SMA in dampers and isolators is justified by their high energy dissipation parameters and high cyclic life verified in experiments. Accelerations and displacements of the floors of a three-storied building are calculated for horizontal harmonic vibrations of the ground. The efficiency of the use of protecting devices is estimated.