Repository navigation
fix(pt_expt): skip neighbor statistics for graph-native DPA4 models #6128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d1207d5
0f6da84
2b7e016
6adfbd0
293c14f
8197f4c
3ffab45
95d2cd6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,6 +34,7 @@ | |
| "is_bridged_sezm_config", | ||
| "migrate_inner_clamp_keys", | ||
| "resolve_bridging_window", | ||
| "validate_tabulated_zbl", | ||
| "window_midpoint", | ||
| ] | ||
|
|
||
|
|
@@ -311,6 +312,22 @@ def concise_bridging_window(data: dict) -> dict: | |
| } | ||
|
|
||
|
|
||
| def validate_tabulated_zbl(data: dict) -> None: | ||
| """Reject legacy tabulated switching for DPA4-family model configs.""" | ||
| # Legacy tabulated switching is not the DPA4 analytical inner potential: | ||
| # reject it rather than silently ignoring it in the dedicated model builder. | ||
| model_type = str(data.get("type", "standard")).lower() | ||
| descriptor_type = str(data.get("descriptor", {}).get("type", "")).lower() | ||
| if "use_srtab" in data and ( | ||
| model_type in _DPA4_FAMILY_TYPES | ||
| or descriptor_type in (*_DPA4_FAMILY_TYPES, "dpa4c") | ||
|
OutisLi marked this conversation as resolved.
Resolved
Comment on lines
+320
to
+323
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The new validator only looks one level down, so a DPA4/DPA4C descriptor wrapped in
Trigger: a standard model whose descriptor is Call chain: Consequence: the identical descriptor written directly is rejected with the new Evidence boundary: reproduced at HEAD by calling |
||
| ): | ||
|
OutisLi marked this conversation as resolved.
Resolved
|
||
| raise ValueError( | ||
| "DPA4/DPA4C do not support the legacy tabulated ZBL (`use_srtab`). " | ||
| "Use `bridging_method: zbl` for analytical inner-potential bridging." | ||
| ) | ||
|
|
||
|
|
||
| def expand_bridging_method(data: dict) -> dict: | ||
| """Expand the ``bridging_method`` sugar into a ``linear_ener`` config. | ||
|
|
||
|
|
@@ -342,9 +359,11 @@ def expand_bridging_method(data: dict) -> dict: | |
| ------ | ||
| ValueError | ||
| If ``bridging_method`` is set on a model type that does not | ||
| support it, or if ``pair_exclude_types`` and | ||
| support it, if a DPA4-family model requests legacy ``use_srtab``, | ||
| or if ``pair_exclude_types`` and | ||
| ``descriptor.exclude_types`` are both given and differ. | ||
| """ | ||
| validate_tabulated_zbl(data) | ||
| method = str(data.get("bridging_method", "none")) | ||
| if method.lower() in ("none", ""): | ||
| return data | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.