mirror of
https://github.com/Discngine/fpocket.git
synced 2026-06-05 04:14:21 +08:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
87cea6b1ce | ||
|
|
b410ea1a6a | ||
|
|
09bb933615 | ||
|
|
1d186a45c9 | ||
|
|
5614b44600 | ||
|
|
0a150455e0 | ||
|
|
225fd07b15 | ||
|
|
4295d69c33 |
7412
data/sample/4gfo.cif
Normal file
7412
data/sample/4gfo.cif
Normal file
File diff suppressed because it is too large
Load Diff
7824
data/sample/4gfo_customized.cif
Normal file
7824
data/sample/4gfo_customized.cif
Normal file
File diff suppressed because it is too large
Load Diff
@@ -121,7 +121,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
||||
#define M_PAR_CHAIN_AS_LIGAND 'a' /**flag, to define which chains are defined as a ligand*/
|
||||
#define M_PAR_CHAIN_AS_LIGAND_LONG "chain_as_ligand"
|
||||
|
||||
#define M_PAR_WRITE_MODE 'w' /**flag, to define which chains are defined as a ligand*/
|
||||
#define M_PAR_WRITE_MODE 'w' /**flag, to define write mode for pocket output: d->same as input, b or both -> both (pdb & cif), p or pdb ->pdb, m or cif -> mmcif*/
|
||||
#define M_PAR_WRITE_MODE_LONG "write_mode"
|
||||
|
||||
#define M_PAR_MIN_N_EXPLICIT_POCKET 'u'
|
||||
|
||||
@@ -142,7 +142,7 @@ s_min_max_coords *float_get_min_max_from_pdb(s_pdb *pdb);
|
||||
void init_coord_grid(s_pdb *pdb);
|
||||
void create_coord_grid(s_pdb *pdb);
|
||||
void fill_coord_grid(s_pdb *pdb);
|
||||
s_atom_ptr_list *init_atom_ptr_list(void);
|
||||
// s_atom_ptr_list *init_atom_ptr_list(void);
|
||||
|
||||
|
||||
short get_mm_type_from_element(char *symbol);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
23
src/fpout.c
23
src/fpout.c
@@ -58,6 +58,7 @@ void write_out_fpocket(c_lst_pockets *pockets, s_pdb *pdb, char *pdbname)
|
||||
char pdb_code[350] = "";
|
||||
char pdb_path[350] = "";
|
||||
char out_path[350] = "";
|
||||
char out_path_tmp[350] = "";
|
||||
char pdb_out_path[350] = "";
|
||||
char info_out_path[350] = "";
|
||||
char mmcif_out_path[350] = "";
|
||||
@@ -85,34 +86,34 @@ void write_out_fpocket(c_lst_pockets *pockets, s_pdb *pdb, char *pdbname)
|
||||
return;
|
||||
}
|
||||
|
||||
sprintf(out_path, "%s/%s", out_path, pdb_code);
|
||||
sprintf(pdb_out_path, "%s_out.pdb", out_path);
|
||||
sprintf(out_path_tmp, "%s/%s", out_path, pdb_code);
|
||||
sprintf(pdb_out_path, "%s_out.pdb", out_path_tmp);
|
||||
|
||||
sprintf(mmcif_out_path, "%s_out.cif", out_path);
|
||||
sprintf(mmcif_out_path, "%s_out.cif", out_path_tmp);
|
||||
|
||||
/* Write vmd and pymol scripts */
|
||||
sprintf(fout, "%s_out.pdb", pdb_code);
|
||||
write_visualization(out_path, fout);
|
||||
write_visualization(out_path_tmp, fout);
|
||||
|
||||
/* Writing full pdb */
|
||||
//printf("%s\n",write_mode);
|
||||
if(write_mode[0] == 'p' || write_mode[0] == 'b'){
|
||||
sprintf(pdb_out_path, "%s_out.pdb", out_path);
|
||||
sprintf(pdb_out_path, "%s_out.pdb", out_path_tmp);
|
||||
|
||||
write_pockets_single_pdb(pdb_out_path, pdb, pockets);
|
||||
}
|
||||
|
||||
/*Writing full mmcif*/
|
||||
if(write_mode[0] == 'm' || write_mode[0] == 'b'){
|
||||
sprintf(mmcif_out_path, "%s_out.cif", out_path);
|
||||
sprintf(mmcif_out_path, "%s_out.cif", out_path_tmp);
|
||||
write_pockets_single_mmcif(mmcif_out_path, pdb, pockets);
|
||||
}
|
||||
|
||||
sprintf(info_out_path, "%s_info.txt", out_path);
|
||||
sprintf(info_out_path, "%s_info.txt", out_path_tmp);
|
||||
write_out_fpocket_info_file(pockets, info_out_path);
|
||||
|
||||
/* Writing pockets as a single pqr */
|
||||
sprintf(fout, "%s_pockets.pqr", out_path);
|
||||
sprintf(fout, "%s_pockets.pqr", out_path_tmp);
|
||||
write_pockets_single_pqr(fout, pockets);
|
||||
|
||||
/* Writing individual pockets pqr */
|
||||
@@ -121,14 +122,14 @@ void write_out_fpocket(c_lst_pockets *pockets, s_pdb *pdb, char *pdbname)
|
||||
else
|
||||
sprintf(out_path, "%s_out", pdb_code);
|
||||
|
||||
sprintf(out_path, "%s/pockets", out_path);
|
||||
sprintf(command, "mkdir %s", out_path);
|
||||
sprintf(out_path_tmp, "%s/pockets", out_path);
|
||||
sprintf(command, "mkdir %s", out_path_tmp);
|
||||
status = system(command);
|
||||
/*if(status != 0) {
|
||||
return ;
|
||||
}*/
|
||||
|
||||
write_each_pocket(out_path, pockets);
|
||||
write_each_pocket(out_path_tmp, pockets);
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
||||
@@ -79,13 +79,11 @@ s_pdb *open_mmcif(char *fpath, const char *ligan, const int keep_lig, int model_
|
||||
model_flag = 1;
|
||||
for (i = 0; i < inatoms; i++) /*loop to go through all atoms*/
|
||||
{
|
||||
|
||||
if (at_in[i].altloc[0] == '.' || at_in[i].altloc[0] == '\0')
|
||||
at_in[i].altloc[0] = ' ';
|
||||
if (at_in[i].modelnumber == model_number && !strncmp(at_in[i].atom_type, "ATOM", 4) && !is_ligand(par->chain_as_ligand, at_in[i].chain[0]))
|
||||
{
|
||||
if (at_in[i].altloc[0] == ' ' || at_in[i].altloc[0] == 'A')
|
||||
|
||||
if (at_in[i].altloc[0] == ' ' || at_in[i].altloc[0] == 'A' || at_in[i].altloc[0] == '?')
|
||||
{
|
||||
if (chains_to_delete(par->chain_delete, at_in[i].chain[0], par->chain_is_kept))
|
||||
{
|
||||
@@ -138,7 +136,7 @@ s_pdb *open_mmcif(char *fpath, const char *ligan, const int keep_lig, int model_
|
||||
else if (at_in[i].modelnumber == model_number && !strncmp(at_in[i].atom_type, "HETATM", 6) || (!strncmp(at_in[i].atom_type, "ATOM", 4) && is_ligand(par->chain_as_ligand, at_in[i].chain[0])))
|
||||
{
|
||||
|
||||
if (at_in[i].altloc[0] == ' ' || at_in[i].altloc[0] == 'A' || at_in[i].altloc[0] == '1')
|
||||
if (at_in[i].altloc[0] == '?' || at_in[i].altloc[0] == ' ' || at_in[i].altloc[0] == 'A' || at_in[i].altloc[0] == '1')
|
||||
{
|
||||
|
||||
if (chains_to_delete(par->chain_delete, at_in[i].chain[0], par->chain_is_kept))
|
||||
@@ -291,7 +289,7 @@ void read_mmcif(s_pdb *pdb, const char *ligan, const int keep_lig, int model_num
|
||||
if (at_in[i].modelnumber == model_number && !strncmp(at_in[i].atom_type, "ATOM", 4) && !is_ligand(params->chain_as_ligand, at_in[i].chain[0]))
|
||||
{
|
||||
|
||||
if (at_in[i].altloc[0] == ' ' || at_in[i].altloc[0] == 'A' || at_in[i].altloc[0] == '1')
|
||||
if (at_in[i].altloc[0] == ' ' || at_in[i].altloc[0] == 'A' || at_in[i].altloc[0] == '1' || at_in[i].altloc[0] == '?')
|
||||
{ /*if within first occurence*/
|
||||
/* Enter this if when arg in command line is -r */
|
||||
|
||||
@@ -448,7 +446,7 @@ void read_mmcif(s_pdb *pdb, const char *ligan, const int keep_lig, int model_num
|
||||
else if (at_in[i].modelnumber == model_number && !strncmp(at_in[i].atom_type, "HETATM", 6) || (!strncmp(at_in[i].atom_type, "ATOM", 4) && is_ligand(params->chain_as_ligand, at_in[i].chain[0])))
|
||||
{
|
||||
|
||||
if (at_in[i].altloc[0] == ' ' || at_in[i].altloc[0] == 'A' || at_in[i].altloc[0] == '1')
|
||||
if (at_in[i].altloc[0] == ' ' || at_in[i].altloc[0] == 'A' || at_in[i].altloc[0] == '1' || at_in[i].altloc[0] =='?')
|
||||
{ /*first occurence*/
|
||||
|
||||
if (is_ligand(params->chain_as_ligand, at_in[i].chain[0]))
|
||||
|
||||
10
src/rpdb.c
10
src/rpdb.c
@@ -186,13 +186,6 @@ s_min_max_coords *float_get_min_max_from_pdb(s_pdb *pdb)
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
s_atom_ptr_list *init_atom_ptr_list()
|
||||
{
|
||||
s_atom_ptr_list *ret = my_malloc(sizeof(s_atom_ptr_list));
|
||||
ret->natoms = 0;
|
||||
ret->latoms = (s_atm **)my_malloc(sizeof(s_atm *));
|
||||
return (ret);
|
||||
}
|
||||
|
||||
void create_coord_grid(s_pdb *pdb)
|
||||
{
|
||||
@@ -284,7 +277,8 @@ void init_coord_grid(s_pdb *pdb)
|
||||
g->atom_ptr[cx][cy] = (s_atom_ptr_list *)my_malloc(sizeof(s_atom_ptr_list) * g->nz);
|
||||
for (cz = 0; cz < g->nz; cz++)
|
||||
{
|
||||
g->atom_ptr[cx][cy][cz] = *init_atom_ptr_list();
|
||||
g->atom_ptr[cx][cy][cz].natoms = 0;
|
||||
g->atom_ptr[cx][cy][cz].latoms = (s_atm **)my_malloc(sizeof(s_atm *));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user