Skip to content

mat-surface-adsorption: site labels show as "unknown" — result.get("site") should be result.get("adsorption_site") #49

Closed

Description

@Zhicheng-Zeng-NTU

In .agents/skills/mat-surface-adsorption/scripts/calculate_adsorption.py (line 120):

site_info = result.get("site", "unknown")

This causes every entry in adsorption_results.json to report "site": "unknown".

Root cause

In matcalc 0.5.1, AdsorptionCalc.calc_adslabs stores the site label in each
adslab dict under the key "adsorption_site" (alongside "adsorption_site_coord"
and "adsorption_site_index"), and these keys pass through calc_many into the
returned results. The script looks up "site", which does not exist, so the
fallback "unknown" is always used.

Suggested fix

site_info = result.get("adsorption_site", "unknown")

Optionally also record "site_coord": result.get("adsorption_site_coord", None)
in the output JSON for traceability.

Verification

Tested with MACE-OMAT-0-small on CO/Cu(111) (matcalc 0.5.1, CPU). After the
one-word change, the JSON correctly reports 1 ontop + 1 bridge + 2 hollow sites,
with the most stable site being ontop (E_ads = -0.506 eV), consistent with
literature.

Activity

  1. bowen-bd commented on Oct 7, 2026

    @bowen-bd
    Collaborator

    Thanks for reporting! This is fixed in #50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions