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

Enable continuous GeM computation. #309

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

maggiezimon
Copy link
Collaborator

@maggiezimon maggiezimon commented Mar 11, 2024

The continuous calculation of GeM is enabled by adding a new score as defined in Eq. A1-A2 in "Local-order metric for condensed-phase environments". The implementation assumes that the additional sites are part of the reference structure and their number (Mb in the paper) is provided as input.

Copy link

trunk-io bot commented Mar 11, 2024

✨ Submitted to Merge. It will be added to the queue once all branch protection rules pass and there are no merge conflicts with the target branch. (details)

@@ -42,6 +44,9 @@ def __init__(
centre_j_id,
standard_deviation,
mesh_size,
number_of_added_sites=0,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If the continuous version of the LoM is to be used, the additional atoms should already be added to the reference (coordinates of the reference structure). In other words, reference should have $M$ rows corresponding to the original reference and additional $M_b$ rows representing the coordinates of extra atoms. With number_of_added_atoms we specify how many sites (rows) were included. The $M_b$ atoms are assumed to be outside the 1st shell, so their distances from the central site are larger than for the other $M$ sites.

A comment is provided explaining that the additional sites should be part of the reference.
@pabloferz
Copy link
Member

@maggiezimon have you tried to take the gradient of GeM? E.g.

cv = GeM(...)
jx.grad(cv.function)(positions)

@maggiezimon
Copy link
Collaborator Author

The grad works if the positions are passed directly, instead of being read from the neighbor list.

To enable grad, we need to make sure that the output depends on the input. The neighbor list dilutes that dependency. So we are now directly passing the positions. It is redundant, though.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants