← Về thư mục
skills/catalyst_sar_screening/kernel.py
- load_contcar_catalog · function · L203-L222 — def load_contcar_catalog(path: str | Path | None = None) -> dict[str, Any]
- list_catalog_metals · function · L225-L240 — def list_catalog_metals( *, host: str = "graphene", motif: str = "pyridineN", state: str = "slab", ) -> list[str]
- parse_structure_description · function · L243-L281 — def parse_structure_description(description: str | dict[str, Any]) -> dict[str, Any]
- build_poscar_from_description · function · L284-L305 — def build_poscar_from_description( description: str | dict[str, Any], output_path: str | Path, ) -> dict[str, Any]
- build_poscars_from_descriptions · function · L308-L327 — def build_poscars_from_descriptions( descriptions: list[str | dict[str, Any]], output_dir: str | Path, ) -> list[dict[str, Any]]
- _lookup_catalog_entry · function · L330-L365 — def _lookup_catalog_entry( recipe: dict[str, Any], catalog: dict[str, Any] ) -> dict[str, Any] | None
- _derive_from_catalog · function · L368-L447 — def _derive_from_catalog( recipe: dict[str, Any], catalog: dict[str, Any] ) -> dict[str, Any] | None
- _pick_reference · function · L450-L465 — def _pick_reference(pool: list[dict[str, Any]], metal: str) -> dict[str, Any]
- _apply_modifications_optional · function · L468-L500 — def _apply_modifications_optional( poscar_text: str, modifications: list[dict[str, Any]] ) -> str
- _apply_modifications_ase · function · L503-L529 — def _apply_modifications_ase(atoms: Any, modifications: list[dict[str, Any]]) -> Any
- _substitute_metal_text · function · L532-L542 — def _substitute_metal_text(poscar_text: str, old: str, new: str) -> str
- _normalize_structured · function · L545-L575 — def _normalize_structured(payload: dict[str, Any]) -> dict[str, Any]
- _canonical_metal · function · L578-L585 — def _canonical_metal(symbol: str) -> str
- _expand_coordination_token · function · L588-L598 — def _expand_coordination_token(token: str) -> list[str]
- _recipe_name · function · L601-L620 — def _recipe_name( metal: str, coordination: list[str], hetero: str | None, hetero_count: int, motif: str | None = None, host: str | None = None, ) -> str
- _normalize_host · function · L623-L634 — def _normalize_host(host: str | None) -> str
- _normalize_motif · function · L637-L655 — def _normalize_motif(motif: str | None, catalog: dict[str, Any]) -> str
- _infer_motif · function · L658-L677 — def _infer_motif(recipe: dict[str, Any]) -> str
- _coordination_matches_motif · function · L680-L691 — def _coordination_matches_motif(coordination: list[str], motif: str) -> bool
- _reference_coordination_for_motif · function · L694-L702 — def _reference_coordination_for_motif(motif: str) -> list[str]
- _coordination_modifications · function · L705-L716 — def _coordination_modifications( current: list[str], target: list[str] ) -> list[dict[str, Any]]
- _metal_period · function · L719-L727 — def _metal_period(metal: str) -> str
- get_vnn_idx · function · L735-L777 — def get_vnn_idx(atoms: Any) -> tuple[int, list[int], list[int], list[int]]
- _sort_index_cw · function · L780-L792 — def _sort_index_cw( atoms: Any, center_idx: int, neighbor_indices: list[int] ) -> list[int]
- get_vnn_positions · function · L795-L802 — def get_vnn_positions(atoms: Any)
- get_active_string · function · L805-L833 — def get_active_string(atoms: Any) -> str
- CalculationTools · class · L841-L1036 — class CalculationTools
- init · method · L844-L864 — def init(self, calculator_name: str = "UMA", device: str = "cuda") -> None
- _optimize_atoms · method · L866-L877 — def _optimize_atoms( self, atoms: Any, max_steps: int = 200 ) -> tuple[Any, float | None]
- _add_adsorbate · method · L879-L896 — def _add_adsorbate(self, atoms: Any, adsorbate: str) -> Any
- calculate_metal_binding_energy · method · L898-L913 — def calculate_metal_binding_energy(self, atoms: Any) -> float | None
- calculate_dissolution_potential · method · L917-L929 — def calculate_dissolution_potential(self, atoms: Any) -> float | None
- calculate_binding_energy · method · L931-L961 — def calculate_binding_energy( self, atoms: Any, adsorbates: list[str] | None = None ) -> tuple[Any | None, dict[str, Any] | None]
- calculate_overpotential · method · L963-L985 — def calculate_overpotential( self, results: dict[str, Any], reaction: str = DEFAULT_REACTION ) -> tuple[float, str]
- evaluate_structure · method · L987-L1036 — def evaluate_structure( self, atoms: Any, metrics: list[str] | None = None, adsorbates: list[str] | None = None, reaction: str = DEFAULT_REACTION, ) -> dict[str, Any]
- calculate_dissolution_potential_from_binding · function · L1039-L1047 — def calculate_dissolution_potential_from_binding( metal: str, metal_bind_e: float ) -> float
- calculate_orr_overpotential · function · L1050-L1065 — def calculate_orr_overpotential( dG_O: float, dG_OH: float, dG_OOH: float ) -> tuple[float, str, dict[str, float]]
- available_dependencies · function · L1073-L1084 — def available_dependencies() -> dict[str, bool]
- command_to_shell · function · L1087-L1088 — def command_to_shell(command: Iterable[str]) -> str
- build_uma_python_command · function · L1091-L1104 — def build_uma_python_command( script: str, *, conda_env: str = "catagent", hf_endpoint: str = "https://hf-mirror.com", ) -> list[str]
- probe_huggingface_hub · function · L1107-L1150 — def probe_huggingface_hub( *, endpoint: str | None = None, timeout: float = 8.0 ) -> dict[str, Any]
- check_uma_readiness · function · L1153-L1262 — def check_uma_readiness( *, require_cuda: bool = False, probe_conda_env: str | None = "catagent", probe_hub: bool = True, hub_timeout: float = 8.0, ) -> dict[str, Any]
- require_uma_ready · function · L1265-L1269 — def require_uma_ready(**kwargs: Any) -> dict[str, Any]
- normalize_metrics · function · L1272-L1284 — def normalize_metrics(metrics: list[str] | None) -> list[str]
- supported_dissolution_metals · function · L1287-L1297 — def supported_dissolution_metals() -> set[str]
- unsupported_dissolution_metals · function · L1300-L1308 — def unsupported_dissolution_metals(metals: Iterable[str]) -> list[str]
- evaluate_poscars · function · L1316-L1376 — def evaluate_poscars( built: list[dict[str, Any]], *, metrics: list[str] | None = None, adsorbates: list[str] | None = None, reaction: str = DEFAULT_REACTION, ) -> list[dict[str, Any]]
- resolve_analysis_mode · function · L1379-L1389 — def resolve_analysis_mode(metrics: list[str] | None = None) -> str
- rank_candidates · function · L1392-L1457 — def rank_candidates( results: list[dict[str, Any]], *, mode: str | None = None, max_overpotential: float | None = 0.8, min_dissolution: float | None = 0.0, ) -> list[dict[str, Any]]
- _f · function · L1401-L1408 — def _f(value: Any) -> float | None
- key · function · L1410-L1434 — def key(row: dict[str, Any]) -> tuple
- analyze_structure_activity · function · L1460-L1489 — def analyze_structure_activity( results: list[dict[str, Any]], *, metrics: list[str] | None = None, max_overpotential: float | None = 0.8, min_dissolution: float | None = 0.0, ) -> dict[str, Any]
- _summarize_metal_trends · function · L1492-L1520 — def _summarize_metal_trends(results: list[dict[str, Any]]) -> list[dict[str, Any]]
- _build_insights · function · L1523-L1577 — def _build_insights( ranked: list[dict[str, Any]], trends: list[dict[str, Any]], *, mode: str ) -> list[str]
- _lattice_determinant · function · L1585-L1587 — def _lattice_determinant(matrix: list[list[float]]) -> float
- parse_poscar · function · L1590-L1640 — def parse_poscar(text: str) -> dict[str, Any]
- export_publication_figures · function · L1643-L1761 — def export_publication_figures( analysis: dict[str, Any], output_dir: str | Path ) -> list[dict[str, Any]]
- export_structure_collage · function · L1764-L1841 — def export_structure_collage( structures: list[dict[str, Any]], output_dir: str | Path, *, max_structures: int = 5 ) -> list[dict[str, Any]]
- build_markdown_report · function · L1844-L1926 — def build_markdown_report( analysis: dict[str, Any], *, title: str = "Catalyst Structure-Activity Report" ) -> str
- render_sar_dashboard · function · L1929-L2051 — def render_sar_dashboard( analysis: dict[str, Any], *, title: str = "Catalyst SAR screening dashboard" ) -> str
- _fmt · function · L2054-L2060 — def _fmt(value: Any) -> str
- run_pipeline · function · L2068-L2170 — def run_pipeline( descriptions: list[str | dict[str, Any]], workdir: str | Path, *, metrics: list[str] | None = None, max_overpotential: float | None = 0.8, min_dissolution: float | None = 0.0, reaction: str = DEFAULT_REACTION, adsorbates: list[str] | None = None, ) -> dict[str, Any]
- run_metal_center_dissolution_case · function · L2173-L2200 — def run_metal_center_dissolution_case( descriptions: list[str | dict[str, Any]], workdir: str | Path | None = None, *, min_dissolution: float = 0.0, ) -> dict[str, Any]
- load_descriptions · function · L2203-L2207 — def load_descriptions(path: str | Path) -> list[str | dict[str, Any]]