Utility Modules
g-xTB
gxtb
get_gxtb_exe
get_gxtb_exe(gxtb_exe: str | None = None) -> Path
Return the g-xTB v2 xtb executable path.
Source code in frust/utils/gxtb.py
8 9 10 11 12 13 14 15 16 17 18 | |
gxtb_ext_params
gxtb_ext_params(*, gxtb_exe: str | None = None, extra_params: str | None = None) -> str
Build Ext_Params for OET's g-xTB v2 wrapper.
Source code in frust/utils/gxtb.py
30 31 32 33 34 35 36 37 38 39 | |
gxtb_orca_block
gxtb_orca_block(*, gxtb_exe: str | None = None, ext_params: str | None = None, tools: Path | None = None) -> str
Build the ORCA method block for OET g-xTB v2 external calculations.
Source code in frust/utils/gxtb.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |
oet_gxtb_bin
oet_gxtb_bin(*, tools: Path | None = None) -> Path
Return the OET g-xTB wrapper executable.
Source code in frust/utils/gxtb.py
21 22 23 24 25 26 27 | |
UMA
uma
UmaServerHandle
dataclass
Source code in frust/utils/uma.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | |
preserve
preserve() -> str
Copy the transient server log to the configured preserved-log directory.
Source code in frust/utils/uma.py
40 41 42 43 44 45 46 47 48 49 50 | |
oet_bin
oet_bin(name: str, *, tools: Path | None = None) -> Path
Return an OET 2 executable path and validate it exists.
Source code in frust/utils/uma.py
95 96 97 98 99 100 101 | |
parse_uma_spec
parse_uma_spec(uma: str, *, device: str = 'cpu', cache_dir: str | None = None, offline: bool = False) -> UmaSpec
Parse FRUST's task or task@model UMA shorthand.
Source code in frust/utils/uma.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |
uma_server
uma_server(*, log_dir: str | None = None, keep_logs: bool | str = 'on_failure', use_gpu: bool = False, server_cores: int | None = None, memory_per_thread_mib: int = 500, port: int | None = None)
Run an OET 2 UMA server bound to localhost for the current process.
Source code in frust/utils/uma.py
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | |
IO
io
dump_df
dump_df(df: DataFrame, step: str, base_dir: Path) -> Path
If dump_each_step is True, writes DataFrame to base_dir/{step}.csv.
Source code in frust/utils/io.py
12 13 14 15 16 17 18 19 | |
read_ts_type_from_xyz
read_ts_type_from_xyz(xyz_file: str)
Reads the transition state (TS) type from the comment line of an XYZ file.
Args: xyz_file (str): Path to the XYZ file containing the transition state structure. The TS type must be specified in the second line as 'TS' followed by a number (e.g., 'TS1 guess', 'TS2').
Returns: str: The transition state type in uppercase (e.g., 'TS1', 'TS2').
Source code in frust/utils/io.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
write_xyz_structures
write_xyz_structures(df: DataFrame, path: Path | str, coord_options: Mapping[str, str], name_col: str = 'custom_name', atoms_col: str = 'atoms', show_mols: bool = False, **molto3d_kwargs) -> None
Write XYZ structure files from coordinate columns in a dataframe.
Args: df: Dataframe containing atoms, names, and coordinate columns. path: Base directory where the XYZ folders should be created. coord_options: Mapping from output folder/suffix to coordinate column. The key is used both as the subfolder name and filename suffix. name_col: Column containing the base structure name. atoms_col: Column containing atomic symbols. show_mols: Whether to display the written structures. **molto3d_kwargs: Additional keyword arguments passed to MolTo3DGrid.
Source code in frust/utils/io.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | |