  The quantization condition for two-particle systems with arbitrary number of
two-body open coupled channels, spin, momentum, and masses in a finite volume
with either periodic or twisted boundary conditions is presented. Although
emphasis is placed in cubic volumes, the result holds for asymmetric volumes.
The result is relativistic, holds for all momenta below the three- and
four-particle thresholds, and is exact up to exponential volume corrections
that are governed by L/r, where L is the spatial extent of the volume and r is
the range of the interactions between the particles. For hadronic systems the
range of the interaction is set by the inverse of the pion mass, m_pi, and as a
result the formalism presented is suitable for m_pi L >> 1. The condition
presented is in agreement with all previous studies of two-body systems in a
finite volume. Implications of the formalism for the studies of multichannel
baryon-baryon systems are discussed.
