Conversation
V-Francois
reviewed
Aug 28, 2026
V-Francois
left a comment
Contributor
There was a problem hiding this comment.
Looks good.
There are merge conflicts though. I think it's because you started this branch from the previous PR's branch (which has been merged since), rather than from main after the merge.
Can you rebase onto main to include just the new changes (the fields, and not the orientation that are already merged).
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds an external aligning field for molecular Monte Carlo simulations, using the molecular orientation definitions introduced previously.
For each molecule, the field contributes
[
U_h = -\mathbf h \cdot \mathbf n,
]
where (\mathbf n) is the previously defined unit molecular orientation and (\mathbf h) contains the field direction and coupling magnitude.
The initial target is the three-site ortho-terphenyl model using ordinary particle-displacement moves.
Changes
Add external-field types:
ExternalFieldNoExternalFieldAligningFieldAdd field-energy functions:
field_energytotal_field_energyInclude the external-field contribution in the initial molecular Hamiltonian.
Include the field-energy difference during ordinary particle displacement:
[
\Delta U_h =
-\mathbf h\cdot
\left(\mathbf n_{\mathrm{new}}-\mathbf n_{\mathrm{old}}\right).
]
Add TOML configuration support.
Add architecture notes and a minimal single-molecule ortho-terphenyl validation example.