get_largest_relax_extension
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
- directory
str
orPath
A directory to search.
- host
str
orNone
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_client
FileClient
A file client to use for performing file operations.
- directory
- Returns
str
The relax extension or an empty string if there were not multiple relaxations.