← Về thư mục
skills/pymatgen/scripts/_common.py
- CliError · class · L28-L29 — class CliError(ValueError)
- reject_url · function · L32-L35 — def reject_url(value: str, label: str = "path") -> None
- checked_input_file · function · L38-L62 — def checked_input_file( value: str | Path, *, max_bytes: int = DEFAULT_MAX_INPUT_BYTES, ) -> Path
- checked_output_file · function · L65-L85 — def checked_output_file( value: str | Path, *, input_paths: tuple[Path, ...] = (), ) -> Path
- _reject_duplicate_pairs · function · L88-L94 — def _reject_duplicate_pairs(pairs: list[tuple[str, Any]]) -> dict[str, Any]
- _reject_constant · function · L97-L98 — def _reject_constant(value: str) -> None
- load_strict_json · function · L101-L118 — def load_strict_json( value: str | Path, *, max_bytes: int = DEFAULT_MAX_INPUT_BYTES, ) -> tuple[Any, Path]
- json_text · function · L121-L129 — def json_text(payload: Any, *, pretty: bool = True) -> str
- emit_json · function · L132-L134 — def emit_json(payload: Any) -> None
- write_text_new · function · L137-L157 — def write_text_new( path: Path, text: str, *, max_bytes: int = DEFAULT_MAX_OUTPUT_BYTES, ) -> None
- write_json_new · function · L160-L167 — def write_json_new( path: Path, payload: Any, *, max_bytes: int = DEFAULT_MAX_OUTPUT_BYTES, ) -> None
- finite_float · function · L170-L180 — def finite_float(value: Any, label: str) -> float
- positive_int · function · L183-L191 — def positive_int(value: str) -> int
- package_versions · function · L194-L202 — def package_versions(names: tuple[str, ...]) -> dict[str, str | None]
- sha256_file · function · L205-L211 — def sha256_file(path: Path, *, chunk_bytes: int = 1024 * 1024) -> str
- structure_oxidation_summary · function · L214-L232 — def structure_oxidation_summary(structure: Any) -> dict[str, Any]
- load_structure · function · L235-L300 — def load_structure( value: str | Path, *, structure_index: int = 0, max_bytes: int = DEFAULT_MAX_INPUT_BYTES, max_sites: int = DEFAULT_MAX_SITES, ) -> tuple[Any, Path, dict[str, Any]]
- safe_error_message · function · L303-L308 — def safe_error_message(exc: BaseException, *, secret: str | None = None) -> str
- atomic_link_from_temp · function · L311-L316 — def atomic_link_from_temp(temp_path: Path, output_path: Path) -> None