get_largest_opt_extension¶
- atomate2.qchem.files.get_largest_opt_extension(directory, host=None, file_client=None)[source]¶
Get the largest numbered opt extension of files in a directory.
For example, if listdir gives [“mol.qout.opt_0.gz”, “mol.qout.opt_1.gz”], this function will return “.opt_1”.
- Parameters:
directory (str or Path) – A directory to search.
host (str 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_client (.FileClient) – A file client to use for performing file operations.
- Returns:
The opt extension or an empty string if there were not multiple relaxations.
- Return type: