Virial theorem and pressure in multiphase systems Pressure in a system of particles with pairwise interactions can be calculated from the virial theorem using the following equation (see here):
$$
P = \frac{2}{3}\langle T\rangle\rho + \frac{\langle I\rangle}{V},\tag{1}
$$
where
$$
I = \frac{\sum\limits_{i} \sum\limits_{j>i} \textbf{f}(\textbf{r}_{ij}) \cdot \textbf{r}_{ij} }{3},\tag{2}
$$
$T$ is the total kinetic energy of all particles, $\rho$ is the density of particles, $V$ is the volume of the system, and $\langle\cdot\rangle$ indicates averaging over time.
Even though equation (1) is derived for systems bounded in space by external potential, it is frequently used to calculate pressure in systems with periodic boundary conditions without any external walls. This is justifiable in thermodynamic limit, since most of the contribution to the virial $I$ comes from the bulk of the system.
Now, suppose we have a phase separation in a system with periodic boundary conditions, and there is a floating droplet. We know that pressure inside droplets is larger compared to the pressure in the gas due to surface tension. Question. What pressure is the equation (1) going to give us: the pressure of the gas, the pressure inside the droplet, or some combination?
 A: It's probably just a typographical errror, but your first term should
be either 2/3 of the the total kinetic energy divided by the volume or $T$ should be the temperature if you are in the canonical ensemble. As an aside,
the virial theorem
can be derived in this form directly in periodic boundary conditions;
it doesn't have to be derived with a bounding potential.
In any case,
by assuming a phase separation, you are assuming that you can identify
the two phase regions. In your example, the droplet presumably has higher
density than the liquid. Given the sets of
particles identified as liquid and gas, and calling the kinetic energy
of particle $i$ $T_i$, and the liquid volume $V_\ell$, the virial
pressure  written out identifying gas and liquid is
\begin{eqnarray}
P &=&
\frac{V_\ell}{V}\left \langle 
\sum_{i\ \rm liquid} \left [
\frac{2
 T_i}{3V_\ell}
+ \frac{\sum_{j>i\ j\ \rm liquid} \vec f(\vec r_{ij})\cdot \vec r_{ij}}{3V_\ell}
+ \frac{\sum_{j>i\ j \ \rm gas} \vec f(\vec r_{ij})\cdot \vec r_{ij}}{3V_\ell}
\right ]
\right \rangle
\nonumber\\
&&+
\frac{V-V_\ell}{V} \left \langle 
\sum_{i\ \rm gas} \left [
\frac{
 2T_i}{3V_\ell}
+ \frac{\sum_{j>i\ j\ \rm gas} \vec f(\vec r_{ij})\cdot \vec r_{ij}}{3(V-V_\ell)}
+ \frac{\sum_{j>i\ j\ \rm liquid} \vec f(\vec r_{ij})\cdot \vec r_{ij}}{3(V-V_\ell)}
\right ]
\right \rangle
\nonumber\\
\end{eqnarray}
The second $j$ sums are over the particles in the other phase. For
the usual short-range interactions, these will only contribute at the
interface, and would be negligible compared to the same phase terms.
They would contribute for small systems and correspond to the surface
energy effects. That is the virial pressure is the negative adiabatic derivative of the energy with respect to volume and a change in surface energy would contribute.
Neglecting those terms, the two separate liquid and gas averages inside
the angle brackets are the
same virial pressures you would calculate for those systems in their
bulk with the corresponding number of particles in the corresponding volumes.
You can see
the pressures come in with the ratios of the volumes of the two phases.
