Functions |
| double | AdGetRotationMatrix (gsl_matrix *fitCoords, gsl_matrix *refCoords, gsl_matrix **rot, BOOL calculateRMSD) |
| double | AdGetRotationMatrixForSelection (gsl_matrix *fitCoords, gsl_matrix *refCoords, gsl_vector *masses, NSIndexSet *selection, gsl_matrix **rot, BOOL calculateRMSD) |
| double | AdLeastSquaresFit (gsl_matrix *fitCoords, gsl_matrix *refCoords, BOOL calculateRMSD) |
| double | AdLeastSquaresSelectionFit (gsl_matrix *fitCoords, gsl_matrix *refCoords, gsl_vector *masses, NSIndexSet *selection, BOOL calculateRMSD) |
| Vector3D * | AdCalculateCentreOfMass (gsl_matrix *coordinates, gsl_vector *masses) |
| void | AdMoveCentreOfMassToOrigin (gsl_matrix *coordinates, gsl_vector *masses) |
| void | AdMoveCentreOfMassToPoint (Vector3D *point, gsl_matrix *coordinates, gsl_vector *masses) |
Detailed Description
Fitting and moving coordinates.
Function Documentation
| Vector3D* AdCalculateCentreOfMass |
( |
gsl_matrix * |
coordinates, |
|
|
gsl_vector * |
masses |
|
) |
| |
Returns the centre of mass of the system with coordinates and masses.
| double AdGetRotationMatrix |
( |
gsl_matrix * |
fitCoords, |
|
|
gsl_matrix * |
refCoords, |
|
|
gsl_matrix ** |
rot, |
|
|
BOOL |
calculateRMSD |
|
) |
| |
Calculates the rotation matrix that optimally superimposes fitCoords on refCoords. The result is returned in rot. If calculateRMSD is YES the final RMSD is returned, othewise -1.0 is returned. The center of masses of the two systems should be the same as the fitting is rotational only.
fitCoords and refCoords must have the same dimension. If no error handler is installed this will result in the program exiting. If AdGSLErrorHandler is installed an NSInternalInconsistencyException will be raised.
| double AdGetRotationMatrixForSelection |
( |
gsl_matrix * |
fitCoords, |
|
|
gsl_matrix * |
refCoords, |
|
|
gsl_vector * |
masses, |
|
|
NSIndexSet * |
selection, |
|
|
gsl_matrix ** |
rot, |
|
|
BOOL |
calculateRMSD |
|
) |
| |
As AdGetRotationMatrix() except
- It only uses the coordinates of the elements defined by selection to calculate the matrix.
- It performs the necessary center of mass translations.
- Parameters:
-
| selection | An NSIndexSet containing the indexes of the elements in fitCoords and refCoords to use to fitting. |
| masses | The masses corresponding to each each element in fitCoords |
| double AdLeastSquaresFit |
( |
gsl_matrix * |
fitCoords, |
|
|
gsl_matrix * |
refCoords, |
|
|
BOOL |
calculateRMSD |
|
) |
| |
Fits fitCoords to refCoords using Kabsch method. The fitted coordinates are placed in fitCoords i.e. the original coordinates are overwritten. If calculateRMSD is YES the final RMSD is returned, othewise -1.0 is returned. The center of masses of the two systems should be the same as the fitting is rotational only.
fitCoords and refCoords must have the same dimension. If no error handler is installed this will result in the program exiting. If AdGSLErrorHandler is installed an NSInternalInconsistencyException will be raised.
| double AdLeastSquaresSelectionFit |
( |
gsl_matrix * |
fitCoords, |
|
|
gsl_matrix * |
refCoords, |
|
|
gsl_vector * |
masses, |
|
|
NSIndexSet * |
selection, |
|
|
BOOL |
calculateRMSD |
|
) |
| |
As AdLeastSquaresFit() except only uses the coordinates of the elements defined by selection to do the fit.
- Parameters:
-
| selection | An NSIndexSet containing the indexes of the elements in fitCoords and refCoords to use to fitting. |
| masses | The masses corresponding to each each element in fitCoords |
| void AdMoveCentreOfMassToOrigin |
( |
gsl_matrix * |
coordinates, |
|
|
gsl_vector * |
masses |
|
) |
| |
Moves the centre of mass of the system with coordinates and masses to the origin. The matrix coordinates is modified on return.
| void AdMoveCentreOfMassToPoint |
( |
Vector3D * |
point, |
|
|
gsl_matrix * |
coordinates, |
|
|
gsl_vector * |
masses |
|
) |
| |
Moves the centre of mass of the system with coordinates and masses to point. The matrix coordinates is modified on return.