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

beignet.func.space #11

Merged
merged 15 commits into from
Jun 11, 2024
Merged

beignet.func.space #11

merged 15 commits into from
Jun 11, 2024

Conversation

henry-isaacson
Copy link
Collaborator

@henry-isaacson henry-isaacson commented Apr 19, 2024

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.

@henry-isaacson henry-isaacson changed the title space Molecular Dynamics: adding space in which particles are simulated Apr 22, 2024
@0x00b1 0x00b1 changed the title Molecular Dynamics: adding space in which particles are simulated Geometry (or boundary) construction Apr 22, 2024
from .__transform import _transform


def transform(transformation: Tensor, position: Tensor) -> Tensor:
Copy link
Collaborator

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.

Copy link
Collaborator Author

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?

Copy link
Collaborator

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:

Copy link
Collaborator

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?

Copy link
Collaborator Author

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/__transform.py Outdated Show resolved Hide resolved

Parameters
----------
dimensions : Optional[Tensor], default=None
Copy link
Collaborator

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?

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 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.

@0x00b1
Copy link
Collaborator

0x00b1 commented Apr 22, 2024

@henry-isaacson Breakout the transform and inverse transform operators into a separate PR.

@0x00b1 0x00b1 changed the title Geometry (or boundary) construction beignet.func.space Apr 22, 2024
@0x00b1 0x00b1 temporarily deployed to test.pypi.org April 22, 2024 19:40 — with GitHub Actions Inactive
@0x00b1 0x00b1 temporarily deployed to test.pypi.org April 22, 2024 19:40 — with GitHub Actions Inactive
@0x00b1 0x00b1 temporarily deployed to test.pypi.org April 22, 2024 19:44 — with GitHub Actions Inactive
@0x00b1 0x00b1 temporarily deployed to test.pypi.org April 22, 2024 19:46 — with GitHub Actions Inactive
@0x00b1 0x00b1 temporarily deployed to test.pypi.org April 22, 2024 19:52 — with GitHub Actions Inactive
@0x00b1 0x00b1 temporarily deployed to test.pypi.org April 22, 2024 20:18 — with GitHub Actions Inactive
@0x00b1 0x00b1 temporarily deployed to test.pypi.org April 22, 2024 20:34 — with GitHub Actions Inactive
@0x00b1 0x00b1 temporarily deployed to test.pypi.org April 22, 2024 20:56 — with GitHub Actions Inactive
@0x00b1 0x00b1 temporarily deployed to test.pypi.org April 22, 2024 20:59 — with GitHub Actions Inactive
@0x00b1 0x00b1 temporarily deployed to test.pypi.org April 23, 2024 19:30 — with GitHub Actions Inactive
@0x00b1 0x00b1 temporarily deployed to test.pypi.org May 9, 2024 18:47 — with GitHub Actions Inactive
@0x00b1 0x00b1 temporarily deployed to test.pypi.org May 9, 2024 18:49 — with GitHub Actions Inactive
@0x00b1 0x00b1 temporarily deployed to test.pypi.org May 9, 2024 19:10 — with GitHub Actions Inactive
@0x00b1 0x00b1 temporarily deployed to test.pypi.org May 10, 2024 15:11 — with GitHub Actions Inactive
@0x00b1 0x00b1 temporarily deployed to test.pypi.org May 10, 2024 19:00 — with GitHub Actions Inactive
@0x00b1 0x00b1 temporarily deployed to test.pypi.org May 10, 2024 19:46 — with GitHub Actions Inactive
@0x00b1 0x00b1 temporarily deployed to test.pypi.org May 10, 2024 19:48 — with GitHub Actions Inactive
@0x00b1 0x00b1 temporarily deployed to test.pypi.org May 10, 2024 20:21 — with GitHub Actions Inactive
@0x00b1 0x00b1 temporarily deployed to test.pypi.org June 10, 2024 18:45 — with GitHub Actions Inactive
@0x00b1 0x00b1 temporarily deployed to test.pypi.org June 10, 2024 18:53 — with GitHub Actions Inactive
@0x00b1 0x00b1 temporarily deployed to test.pypi.org June 11, 2024 19:00 — with GitHub Actions Inactive
@0x00b1 0x00b1 merged commit 766f20b into main Jun 11, 2024
11 checks passed
@0x00b1 0x00b1 deleted the space branch June 11, 2024 19:09
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.

3 participants