get_largest_relax_extension#

atomate2.vasp.files.get_largest_relax_extension(directory: Path | str, host: str | None = None, file_client: FileClient | None = None) str[source]#

Get the largest numbered relax extension of files in a directory.

For example, if listdir gives [“vasprun.xml.relax1.gz”, “vasprun.xml.relax2.gz”], this function will return “.relax2”.

Parameters
directorystr or Path

A directory to search.

hoststr or None

The hostname used to specify a remote filesystem. Can be given as either “username@remote_host” or just “remote_host” in which case the username will be inferred from the current user. If None, the local filesystem will be used.

file_clientFileClient

A file client to use for performing file operations.

Returns
str

The relax extension or an empty string if there were not multiple relaxations.