Skip to content

Add Gay-Berne interaction with tunable radial width#5396

Draft
abhispace27 wants to merge 1 commit into
espressomd:pythonfrom
abhispace27:add-gay-berne-width-interaction
Draft

Add Gay-Berne interaction with tunable radial width#5396
abhispace27 wants to merge 1 commit into
espressomd:pythonfrom
abhispace27:add-gay-berne-width-interaction

Conversation

@abhispace27

Copy link
Copy Markdown

Fixes #

Description of changes:

This pull request adds a modified Gay-Berne non-bonded interaction with an
independently tunable radial width.

In the original Gay-Berne interaction, sig controls both the
orientation-dependent position of the potential minimum and the radial width
of the Lennard-Jones-like well. The new gay_berne_width interaction introduces
an additional parameter, wid, so that:

  • sig retains control of the orientation-dependent minimum position;
  • wid controls the radial width and local stiffness of the well.

The modified radial coordinate is

[
x_w = 2^{1/6} + \frac{r-r_{\min}}{\mathrm{wid}},
]

with

[
r_{\min} = s + \left(2^{1/6}-1\right)\mathrm{sig},
]

where (s) is the orientation-dependent Gay-Berne contact distance.

Setting wid = sig recovers the radial form of the existing ESPResSo
Gay-Berne interaction.

The implementation includes:

  • force, torque, and energy kernels;
  • director-based and quaternion-based overloads;
  • cutoff and active-pair-mask integration;
  • pressure/virial force integration;
  • C++ script-interface registration;
  • a Python interface exposed as
    system.non_bonded_inter[type1, type2].gay_berne_width;
  • the compile-time feature GAY_BERNE_WIDTH, which implies ROTATION.

The code builds successfully locally with GAY_BERNE_WIDTH enabled.

@abhispace27 abhispace27 force-pushed the add-gay-berne-width-interaction branch from 8430bf2 to bad5a23 Compare July 10, 2026 15:34
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