Commit ac74a3f4 by Chloe Dequeker

trailing spaces

parent 11b33f7d
......@@ -16,11 +16,11 @@ void sphericToxyz(float *x, float *y, float *z, float x0, float y0, float z0, fl
}
struct pdb_values* rotate_sophie(struct pdb_values* pdb, struct pdb_values* pdbR, struct pdb_values* newPDB, float R, float theta, float phi, float alpha,float beta,float gamma, struct docking_results* dock_res, int nConf){
/* This function rotates the PDB pdb given in argument and sets the new coordinates in newPDB.
* The final center of the repair is the geometric center of the PDB pdbR.
/* This function rotates the PDB pdb given in argument and sets the new coordinates in newPDB.
* The final center of the repair is the geometric center of the PDB pdbR.
* The angles alpha, beta, gamma in arguments correspond to the rotation angles that have to be applied to
* each residue.
* In the struct dock_res, we can find the angles alpha0, beta0 and gamma0.
* each residue.
* In the struct dock_res, we can find the angles alpha0, beta0 and gamma0.
* alpha0 corresponds to the final angle alpha of the CA 1 once it's been rotated by dalpha
* beta0 corresponds to the final angle beta of the CA 1 once it's been rotated by dbeta
* gamma0 corresponds to the final angle gamma of the CA 5 once it's been rotated by dalpha and then dbeta
......@@ -28,7 +28,7 @@ struct pdb_values* rotate_sophie(struct pdb_values* pdb, struct pdb_values* pdbR
* The rotation matrices used are available at :
* https://en.wikipedia.org/wiki/Rotation_matrix in "Nested Dimensions"
*/
float xi = 0, yi = 0, zi = 0;
float x1i = 0, y1i = 0, z1i = 0;
float x2i = 0, y2i = 0, z2i = 0;
......@@ -41,13 +41,13 @@ struct pdb_values* rotate_sophie(struct pdb_values* pdb, struct pdb_values* pdbR
float c_b=cos(beta),s_b=sin(beta);
float c_g=cos(gamma),s_g=sin(gamma);
/* The angles alpha0, beta0, gamma0 corresponds to the angles for the axis
/* The angles alpha0, beta0, gamma0 corresponds to the angles for the axis
* (origin,CA1 rotated by alpha), (origin, CA1 rotated by beta) and
* (origin, CA5 rotated by alpha then beta) respectively
* (origin, CA5 rotated by alpha then beta) respectively
*
* We name these axis :
* N : (origin,CA1 rotated by alpha)
* Z : (origin, CA5 rotated by alpha then beta)
* N : (origin,CA1 rotated by alpha)
* Z : (origin, CA5 rotated by alpha then beta)
*
* The axis N therefore has the coordinates :
* xN : c_a0
......@@ -62,7 +62,7 @@ struct pdb_values* rotate_sophie(struct pdb_values* pdb, struct pdb_values* pdbR
float xN = c_a0;
float yN = s_a0;
float zN = 0;
/* The coordinates of the unit vector for the axis Z can be computed as such :
* xZ : -s_a0 * c_b0
* yZ : c_a0 * c_b0
......@@ -77,7 +77,7 @@ struct pdb_values* rotate_sophie(struct pdb_values* pdb, struct pdb_values* pdbR
newPDB->nbAtom = pdb->nbAtom;
}
memcpy(newPDB->residues,pdb->residues,pdb->nbRes*sizeof(struct residue));
float newX = pdbR->centerX + R*sin(theta)*cos(phi);
float newY = pdbR->centerY + R*sin(theta)*sin(phi);
......@@ -107,7 +107,7 @@ struct pdb_values* rotate_sophie(struct pdb_values* pdb, struct pdb_values* pdbR
z3i = (xZ*zZ*(1.0-c_g)-yZ*s_g)*x2i + (yZ*zZ*(1.0-c_g)+xZ*s_g)*y2i + (zZ*zZ+(1.0-zZ*zZ)*c_g) *z2i;
/* Now the residue has been rotated, and we need to translate it
/* Now the residue has been rotated, and we need to translate it
* to its final destination
*/
newPDB->residues[i].x[j] = x3i + newX;
......@@ -115,7 +115,7 @@ struct pdb_values* rotate_sophie(struct pdb_values* pdb, struct pdb_values* pdbR
newPDB->residues[i].z[j] = z3i + newZ;
/* We also translate the coordinates of the first and fifth CA, even
* though they are not used afterwards. This is for the sake of
* though they are not used afterwards. This is for the sake of
* having the right values at the right places
*/
newPDB->xCA1 = (newPDB->xCA1 - pdb->centerX) + newX;
......@@ -138,10 +138,10 @@ struct pdb_values* rotate_sophie(struct pdb_values* pdb, struct pdb_values* pdbR
void getAnglesFromCA1andCA5_sophie(struct pdb_values* pdb, float* alpha, float* beta, float* gamma){
/* In this function, we first need to find the initial angles alpha and beta that correspond
* to the angles alpha and beta for the first CA of the protein.
* Then, we need to apply a rotation alpha around the axis Z, then a rotation beta
* to the angles alpha and beta for the first CA of the protein.
* Then, we need to apply a rotation alpha around the axis Z, then a rotation beta
* around the axis X on the fifth atom CA of the protein.
* The coordinates of the then rotated atom CA 5 will give us the initial angle gamma
* The coordinates of the then rotated atom CA 5 will give us the initial angle gamma
*/
*alpha = 0;
......@@ -165,10 +165,10 @@ void getAnglesFromCA1andCA5_sophie(struct pdb_values* pdb, float* alpha, float*
x2 = pdb->xCA5 - pdb->centerX;
y2 = pdb->yCA5 - pdb->centerY;
z2 = pdb->zCA5 - pdb->centerZ;
// Lenght of the projection on the plane X,Y
p1 = sqrt(x1*x1+y1*y1);
// Distance between the CA 1 and the geometric center of the ligand
r1 = sqrt(x1*x1+y1*y1+z1*z1);
......@@ -182,14 +182,14 @@ void getAnglesFromCA1andCA5_sophie(struct pdb_values* pdb, float* alpha, float*
s_b = z1/r1;
*(alpha)= acos(c_a);
if(s_a<0.0)
if(s_a<0.0)
*alpha = -(*alpha);
*(beta)= acos(c_b);
if(s_b<0.0)
if(s_b<0.0)
*beta = -(*beta);
/* Rotation matrix for alpha */
x1i = x2*c_a - y2*s_a;
y1i = y2*c_a + x2*s_a;
......@@ -206,7 +206,7 @@ void getAnglesFromCA1andCA5_sophie(struct pdb_values* pdb, float* alpha, float*
s_g = x2i/p2;
*gamma = acos(c_g);
if(s_g<0.0)
if(s_g<0.0)
*gamma = -(*gamma);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment