Skip to content
Snippets Groups Projects
Commit f15583ba authored by Christian Faber's avatar Christian Faber
Browse files

comments

parent bd44721c
No related branches found
No related tags found
No related merge requests found
...@@ -102,7 +102,7 @@ def rmsd_from_rot_tran( ...@@ -102,7 +102,7 @@ def rmsd_from_rot_tran(
"""Calculate an RMSD like value for a given set of vectors x and y with a given rotation matrix and translation vector """Calculate an RMSD like value for a given set of vectors x and y with a given rotation matrix and translation vector
Mathematical formula: Mathematical formula:
.. math:: \tilde{\mathrm{RMSD}} = \\frac{1}{M} \sum_{k=1..M} |\mathscr{U}\mathbf{x}^k + \mathbf{r} - \mathbf{y}^k|^2 .. math:: \mathrm{E} = \\frac{1}{M} \sum_{k=1..M} |\mathscr{U}\mathbf{x}^k + \mathbf{r} - \mathbf{y}^k|^2
**Important Note:** The translation vector differs from Kabsch algorithm, there you translate befor rotating. In Coutsias paper it is the otherway round. **Important Note:** The translation vector differs from Kabsch algorithm, there you translate befor rotating. In Coutsias paper it is the otherway round.
...@@ -114,9 +114,12 @@ def rmsd_from_rot_tran( ...@@ -114,9 +114,12 @@ def rmsd_from_rot_tran(
:type rot: np.ndarray :type rot: np.ndarray
:param trans: Translation vector r, see note above :param trans: Translation vector r, see note above
:type trans: np.ndarray :type trans: np.ndarray
:return: RMSD like value :return: RMSD like value (:math:`\sqrt{E}`)
:rtype: float :rtype: float
""" """
print(trans.shape)
print(np.matmul(rot, x).shape, y.shape)
return 0.0 return 0.0
...@@ -217,6 +220,7 @@ def rmsd_per_residue(file1: str, file2: str) -> list[float]: ...@@ -217,6 +220,7 @@ def rmsd_per_residue(file1: str, file2: str) -> list[float]:
res2_AA = [list(a.get_vector()) for a in res2.get_atoms()] res2_AA = [list(a.get_vector()) for a in res2.get_atoms()]
res1_AA = np.transpose(np.array(res1_AA)) res1_AA = np.transpose(np.array(res1_AA))
res2_AA = np.transpose(np.array(res2_AA)) res2_AA = np.transpose(np.array(res2_AA))
rmsd_from_rot_tran(res1_AA, res2_AA, rot, trans)
return [0.0] return [0.0]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment