westpa.oldtools package

westpa.oldtools module

westpa.oldtools.files module

westpa.oldtools.files.load_npy_or_text(filename)

Load an array from an existing .npy file, or read a text file and convert to a NumPy array. In either case, return a NumPy array. If a pickled NumPy dataset is found, memory-map it read-only. If the specified file does not contain a pickled NumPy array, attempt to read the file using numpy.loadtxt(filename, **kwargs).

westpa.oldtools.miscfn module

Miscellaneous support functions for WEST and WEST tools

westpa.oldtools.miscfn.parse_int_list(list_string)

Parse a simple list consisting of integers or ranges of integers separated by commas. Ranges are specified as min:max, and include the maximum value (unlike Python’s range). Duplicate values are ignored. Returns the result as a sorted list. Raises ValueError if the list cannot be parsed.