144 for(p=pdb, natoms = 0; p!=
next;
NEXT(p), natoms++) ;
147 x = (
REAL *)malloc(natoms *
sizeof(
REAL));
148 y = (
REAL *)malloc(natoms *
sizeof(
REAL));
149 z = (
REAL *)malloc(natoms *
sizeof(
REAL));
196 for(p=four, nmove=2; p!=next && nmove<natoms;
NEXT(p), nmove++)
208 for(j=0; j<nmove; j++)
218 s = (
REAL)sqrt((
double)(x[1] * x[1] + y[1] * y[1] + z[1] * z[1]));
224 cosrot = (
REAL)cos((
double)chi);
225 sinrot = (
REAL)sin((
double)chi);
228 matrix[0][0] = n1*n1+(1-n1*n1)*cosrot;
229 matrix[0][1] = n1*n2*(1-cosrot)+n3*sinrot;
230 matrix[0][2] = n1*n3*(1-cosrot)-n2*sinrot;
231 matrix[1][0] = n1*n2*(1-cosrot)-n3*sinrot;
232 matrix[1][1] = n2*n2+(1-n2*n2)*cosrot;
233 matrix[1][2] = n2*n3*(1-cosrot)+n1*sinrot;
234 matrix[2][0] = n1*n3*(1-cosrot)+n2*sinrot;
235 matrix[2][1] = n2*n3*(1-cosrot)-n1*sinrot;
236 matrix[2][2] = n3*n3+(1-n3*n3)*cosrot;
239 for(j=0; j<nmove; j++)
245 tempx = x[j] * matrix[0][0] +
246 y[j] * matrix[1][0] +
248 tempy = x[j] * matrix[0][1] +
249 y[j] * matrix[1][1] +
251 tempz = x[j] * matrix[0][2] +
252 y[j] * matrix[1][2] +
261 for(j=0; j<nmove; j++)
275 for(p=four, nmove=2; p!=next && nmove<natoms;
NEXT(p), nmove++)
void blSetChi(PDB *pdb, PDB *next, REAL chi, int type)
Include file for PDB routines.
REAL blCalcChi(PDB *pdb, int type)
PDB * blGetPDBByN(PDB *pdb, int n)
Type definitions for maths.