neurosnap.database.foldseek module#

Foldseek API helpers.

Perform a protein structure search using the Foldseek API.

Parameters:
  • structure (Union[Structure, StructureEnsemble, StructureStack, str, Path]) – A Neurosnap structure container or a path to a PDB file.

  • mode (str) – Search mode. Must be one of "3diaa" or "tm-align".

  • databases (Optional[List[str]]) – Databases to search. Defaults to Foldseek’s common public structure databases.

  • max_retries (int) – Maximum number of retries when polling job status.

  • retry_interval (int) – Seconds between job-status polls.

  • output_format (str) – Output format, either "json" or "dataframe".

Return type:

Union[str, DataFrame]

Returns:

Search results in the requested format.

Raises:
  • RuntimeError – If job submission or retrieval fails.

  • TimeoutError – If the job does not complete before retries are exhausted.

  • ValueError – If output_format is invalid.