Skip to content

Force Halving for Flexible Dihedrals#300

Open
skfegan wants to merge 7 commits intomainfrom
278-flexible-dihedrals
Open

Force Halving for Flexible Dihedrals#300
skfegan wants to merge 7 commits intomainfrom
278-flexible-dihedrals

Conversation

@skfegan
Copy link
Member

@skfegan skfegan commented Mar 17, 2026

Summary

This pull request adds force halving for degrees of freedom associated with flexible dihedrals. Flexible dihedrals are defined as dihedral angles which have more than one peak in their histogram of angle values. This eliminates double counting between the vibrational and conformational entropy terms.

Changes

Levels:

  • Count the number of flexible dihedrals in each type of molecule.
  • Add flexible_dihedrals to the shared_data.

Entropy:

  • Add the flexible dihedral force halving (or equivalently eigenvalue quartering) to the vibrational entropy calculation

Unit Tests:

  • Add unit tests for the flexible dihedral counting and force halving.

Regression Tests:

  • Update baselines for the 9 regression test systems.

Impact

  • This should improve the accuracy of the calculations as it is now avoiding double counting for flexible dihedrals.

Copy link
Member

@harryswift01 harryswift01 left a comment

Choose a reason for hiding this comment

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

This looks like a great addition to correct the force halving for the flexible dihedrals. I can see this change has affected the regression results, and the regression baselines have been updated accordingly. The corresponding unit tests have also been updated. Happy to approve.

@harryswift01 harryswift01 added the feature request New feature or request label Mar 17, 2026
Copy link
Member

@jimboid jimboid left a comment

Choose a reason for hiding this comment

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

Looks like a solid contribution to the code base! Removing duplicate counting of forces for multiple entropy types. This looks like a very complete PR with nice code inline with the accepted standards and norms on the repo, documented methods and the relevant tests in place. The baselines have been updated to reflect the greater accuracy of the code. Happy to approve this, thanks a lot Sarah!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature request New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants