function xdot = triatom(x,t) % Triatomic Euler and Green functions integration. % Routine for integrating Euler's rigid body equations % and Green's function for a triatomic molecule. For % ab initio IR spectra. This appears to work. % Use with either ode23 (better) or ode45. % % D. Holmgren holmgren@phobos.astro.uwo.ca % moments of inertia for water molecule... ixx = 1.720; iyy = 0.5766; izz = 1.1434; % Euler's equations... xdot(1) = -x(2) * x(3) * (izz - iyy) / ixx; xdot(2) = -x(3) * x(1) * (ixx - izz) / iyy; xdot(3) = -x(1) * x(2) * (iyy - ixx) / izz; % Green's function matrix elements... xdot(4) = x(2) * x(6) - x(3) * x(5); xdot(5) = x(3) * x(4) - x(1) * x(6); xdot(6) = x(3) * x(5) - x(2) * x(4); xdot(7) = -x(3) * x(8) + x(2) * x(9); xdot(8) = x(3) * x(7) - x(1) * x(9); xdot(9) = -x(2) * x(7) + x(1) * x(8); xdot(10) = -x(3) * x(11) + x(2) * x(12); xdot(11) = x(3) * x(10) - x(1) * x(12); xdot(12) = x(1) * x(12) - x(2) * x(10);