Skip to content

Conversation

@mnabian
Copy link
Collaborator

@mnabian mnabian commented Feb 10, 2026

PhysicsNeMo Pull Request

Description

Addresses this bug: molecular_dynamics/lennard_jones example fails with ValueError: Expected tensor of shape (N_nodes, 1) but got tensor of shape (258, 128).

The fix includes passing the dummy node features through a 1-layer encoder, and not allowing meshgraphnet to take None as the number of layers anymore, which was causing unexpected behavior.

Was able to reproduce the results:

image (26)

Checklist

Dependencies

Review Process

All PRs are reviewed by the PhysicsNeMo team before merging.

Depending on which files are changed, GitHub may automatically assign a maintainer for review.

We are also testing AI-based code review tools (e.g., Greptile), which may add automated comments with a confidence score.
This score reflects the AI’s assessment of merge readiness and is not a qualitative judgment of your work, nor is
it an indication that the PR will be accepted / rejected.

AI-generated feedback should be reviewed critically for usefulness.
You are not required to respond to every AI comment, but they are intended to help both authors and reviewers.
Please react to Greptile comments with 👍 or 👎 to provide feedback on their accuracy.

@mnabian mnabian requested a review from ktangsali February 10, 2026 23:15
@mnabian
Copy link
Collaborator Author

mnabian commented Feb 10, 2026

/blossom-ci

@mnabian mnabian enabled auto-merge February 10, 2026 23:17
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 10, 2026

Greptile Overview

Greptile Summary

This PR updates the Lennard-Jones molecular dynamics example to fix an input-size bug in lennard_jones_system.py, ensuring the generated particle positions match the intended number of atoms and downstream computations receive correctly shaped tensors/arrays.

The change is localized to the example code under examples/molecular_dynamics/lennard_jones/ and does not affect core library APIs; it primarily corrects how the example initializes or constructs its system state before running the simulation.

Important Files Changed

Filename Overview
examples/molecular_dynamics/lennard_jones/lennard_jones_system.py Fixes Lennard-Jones example input sizing by correcting how positions are generated/repeated; no functional issues found in updated logic.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@mnabian
Copy link
Collaborator Author

mnabian commented Feb 10, 2026

/blossom-ci

Copy link
Collaborator

@coreyjadams coreyjadams left a comment

Choose a reason for hiding this comment

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

LGTM

@mnabian
Copy link
Collaborator Author

mnabian commented Feb 10, 2026

/blossom-ci

@mnabian mnabian self-assigned this Feb 10, 2026
@mnabian mnabian requested review from ktangsali and removed request for ktangsali February 10, 2026 23:36
@mnabian
Copy link
Collaborator Author

mnabian commented Feb 11, 2026

/blossom-ci

1 similar comment
@mnabian
Copy link
Collaborator Author

mnabian commented Feb 11, 2026

/blossom-ci

Copy link
Collaborator

@ktangsali ktangsali left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for running e2e test.

@mnabian
Copy link
Collaborator Author

mnabian commented Feb 11, 2026

/blossom-ci

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