[pull] develop from lammps:develop - #177
Merged
Merged
Conversation
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.
…f their extract tables
…ammps into collected-small-changes
…into collected-small-changes
…mmps into collected-small-changes
…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.
…mit hash and branch info
Collected small changes and fixes
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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 : )