I have a parallelepiped defined by the three vectors $\vec{a}, \vec{b}, \vec{c} \in \mathbb{R}^3$ (which happen to be a periodic crystal unit cell). They define a periodic quotient topology on $\mathbb{R}^3$ by:
$$ \vec{x} \sim \vec{x} + \vec{a} \sim \vec{x} + \vec{b} \sim \vec{x} + \vec{c} $$
Is there an isometric mapping from this space onto the 3-torus given by the quotient topology of $\mathbb{R}^3$ induced by:
$$ \vec{x} \sim \vec{x} + \left<n_x L_x, n_yL_y, n_zL_z\right> \text{ for } n_{x, y, z} \in \mathbb{Z} $$
for some chosen $L_x, L_y, L_z \in \mathbb{R}$?
(Some background: I'm trying to efficiently do a very large number of periodic nearest neighbor queries in this space; the standard data structure for doing so would be a KD-tree, and the KDTree I have available -- scipy's -- supports a toroidal topology. If I can isometrically map my original periodic space onto a 3-torus, I can use the existing tools.)
No, there is not in general any such isometric mapping.
Here are several conditions, each of which is logically equivalent to the existence of such an isometric mapping. To express them, let $M$ denote the matrix whose rows are the coordinates of your three vectors, $$M = \begin{pmatrix} a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \\ c_1 & c_2 & c_3 \end{pmatrix} $$ Also, let $\Lambda$ be the "lattice" generated by your three vectors, $$\Lambda = \{l \vec a + m \vec b + n \vec c \mid l,m,n \in \mathbb R\} $$ The first equivalent condition is
If $O$ exists, then the diagonal entries of that matrix $M$ are then the numbers $L_x,L_y,L_z$ that you are looking for.
If these three vectors exist, then the orthonormal matrix $O$ you need in order to verify 1 is $$O = \begin{pmatrix} u_1 / |\vec u| & u_2 / |\vec u| & u_3 / |\vec u| \\ v_1 / |\vec v| & v_2 / |\vec v| & v_3 / |\vec v| \\ w_1 / |\vec w| & w_2 / |\vec w| & w_3 / |\vec w| \\ \end{pmatrix} $$
Finally, if $L_x,L_y,L_z \in \mathbb R$ exist as you say, then you can simply take $\vec u = \langle L_x,0,0 \rangle$, $\vec v = \langle 0,L_y,0 \rangle$, $\vec w = \langle 0,0,L_z \rangle$ in order to verify 2. Altogether this proves that your condition is equivalent to 1 and to 2.
Okay, but there's still an issue of how to use these to produce a counterexample. For that purpose, here's one more equivalent condition, which is somewhat more constructive: CAUTION: THIS ONE IS WRONG. It is correctible, but I don't have the time at the moment.
So, here's a counterexample: $\vec a = \vec u = \langle 1,0,0 \rangle$, $\vec b = \vec v = \langle 1/2 , \sqrt{3}/2 , 0\rangle$ (which is just $\vec a$ rotated by angle $\pi/3$ around the $z$ axis), and $\vec c = \vec w = \langle 0,0,42 \rangle$. Now one has to think a little bit to convince oneself that these three vectors satisfy the first part of 3, but they do NOT satisfy the conclusion (*) of 3.