Skip to content
Snippets Groups Projects
Commit e5ea309e authored by Michele Nottoli's avatar Michele Nottoli
Browse files

Checking also Coulomb descriptors.

parent 0ae1eed9
Branches
Tags
1 merge request!6QTR
Pipeline #1962 failed
...@@ -9,12 +9,13 @@ import gext.grassmann ...@@ -9,12 +9,13 @@ import gext.grassmann
import utils import utils
SMALL = 1e-10 SMALL = 1e-10
THRESHOLD = 1e-2 THRESHOLD = 2e-2
@pytest.mark.parametrize("datafile", ["urea.json", "glucose.json"]) @pytest.mark.parametrize("datafile", ["urea.json", "glucose.json"])
@pytest.mark.parametrize("fitting", ["leastsquare", "qtr"]) @pytest.mark.parametrize("fitting", ["leastsquare", "qtr"])
@pytest.mark.parametrize("regularization", [0.0, 1e-6, 5e-6]) @pytest.mark.parametrize("regularization", [0.0, 1e-6, 5e-6])
def test_extrapolation(datafile, fitting, regularization): @pytest.mark.parametrize("descriptor", ["distance", "coulomb"])
def test_extrapolation(datafile, fitting, regularization, descriptor):
# load test data from json file # load test data from json file
data = utils.load_json(f"tests/{datafile}") data = utils.load_json(f"tests/{datafile}")
...@@ -29,7 +30,8 @@ def test_extrapolation(datafile, fitting, regularization): ...@@ -29,7 +30,8 @@ def test_extrapolation(datafile, fitting, regularization):
# initialize an extrapolator # initialize an extrapolator
extrapolator = gext.Extrapolator(nelectrons, nbasis, natoms, extrapolator = gext.Extrapolator(nelectrons, nbasis, natoms,
nsteps=n, fitting=fitting, fitting_regularization=regularization) nsteps=n, fitting=fitting, fitting_regularization=regularization,
descriptor=descriptor)
# load data in the extrapolator up to index n - 1 # load data in the extrapolator up to index n - 1
for (coords, coeff, overlap) in zip(data["trajectory"][:n], for (coords, coeff, overlap) in zip(data["trajectory"][:n],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment