-
Notifications
You must be signed in to change notification settings - Fork 663
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
refactoring HydrogenBondAnalysis #2238
Comments
@xiki-tempula you said about the new proposed HydrogenBondAnalysis (PR #2237 by @p-j-smith ) #2237 (comment)
Do you think there is a way that you can build/refactor WaterBridgeAnalysis on the new class? I think we are starting a discussion about what the API of a new HydrogenBondAnalysis ought to look like so things would likely change. But you would think that you could – in principle – work with the new class? And do you think that would actually have the time to do it if necessary? |
@orbeckst I guess the major obstacle is the underlying data structure. In wba, the data is stored as a network to represent the nature of the water network, so the analysis part acts upon the underlying network data structure. for frame in frames:
find_hb(sele1, sele2) whereas wba works as: for frame in frames:
find_hb(sele1, sele2)
find_hb(sele1, water1)
for water_no in number_of_water:
find_hb(water[water_no], sele2)
find_hb(water[water_no], water[water_no+1]) So the only common part is find_hb(sele1, sele2), which is only 3 lines in the current PR. |
Update:
|
The PR #2087 is fully compatible with the old hbond_analysis and has passed all the test. I wonder if it is possible to review the PR, please? Thank you. |
See my #2087 (comment). |
As part of this |
This issue was fixed by PR #2237. Anything else can go into their own issues. |
Is your feature request related to a problem? Please describe.
The
analysis.hbonds.hbond_analysis.HydrogenBondAnalysis
class is very useful and widely used but the code is messy and old and thus hard to maintain, to debug (see e.g. #1687), or to extend. It also does not follow the Analysis API. Performance is also not stellar (e.g. does not usecapped_distances()
)Describe the solution you'd like
Refactor/rewrite, ideally without breaking the API, which includes
HydrogenBondAnalysis
count_by_time()
,count_by_type()
,timesteps_by_type()
The data structures should be clean, see #2177 for a discussion.
The class should implement the Analysis API ("Bauhaus") from #719.
Describe alternatives you've considered
Current work
Currently there are two PRs with different solutions
The text was updated successfully, but these errors were encountered: