Skip to content

feat(forcefield): add SixthPower mixing rule and aliases for Class-II CFF - #75

Merged
dubbelda merged 1 commit into
iRASPA:mainfrom
Eng-LO:feat/class2-9-6-cff96
Sep 8, 2026
Merged

dubbelda merged 1 commit into
iRASPA:mainfrom
Eng-LO:feat/class2-9-6-cff96

Conversation

@Eng-LO

@Eng-LO Eng-LO commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

This pull request completes Class-II 9-6 / PCFF force field support in RASPA3 by adding the Sixth-Power (Waldman-Hagler) mixing rule, common string aliases, and dedicated unit tests, resolving #66.

Following the addition of the core CFF9_6 and CFFEpsilonSigma functional forms, this PR provides:

  1. Sixth-Power (Waldman-Hagler) Mixing Rule (MixingRule::SixthPower):
    Enables automatic cross-interaction computation for Class-II force fields (e.g. PCFF, SciPCFF, COMPASS) where:
    $$\sigma_{ij} = \left(\frac{\sigma_i^6 + \sigma_j^6}{2}\right)^{1/6}, \quad \varepsilon_{ij} = 2 \sqrt{\varepsilon_i \varepsilon_j} \frac{\sigma_i^3 \sigma_j^3}{\sigma_i^6 + \sigma_j^6}$$
    Recognizes "SixthPower", "Waldman-Hagler", "sixthpower", and "waldman-hagler" in force_field.json.
  2. String Aliases in VDWParameters::stringToEnum:
    Accepts standard user notation including "cff_eps_sigma", "class2", "class-2", "pcff", "cff96", and "cff_9_6", eliminating invalid interaction string errors during input parsing.
  3. Dedicated Unit Tests (cff_cross_mixing.cpp):
    Adds tests for alias resolution, analytical sixth-power parameter mixing, energy evaluation across distances, and spatial gradient factors using the PairDerivatives framework.
  4. Cross-Engine Benchmark Parity:
    To independently verify numerical correctness and thermodynamic sampling against reference codes (LAMMPS pair_style lj/class2/coul/cut, pair_modify mix sixthpower), a full polyethylene–methane benchmark (6,020-atom host, 300 K) was performed:
    • Deterministic single-point parity: interaction energy matches LAMMPS to $2.8 \times 10^{-11}$ relative difference.
    • Thermodynamic chemical potential consistency: $\mu_{\text{ex}} = 10.40 \pm 0.19\text{ kJ/mol}$ (RASPA3 Widom/CFCMC) vs $13.06 \pm 2.23\text{ kJ/mol}$ (LAMMPS Widom), consistent within $1.2\sigma$.
      Full benchmark datasets, inputs, and raw output logs are archived at:
      https://github.com/Eng-LO/cff96-polyethylene-benchmark

Closes #66

… CFF

- Add SixthPower (Waldman-Hagler) mixing rule to ForceField for CFFEpsilonSigma
  and LennardJones potentials.
- Support common Class-II force field aliases in stringToEnum (cff_eps_sigma,
  class2, class-2, pcff, cff96, cff_9_6).
- Add comprehensive unit test suite in cff_cross_mixing.cpp testing analytic
  sixth-power mixed parameters, energy, gradients, and string aliases.
- Verified against companion cross-engine validation benchmark
  (https://github.com/Eng-LO/cff96-polyethylene-benchmark).
@dubbelda
dubbelda merged commit 56e1a92 into iRASPA:main Sep 8, 2026
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.

Question: Exact PCFF/Class-II 9-6 VDW Support in RASPA3

2 participants