Skip to content

Conversation

@pm-blanco
Copy link
Collaborator

@pm-blanco pm-blanco commented May 16, 2025

Fixes

  • Missing methods in lib/lattice.py that were removed in Add a hydrogel builder #103, which were breaking the lattice tutorial.
  • Peptide example broken in the pyMBE tutorial tutorials/pyMBE_tutorial.ipynb.
  • Code repetition and coverage of all lines in calculate_HH.
  • Excessive run time of the unit test testsuite/henderson_hasselbalch_tests.py.

Changed

  • Unified exception handling, soft errors and internal information messages are now handled by loggins and hard errors by raise statements. Fixes Improve exception handling #115
  • Peptide molecules have now their own pyMBE type pmb_type = "peptide" instead than sharing type with custom molecules pmb_type = "molecule". This simplifies handling cases in which both objects behave differently.

Removed

  • lib/handy_functions.relax_espresso_system no longer supports force capping because it causes instabilities when relaxing bonded systems.
  • verbose optional argument have been removed from most methods except from those that need to silence verbose from espresso.

Adds

  • Private methods for sanity checks, used in various methods to ensure that the inputs are pyMBE objects of the expected type.

@pm-blanco pm-blanco requested a review from jngrad May 16, 2025 13:32
@pm-blanco pm-blanco self-assigned this May 16, 2025
Copy link
Member

@jngrad jngrad left a comment

Choose a reason for hiding this comment

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

besides suggested changes, LGTM

@pm-blanco pm-blanco merged commit fa9dea3 into pyMBE-dev:main May 16, 2025
3 checks passed
1234somesh pushed a commit to 1234somesh/pyMBE that referenced this pull request May 21, 2025
…MBE-dev#126)

* add sanity checks, unify exceptions with loggins, add full coverage to calculate_HH and other functions, fix missing lines from lib/lattice and tutorials

* remove verbose

* fix pylint issues

* speed up HH unit test

* remove force capping from energy relaxation

* address JN suggestions, fix relaxation issues with hydrogel functional test
@pm-blanco pm-blanco deleted the improve_code_quality branch August 12, 2025 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve exception handling

2 participants