Commit e5d6a8e6 by Chloe Dequeker

modif main complete

parent 0f097225
......@@ -284,6 +284,7 @@ int main(int argc, char** argv){
struct pdb_values* pdbL = NULL;
struct pdb_values* pdbR = NULL;
struct pdb_values* newPDB = NULL;
struct pdb_values* newPDB_R = NULL;
struct docking_results* dock_res = NULL;
float dalpha = 0, dbeta = 0, dgamma = 0;
......@@ -340,6 +341,12 @@ int main(int argc, char** argv){
dock_res->trans_Y[target_conf],dock_res->trans_Z[target_conf],
dock_res->alpha[target_conf],dock_res->beta[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{
newPDB = rotate_global(pdbL,pdbR,newPDB,dock_res->distCenters[target_conf],
dock_res->theta[target_conf],dock_res->phi[target_conf],
......@@ -348,14 +355,20 @@ int main(int argc, char** argv){
/* Write the number of the conformation and get the interface */
if(!doNotOutputINT){
getInterface(pdbR,newPDB,target_conf);
if(ATTRACT){
getInterface(newPDB_R,newPDB,target_conf);
}else{
getInterface(pdbR,newPDB,target_conf);
}
}
if(constructPDB){
writePDB(newPDB, ligand,target_conf);
}
freePDB(newPDB);
newPDB = NULL;
freePDB(newPDB_R);
newPDB = NULL;
newPDB_R = NULL;
}else{ /* For all conformations */
for(i=1;i<=dock_res->nbConf;i++){
......@@ -390,6 +403,12 @@ int main(int argc, char** argv){
dock_res->trans_Y[i],dock_res->trans_Z[i],
dock_res->alpha[i],dock_res->beta[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{
newPDB = rotate_global(pdbL,pdbR,newPDB,dock_res->distCenters[i],
dock_res->theta[i],dock_res->phi[i],
......@@ -398,7 +417,11 @@ int main(int argc, char** argv){
/* Write the number of the conformation and get the interface */
if(!doNotOutputINT){
getInterface(pdbR,newPDB,i);
if(ATTRACT){
getInterface(newPDB_R,newPDB,i);
}else{
getInterface(pdbR,newPDB,i);
}
}
if(constructPDB){
......@@ -406,7 +429,9 @@ int main(int argc, char** argv){
}
}
freePDB(newPDB);
newPDB = NULL;
freePDB(newPDB_R);
newPDB = NULL;
newPDB_R = NULL;
}
freePDB(pdbL);
......
......@@ -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_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 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