DataFrame Schema
schema
DataFrame schema helpers for FRUST results.
StructureMetadata
dataclass
Parsed structure identity independent of display/file names.
Source code in frust/schema.py
25 26 27 28 29 30 31 32 33 34 35 36 | |
canonical_output_columns
canonical_output_columns(df: DataFrame) -> pd.DataFrame
Rename legacy output suffixes to the compact schema.
Source code in frust/schema.py
63 64 65 66 67 68 69 70 71 72 73 | |
energy_columns
energy_columns(df: DataFrame) -> list[str]
Return energy-like columns in dataframe order.
Source code in frust/schema.py
44 45 46 | |
infer_group_columns
infer_group_columns(df: DataFrame) -> list[str]
Choose columns that identify one chemical object for lowest filtering.
Source code in frust/schema.py
91 92 93 94 | |
latest_opt_coords_column
latest_opt_coords_column(prefix: str, df: DataFrame) -> str | None
Find the optimized coordinate column matching a vibration prefix.
Source code in frust/schema.py
54 55 56 57 58 59 60 | |
metadata_from_mapping
metadata_from_mapping(metadata: dict[str, Any] | None, *, fallback_name: str, smiles: str | None = None) -> StructureMetadata
Build complete metadata from an optional partial mapping.
Source code in frust/schema.py
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | |
normal_termination_columns
normal_termination_columns(df: DataFrame) -> list[str]
Return normal-termination columns in dataframe order.
Source code in frust/schema.py
49 50 51 | |
normalize_dataframe
normalize_dataframe(df: DataFrame) -> pd.DataFrame
Normalize old FRUST dataframe columns to the current schema.
This is intentionally conservative: it does not add ligand_name back.
It only maps old data into canonical names so older parquet files can still
be read by current utilities.
Source code in frust/schema.py
76 77 78 79 80 81 82 83 84 85 86 87 88 | |
output_column
output_column(prefix: str, key: str) -> str
Build a dataframe output column with the canonical short suffix.
Source code in frust/schema.py
39 40 41 | |
parse_structure_name
parse_structure_name(name: str, smiles: str | None = None) -> StructureMetadata
Parse legacy structure names when no structured metadata is available.
Source code in frust/schema.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | |