Skip to content

Commit

Permalink
Merge pull request #125 from martimunicoy/bug_index
Browse files Browse the repository at this point in the history
Fix bug PDB index
  • Loading branch information
laumalo committed Jan 22, 2021
2 parents 45bdcda + c99d82f commit 0dcfff5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions docs/releasehistory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ New features
- `PR #119 <https://github.com/martimunicoy/peleffy/pull/119>`_: Adds explanatory error message when using an invalid Impact Template in the from_impact_template method.
- `PR #119 <https://github.com/martimunicoy/peleffy/pull/119>`_: Supports Openforcefield-0.8.3 .

Bugfixes
""""""""
- `PR #125 <https://github.com/martimunicoy/peleffy/pull/125>`_: A bad index slicing in the molecule.Molecule._pdb_checkup() is now fixed.

Tests added
"""""""""""
Expand Down
6 changes: 3 additions & 3 deletions peleffy/topology/molecule.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ def _pdb_checkup(self, path):
with open(path) as pdb_file:
for line in pdb_file:
if line.startswith('ATOM') or line.startswith('HETATM'):
atom_id.append(line[13:16])
res_name.append(line[18:20])
res_id.append(line[23:26])
atom_id.append(line[12:16])
res_name.append(line[17:20])
res_id.append(line[22:26])
if line.startswith('CONECT'):
connectivity = True

Expand Down

0 comments on commit 0dcfff5

Please sign in to comment.