pyMBE-dev / pyMBE

pyMBE provides tools to facilitate building up molecules with complex architectures in the Molecular Dynamics software ESPResSo. For an up-to-date API documention please check our website:
https://pymbe-dev.github.io/pyMBE/pyMBE.html
GNU General Public License v3.0
6 stars 8 forks source link

Undefined behavior of calculate_HH for sequences with undefined particles #2

Open pm-blanco opened 6 months ago

pm-blanco commented 6 months ago

The current implementation of calculate_HH breaks if the molecule has undefined particles on its residue_list. This becomes inconvenient if the user wants to use the function in plotting scripts for molecules with many types of different particle types because then one needs to define dummy particles in pyMBE for such particles instead of simply passing a pka_set.

See handy_scripts/plot_HH.py Suggested behaviour: The function should ignore particles not defined in the pmb.df for the calculation of the HH curve but it should print a warning to terminal to inform the user that such particles have been ignored.