@@ -177,29 +177,31 @@ def run_search(interface=None):
177
177
178
178
TNS = TextNumericSearch ()
179
179
if void_search_dict .get ("total_surface_area" , False ):
180
- tsa = query_string_to_tuple (void_search_dict ["total_surface_area" ], 10000.0 )
181
- query_report += f"Pore Total Surface Area (Å^2) { tsa [0 ]} -{ tsa [1 ]} <br>"
180
+ tsa = query_string_to_tuple (void_search_dict ["total_surface_area" ], 10000.0 )
181
+ query_report += f"Pore Total Surface Area (Å^2) { round ( tsa [0 ], 1 ) } -{ round ( tsa [1 ], 1 ) } <br>"
182
182
TNS .add_pore_analysis_total_surface_area (tsa )
183
183
184
184
if void_search_dict .get ("total_geometric_volume" , False ):
185
185
tgv = query_string_to_tuple (void_search_dict ["total_geometric_volume" ], 100000.0 )
186
- query_report += f"Pore Total Geometric Volume (Å^3): { tgv [0 ]} -{ tgv [1 ]} <br>"
186
+ query_report += f"Pore Total Geometric Volume (Å^3): { round ( tgv [0 ], 1 ) } -{ round ( tgv [1 ], 1 ) } <br>"
187
187
TNS .add_pore_analysis_total_geometric_volume (tgv )
188
188
189
189
if void_search_dict .get ("pore_limiting_diameter" , False ):
190
190
pld = query_string_to_tuple (void_search_dict ["pore_limiting_diameter" ], 200.0 )
191
- query_report += f"Pore Limiting Diameter (Å): { pld [0 ]} -{ pld [1 ]} <br>"
191
+ query_report += f"Pore Limiting Diameter (Å): { round ( pld [0 ], 2 ) } -{ round ( pld [1 ], 2 ) } <br>"
192
192
TNS .add_pore_analysis_pore_limiting_diameter (pld )
193
193
194
194
if void_search_dict .get ("max_pore_diameter" , False ):
195
195
pmd = query_string_to_tuple (void_search_dict ["max_pore_diameter" ], 200.0 )
196
- query_report += f"Pore Maximum Diameter (Å): { pmd [0 ]} -{ pmd [1 ]} <br>"
196
+ query_report += f"Pore Maximum Diameter (Å): { round ( pmd [0 ], 2 ) } -{ round ( pmd [1 ], 2 ) } <br>"
197
197
TNS .add_pore_analysis_max_pore_diameter (pmd )
198
198
199
199
if void_search_dict .get ("num_percolated_dimensions" , False ):
200
- npd = query_string_to_tuple (void_search_dict ["num_percolated_dimensions" ], 3.1 )
201
- query_report += f"Number of Percolated Dimensions: { npd [0 ]} -{ npd [1 ]} <br>"
202
- TNS .add_pore_analysis_max_pore_diameter (npd )
200
+ npd = query_string_to_tuple (void_search_dict ["num_percolated_dimensions" ],3.1 )
201
+ low , high = int (round (npd [0 ],0 )), int (round (npd [1 ],0 ))
202
+ range_text = f"{ low } -{ high } " if low != high else high
203
+ query_report += f"Number of Percolated Dimensions: { range_text } <br>"
204
+ TNS .add_pore_analysis_num_percolated_dimensions (npd )
203
205
204
206
hits = TNS .search ()
205
207
refcode_list = list ()
0 commit comments