Computational protein engineer here. Pretty good explanation. I wanted to add that just because we know that a protein’s behavior changes depending on pH, it is still interesting to see what atom-level changes to the 3D structure are caused by the pH shift (e.g. so that we can better predict those changes on other proteins).
This will work in general. One point of improvement: right now, if the request fails, the panic will cause your whole program to crash. You could change your function to return a
Result<Html, SomeErrorType>
instead, and handle errors more gracefully in the place where your function is called (e.g. ignoring pages that returned an error and continuing with the rest).Look into anyhow for an easy to use error handling crate, allowing you to return an
anyhow::Result<Html>