In this paper, we develop a general approach to integrating petrophysical models in three-dimensional seismic full-waveform inversion based on the Gramian constraints. In the framework of this approach, we present an example of the frequency-domain P-wave velocity inversion guided by an electrical conductivity model. In order to introduce a coupling between the two models, we minimize the corresponding Gramian functional, which is included in the Tikhonov parametric functional. We demonstrate that in the case of a single-physics inversion guided by a model of different physical type, the general expressions of the Gramian functional and its gradients become simple and easy to program. We also prove that the Gramian functional has a non-negative quadratic form, so it can be easily incorporated in a standard gradient-based minimization scheme. The developed new approach of seismic inversion guided by the known petrophysical model has been validated by three-dimensional inversion of synthetic seismic data generated for a realistic three-dimensional model of the subsurface.