Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #156: A bug in the preparation.protonate._fix_pybel_output and its potential cause #161

Merged

Conversation

SwordJack
Copy link
Contributor

Dear Colleagues,

The issue #156 is now fixed in this pull request.

Major modifications are performed to enzy_htp/preparation/protonate.py.

The function protonate_ligand_with_pybel can now detect the existence of hydrogen atom(s) and raise an info if Hydrogen atom(s) is detected, then remove hydrogen atoms.

The function _fix_pybel_output can now raise a ValueError if there is any hydrogen atom in the middle, i.e., the hydrogen atom(s) should be absent or at the end of the file.

Some updates to dev-tools/conda-install script are also performed to enable users to automatically install EnzyHTP solely or as a dependency, while a warning will be prompted if a user is to install it to base environment.

Best,
Yinjie.

@SwordJack SwordJack added bug Something isn't working refactoring issues related to refactoring of the code preparation functions related to the preparation module labels Jan 30, 2024
Copy link
Collaborator

@chrisjurich chrisjurich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty good overall start! I appreciate the attention to detail and think this is a great contribution to the workflow since there are many problems with pybel. I do think a lot of what you wrote is somewhat redundant since there are other functions that do what you want to do. I mostly noticed PDBParser() not being used as well as parsing values from a PDB file, which is usually achieved more easily with the PyMOLInterface

enzy_htp/preparation/protonate.py Show resolved Hide resolved
enzy_htp/preparation/protonate.py Show resolved Hide resolved
enzy_htp/structure/residue.py Outdated Show resolved Hide resolved
test/preparation/data/ligand_test_4WI_protonated_H_end.pdb Outdated Show resolved Hide resolved
Copy link
Collaborator

@shaoqx shaoqx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address the comment

test/structure/test_residue.py Outdated Show resolved Hide resolved
enzy_htp/structure/structure_operation/general.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@shaoqx shaoqx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see the comments

Copy link
Collaborator

@shaoqx shaoqx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing all the comments! Approved

Copy link
Collaborator

@chrisjurich chrisjurich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work on the PR, Yinjie!

@chrisjurich chrisjurich merged commit 7c3cb93 into develop_refactor Feb 2, 2024
@shaoqx shaoqx deleted the yinjie/refactor_remove_ligand_hydrogen branch February 2, 2024 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working preparation functions related to the preparation module refactoring issues related to refactoring of the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A bug in the preparation.protonate._fix_pybel_output and its potential cause
3 participants