Skip to content

[pull] develop from lammps:develop - #177

Merged
pull[bot] merged 59 commits into
comphy-lab:developfrom
lammps:develop
Jul 31, 2026
Merged

[pull] develop from lammps:develop#177
pull[bot] merged 59 commits into
comphy-lab:developfrom
lammps:develop

Conversation

@pull

@pull pull Bot commented Jul 31, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

erybin and others added 30 commits July 20, 2026 16:27
Signed-off-by: erybin <evgeny.rybin@intel.com>
… sub-style checks

hybrid, hybrid/overlay and hybrid/scaled are each registered under two names,
the plain one and a /omp alias bound to the same class. With a suffix active,
Force::new_pair() finds the aliased name, so Force::store_style() records
force->pair_style as e.g. "hybrid/overlay/omp". Three call sites compare that
field for exact equality and misbehave under -sf omp:

  * PairKolmogorovCrespiZ::settings() aborts with "requires hybrid/overlay
    pair_style" even though hybrid/overlay is what is in use, so
    `pair_style hybrid/overlay kolmogorov/crespi/z` cannot run under -sf omp.

  * ComputeFEP::init() and FixAdaptFEP::init() use the comparison to decide
    whether to validate that the requested type range is served by the named
    sub-style. Under a suffix that validation is silently skipped.

Use a prefix match instead, which is what Force::pair_match() already does to
gate its own dynamic_cast<PairHybrid *>. In the two FEP files this also covers
hybrid/scaled and hybrid/molecular, which the original two-name test missed;
every style matched is a PairHybrid subclass, so the cast stays valid.

unittest/force-styles does not catch the first case because it skips its OMP
branch when no /omp variant of the sub-style exists.
akohlmey added 27 commits July 24, 2026 01:24
…from other classes

instead of assigning a pointer, we now copy the data.
With "pair_style mliap unified <model> 1" the pair style requests a
neighbor list that includes neighbors of ghost atoms, so the pair list
also contains entries where i is a ghost.  update_pair_forces() applied
forces and tallied the virial for those entries as well, which counts
interactions that the owning atoms already account for.

Commit 61993d1 dropped the guard against this from both
update_pair_energy() and update_pair_forces().  It was restored for the
energy in commit 1c40cd1, but not for forces and virial, leaving the
energy correct while forces and pressure were not: for the LJ melt test
the initial pressure came out as -100.6 instead of -3.78.

Restore the guard in the plain and the KOKKOS version, which makes the
ghost neighbor list tests in TestMliapPyUnified pass again.

This is not a backport, the same defect is present in the development
branch.
@pull pull Bot locked and limited conversation to collaborators Jul 31, 2026
@pull pull Bot added the ⤵️ pull label Jul 31, 2026
@pull
pull Bot merged commit d3f2238 into comphy-lab:develop Jul 31, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants