src.quatfit (28 February 2006) | index /Users/baker/coding/manifold/pdb2pqr/trunk/pdb2pqr/src/quatfit.py

`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
----------------------------
PDB2PQR -- An automated pipeline for the setup, execution, and analysis of
Poisson-Boltzmann electrostatics calculations
Nathan A. Baker (baker@biochem.wustl.edu)
Todd Dolinsky (todd@ccb.wustl.edu)
Dept. of Biochemistry and Molecular Biophysics
Center for Computational Biology
Washington University in St. Louis
Jens Nielsen (Jens.Nielsen@ucd.ie)
University College Dublin
Additional contributing authors listed in documentation and supporting
package licenses.
Copyright (c) 2003-2007. Washington University in St. Louis.
All Rights Reserved.
This file is part of PDB2PQR.
PDB2PQR is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
PDB2PQR is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with PDB2PQR; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
----------------------------`

Modules
`` |  |
math | os | string | sys

Functions
`` |  | center(numpoints, refcoords) `Center a molecule using equally weighted points Parameters numpoints: Number of points refcoords: List of reference coordinates, with each set a list of form [x,y,z] (list) Returns refcenter: Center of the set of points (list) relcoords: Moved refcoords relative to refcenter (list)` findCoordinates(numpoints, refcoords, defcoords, defatomcoords) `Driver for the quaternion file. Provide the coordinates as inputs and obtain the coordinates for the new atom as output. Parameters numpoints: The number of points in each list (int) refcoords: The reference coordinates, a list of lists of form [x,y,z] (list) defcoords: The definition coordinates, a list of lists of form [x,y,z] (list) defatomcoords: The definition coordinates for the atom to be placed in the reference frame (list) Returns newcoords: The coordinates of the new atom in the reference frame (list)` jacobi(a, nrot) `Jacobi diagonalizer with sorted output, only good for 4x4 matrices Parameters a: Matrix to diagonalize (4x4 list) nrot: Maximum number of sweeps Returns d: Eigenvalues v: Eigenvectors` q2mat(q) `Generate a left rotation matrix from a normalized quaternion Parameters q: The normalized quaternion (list) Returns u: The rotation matrix (2-dimensional list)` qchichange(initcoords, refcoords, angle) `Change the chiangle of the reference coordinate using the initcoords and the given angle Parameters initcoords: Coordinates based on the point and basis atoms (one dimensional list) difchi : The angle to use (float) refcoords : The atoms to analyze (list of many coordinates) Returns newcoords : The new coordinates of the atoms (list of many coords)` qfit(numpoints, refcoords, defcoords) `Method for getting new atom coordinates from sets of reference and definition coordinates. Parameters numpoints: The number of points in each list (int) refcoords: List of reference coordinates, with each set a list of form [x,y,z] (list) defcoords: List of definition coordinates, with each set a list of form [x,y,z] (list)` qtransform(numpoints, defcoords, refcenter, fitcenter, rotation) `Transform the set of defcoords using the reference center, the fit center, and a rotation matrix. Parameters numpoints: The number of points in each list (int) defcoords: Definition coordinates (list) refcenter: The reference center (list) defcenter: The definition center (list) rotation: The rotation matrix (list) Returns newcoords: The coordinates of the new point (list)` qtrfit(numpoints, defcoords, refcoords, nrot) `Find the quaternion, q, [and left rotation matrix, u] that minimizes | qTXq - Y | ^ 2 [|uX - Y| ^ 2] This is equivalent to maximizing Re (qTXTqY) The left rotation matrix, u, is obtained from q by u = qT1q Parameters numpoints: The number of points in each list (int) defcoords: List of definition coordinates, with each set a list of form [x,y,z] (list) refcoords: List of fitted coordinates, with each set a list of form [x,y,z] (list) nrot : The maximum number of jacobi sweeps Returns q : The best-fit quaternion u : The best-fit left rotation matrix` rotmol(numpoints, x, u) `Rotate a molecule Parameters numpoints: The number of points in the list (int) x: The input coordinates (list) u: The left rotation matrix (list) Returns out: The rotated coordinates out=u * x (list)` translate(numpoints, refcoords, center, mode) `Translate a molecule using equally weighted points Parameters numpoints: Number of points refcoords: List of reference coordinates, with each set a list of form [x,y,z] (list) center: Center of the system(list) mode: If 1, center will be subtracted from refcoords If 2, center will be added to refcoords Returns relcoords: Moved refcoords relative to refcenter (list)`

Data
`` |  | DIHEDRAL = 57.2958 SMALL = 9.9999999999999995e-08 __author__ = 'David Heisterberg, Jan Labanowski, Jens Erik Nielsen, Todd Dolinsky' __date__ = '28 February 2006'

Author
`` |  | David Heisterberg, Jan Labanowski, Jens Erik Nielsen, Todd Dolinsky