@@ -83,7 +83,7 @@ class Molecule(BaseModel):
8383Molecules = TypeAdapter (dict [str , Molecule ])
8484
8585
86- class MoleculeSimulationOutput (BaseModel ):
86+ class MoleculeModelOutput (BaseModel ):
8787 """Stores the simulation state for a molecule.
8888
8989 Attributes:
@@ -97,26 +97,25 @@ class MoleculeSimulationOutput(BaseModel):
9797 simulation_state : SimulationState
9898
9999
100- class SmallMoleculeMinimizationModelOutput (ModelOutput ):
101- """ModelOutput object for small molecule conformer minimization benchmark.
100+ class ReferenceGeometryStabilityModelOutput (ModelOutput ):
101+ """ModelOutput object for reference geometry stability benchmark.
102102
103103 Attributes:
104104 openff_neutral: A list of simulation states for each molecule in the dataset.
105105 openff_charged: A list of simulation states for each molecule in the dataset.
106106 """
107107
108- openff_neutral : list [MoleculeSimulationOutput ]
109- openff_charged : list [MoleculeSimulationOutput ]
108+ openff_neutral : list [MoleculeModelOutput ]
109+ openff_charged : list [MoleculeModelOutput ]
110110
111111
112- class SmallMoleculeMinimizationDatasetResult (BaseModel ):
112+ class ReferenceGeometryStabilityDatasetResult (BaseModel ):
113113 """Result for a single dataset.
114114
115115 Attributes:
116116 rmsd_values: The list of rmsd values for each molecule.
117117 avg_rmsd: The average rmsd across all molecules in the dataset.
118- num_exploded: The number of molecules that exploded during
119- minimization.
118+ num_exploded: The number of molecules that exploded during minimization.
120119 num_bad_rmsds: The number of molecules that we consider to
121120 have a poor rmsd score.
122121 """
@@ -127,8 +126,8 @@ class SmallMoleculeMinimizationDatasetResult(BaseModel):
127126 num_bad_rmsds : NonNegativeInt
128127
129128
130- class SmallMoleculeMinimizationResult (BenchmarkResult ):
131- """Results object for small molecule minimization benchmark.
129+ class ReferenceGeometryStabilityResult (BenchmarkResult ):
130+ """Results object for reference geometry stability benchmark.
132131
133132 Attributes:
134133 openff_neutral: The results for the openff neutral dataset.
@@ -138,25 +137,25 @@ class SmallMoleculeMinimizationResult(BenchmarkResult):
138137 0 and 1.
139138 """
140139
141- openff_neutral : SmallMoleculeMinimizationDatasetResult
142- openff_charged : SmallMoleculeMinimizationDatasetResult
140+ openff_neutral : ReferenceGeometryStabilityDatasetResult
141+ openff_charged : ReferenceGeometryStabilityDatasetResult
143142 avg_rmsd : NonNegativeFloat | None = None
144143
145144
146- class SmallMoleculeMinimizationBenchmark (Benchmark ):
147- """Benchmark for small molecule minimization .
145+ class ReferenceGeometryStabilityBenchmark (Benchmark ):
146+ """Benchmark for reference geometry stability .
148147
149148 Attributes:
150149 name: The unique benchmark name that should be used to run the benchmark
151150 from the CLI and that will determine the output folder name for the result
152- file. The name is `small_molecule_minimization `.
151+ file. The name is `reference_geometry_stability `.
153152 category: A string that describes the category of the benchmark, used for
154153 example, in the UI app for grouping. Default, if not overridden,
155154 is "General". This benchmark's category is "Small Molecules".
156155 result_class: A reference to the type of `BenchmarkResult` that will determine
157156 the return type of `self.analyze()`. The result class type is
158- `SmallMoleculeMinimizationResult `.
159- model_output_class: A reference to the `SmallMoleculeMinimizationModelOutput `
157+ `ReferenceGeometryStabilityResult `.
158+ model_output_class: A reference to the `ReferenceGeometryStabilityModelOutput `
160159 class.
161160 required_elements: The set of atomic element types that are present in the
162161 benchmark's input files.
@@ -166,10 +165,10 @@ class SmallMoleculeMinimizationBenchmark(Benchmark):
166165 element types. For this benchmark, the attribute is set to True.
167166 """
168167
169- name = "small_molecule_minimization "
168+ name = "reference_geometry_stability "
170169 category = "Small Molecules"
171- result_class = SmallMoleculeMinimizationResult
172- model_output_class = SmallMoleculeMinimizationModelOutput
170+ result_class = ReferenceGeometryStabilityResult
171+ model_output_class = ReferenceGeometryStabilityModelOutput
173172
174173 required_elements = {"N" , "Cl" , "H" , "O" , "S" , "F" , "P" , "C" , "Br" }
175174
@@ -185,7 +184,7 @@ def run_model(self) -> None:
185184 else :
186185 md_kwargs = SIMULATION_CONFIG
187186
188- self .model_output = SmallMoleculeMinimizationModelOutput (
187+ self .model_output = ReferenceGeometryStabilityModelOutput (
189188 openff_neutral = [],
190189 openff_charged = [],
191190 )
@@ -206,12 +205,12 @@ def run_model(self) -> None:
206205 md_engine .run ()
207206
208207 getattr (self .model_output , dataset_prefix ).append (
209- MoleculeSimulationOutput (
208+ MoleculeModelOutput (
210209 molecule_name = molecule_name , simulation_state = md_engine .state
211210 )
212211 )
213212
214- def analyze (self ) -> SmallMoleculeMinimizationResult :
213+ def analyze (self ) -> ReferenceGeometryStabilityResult :
215214 """Calculates the RMSD between the MLIP and reference structures.
216215
217216 The RMSD is calculated for each structure in the `inference_results` attribute.
@@ -220,7 +219,7 @@ def analyze(self) -> SmallMoleculeMinimizationResult:
220219 respect to the reference structure.
221220
222221 Returns:
223- A `SmallMoleculeMinimizationResult ` object with the benchmark results.
222+ A `ReferenceGeometryStabilityResult ` object with the benchmark results.
224223
225224 Raises:
226225 RuntimeError: If called before `run_model()`.
@@ -232,7 +231,7 @@ def analyze(self) -> SmallMoleculeMinimizationResult:
232231
233232 for dataset_prefix in DATASET_PREFIXES :
234233 rmsd_values : list [float | None ] = []
235- dataset_model_output : list [MoleculeSimulationOutput ] = getattr (
234+ dataset_model_output : list [MoleculeModelOutput ] = getattr (
236235 self .model_output , dataset_prefix
237236 )
238237 num_exploded = 0
@@ -287,7 +286,7 @@ def analyze(self) -> SmallMoleculeMinimizationResult:
287286 rmsd for rmsd in rmsd_values if rmsd is not None
288287 )
289288
290- dataset_result = SmallMoleculeMinimizationDatasetResult (
289+ dataset_result = ReferenceGeometryStabilityDatasetResult (
291290 rmsd_values = rmsd_values ,
292291 avg_rmsd = avg_rmsd ,
293292 num_exploded = num_exploded ,
@@ -318,7 +317,9 @@ def analyze(self) -> SmallMoleculeMinimizationResult:
318317 if dataset_result .avg_rmsd is not None
319318 )
320319
321- return SmallMoleculeMinimizationResult (** result , score = score , avg_rmsd = avg_rmsd )
320+ return ReferenceGeometryStabilityResult (
321+ ** result , score = score , avg_rmsd = avg_rmsd
322+ )
322323
323324 def _load_dataset_from_file (self , filename : str ) -> dict [str , Molecule ]:
324325 """Helper method to load, validate, and optionally truncate a dataset.
0 commit comments