Skip to content

Conversation

@radakb
Copy link

@radakb radakb commented Oct 7, 2025

  1. Fix buffer overflow error in fpocket with the -d option
    The buffer for env_atm filenames was too short for systems with > 9 pockets.
    There's probably a better way to fix this than just increasing the buffer size
    but this does the trick for all cases where I encountered the error.

  2. Correct amino acid labels in fpocket descriptor output
    The order of amino acid names in fpout.c did not match the hardcoded order in
    aa.h. I spent two days looking for a reason as to why different amino acids
    would be found by fpocket and dpocket (see bug 3), but it turns out it was
    just a labeling error.

  3. Correct the dpocket ASA calculation for implicit pockets near the ligand
    The implicit pocket descriptors were being computed with pdb_w_lig which
    resulted in different areas from fpocket because they are influenced by
    nearby ligand atoms. There was no issue when no ligand was present bc the
    pdb and pdb_w_lig data structures are identical in that case. I could not
    find any reason why ligand information would NEED to be present in that
    part of set_descriptors(). The parts where explicit pocket information are
    useful (example overlap calculations) should be unchanged.

    Note that a similar issue seems to persist for explicit pocket definitions
    and this might explain why the drug score for explicit pockets is always zero
    (a bug reported elsewhere).

I tested all of these changes by running fpocket and dpocket on the same complex and its synthetic "apo" pdb. I then diffed all descriptors in stdout from fpocket -d and in dpout_fpocketp.txt (only for the pocket with the largest overlap). The results were identical for atleast 10 random pdbs curated in the HiQBind data set.

1) Fix buffer overflow error in fpocket with the -d option
     The buffer for env_atm filenames was too short for systems with > 9 pockets.
     There's probably a better way to fix this than just increasing the buffer size
     but this does the trick for all cases where I encountered the error.
2) Correct amino acid labels in fpocket descriptor output
     The order of amino acid names in fpout.c did not match the hardcoded order in
     aa.h. I spent two days looking for a reason as to why different amino acids
     would be found by fpocket and dpocket (see bug 3), but it turns out it was
     just a labeling error.
3) Correct the dpocket ASA calculation for implicit pockets near the ligand
     The implicit pocket descriptors were being computed with `pdb_w_lig` which
     resulted in different areas from fpocket because they are influenced by
     nearby ligand atoms. There was no issue when no ligand was present bc the
     `pdb` and `pdb_w_lig` data structures are identical in that case. I could not
     find any reason why ligand information would NEED to be present in that
     part of set_descriptors(). The parts where explicit pocket information are
     useful (example overlap calculations) should be unchanged.

     Note that a similar issue seems to persist for explicit pocket definitions
     and this might explain why the drug score for explicit pockets is always zero
     (a bug reported elsewhere).

I tested all of these changes by running fpocket and dpocket on the same complex
and its synthetic "apo" pdb. I then diffed all descriptors in stdout from
fpocket -d and in dpout_fpocketp.txt (only for the pocket with the largest overlap).
The results were identical for atleast 10 random pdbs curated in the HiQBind data set.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant