  It is shown that under certain boundary conditions the virial theorem has to
be modified. We analyze the origin of the extra term and compute it in
particular examples. The Coulomb and harmonic oscillator with point interaction
have been studied in the light of this generalization of the virial theorem.
