Skip to content

Conversation

@Praagnya
Copy link
Contributor

@Praagnya Praagnya commented Nov 22, 2025

Summary

  • Implemented SimState.wrap_positions property using ts.transforms.pbc_wrap_batched to properly wrap atomic positions according to periodic boundary conditions.

Checklist

Before a pull request can be merged, the following items must be checked:

  • Doc strings have been added in the Google docstring format.
  • Run ruff on your code.
  • Tests have been added for any new functionality or bug fixes.

Resolves #343

@Praagnya
Copy link
Contributor Author

@thomasloux Could you please review this? I created a new branch without the test since my previous commits got messy after other changes in my fork. So I opened a clean PR.

@orionarcher
Copy link
Collaborator

Could you link the other PR for context?

@Praagnya
Copy link
Contributor Author

Previous PR: #345

"""
# TODO: implement a wrapping method
return self.positions
if not self.pbc:
Copy link
Collaborator

Choose a reason for hiding this comment

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

now self.pbc is a Boolean (3,) shaped Tensor. So this expression won't work here. I don't think this piece of code should need a test, a static typing check would have catched that. replace with if not self.pbc.any()

@thomasloux
Copy link
Collaborator

For reference of use of static check #339

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.

Implement SimState.wrap_positions

3 participants