We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
For my test case, this implementation was slightly faster than the pymatgen neighborlist but I did not extensively test this.
from matscipy.neighbours import neighbour_list def calc_neighbor_by_matscipy( pos: Tensor, cell: Tensor, pbc: Tensor, cutoff: float ) -> Tuple[Tensor, Tensor]: idx_i, idx_j, S = neighbour_list( quantities="ijS", pbc=pbc.detach().cpu().numpy(), cell=cell.detach().cpu().numpy(), positions=pos.detach().cpu().numpy(), cutoff=cutoff, ) edge_index = torch.tensor(np.stack([idx_i, idx_j], axis=0), dtype=torch.int64, device=pos.device) # convert int64 -> pos.dtype (float) S = torch.tensor(S, dtype=pos.dtype, device=pos.device) return edge_index, S
The text was updated successfully, but these errors were encountered:
Thank you for opening the issue and sharing the codes.
Recently I have no time to include it in main branch, but it is helpful information for others!
Sorry, something went wrong.
No branches or pull requests
For my test case, this implementation was slightly faster than the pymatgen neighborlist but I did not extensively test this.
The text was updated successfully, but these errors were encountered: