Skip to content

Add molecular aligning external field - #86

Open
DanqiLANG wants to merge 3 commits into
TheDisorderedOrganization:mainfrom
DanqiLANG:ExternalField
Open

DanqiLANG wants to merge 3 commits into
TheDisorderedOrganization:mainfrom
DanqiLANG:ExternalField

Conversation

@DanqiLANG

Copy link
Copy Markdown
Contributor

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:

    • ExternalField
    • NoExternalField
    • AligningField
  • Add field-energy functions:

    • field_energy
    • total_field_energy
  • Include 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.

@DanqiLANG
DanqiLANG requested a review from a team as a code owner August 26, 2026 11:55

@V-Francois V-Francois left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

No deployments
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