quatfit
Quatfit routines for PDB2PQR
This module is used to find the coordinates of a new atom based on a reference set of coordinates and a definition set of coordinates.
Original Code by David J. Heisterberg, The Ohio Supercomputer Center, 1224 Kinnear Rd., Columbus, OH 43212-1163, (614)292-6036, djh@osc.edu, djh@ohstpy.bitnet, ohstpy::djh
Translated to C from fitest.f program and interfaced with Xmol program by Jan Labanowski, jkl@osc.edu, jkl@ohstpy.bitnet, ohstpy::jkl
Todo
There are many unnecessary parameters in this module due to FORTRAN/C assumptions about how the code should behave.
Code author: David Heisterberg
Code author: Jan Labanowski
Code author: Jens Erik Nielsen
Code author: Todd Dolinsky
- pdb2pqr.quatfit.center(numpoints, refcoords)[source]
Center a molecule using equally weighted points.
- pdb2pqr.quatfit.find_coordinates(numpoints, refcoords, defcoords, defatomcoords)[source]
Driver for the quaternion file.
Provide the coordinates as inputs and obtain the coordinates for the new atom as output.
- Parameters:
numpoints (int) – the number of points in each list
refcoords ([[float, float, float]]) – the reference coordinates, a list of lists of form [x,y,z]
defcoords ([[float, float, float]]) – the definition coordinates, a list of lists of form [x,y,z]
defatomcoords ([[float, float, float]]) – the definition coordinates for the atom to be placed in the reference frame
- Returns:
the coordinates of the new atom in the reference frame
- Return type:
- pdb2pqr.quatfit.jacobi(amat, nrot)[source]
Jacobi diagonalizer with sorted output, only good for 4x4 matrices.
- Parameters:
amat – Matrix to diagonalize
nrot (int) – maximum number of sweeps
- Returns:
(eigenvalues, eigenvectors)
- pdb2pqr.quatfit.qchichange(initcoords, refcoords, angle)[source]
Change the chiangle of the reference coordinate.
Change the chiangle of the reference coordinate using the initcoords and the given angle.
- Parameters:
- Returns:
the new coordinates of the atoms
- Return type:
- pdb2pqr.quatfit.qfit(numpoints, refcoords, defcoords)[source]
Method for getting new atom coordinates from sets of reference and definition coordinates.
Todo
Remove hard-coded parameters of function.
- pdb2pqr.quatfit.qtransform(numpoints, defcoords, refcenter, fitcenter, rotation)[source]
Transform coordinates using the reference.
Transform the set of defcoords using the reference center, the fit center, and a rotation matrix.
- pdb2pqr.quatfit.qtrfit(numpoints, defcoords, refcoords, nrot)[source]
Find the best-fit quaternion.
Find the quaternion, q, [and left rotation matrix, u] that minimizes
\[| qTXq - Y | ^ 2 [|uX - Y| ^ 2]\]This is equivalent to maximizing
\[Re(q^T X^T q Y)\]The left rotation matrix, u, is obtained from q by
\[u = qT1q\]- Parameters:
numpoints (int) – the number of points in each list
defcoords ([[float, float, float]]) – list of definition coordinates, with each set a list of form [x,y,z]
refcoords ([[float, float, float]]) – list of fitted coordinates, with each set a list of form [x,y,z]
nrot (int) – the maximum number of Jacobi sweeps
- Returns:
(the best-fit quaternion, the best-fit left rotation matrix)