-
Notifications
You must be signed in to change notification settings - Fork 12
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
Tutorial Updates #46
Comments
I find the former clearer, since it doesn't separate the name sigma = 3.4*unit.angstrom
epsilon = 0.238*unit.kilocalories_per_mole
Agreed about the formatting, not about the -1. If you print "state 0 / 9", that indicates there are 9 states when in fact there are 10. |
@mikemhenry thanks for your interest! The tutorials would definitely benefit from some updates and clean up. I think that we don't need so much comment about the language features. If they want to learn Python, there are better tutorial for that. # Use a comma to define related things close together
# use f-string formatting, print the current state number, and take care of starting at 0 and not 1 Also, keep in mind, there are more tutorials (#25). At some point, we may convert these one to Jupyter notebooks too. |
Sounds good! I'll take a pass at things and I really appreciate the feedback! There are 10 states when going 0 to 9, what looks weird is when the loops end like:
I think most people would expect an iteration to look like
or
|
That is a good point, I'll focus on the scripts so that if we decide to switch to notebooks we can import the code so we don't need to copy and paste/maintain it in two locations. If we don't end up doing it by the time we are happy with the tutorials then I'll split things up and copy it back into PR opened #47 |
Adding 1 to |
Wanted to make an issue before making a PR updating the tutorials to more closely follow PEP8 and use modern features of the python language. Since python3.6 is the oldest version of python supported in the next openmm release (at least that is my understanding) I would not use any features newer than those available in 3.6.
My motivation is that most users will copy and paste a tutorial and adapt things to fit their workflow, so we should try and incorporate python programming best practices.
Two quick examples from the alchemical free energy tutorial.
I'm happy to submit a PR for each tutorial and we can discuss each change on a case-by-case basis.
The text was updated successfully, but these errors were encountered: