149 if((NCoor == 0) || (
blGetPDBCoor(fit_pdb, &fit_coor) != NCoor))
152 if(ref_coor) free(ref_coor);
153 if(fit_coor) free(fit_coor);
160 if(ref_coor) free(ref_coor);
161 if(fit_coor) free(fit_coor);
166 if((weights = (
REAL *)malloc(NCoor *
sizeof(
REAL))) ==
NULL)
168 if(ref_coor) free(ref_coor);
169 if(fit_coor) free(fit_coor);
175 insert = ref_pdb->
insert[0];
185 for(q=start; q!=p;
NEXT(q))
187 weights[i] = (
REAL)(1.0/(
REAL)natom);
188 if(!strncmp(q->atnam,
"CA ",4)) weights[i] = (
REAL)1.0;
189 if(!strncmp(q->atnam,
"CB ",4)) weights[i] = (
REAL)1.0;
201 weights[i] = (
REAL)(1.0/(
REAL)natom);
202 if(!strncmp(q->atnam,
"CA ",4)) weights[i] = (
REAL)1.0;
203 if(!strncmp(q->atnam,
"CB ",4)) weights[i] = (
REAL)1.0;
208 RetVal =
blMatfit(ref_coor,fit_coor,RotMat,NCoor,weights,
FALSE);
228 rm[i][j] = RotMat[i][j];
Include file for PDB routines.
BOOL blFitCaCbPDB(PDB *ref_pdb, PDB *fit_pdb, REAL rm[3][3])
int blGetPDBCoor(PDB *pdb, COOR **coor)
BOOL blMatfit(COOR *x1, COOR *x2, REAL rm[3][3], int n, REAL *wt1, BOOL column)
Include file for least squares fitting.
void blGetCofGPDB(PDB *pdb, VEC3F *cg)
System-type variable type definitions.
void blOriginPDB(PDB *pdb)
Type definitions for maths.
void blTranslatePDB(PDB *pdb, VEC3F tvect)
void blApplyMatrixPDB(PDB *pdb, REAL matrix[3][3])