/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

package etomica.potential;

import etomica.atom.AtomLeafAgentManager;
import etomica.atom.AtomType;
import etomica.atom.IAtom;
import etomica.box.Box;
import etomica.config.Configuration;
import etomica.config.ConfigurationResourceFile;
import etomica.models.water.P2WaterSPCE;
import etomica.models.water.SpeciesWater3P;
import etomica.simulation.Simulation;
import etomica.space.Space;
import etomica.space3d.Vector3D;
import etomica.units.Kelvin;
import org.junit.Before;
import org.junit.Test;

import java.util.HashMap;
import java.util.Map;

import static org.junit.Assert.assertEquals;

/**
 * This test compares the computed values against the values provided by NIST at
 * https://www.nist.gov/mml/csd/chemical-informatics-research-group/spce-water-reference-calculations-10%C3%A5-cutoff.
 * NIST provides data for 4 configurations. This test checks only 1 of them. The file being compared can be changed by
 * changing the field "filenum".
 *
 * Created by Navneeth on 7/12/2017.
 */
public class EwaldSummationTest {

    private static int filenum;
    private static int[] NIST_nmol = {100,200,300,750};
    private static double[] NIST_boxl = {20,20,20,30};
    private static double[] NIST_real = {-5.58889E+05,-1.19295E+06,-1.96297E+06,-3.57226E+06};
    private static double[] NIST_fourier = {6.27009E+03,