New out-of-plane functional forms for fitting experiments - #110
Open
EvienCheng wants to merge 14 commits into
Open
New out-of-plane functional forms for fitting experiments#110EvienCheng wants to merge 14 commits into
EvienCheng wants to merge 14 commits into
Conversation
… plugins Squashed net contribution of the valence_new branch (Urey-Bradley plugin, HarmonicHeight/LeeKrimm/HarmonicAngle collections, associated tests and force-field artifacts) rebased onto a clean base, dropping the interleaved upstream-sync and experimental-branch merge commits that were previously mixed into this branch's history. Co-authored-by: EvienCheng <evienc@uci.edu>
Imports smirnoff_plugins.handlers.bonded, which doesn't exist in this repo, and isn't referenced by any entry point or test.
# Conflicts: # setup.py # smirnoff_plugins/_tests/handlers/test_valence.py # smirnoff_plugins/handlers/valence.py
for more information, see https://pre-commit.ci
Member
|
(Not urgent!) Hi @fjclark & @mattwthompson , here is some work from Evien, an undergrad in our lab, whenever you have time can you please review this, thank you! |
Member
|
Thanks @EvienCheng - I will have a look through the code next week |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #110 +/- ##
==========================================
+ Coverage 86.59% 87.05% +0.45%
==========================================
Files 9 9
Lines 694 842 +148
==========================================
+ Hits 601 733 +132
- Misses 93 109 +16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Description
Adds three new out-of-plane potential forms as SMIRNOFF plugins (
HarmonicHeight,HarmonicAngle,LeeKrimm), alongside the existing SMIRNOFF periodic-torsion treatment, giving a choice of functional forms for out-of-plane deformation at trivalent centers.Co-authored-by: @pavankum , and a final code review and the messy git history sorted by Claude.
Background: out-of-plane functional forms
SMIRNOFF (periodic torsion). Out-of-plane deformation is treated as a periodic torsion over the dihedral$\theta$ between the $(i,j,k)$ and $(j,k,l)$ planes:

Depiction of SMIRNOFF's three improper torsions with the same handedness, out of six possible permutations with the central atom (second atom) fixed. Improper torsions enforce planarity, so the ideal out-of-plane angle is 0°, and the potential must penalize deviations symmetrically. A periodicity of 2 and phase of 180° places the energy minimum at$\theta$ = 0° and ensures symmetric penalties for bending above or below the plane.
Alternate functional forms being added here
Harmonic, Wilson angle ($\theta$ , symmetrized over the three angles at a center:
HarmonicAngle). Uses the classic Wilson–Decius–Cross out-of-plane angleHere$\theta$ is the Wilson out-of-plane angle, defined as the angle between a bond $\mathbf{x}_{41}$ and the plane containing the other two bonds $\mathbf{x}_{42}$ and $\mathbf{x}_{43}$ :
where$\phi_1$ is the valence angle between $\mathbf{x}_{42}$ and $\mathbf{x}_{43}$ . In practice, the symmetrized average of the three Wilson angles at a given center is used. This is the classic definition from Wilson, Decius & Cross and remains widely used in molecular mechanics force fields such as MMFF94 and MMFF94s, which adopt the form:
where$\chi_{ijk;l}$ is the Wilson angle in degrees. The harmonic approximation around $\theta_0 = 0^\circ$ is appropriate for most sp$^2$ centers near planarity.
Harmonic, pyramid height ($h$ (Lee, Palmo & Krimm), the normal distance from the apex atom to the plane of its three neighbors (figure below from the paper above):
HarmonicHeight). Uses the dimensionless pyramid heightThe coordinate$h$ is defined as:
where$\mathbf{e}_{41}$ , $\mathbf{e}_{42}$ , $\mathbf{e}_{43}$ are unit bond vectors and $\hat{v}$ is the unit normal to the plane spanned by the three end atoms. The coordinate $h \in [-1, 1]$ , with $h=0$ corresponding to a planar structure. Unlike the Wilson angle, well-defined for all admissible geometries with no extra symmetrization needed. $h_0=0$ for planar ($sp^2$ ) centers; $k$ fit to local curvature.
Lee–Krimm ($h$ , designed to fix both of the above:
LeeKrimm). Built on pyramid heightThe parameters$V_2$ and $V_4$ are the quadratic and quartic spring constants for small and large puckers, respectively, while $t$ controls the curvature of the potential near $h=0$ and $s$ (a positive integer) governs how steeply the potential rises as $h\to\pm 1$ ; larger values of $s$ make the function behave like a polynomial in $h^2$ near $h=0$ .
Test plan
UreyBradley,HarmonicHeight,LeeKrimm,HarmonicAnglecollections/handlers passStatus