Skip to content

Compose models for allegro-pol simulation#537

Draft
CompRhys wants to merge 2 commits intoextensible-extrasfrom
allegro-pol
Draft

Compose models for allegro-pol simulation#537
CompRhys wants to merge 2 commits intoextensible-extrasfrom
allegro-pol

Conversation

@CompRhys
Copy link
Copy Markdown
Member

@CompRhys CompRhys commented Apr 8, 2026

Adds SerialSumModel to allow for allegro-pol to make predictions and pass to subsequent model in single sum model.

@CompRhys CompRhys changed the base branch from main to extensible-extras April 8, 2026 19:40
Copy link
Copy Markdown
Collaborator

@orionarcher orionarcher left a comment

Choose a reason for hiding this comment

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

Not sure I fully understand the purpose of UniformPolarizationModel or when it should be used, which probably betrays either my ignorance or the need for slightly more documentation. Implementation seems good aside from a few docs and interface suggestions.

Comment on lines +14 to +19
class _PolarizationState(Protocol):
n_systems: int
device: torch.device
dtype: torch.dtype
positions: torch.Tensor
system_idx: torch.Tensor
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

seems to be duplicative of BaseState? Can we just use BaseState as the type?

* ``forces``: ``e Z*·E``
* ``stress``: zero tensor, so upstream stress is preserved unchanged

The model also emits ``total_polarization`` using TorchSim's blessed naming.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Interesting turn of phrase, could be a little clearer. Could also include a little more documentation on when this is appropriate to use.

@TorchSim TorchSim deleted a comment from orionarcher Apr 8, 2026
@TorchSim TorchSim deleted a comment from orionarcher Apr 8, 2026
@TorchSim TorchSim deleted a comment from orionarcher Apr 8, 2026
@CompRhys CompRhys marked this pull request as draft April 8, 2026 21:08
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.

2 participants