schrodinger.application.desmond.file_utils module

schrodinger.application.desmond.file_utils.is_zipped_graph_file_path(file_path: schrodinger.application.desmond.typing_utils.PathType) bool
Parameters

file_path – a file path

Returns

whether the specified file path uses an extension that indicates a zipped graph file

schrodinger.application.desmond.file_utils.is_graph_file_path(file_path: schrodinger.application.desmond.typing_utils.PathType) bool
Parameters

file_path – a file path

Returns

whether the specified file path uses an extension that indicates a graph file (compressed or not)

schrodinger.application.desmond.file_utils.get_graph_file_path_base(file_path: schrodinger.application.desmond.typing_utils.PathType) str

Return the “base” form of a file path that has a graph file extension.

Getting the “base” of a file path that points to a graph file can be tricky because typical APIs might trip over the “double extension” form of .fmp.gz.

Parameters

file_path – a file path that uses a graph file extension

Returns

the same file path but without the graph file extension; if the input file path has no graph file extension, then return the unaltered file path (cast to str)