| You will be given a code file that already includes line numbers. | |
| Your task is to identify all functions that are related to **scientific computing**, especially **chemistry-related computations**, and for each such function, provide a relevance score and explanation. | |
| Follow these instructions carefully: | |
| 1. Scope and relevance criteria | |
| - “Scientific computing” mainly includes: numerical methods, differential equation solvers, matrix/tensor operations, statistical modeling, numerical optimization, simulation and modeling, etc. | |
| - “Chemistry-related” mainly includes: molecular structure, reaction kinetics, quantum chemistry, molecular dynamics, thermodynamics/equilibrium calculations, spectroscopy calculations, chemical engineering process simulation, etc. | |
| - If a function clearly implements any scientific computation (especially chemistry-related), treat it as relevant. | |
| - If a function is clearly unrelated to scientific/chemical computation (e.g., pure UI, logging, basic string manipulation, generic helpers with no scientific meaning, general business logic not involving scientific models), do not include that function at all in the output. | |
| 2. Scoring rules (0–100) | |
| - Only score functions that are considered “relevant”. | |
| Completely unrelated functions must not appear in the output (you do not need to assign score 0 to them). | |
| - Scoring dimensions (combined): | |
| - Strength of connection to “scientific computing”. | |
| - Specific relevance to chemistry. | |
| - Complexity and sophistication of the algorithm/model/mathematical content. | |
| - Correct/meaningful use of scientific/chemical theory (e.g., use of physical constants, chemical laws, quantum chemistry or molecular simulation theory). | |
| - Suggested ranges: | |
| - 90–100: Highly professional, complex scientific/chemical computing (e.g., quantum chemistry SCF/DFT, molecular dynamics integrators, complex reaction network models). | |
| - 70–89: Clearly chemistry-related and non-trivial numerical computations (e.g., thermodynamic property calculations, multi-step equilibrium computation, complex kinetic ODE systems). | |
| - 40–69: Some scientific computing logic, but more basic or generic (e.g., simple energy calculation, basic statistics, simple kinetic equations). | |
| - 10–39: Very shallow or indirect scientific logic (e.g., single physical/chemical formula evaluation, basic unit conversion). | |
| - 0: For completely unrelated functions, do not output them at all. | |
| 3. Line numbers and documentation | |
| - The input code includes line numbers. Using those: | |
| - For each function you output, provide the start line and end line of the function definition (inclusive). | |
| - If there is a documentation comment (e.g., docstring, comment block) that clearly documents that function (either directly above it or clearly associated inside it), provide the start line and end line of that documentation. | |
| - If no clear documentation specific to that function exists, set both `doc_start_line` and `doc_end_line` to `null`. | |
| - Line numbers must be integers and must match exactly the line numbers shown in the input. | |
| 4. Output format (strict JSON) | |
| - The final output must be a JSON array. | |
| - Each element in the array must be a JSON object with exactly the following fields (names and types must match exactly): | |
| - `function_name`: string, the function name. | |
| - `function_start_line`: integer, the starting line number of the function definition. | |
| - `function_end_line`: integer, the ending line number of the function definition. | |
| - `relevance_score`: integer from 0 to 100 (but include only relevant functions; irrelevant ones must not be output). | |
| - `relevance_reason`: string, a brief explanation of why this function is related to scientific/chemical computing and why it received that score. Be as specific as possible about the computations or theory involved. | |
| - `doc_start_line`: integer or null, the starting line number of the associated documentation comment. | |
| - `doc_end_line`: integer or null, the ending line number of the associated documentation comment. | |
| - If the code file contains no functions related to scientific or chemical computation, output: `[]` | |
| - You must not output any extra text, comments, or explanations outside of the JSON. | |
| Only output valid JSON. | |
| 5. Things you must not do | |
| - Do not invent or guess line numbers that are not present in the input. | |
| - Do not output information at any granularity other than functions (e.g., do not separately describe classes or modules unless tied to a specific function). | |
| - Do not output any natural language explanation before or after the JSON. | |
| No Markdown, no additional text, only JSON. | |
| --- | |
| Code to analyze (with line numbers): | |
| {CODE_FILE} |