atompack.hub ============ .. py:module:: atompack.hub Classes ------- .. autoapisummary:: atompack.hub.AtompackReader Functions --------- .. autoapisummary:: atompack.hub.download atompack.hub.upload atompack.hub.open atompack.hub.open_path Module Contents --------------- .. py:class:: AtompackReader(paths: Sequence[pathlib.Path], databases: Sequence[atompack._atompack_rs.PyAtomDatabase]) Read-only view over one atompack file or a lexicographically ordered shard set. .. py:method:: get_molecule(index: int) -> atompack._atompack_rs.PyMolecule .. py:method:: get_molecules(indices: list[int]) -> list[atompack._atompack_rs.PyMolecule] .. py:method:: to_ase_batch(indices: list[int] | None = None, *, attach_calc: bool = True, calc_mode: str = 'singlepoint', copy_info: bool = True, copy_arrays: bool = True) -> list[object] .. py:method:: close() -> None .. py:function:: download(repo_id: str, path_in_repo: str | None = None, *, revision: str | None = None, repo_type: str = 'dataset', token: str | bool | None = None, cache_dir: str | pathlib.Path | None = None, local_dir: str | pathlib.Path | None = None, local_files_only: bool = False, force_download: bool = False) -> pathlib.Path Download a single .atp file or shard directory from a Hugging Face repo. .. py:function:: upload(source: str | pathlib.Path, repo_id: str, path_in_repo: str | None = None, *, repo_type: str = 'dataset', revision: str | None = None, token: str | None = None, commit_message: str | None = None, create_repo: bool = True, private: bool = False, use_xet: bool | None = None) -> Any Upload a local .atp file or shard directory to a Hugging Face repo. By default, large single-shard uploads temporarily disable Xet so the Hub can use multipart LFS upload, which is typically much faster for large compressed `.atp` files. Pass `use_xet=True` to force Xet, or `use_xet=False` to disable it explicitly. .. py:function:: open(repo_id: str, path_in_repo: str | None = None, *, revision: str | None = None, repo_type: str = 'dataset', token: str | bool | None = None, cache_dir: str | pathlib.Path | None = None, local_dir: str | pathlib.Path | None = None, local_files_only: bool = False, force_download: bool = False) -> AtompackReader Download atompack data from Hugging Face and return a read-only reader. .. py:function:: open_path(source: str | pathlib.Path) -> AtompackReader Open a local .atp file or shard directory as a read-only reader.