{"kind":"task","effective_mode":"full","benchmark":{"kind":"benchmark","effective_mode":"full","slug":"scicode","formal_name":"SciCode","introduction":"SciCode evaluates the ability to solve scientific research problems through code. Problems are decomposed into subproblems; this dev import preserves the relationships between 15 parent problems and 50 subproblems.","introduction_ja":"","introduction_en":"","category":"Category not supplied","task_count":null,"acquisition_status":"Acquisition status not supplied","official_url":"https://huggingface.co/datasets/SciCode1/SciCode","indexing_mode":"noindex","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[]}},"task_id":"69e335f0-d1ca-5a82-bab6-b343e9761c03","task_key":"dev--10","task_revision_id":"2","upstream_id":"10","short_description":"ewald_summation","config":"","split":"dev","body":"{\"problem_background_main\":\"\",\"problem_description_main\":\"Write a Python function that calculates the energy of a periodic system using Ewald summation given `latvec` of shape `(3, 3)`, `atom_charges` of shape `(natoms,)`, `atom_coords` of shape `(natoms, 3)`, and `configs` of shape `(nelectrons, 3)` using the following formula.\\n\\n\\\\begin{align}\\nE &= E_{\\\\textrm{real-cross}} + E_{\\\\textrm{real-self}} + E_{\\\\textrm{recip}} + E_{\\\\textrm{charged}}. \\\\\\\\\\nE_{\\\\textrm{real-cross}} &= \\\\sum_{\\\\mathbf{n}} {}^{\\\\prime} \\\\sum_{i=1}^N \\\\sum_{j>i}^N q_i q_j \\\\frac{\\\\textrm{erfc} \\\\left(  \\\\alpha |\\\\mathbf{r}_{ij} + \\\\mathbf{n} L| \\\\right)}{|\\\\mathbf{r}_{ij} + \\\\mathbf{n} L|}. \\\\\\\\\\nE_{\\\\textrm{real-self}} &= - \\\\frac{\\\\alpha}{\\\\sqrt{\\\\pi}} \\\\sum_{i=1}^N q_i^2. \\\\\\\\\\nE_{\\\\textrm{recip}} &= \\\\frac{4 \\\\pi}{V} \\\\sum_{\\\\mathbf{k} > 0} \\\\frac{\\\\mathrm{e}^{-\\\\frac{k^2}{4 \\\\alpha^2}}}{k^2} \\n\\\\left| \\n\\\\sum_{i=1}^N q_i \\\\mathrm{e}^{i \\\\mathbf{k} \\\\cdot \\\\mathbf{r}_i} \\\\sum_{j=1}^N q_j \\\\mathrm{e}^{-i \\\\mathbf{k} \\\\cdot \\\\mathbf{r}_j}\\n\\\\right|. \\\\\\\\\\nE_{\\\\textrm{charge}} &= -\\\\frac{\\\\pi}{2 V \\\\alpha^2} \\\\left|\\\\sum_{i}^N q_i \\\\right|^2.\\n\\\\end{align}\",\"problem_io\":\"\\\"\\\"\\\"\\nParameters:\\n    latvec (np.ndarray): A 3x3 array representing the lattice vectors.\\n    atom_charges (np.ndarray): An array of shape (natoms,) representing the charges of the atoms.\\n    atom_coords (np.ndarray): An array of shape (natoms, 3) representing the coordinates of the atoms.\\n    configs (np.ndarray): An array of shape (nelectrons, 3) representing the configurations of the electrons.\\n    gmax (int): The maximum integer number of lattice points to include in one positive direction.\\n\\nReturns:\\n    float: The total energy from the Ewald summation.\\n\\\"\\\"\\\"\",\"problem_name\":\"ewald_summation\",\"required_dependencies\":\"import numpy as np\\nfrom scipy.special import erfc\"}","display_format":"scicode","language":"","answer_status":"published","assets":[],"source_url":"https://huggingface.co/datasets/SciCode1/SciCode","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}