Skip to content
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

Documentation, tweak temperature calc logic. #39

Merged
merged 2 commits into from
Nov 19, 2020

Conversation

terrycojones
Copy link
Contributor

Hi. This is a very nicely designed package - thank you! I made a few small suggestions while reading the code. Feel free to ignore or cherry pick, etc.

else:
T = abs(dE)
dE = self.energy() - E
T = abs(dE)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think there's any reason to call abs() here, given that the loop condition is while T == 0.0.

Copy link
Owner

Choose a reason for hiding this comment

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

Should be the same behavior as before wrt T but I like this approach as dE can be used later in the code and have semantically-accurate values regardless of the return value of move(). 👍

@perrygeo
Copy link
Owner

@terrycojones Thanks for the contribution! Agreed with all the changes, I'll get this into the next release.

@perrygeo perrygeo merged commit 951e7d8 into perrygeo:master Nov 19, 2020
@perrygeo perrygeo changed the title Tiny possible changes Documentation, tweak temperature calc logic. Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants