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

adaptive translation / rotation scale factor #140

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

paulboone
Copy link

Adjusts the MC translation move maximum axis perturbation within the bounds of 0.01 - 2Å and Adjusts the MC rotation move maximum rotation within the bounds of 0.0001 to 1.0 of a complete rotation (i.e. 1.0 = 2pi radians).

This PR is mostly to get a review prior to making final changes!

  • Please take a CLOSE look at the rotation_matrix function. I am not sure at all if the math is correct here. I do know that doing it this way accomplishes the desired effect of the rotation scaling parameter being adjusted correctly when using a system of dense water molecules, which implies it is correct, but I definitely did not derive it. Without the diagm multiplication, the scaling parameters do not affect the acceptance %s since I think the molecule is rotated by a small scaled value but then flipped across the z axis (I think). This will almost never be a good idea with water molecules, so the rotations always failed without that diagm term.

  • Currently I've done the adjustment based on the acceptance % since the last adjustment, but I'm beginning to think it should be based on the all-time acceptance %, instead. Thoughts?

  • I have written no additional tests for this (yet). It looks like the only existing tests for the rotation_matrix function are molecule_test.jl:159:192, which still pass. It looks like the the generic_rotation_test.jl file is stale?

Let me know if you have naming / comment / style conventions or any other comments / thoughts / requests at all.

@paulboone
Copy link
Author

Needs to properly handle moves / rotates when there are no adsorbates in the system. Right now, these count as proposed moves (+1 in markov_counts) but always "fail" since there is nothing to move / rotate. These shouldn't be included in the acceptance rate calculations.

@paulboone
Copy link
Author

I am now certain that the scaled rotation_matrix function incorrect! :)

…o both directions; variables renamed to match Arvo paper explicitly to make it easier to compare.
@paulboone
Copy link
Author

I think the main problem with the rotation matrix is fixed now with the last commit, mainly that the rotation about the z-axis wasn't centered so it went in only one direction. My code for visualizing the results of the rotation_matrix is here: https://github.com/paulboone/mcH2O/blob/master/RotationMatrixTest.jl

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.

1 participant