Commit b20bc0f0 by Chloe Dequeker

modif clash system : per res

parent a99f026d
......@@ -112,7 +112,7 @@ void getInterface(struct pdb_values* pdbR, struct pdb_values* pdbL, int confID){
* final quadratic complexity
*/
int i = 0, j = 0, k = 0, l = 0;
int i = 0, j = 0, k = 0, l = 0, isClashed = 0;
int oldCandL = -1, oldCandR = -1;
float x1 = 0, y1 = 0, z1 = 0;
float x2 = 0, y2 = 0, z2 = 0;
......@@ -194,6 +194,7 @@ void getInterface(struct pdb_values* pdbR, struct pdb_values* pdbL, int confID){
/* For each candidate residue of the receptor */
for(i=0;i<nbCandR;i++){
isClashed = 0;
for(j=0;j<t_candidateR[i]->nbAtom;j++){
x1 = t_candidateR[i]->x[j];
y1 = t_candidateR[i]->y[j];
......@@ -208,8 +209,9 @@ void getInterface(struct pdb_values* pdbR, struct pdb_values* pdbL, int confID){
dist = sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) + (z1-z2)*(z1-z2));
if(dist < DIST_FOR_CLASH){
if(!force)
if(!force && !isClashed)
clash++;
isClashed = 1;
if(clash >= TOO_MANY_CLASHES){
break;
}
......
......@@ -11,7 +11,7 @@
#define COEF_DEGREE_TO_RADIAN 0.017453293 /* Coefficient to convert degrees to radians */
#define NB_MAX_ATOM_PER_RES 100 /* No residue has more atoms than that */
#define TOO_MANY_CLASHES 40 /* If not forcing, program will skip conformation after
#define TOO_MANY_CLASHES 20 /* If not forcing, program will skip conformation after
* this number of clashes */
#define DIST_FOR_CONTACT 5 /* Distance under which we consider
* two residues are in contact */
......
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