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

Add input module #137

Merged
merged 20 commits into from
Apr 20, 2021
Merged

Add input module #137

merged 20 commits into from
Apr 20, 2021

Conversation

laumalo
Copy link
Collaborator

@laumalo laumalo commented Apr 9, 2021

@codecov-io
Copy link

codecov-io commented Apr 14, 2021

Codecov Report

Merging #137 (f26d594) into devel (de108f4) will increase coverage by 0.02%.
The diff coverage is 90.38%.

❗ Current head f26d594 differs from pull request most recent head de6a75f. Consider uploading reports for the commit de6a75f to get more accurate results

@lgtm-com
Copy link

lgtm-com bot commented Apr 15, 2021

This pull request introduces 1 alert when merging 37f1cbb into de108f4 - view on LGTM.com

new alerts:

  • 1 for Except block handles 'BaseException'

@laumalo laumalo linked an issue Apr 15, 2021 that may be closed by this pull request
Copy link
Owner

@martimunicoy martimunicoy left a 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``
Copy link
Owner

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?

@@ -618,5 +620,147 @@ def test_parse_charges_from_mae(self):
_ = parse_charges_from_mae(PATH_PDB_BHP, parameters)


class TestPDB(object):
Copy link
Owner

Choose a reason for hiding this comment

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

Change it for PDBFile.

from peleffy.utils import Logger


class PDB(object):
Copy link
Owner

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
Copy link
Owner

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


# 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
Copy link
Owner

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.


# Select which atoms compose this hetero molecule
atom_ids = [line[6:11].strip() for line in self.pdb_content
if line.startswith('HETATM')
Copy link
Owner

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

@codecov-commenter
Copy link

codecov-commenter commented Apr 19, 2021

Codecov Report

Merging #137 (f4d050b) into devel (eb02cd7) will decrease coverage by 1.05%.
The diff coverage is 83.76%.

@martimunicoy martimunicoy merged commit d5165bb into devel Apr 20, 2021
@martimunicoy martimunicoy deleted the pdb_class branch April 20, 2021 14:55
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.

Multiple molecules in the input PDB file
4 participants