-
Notifications
You must be signed in to change notification settings - Fork 5
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
beignet.func.space
#11
Conversation
from .__transform import _transform | ||
|
||
|
||
def transform(transformation: Tensor, position: Tensor) -> Tensor: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be moved to beignet.operators._transform
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want me to add to your operators PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@henry-isaacson Create a new PR
return displacement | ||
|
||
if remapped: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does Ruff add a newline? Can you fix that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's because it wants to put a newline before all function and method definitions. I couldn't find an explicit rule for it, but if we really want to fix it I can turn off ruff for that code block.
src/beignet/func/_molecular_dynamics/_space/__inverse_transform.py
Outdated
Show resolved
Hide resolved
|
||
Parameters | ||
---------- | ||
dimensions : Optional[Tensor], default=None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we rename this to transformation
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we expect parallelepiped
to be true in most cases then yes we could rename. We could also introduce a second variable with the code using dimensions
when parallelepiped is false and transformation
when true.
@henry-isaacson Breakout the transform and inverse transform operators into a separate PR. |
beignet.func.space
defines a simulation space.This function is fundamental in constructing simulation spaces derived from subsets of$\mathbb{R}^{D}$ (where $D = 1$ , $2$ , or $3$ ) and is instrumental in setting up simulation environments with specific characteristics (e.g., periodic boundary conditions). The function returns a a displacement function and a shift function to compute particle interactions and movements in space.