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

Cell list Distance module does not support triclinic domains #177

Open
RaulPPelaez opened this issue May 29, 2023 · 4 comments
Open

Cell list Distance module does not support triclinic domains #177

RaulPPelaez opened this issue May 29, 2023 · 4 comments

Comments

@RaulPPelaez
Copy link
Collaborator

Current implementation of the cell list will fail if the provided box vectors do not represent a rectangular domain:

TORCH_CHECK(box_size[0][1].item<double>() == 0 && box_size[0][2].item<double>() == 0 &&
box_size[1][0].item<double>() == 0 && box_size[1][2].item<double>() == 0 &&
box_size[2][0].item<double>() == 0 && box_size[2][1].item<double>() == 0,
"Expected \"box_size\" to be diagonal");

Supporting triclinic requires modifying the cell traversal code:

// Loop over the 27 cells around the current cell
for (int i = 0; i < 27; i++) {

similarly as how it is done here:
https://github.com/openmm/openmm/blob/master/platforms/reference/src/SimTKReference/ReferenceNeighborList.cpp#L154-L183
This would probably make the current traversal much slower, so maybe it is a good idea to have different kernels for rectangular and triclinic.

@guillemsimeon
Copy link
Collaborator

Is this solved?

@RaulPPelaez
Copy link
Collaborator Author

No, but I have it in my list.

@guillemsimeon
Copy link
Collaborator

Should I close this, @RaulPPelaez ?

@RaulPPelaez
Copy link
Collaborator Author

No, leave it open. Have not got around it yet.

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

No branches or pull requests

2 participants