chemcoord.Zmat.minimize_dihedrals¶
-
Zmat.
minimize_dihedrals
()¶ Give a representation of the dihedral with minimized absolute value.
Mathematically speaking the angles in a zmatrix are representations of an equivalence class. We will denote an equivalence relation with \(\sim\) and use \(\alpha\) for an angle and \(\delta\) for a dihedral angle. Then the following equations hold true.
\[\begin{split}(\alpha, \delta) &\sim (-\alpha, \delta + \pi) \\ \alpha &\sim \alpha \mod 2\pi \\ \delta &\sim \delta \mod 2\pi\end{split}\]This function asserts:
\[-\pi \leq \delta \leq \pi\]The main application of this function is the construction of a transforming movement from
zmat1
tozmat2
. This is under the assumption thatzmat1
andzmat2
are the same molecules (regarding their topology) and have the same construction table (get_construction_table()
):with cc.TestOperators(False): D = zm2 - zm1 zmats1 = [zm1 + D * i / n for i in range(n)] zmats2 = [zm1 + D.minimize_dihedrals() * i / n for i in range(n)]
The movement described by
zmats1
might be too large, because going from \(5^\circ\) to \(355^\circ\) is \(350^\circ\) in this case and not \(-10^\circ\) as inzmats2
which is the desired \(\Delta\) in most cases.Parameters: None – Returns: Zmatrix with accordingly changed angles and dihedrals. Return type: Zmat