mirror of
https://github.com/Discngine/fpocket.git
synced 2026-06-04 20:04:22 +08:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4bb0d8447f | ||
|
|
08480cca17 | ||
|
|
6c7c55dfdd | ||
|
|
fdd5a7d14e | ||
|
|
9fdba19dd7 | ||
|
|
4810330d32 | ||
|
|
c75e2d7f98 | ||
|
|
0e8b195945 |
@@ -81,8 +81,8 @@ typedef struct s_desc
|
|||||||
characterChain2, /**< 0 if protein, 1 if nucl acid pocket, 2 if HETATM pocket*/
|
characterChain2, /**< 0 if protein, 1 if nucl acid pocket, 2 if HETATM pocket*/
|
||||||
numResChain1, /**<number of resdiues on chain 1*/
|
numResChain1, /**<number of resdiues on chain 1*/
|
||||||
numResChain2; /**<number of res on chain 2*/
|
numResChain2; /**<number of res on chain 2*/
|
||||||
char nameChain1[2], /**<name of the first chain in contact with the pocket*/
|
char nameChain1[255], /**<name of the first chain in contact with the pocket*/
|
||||||
nameChain2[2]; /**<name of the second chain in contact with the pocket, if there is*/
|
nameChain2[255]; /**<name of the second chain in contact with the pocket, if there is*/
|
||||||
char ligTag[8]; /**<het atom tag of ligands situated in the pocket*/
|
char ligTag[8]; /**<het atom tag of ligands situated in the pocket*/
|
||||||
|
|
||||||
} s_desc ;
|
} s_desc ;
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -65,7 +65,6 @@ s_desc* allocate_s_desc(void)
|
|||||||
s_desc *desc = (s_desc*)my_malloc(sizeof(s_desc)) ;
|
s_desc *desc = (s_desc*)my_malloc(sizeof(s_desc)) ;
|
||||||
|
|
||||||
reset_desc(desc) ;
|
reset_desc(desc) ;
|
||||||
|
|
||||||
return desc ;
|
return desc ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -364,7 +363,7 @@ void set_atom_based_descriptors(s_atm **atoms, int natoms, s_desc *desc,s_atm *a
|
|||||||
nb_res_ids = 0 ; /* Current number of residus */
|
nb_res_ids = 0 ; /* Current number of residus */
|
||||||
|
|
||||||
int nb_polar_atm = 0 ;
|
int nb_polar_atm = 0 ;
|
||||||
char curChainName[2];
|
char *curChainName = (char*)my_malloc(255*sizeof(char));
|
||||||
|
|
||||||
if(atoms && natoms>1){
|
if(atoms && natoms>1){
|
||||||
firstatom=atoms[0];
|
firstatom=atoms[0];
|
||||||
@@ -373,8 +372,8 @@ void set_atom_based_descriptors(s_atm **atoms, int natoms, s_desc *desc,s_atm *a
|
|||||||
if(element_in_std_res(firstatom->res_name)) desc->characterChain1=0;
|
if(element_in_std_res(firstatom->res_name)) desc->characterChain1=0;
|
||||||
else if(element_in_nucl_acid(firstatom->res_name)) desc->characterChain1=1;
|
else if(element_in_nucl_acid(firstatom->res_name)) desc->characterChain1=1;
|
||||||
else if(element_in_kept_res(firstatom->res_name)) desc->characterChain1=2;
|
else if(element_in_kept_res(firstatom->res_name)) desc->characterChain1=2;
|
||||||
strncpy(desc->nameChain1,firstatom->chain,2);
|
strcpy(desc->nameChain1,firstatom->chain);
|
||||||
strncpy(curChainName,firstatom->chain,2);
|
strcpy(curChainName,firstatom->chain);
|
||||||
desc->numResChain1 = countResidues(all_atoms,all_natoms,firstatom->chain);
|
desc->numResChain1 = countResidues(all_atoms,all_natoms,firstatom->chain);
|
||||||
|
|
||||||
for(i = 0 ; i < natoms ; i++) {
|
for(i = 0 ; i < natoms ; i++) {
|
||||||
@@ -384,7 +383,7 @@ void set_atom_based_descriptors(s_atm **atoms, int natoms, s_desc *desc,s_atm *a
|
|||||||
desc->interChain = 1;
|
desc->interChain = 1;
|
||||||
if(!desc->numResChain2){
|
if(!desc->numResChain2){
|
||||||
desc->numResChain2 = countResidues(all_atoms,all_natoms,curatom->chain);
|
desc->numResChain2 = countResidues(all_atoms,all_natoms,curatom->chain);
|
||||||
strncpy(curChainName,curatom->chain,1);
|
strcpy(curChainName,curatom->chain);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -124,9 +124,13 @@ s_pdb *open_mmcif(char *fpath, const char *ligan, const int keep_lig, int model_
|
|||||||
if (par->xlig_resnumber > -1)
|
if (par->xlig_resnumber > -1)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (((is_ligand(par->chain_as_ligand, at_in[i].chain_auth,par->n_chains_as_ligand)) || (par->xlig_chain_code !=NULL && at_in[i].chain_auth[0] == par->xlig_chain_code[0] && at_in[i].resid_auth == par->xlig_resnumber && par->xlig_resname[0] == at_in[i].resname[0] && par->xlig_resname[1] == at_in[i].resname[1] && par->xlig_resname[2] == at_in[i].resname[2]) || (par->xlig_chain_code!=NULL && at_in[i].chain_auth[0] == par->xlig_chain_code[0] && at_in[i].resid_auth == par->xlig_resnumber && par->xlig_resname[0] == at_in[i].resname[0] && par->xlig_resname[1] == at_in[i].resname[1] && par->xlig_resname[2] == at_in[i].resname[2])))
|
// if (((is_ligand(par->chain_as_ligand, at_in[i].chain_auth,par->n_chains_as_ligand)) || (par->xlig_chain_code !=NULL && at_in[i].chain_auth[0] == par->xlig_chain_code[0] && at_in[i].resid_auth == par->xlig_resnumber && par->xlig_resname[0] == at_in[i].resname[0] && par->xlig_resname[1] == at_in[i].resname[1] && par->xlig_resname[2] == at_in[i].resname[2]) || (par->xlig_chain_code!=NULL && at_in[i].chain_auth[0] == par->xlig_chain_code[0] && at_in[i].resid_auth == par->xlig_resnumber && par->xlig_resname[0] == at_in[i].resname[0] && par->xlig_resname[1] == at_in[i].resname[1] && par->xlig_resname[2] == at_in[i].resname[2])))
|
||||||
|
if (((is_ligand(par->chain_as_ligand, at_in[i].chain_auth,par->n_chains_as_ligand)) || (par->xlig_chain_code !=NULL && strcmp(at_in[i].chain_auth,par->xlig_chain_code)==0 && at_in[i].resid_auth == par->xlig_resnumber && par->xlig_resname[0] == at_in[i].resname[0] && par->xlig_resname[1] == at_in[i].resname[1] && par->xlig_resname[2] == at_in[i].resname[2]) || (par->xlig_chain_code!=NULL && at_in[i].chain_auth[0] == par->xlig_chain_code[0] && at_in[i].resid_auth == par->xlig_resnumber && par->xlig_resname[0] == at_in[i].resname[0] && par->xlig_resname[1] == at_in[i].resname[1] && par->xlig_resname[2] == at_in[i].resname[2])))
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
pdb->n_xlig_atoms++;
|
pdb->n_xlig_atoms++;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -630,9 +634,8 @@ void read_mmcif(s_pdb *pdb, const char *ligan, const int keep_lig, int model_num
|
|||||||
|
|
||||||
unsigned short is_chain_ligand=(is_ligand(params->chain_as_ligand, at_in[i].chain_auth,params->n_chains_as_ligand) && strncmp(at_in[i].resname, "HOH", 3) && strncmp(at_in[i].resname, "WAT", 3) && strncmp(at_in[i].resname, "TIP", 3));
|
unsigned short is_chain_ligand=(is_ligand(params->chain_as_ligand, at_in[i].chain_auth,params->n_chains_as_ligand) && strncmp(at_in[i].resname, "HOH", 3) && strncmp(at_in[i].resname, "WAT", 3) && strncmp(at_in[i].resname, "TIP", 3));
|
||||||
|
|
||||||
if (is_chain_ligand || (params->xlig_chain_code !=NULL && at_in[i].chain_auth[0] == params->xlig_chain_code[0] && at_in[i].resid_auth == params->xlig_resnumber && params->xlig_resname[0] == at_in[i].resname[0] && params->xlig_resname[1] == at_in[i].resname[1] && params->xlig_resname[2] == at_in[i].resname[2]) || (params->xlig_chain_code!=NULL && at_in[i].chain_auth[0] == params->xlig_chain_code[0] && at_in[i].resid_auth == params->xlig_resnumber && params->xlig_resname[0] == at_in[i].resname[0] && params->xlig_resname[1] == at_in[i].resname[1] && params->xlig_resname[2] == at_in[i].resname[2]))
|
if (is_chain_ligand || (params->xlig_chain_code !=NULL && strcmp(at_in[i].chain_auth, params->xlig_chain_code)==0 && at_in[i].resid_auth == params->xlig_resnumber && params->xlig_resname[0] == at_in[i].resname[0] && params->xlig_resname[1] == at_in[i].resname[1] && params->xlig_resname[2] == at_in[i].resname[2]) || (params->xlig_chain_code!=NULL && strcmp(at_in[i].chain_auth, params->xlig_chain_code)==0 && at_in[i].resid_auth == params->xlig_resnumber && params->xlig_resname[0] == at_in[i].resname[0] && params->xlig_resname[1] == at_in[i].resname[1] && params->xlig_resname[2] == at_in[i].resname[2]))
|
||||||
{
|
{
|
||||||
|
|
||||||
*(pdb->xlig_x + i_explicit_ligand_atom) = ts_in.coords[3 * i];
|
*(pdb->xlig_x + i_explicit_ligand_atom) = ts_in.coords[3 * i];
|
||||||
*(pdb->xlig_y + i_explicit_ligand_atom) = ts_in.coords[(3 * i) + 1];
|
*(pdb->xlig_y + i_explicit_ligand_atom) = ts_in.coords[(3 * i) + 1];
|
||||||
*(pdb->xlig_z + i_explicit_ligand_atom) = ts_in.coords[(3 * i) + 2];
|
*(pdb->xlig_z + i_explicit_ligand_atom) = ts_in.coords[(3 * i) + 2];
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ static const char atomSiteHeader[] =
|
|||||||
|
|
||||||
void write_each_pocket_for_DB(const char out_path[], c_lst_pockets *pockets, s_pdb *pdb) {
|
void write_each_pocket_for_DB(const char out_path[], c_lst_pockets *pockets, s_pdb *pdb) {
|
||||||
int out_len = strlen(out_path);
|
int out_len = strlen(out_path);
|
||||||
char out[out_len + 20];
|
char out[out_len + 40];
|
||||||
out[0] = '\0';
|
out[0] = '\0';
|
||||||
|
|
||||||
node_pocket *pcur;
|
node_pocket *pcur;
|
||||||
@@ -500,7 +500,7 @@ void write_mdpockets_concat_pqr(FILE *f, c_lst_pockets *pockets) {
|
|||||||
*/
|
*/
|
||||||
void write_each_pocket(const char out_path[], c_lst_pockets *pockets) {
|
void write_each_pocket(const char out_path[], c_lst_pockets *pockets) {
|
||||||
int out_len = strlen(out_path);
|
int out_len = strlen(out_path);
|
||||||
char out[out_len + 20];
|
char out[out_len + 40];
|
||||||
out[0] = '\0';
|
out[0] = '\0';
|
||||||
|
|
||||||
node_pocket *pcur;
|
node_pocket *pcur;
|
||||||
|
|||||||
Reference in New Issue
Block a user