qmmd.qmcalc.tabulate
Attributes
Functions
|
Sort a given list in a more natural way (e.g., 'abc2' before 'abc10'). |
|
Replace multiple strings in str1 by str2. |
|
Find the values of interest from Gaussian output files. |
|
Tabulate the quantities of interest from Gaussian .out files to an Excel document. |
Module Contents
- qmmd.qmcalc.tabulate.sortNatural(targetList: List[str]) List[str][source]
Sort a given list in a more natural way (e.g., ‘abc2’ before ‘abc10’).
- Parameters:
targetList (List[str]) – List of strings to be sorted.
- Returns:
Naturally sorted list.
- Return type:
List[str]
- qmmd.qmcalc.tabulate.replaceMultiple(str1: str, strsToReplace: List[str], str2: str) str[source]
Replace multiple strings in str1 by str2.
- Parameters:
str1 (str) – Target string.
strsToReplace (List[str]) – List of strings to be replaced.
str2 (str) – Replacement string.
- Returns:
Updated string.
- Return type:
str
- qmmd.qmcalc.tabulate.findVal(lineList: List[str], targetStr: List[str]) float | str[source]
Find the values of interest from Gaussian output files.
- Parameters:
lineList (List[str]) – List of lines from the Gaussian output file (reversed).
targetStr (List[str]) – List of target strings to search for.
- Returns:
Found value, either as a float (for energies) or a string.
- Return type:
Union[float, str]
- Raises:
Exception – If the target string is not found in the line list.
- qmmd.qmcalc.tabulate.writeToExcel(inputDirPath: str, verbose: bool = False) xlsxwriter.workbook.Workbook[source]
Tabulate the quantities of interest from Gaussian .out files to an Excel document.
- Parameters:
inputDirPath (str) – Path to the directory containing Gaussian output files.
verbose (bool, optional) – Whether to display details of the process.
- Returns:
The xlsxwriter Workbook object.
- Return type:
Workbook
- qmmd.qmcalc.tabulate.inputDirPath = '/mnt/c/Users/ASUS/Documents/qmmd/src/qmmd/data/exampleXYZs'