Datasets:
Formats:
csv
Languages:
English
Size:
1K - 10K
Tags:
open-science
superconductivity
superconductor-discovery
strongly-correlated
materials-discovery
2d-materials
License:
fix4/5 in pipeline
Browse files- pipeline/build_final.py +33 -8
pipeline/build_final.py
CHANGED
|
@@ -58,11 +58,31 @@ def main():
|
|
| 58 |
return oid
|
| 59 |
nextid[0] += 1
|
| 60 |
return f"OSC-{nextid[0]}"
|
| 61 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
for s in solved:
|
| 63 |
-
|
| 64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
s["verified_score"] = round(s["nef_states_eV_atom"] * Ad * SCALE, 3)
|
|
|
|
|
|
|
|
|
|
| 66 |
solved.sort(key=lambda s: -s["verified_score"])
|
| 67 |
oid_map = {s["material_id"]: osc_id_for(s["material_id"]) for s in solved}
|
| 68 |
fml_map = {s["material_id"]: meta(s["material_id"], "formula", derive_formula(s["material_id"])) for s in solved}
|
|
@@ -100,18 +120,23 @@ def main():
|
|
| 100 |
with open("active_challenge.csv", "w", newline="", encoding="utf-8") as f:
|
| 101 |
w = csv.DictWriter(f, fieldnames=acols, extrasaction="ignore"); w.writeheader(); w.writerows(arows)
|
| 102 |
|
| 103 |
-
# ---- submissions.csv (verified anchors, one scale) ----
|
| 104 |
scols = ["material_id", "osc_id", "formula", "author", "method_name",
|
| 105 |
-
"provisional_score", "verified_score", "verified", "is_anchor"
|
|
|
|
| 106 |
srows = []
|
| 107 |
for s in solved:
|
| 108 |
uid = s["material_id"]
|
|
|
|
|
|
|
|
|
|
| 109 |
srows.append({
|
| 110 |
"material_id": uid, "osc_id": oid_map[uid],
|
| 111 |
-
"formula": fml_map[uid], "author": "OSC
|
| 112 |
-
"method_name": f"precise
|
| 113 |
"provisional_score": s["verified_score"], "verified_score": s["verified_score"],
|
| 114 |
-
"verified": "true", "is_anchor": "true"
|
|
|
|
| 115 |
with open("submissions.csv", "w", newline="", encoding="utf-8") as f:
|
| 116 |
w = csv.DictWriter(f, fieldnames=scols, extrasaction="ignore"); w.writeheader(); w.writerows(srows)
|
| 117 |
print(f"\nwrote active_challenge.csv ({len(arows)}) + submissions.csv ({len(srows)})")
|
|
|
|
| 58 |
return oid
|
| 59 |
nextid[0] += 1
|
| 60 |
return f"OSC-{nextid[0]}"
|
| 61 |
+
# A_d(Ne) dome table from solved materials (for particle-hole remap)
|
| 62 |
+
A_by_Ne = {s["solver_Ne"]: s["A_dwave"] for s in solved if s.get("A_dwave") is not None}
|
| 63 |
+
T_MIN = 0.01 # eV; below this the single-band effective model is ill-defined (U/t -> inf)
|
| 64 |
+
# verified score per material, with two honest fixes:
|
| 65 |
+
# fix4: t<T_MIN (e.g. 2CuO-1 t=0.0002) -> effective model ill-defined, excluded from scoring
|
| 66 |
+
# fix5: n_band>1 (Ne>36) -> particle-hole symmetry, A_d(Ne)=A_d(72-Ne)
|
| 67 |
+
kept, excluded = [], []
|
| 68 |
for s in solved:
|
| 69 |
+
t = s.get("t_ev"); Ne = s.get("solver_Ne")
|
| 70 |
+
if t is None or float(t) < T_MIN:
|
| 71 |
+
s["status"] = "excluded"; s["exclude_reason"] = f"effective model ill-defined (t={t} eV < {T_MIN})"
|
| 72 |
+
excluded.append(s); continue
|
| 73 |
+
Ad = s.get("A_dwave")
|
| 74 |
+
if Ne is not None and Ne > 36: # electron-doped past half-filling
|
| 75 |
+
Ne_eff = 72 - Ne
|
| 76 |
+
Ad = A_by_Ne.get(Ne_eff, Ad); s["ph_mapped"] = True; s["Ne_eff"] = Ne_eff
|
| 77 |
+
if Ad is None:
|
| 78 |
+
s["status"] = "excluded"; s["exclude_reason"] = f"no solver A_d for Ne={Ne}"
|
| 79 |
+
excluded.append(s); continue
|
| 80 |
+
Ad = max(0.0, Ad)
|
| 81 |
+
s["A_dwave"] = round(Ad, 5)
|
| 82 |
s["verified_score"] = round(s["nef_states_eV_atom"] * Ad * SCALE, 3)
|
| 83 |
+
kept.append(s)
|
| 84 |
+
print(f"[fix4/5] excluded {len(excluded)}: " + ", ".join(f"{e['material_id']}({e['exclude_reason'][:22]})" for e in excluded[:8]))
|
| 85 |
+
solved = kept
|
| 86 |
solved.sort(key=lambda s: -s["verified_score"])
|
| 87 |
oid_map = {s["material_id"]: osc_id_for(s["material_id"]) for s in solved}
|
| 88 |
fml_map = {s["material_id"]: meta(s["material_id"], "formula", derive_formula(s["material_id"])) for s in solved}
|
|
|
|
| 120 |
with open("active_challenge.csv", "w", newline="", encoding="utf-8") as f:
|
| 121 |
w = csv.DictWriter(f, fieldnames=acols, extrasaction="ignore"); w.writeheader(); w.writerows(arows)
|
| 122 |
|
| 123 |
+
# ---- submissions.csv (verified anchors, one scale, with scoring breakdown) ----
|
| 124 |
scols = ["material_id", "osc_id", "formula", "author", "method_name",
|
| 125 |
+
"provisional_score", "verified_score", "verified", "is_anchor",
|
| 126 |
+
"nef", "solver_delta", "A_dwave", "verify_note"]
|
| 127 |
srows = []
|
| 128 |
for s in solved:
|
| 129 |
uid = s["material_id"]
|
| 130 |
+
nef = s["nef_states_eV_atom"]; d = s["solver_delta"]; Ad = s["A_dwave"]
|
| 131 |
+
note = (f"overdoped (δ={d:+.2f}): d-wave amplitude ≤0 → not a d-wave candidate"
|
| 132 |
+
if Ad <= 0 else f"d-wave dome, δ={d:+.2f}, A_d={Ad:.3f}")
|
| 133 |
srows.append({
|
| 134 |
"material_id": uid, "osc_id": oid_map[uid],
|
| 135 |
+
"formula": fml_map[uid], "author": "OSC-66",
|
| 136 |
+
"method_name": f"precise 6×6 solver @ δ={d:+.2f}",
|
| 137 |
"provisional_score": s["verified_score"], "verified_score": s["verified_score"],
|
| 138 |
+
"verified": "true", "is_anchor": "true",
|
| 139 |
+
"nef": round(nef, 4), "solver_delta": d, "A_dwave": round(Ad, 5), "verify_note": note})
|
| 140 |
with open("submissions.csv", "w", newline="", encoding="utf-8") as f:
|
| 141 |
w = csv.DictWriter(f, fieldnames=scols, extrasaction="ignore"); w.writeheader(); w.writerows(srows)
|
| 142 |
print(f"\nwrote active_challenge.csv ({len(arows)}) + submissions.csv ({len(srows)})")
|