Commit e5d6a8e6 by Chloe Dequeker

modif main complete

parent 0f097225
...@@ -284,6 +284,7 @@ int main(int argc, char** argv){ ...@@ -284,6 +284,7 @@ int main(int argc, char** argv){
struct pdb_values* pdbL = NULL; struct pdb_values* pdbL = NULL;
struct pdb_values* pdbR = NULL; struct pdb_values* pdbR = NULL;
struct pdb_values* newPDB = NULL; struct pdb_values* newPDB = NULL;
struct pdb_values* newPDB_R = NULL;
struct docking_results* dock_res = NULL; struct docking_results* dock_res = NULL;
float dalpha = 0, dbeta = 0, dgamma = 0; float dalpha = 0, dbeta = 0, dgamma = 0;
...@@ -340,6 +341,12 @@ int main(int argc, char** argv){ ...@@ -340,6 +341,12 @@ int main(int argc, char** argv){
dock_res->trans_Y[target_conf],dock_res->trans_Z[target_conf], dock_res->trans_Y[target_conf],dock_res->trans_Z[target_conf],
dock_res->alpha[target_conf],dock_res->beta[target_conf], dock_res->alpha[target_conf],dock_res->beta[target_conf],
dock_res->gamma[target_conf]); dock_res->gamma[target_conf]);
}else if(ATTRACT){
/* For the ligand */
newPDB = rotate_ATTRACT(pdbL,newPDB,dock_res,target_conf,0);
/*For the receptor */
newPDB_R = rotate_ATTRACT(pdbR,newPDB,dock_res,target_conf,1);
}else{ }else{
newPDB = rotate_global(pdbL,pdbR,newPDB,dock_res->distCenters[target_conf], newPDB = rotate_global(pdbL,pdbR,newPDB,dock_res->distCenters[target_conf],
dock_res->theta[target_conf],dock_res->phi[target_conf], dock_res->theta[target_conf],dock_res->phi[target_conf],
...@@ -348,14 +355,20 @@ int main(int argc, char** argv){ ...@@ -348,14 +355,20 @@ int main(int argc, char** argv){
/* Write the number of the conformation and get the interface */ /* Write the number of the conformation and get the interface */
if(!doNotOutputINT){ if(!doNotOutputINT){
if(ATTRACT){
getInterface(newPDB_R,newPDB,target_conf);
}else{
getInterface(pdbR,newPDB,target_conf); getInterface(pdbR,newPDB,target_conf);
} }
}
if(constructPDB){ if(constructPDB){
writePDB(newPDB, ligand,target_conf); writePDB(newPDB, ligand,target_conf);
} }
freePDB(newPDB); freePDB(newPDB);
freePDB(newPDB_R);
newPDB = NULL; newPDB = NULL;
newPDB_R = NULL;
}else{ /* For all conformations */ }else{ /* For all conformations */
for(i=1;i<=dock_res->nbConf;i++){ for(i=1;i<=dock_res->nbConf;i++){
...@@ -390,6 +403,12 @@ int main(int argc, char** argv){ ...@@ -390,6 +403,12 @@ int main(int argc, char** argv){
dock_res->trans_Y[i],dock_res->trans_Z[i], dock_res->trans_Y[i],dock_res->trans_Z[i],
dock_res->alpha[i],dock_res->beta[i], dock_res->alpha[i],dock_res->beta[i],
dock_res->gamma[i]); dock_res->gamma[i]);
}else if(ATTRACT){
/* For the ligand */
newPDB = rotate_ATTRACT(pdbL,newPDB,dock_res,target_conf,0);
/*For the receptor */
newPDB_R = rotate_ATTRACT(pdbR,newPDB,dock_res,target_conf,1);
}else{ }else{
newPDB = rotate_global(pdbL,pdbR,newPDB,dock_res->distCenters[i], newPDB = rotate_global(pdbL,pdbR,newPDB,dock_res->distCenters[i],
dock_res->theta[i],dock_res->phi[i], dock_res->theta[i],dock_res->phi[i],
...@@ -398,15 +417,21 @@ int main(int argc, char** argv){ ...@@ -398,15 +417,21 @@ int main(int argc, char** argv){
/* Write the number of the conformation and get the interface */ /* Write the number of the conformation and get the interface */
if(!doNotOutputINT){ if(!doNotOutputINT){
if(ATTRACT){
getInterface(newPDB_R,newPDB,i);
}else{
getInterface(pdbR,newPDB,i); getInterface(pdbR,newPDB,i);
} }
}
if(constructPDB){ if(constructPDB){
writePDB(newPDB, ligand,i); writePDB(newPDB, ligand,i);
} }
} }
freePDB(newPDB); freePDB(newPDB);
freePDB(newPDB_R);
newPDB = NULL; newPDB = NULL;
newPDB_R = NULL;
} }
freePDB(pdbL); freePDB(pdbL);
......
...@@ -17,6 +17,8 @@ struct pdb_values* rotate_ZDOCK_init(struct pdb_values* pdb, struct pdb_values* ...@@ -17,6 +17,8 @@ struct pdb_values* rotate_ZDOCK_init(struct pdb_values* pdb, struct pdb_values*
struct pdb_values* rotate_ZDOCK(struct pdb_values* pdb, struct pdb_values* newPDB, float trans_X, float trans_Y, float trans_Z, float alpha, float beta, float gamma); struct pdb_values* rotate_ZDOCK(struct pdb_values* pdb, struct pdb_values* newPDB, float trans_X, float trans_Y, float trans_Z, float alpha, float beta, float gamma);
struct pdb_values* rotate_ATTRACT(struct pdb_values* pdb, struct pdb_values* newPDB, struct docking_results* dock_res, int target_conf, int isRec);
void init_ZDOCK(struct pdb_values** pdbL_addr); void init_ZDOCK(struct pdb_values** pdbL_addr);
void rotateAtom (float oldX, float oldY, float oldZ, void rotateAtom (float oldX, float oldY, float oldZ,
......
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