-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add input module #137
Add input module #137
Conversation
laumalo
commented
Apr 9, 2021
•
edited
edited
- Tag issue being addressed
- Add tests
- Update docstrings/documentation, if applicable
- Update changelog
- All tests successfully pass
This pull request introduces 1 alert when merging 37f1cbb into de108f4 - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a very nice feature. Thanks @laumalo! After minor changes I think we are good to go:)
It defines the chain of the molecule to parameterize from the input PDB file. | ||
|
||
- Flag: ``--chain`` | ||
- Default: ``None`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the default is None we should explain here the behaviour of the algorithm when this parameter is not initialized. What will happen when no chain is supplied? Then do we need to supply a PDB with a single chain?
peleffy/tests/test_utils.py
Outdated
@@ -618,5 +620,147 @@ def test_parse_charges_from_mae(self): | |||
_ = parse_charges_from_mae(PATH_PDB_BHP, parameters) | |||
|
|||
|
|||
class TestPDB(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change it for PDBFile.
peleffy/utils/input.py
Outdated
from peleffy.utils import Logger | ||
|
||
|
||
class PDB(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Class name might be too ambiguous (I know it was me the one who suggested it). I would change it for PDBFile
, for instance (or any other that you might think of).
Examples | ||
-------- | ||
|
||
Load all the hetero molecules from a PDB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is so cool! Thanks @laumalo
peleffy/utils/input.py
Outdated
|
||
# Check if there is more than one hetero molecule in the same chain | ||
residues_ids = set([line[22:26].strip() for line in self.pdb_content | ||
if line.startswith('HETATM') and line[21:22] == chain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be careful with code styling. These lines are not correctly aligned.
peleffy/utils/input.py
Outdated
|
||
# Select which atoms compose this hetero molecule | ||
atom_ids = [line[6:11].strip() for line in self.pdb_content | ||
if line.startswith('HETATM') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same happens here. Lines are not aligned