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

Remove parse_sequence_from_file #110

Merged
merged 3 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading