I'm familiar with Lagrangian of a $\bf{linear}$ tri-atomic molecule moving only on 1-dimension.like this
The kinetic energy is written as $$ T = \frac{1}{2}(m\dot{x}_{1}^{2} + M\dot{x}_{2}^{2} + m\dot{x}_{3}^{2} ) $$ Potential energy $$ U = \frac{1}{2}(k(x_{2} - x_{1})^{2} +k(x_{3} - x_{2})^{2}) $$ Then the Lagrangian is $\mathcal{L}=T-U$. Suppose now if we have a cyclic molecule like Ozone like this. How do you write the Lagrangian for this? I'm confused in differentiating between the linear and cyclic motion