Skip to content

Commit

Permalink
Remove parse_sequence_from_file (#110)
Browse files Browse the repository at this point in the history
* Add parsing test

* Remove parse_sequence_from_file

* update CHANGELOG

---------

Co-authored-by: blancoapa <[email protected]>
  • Loading branch information
davidbbeyer and pm-blanco authored Jan 21, 2025
1 parent a04f92b commit 6149dc1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Code of conduct of our community `CODE_OF_CONDUCT.md`, adhering to the Contributor Covenant v2.1 (#104)
- New optional argument `backbone_vector` enabling to build molecules along an input vector using `pmb.create_molecule` and `pmb.create_pmb_object` (#99)
- Unit testing for reaction methods (#86)
- New boolean flag `--ideal` as argparse argument of `samples/globular_protein.py` enabling to run the script without setting up interactions.
- Unit tests for `pmb.create_protein`, `pmb.enable_motion_of_rigid_object`, `pmb.protein_sequence_parser`, `pmb.define_protein`, `pmb.read_protein_vtf_in_df` (#101)
- Library `lattice.py`, a general builder for crystaline lattices. This library is part of on-going project to support hydrogels in pyMBE. (#93)
Expand All @@ -38,6 +37,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- NumPy 2, Pandas 2 and the development version of ESPResSo are now fully supported. (#106)
- Fixed several deprecated paths and function names in `tutorials/pyMBE_tutorial.ipynb`. (#77, #78, #79, #80, #81)

### Removed
- `pmb.parse_sequence_from_file` has been removed since it is no longer necesary to parse the sequence from pmb.df (#110)

## [0.8.0] - 2024-06-18

### Added
Expand Down
19 changes: 0 additions & 19 deletions pyMBE.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,6 @@ def calculate_HH(self, molecule_name, pH_list=None, pka_set=None):
Z_HH.append(Z)
else:
# Molecule has a sequence
if not isinstance(sequence, list):
# If the df has been read by file, the sequence needs to be parsed.
sequence = self.parse_sequence_from_file(sequence=sequence)
for name in sequence:
if name in pka_set.keys():
if pka_set[name]['acidity'] == 'acidic':
Expand Down Expand Up @@ -2318,22 +2315,6 @@ def load_pka_set(self, filename, verbose=False, overwrite=True):
overwrite=overwrite)
return

def parse_sequence_from_file(self,sequence):
"""
Parses the given sequence such that it can be used in pyMBE. This function has to be used if the df was read from a file.
Args:
sequence(`str`): sequence to be parsed
Returns:
sequence(`lst`): parsed sequence
"""
sequence = sequence.replace(' ', '')
sequence = sequence.replace("'", '')
sequence = sequence.split(",")[1:-1]
return sequence



def propose_unused_type(self):
"""
Expand Down

0 comments on commit 6149dc1

Please sign in to comment.