From 9784ea16035941d873e041879f199026a9ae1b2d Mon Sep 17 00:00:00 2001 From: Nico Date: Tue, 28 Nov 2023 15:14:20 +0100 Subject: [PATCH] unused import in test --- tests/solver/test_base_solver.py | 3 --- tests/solver/test_h2_adf_jacobi.py | 1 - tests/solver/test_h2_pyscf_geo_opt.py | 4 ---- tests/solver/test_h2_pyscf_metropolis.py | 1 - tests/solver/test_lih_pyscf_backflow.py | 1 - tests/solver/test_lih_pyscf_compare_backflow.py | 1 - tests/solver/test_lih_pyscf_generic_backflow.py | 1 - tests/solver/test_lih_pyscf_orbital_dependent_backflow.py | 1 - tests/wavefunction/base_test_cases.py | 1 - .../wavefunction/jastrows/distance/test_elec_elec_distance.py | 2 +- .../jastrows/elec_elec/base_elec_elec_jastrow_test.py | 1 - tests/wavefunction/jastrows/elec_elec_nuc/test_hess.py | 1 - .../elec_elec_nuc/test_three_body_jastrow_boys_handy.py | 2 +- .../elec_elec_nuc/test_three_body_jastrow_fully_connected.py | 2 +- tests/wavefunction/jastrows/test_combined_terms.py | 2 +- .../orbitals/backflow/test_backflow_kernel_generic_pyscf.py | 1 - .../orbitals/backflow/test_backflow_kernel_inverse_pyscf.py | 3 +-- .../orbitals/backflow/test_backflow_transformation_pyscf.py | 3 +-- .../test_orbital_dependent_backflow_transformation_pyscf.py | 1 - tests/wavefunction/orbitals/test_ao_derivatives_adf.py | 1 - .../orbitals/test_backflow_ao_derivatives_pyscf.py | 4 +--- tests/wavefunction/orbitals/test_cartesian_harmonics.py | 1 - .../test_orbital_dependent_backflow_ao_derivatives_pyscf.py | 4 +--- tests/wavefunction/orbitals/test_radial_gto.py | 1 - tests/wavefunction/orbitals/test_radial_sto.py | 1 - tests/wavefunction/orbitals/test_spherical_harmonics.py | 1 - tests/wavefunction/test_slaterjastrow_ee_cusp.py | 2 +- 27 files changed, 9 insertions(+), 38 deletions(-) diff --git a/tests/solver/test_base_solver.py b/tests/solver/test_base_solver.py index 594eb2f6..54d16c6e 100644 --- a/tests/solver/test_base_solver.py +++ b/tests/solver/test_base_solver.py @@ -1,8 +1,5 @@ import unittest -import numpy as np -import torch -import torch.optim as optim class BaseTestSolvers: diff --git a/tests/solver/test_h2_adf_jacobi.py b/tests/solver/test_h2_adf_jacobi.py index 950a7686..e2118c3f 100644 --- a/tests/solver/test_h2_adf_jacobi.py +++ b/tests/solver/test_h2_adf_jacobi.py @@ -1,6 +1,5 @@ import unittest -import numpy as np import torch import torch.optim as optim diff --git a/tests/solver/test_h2_pyscf_geo_opt.py b/tests/solver/test_h2_pyscf_geo_opt.py index ff62759e..31466dd0 100644 --- a/tests/solver/test_h2_pyscf_geo_opt.py +++ b/tests/solver/test_h2_pyscf_geo_opt.py @@ -6,10 +6,6 @@ from qmctorch.sampler import Metropolis -from qmctorch.utils.plot_data import (plot_block, plot_blocking_energy, - plot_correlation_coefficient, - plot_integrated_autocorrelation_time, - plot_walkers_traj) from qmctorch.scf import Molecule from qmctorch.wavefunction.slater_jastrow import SlaterJastrow from qmctorch.wavefunction.jastrows.elec_elec import JastrowFactor, PadeJastrowKernel diff --git a/tests/solver/test_h2_pyscf_metropolis.py b/tests/solver/test_h2_pyscf_metropolis.py index 15bc1f28..ea407fb9 100644 --- a/tests/solver/test_h2_pyscf_metropolis.py +++ b/tests/solver/test_h2_pyscf_metropolis.py @@ -1,4 +1,3 @@ -from qmctorch.wavefunction import jastrows import unittest import numpy as np diff --git a/tests/solver/test_lih_pyscf_backflow.py b/tests/solver/test_lih_pyscf_backflow.py index 1d6cc922..0d6f13ff 100644 --- a/tests/solver/test_lih_pyscf_backflow.py +++ b/tests/solver/test_lih_pyscf_backflow.py @@ -1,4 +1,3 @@ -from tests.wavefunction.test_slaterjastrow import TestSlaterJastrow import unittest import numpy as np diff --git a/tests/solver/test_lih_pyscf_compare_backflow.py b/tests/solver/test_lih_pyscf_compare_backflow.py index dec3033a..0f97b992 100644 --- a/tests/solver/test_lih_pyscf_compare_backflow.py +++ b/tests/solver/test_lih_pyscf_compare_backflow.py @@ -1,4 +1,3 @@ -from tests.wavefunction.test_slaterjastrow import TestSlaterJastrow import unittest import numpy as np diff --git a/tests/solver/test_lih_pyscf_generic_backflow.py b/tests/solver/test_lih_pyscf_generic_backflow.py index d8486308..c7fdffad 100644 --- a/tests/solver/test_lih_pyscf_generic_backflow.py +++ b/tests/solver/test_lih_pyscf_generic_backflow.py @@ -1,4 +1,3 @@ -from tests.wavefunction.test_slaterjastrow import TestSlaterJastrow import unittest import numpy as np diff --git a/tests/solver/test_lih_pyscf_orbital_dependent_backflow.py b/tests/solver/test_lih_pyscf_orbital_dependent_backflow.py index 118d994d..b1ad4faf 100644 --- a/tests/solver/test_lih_pyscf_orbital_dependent_backflow.py +++ b/tests/solver/test_lih_pyscf_orbital_dependent_backflow.py @@ -1,4 +1,3 @@ -from tests.wavefunction.test_slaterjastrow import TestSlaterJastrow import unittest import numpy as np diff --git a/tests/wavefunction/base_test_cases.py b/tests/wavefunction/base_test_cases.py index bfa699bb..5f7d39b3 100644 --- a/tests/wavefunction/base_test_cases.py +++ b/tests/wavefunction/base_test_cases.py @@ -1,7 +1,6 @@ import unittest from torch.autograd import grad, gradcheck, Variable -import numpy as np import torch diff --git a/tests/wavefunction/jastrows/distance/test_elec_elec_distance.py b/tests/wavefunction/jastrows/distance/test_elec_elec_distance.py index f0560f72..6024fb77 100644 --- a/tests/wavefunction/jastrows/distance/test_elec_elec_distance.py +++ b/tests/wavefunction/jastrows/distance/test_elec_elec_distance.py @@ -1,5 +1,5 @@ import torch -from torch.autograd import Variable, grad, gradcheck +from torch.autograd import Variable, grad from qmctorch.wavefunction.jastrows.distance import ElectronElectronDistance import unittest diff --git a/tests/wavefunction/jastrows/elec_elec/base_elec_elec_jastrow_test.py b/tests/wavefunction/jastrows/elec_elec/base_elec_elec_jastrow_test.py index 745bb179..9d96445f 100644 --- a/tests/wavefunction/jastrows/elec_elec/base_elec_elec_jastrow_test.py +++ b/tests/wavefunction/jastrows/elec_elec/base_elec_elec_jastrow_test.py @@ -1,7 +1,6 @@ import unittest from torch.autograd import grad, gradcheck, Variable -import numpy as np import torch diff --git a/tests/wavefunction/jastrows/elec_elec_nuc/test_hess.py b/tests/wavefunction/jastrows/elec_elec_nuc/test_hess.py index 5d116766..76e07580 100644 --- a/tests/wavefunction/jastrows/elec_elec_nuc/test_hess.py +++ b/tests/wavefunction/jastrows/elec_elec_nuc/test_hess.py @@ -1,5 +1,4 @@ import torch -from torch import nn from torch.autograd import grad from torch.autograd.variable import Variable diff --git a/tests/wavefunction/jastrows/elec_elec_nuc/test_three_body_jastrow_boys_handy.py b/tests/wavefunction/jastrows/elec_elec_nuc/test_three_body_jastrow_boys_handy.py index d7c3f2c1..5e903dab 100644 --- a/tests/wavefunction/jastrows/elec_elec_nuc/test_three_body_jastrow_boys_handy.py +++ b/tests/wavefunction/jastrows/elec_elec_nuc/test_three_body_jastrow_boys_handy.py @@ -2,7 +2,7 @@ from types import SimpleNamespace import numpy as np import torch -from torch.autograd import Variable, grad, gradcheck +from torch.autograd import Variable, grad from qmctorch.wavefunction.jastrows.elec_elec_nuclei.jastrow_factor_electron_electron_nuclei import JastrowFactorElectronElectronNuclei from qmctorch.wavefunction.jastrows.elec_elec_nuclei.kernels.boys_handy_jastrow_kernel import BoysHandyJastrowKernel diff --git a/tests/wavefunction/jastrows/elec_elec_nuc/test_three_body_jastrow_fully_connected.py b/tests/wavefunction/jastrows/elec_elec_nuc/test_three_body_jastrow_fully_connected.py index 1227ba48..91e7accc 100644 --- a/tests/wavefunction/jastrows/elec_elec_nuc/test_three_body_jastrow_fully_connected.py +++ b/tests/wavefunction/jastrows/elec_elec_nuc/test_three_body_jastrow_fully_connected.py @@ -2,7 +2,7 @@ from types import SimpleNamespace import numpy as np import torch -from torch.autograd import Variable, grad, gradcheck +from torch.autograd import Variable, grad from qmctorch.wavefunction.jastrows.elec_elec_nuclei.jastrow_factor_electron_electron_nuclei import JastrowFactorElectronElectronNuclei from qmctorch.wavefunction.jastrows.elec_elec_nuclei.kernels.fully_connected_jastrow_kernel import FullyConnectedJastrowKernel diff --git a/tests/wavefunction/jastrows/test_combined_terms.py b/tests/wavefunction/jastrows/test_combined_terms.py index e53b5216..3283bd9c 100644 --- a/tests/wavefunction/jastrows/test_combined_terms.py +++ b/tests/wavefunction/jastrows/test_combined_terms.py @@ -7,7 +7,7 @@ from qmctorch.wavefunction.jastrows.jastrow_factor_combined_terms import JastrowFactorCombinedTerms from qmctorch.wavefunction.jastrows.elec_elec.kernels import PadeJastrowKernel as PadeJastrowKernelElecElec from qmctorch.wavefunction.jastrows.elec_nuclei.kernels import PadeJastrowKernel as PadeJastrowKernelElecNuc -from qmctorch.wavefunction.jastrows.elec_elec_nuclei.kernels import BoysHandyJastrowKernel, FullyConnectedJastrowKernel +from qmctorch.wavefunction.jastrows.elec_elec_nuclei.kernels import BoysHandyJastrowKernel torch.set_default_tensor_type(torch.DoubleTensor) diff --git a/tests/wavefunction/orbitals/backflow/test_backflow_kernel_generic_pyscf.py b/tests/wavefunction/orbitals/backflow/test_backflow_kernel_generic_pyscf.py index 4be0c43f..19d444a4 100644 --- a/tests/wavefunction/orbitals/backflow/test_backflow_kernel_generic_pyscf.py +++ b/tests/wavefunction/orbitals/backflow/test_backflow_kernel_generic_pyscf.py @@ -1,7 +1,6 @@ import unittest import torch -from pyscf import gto from torch import nn from torch.autograd import Variable, grad import numpy as np diff --git a/tests/wavefunction/orbitals/backflow/test_backflow_kernel_inverse_pyscf.py b/tests/wavefunction/orbitals/backflow/test_backflow_kernel_inverse_pyscf.py index 0001d1cd..4f6980ed 100644 --- a/tests/wavefunction/orbitals/backflow/test_backflow_kernel_inverse_pyscf.py +++ b/tests/wavefunction/orbitals/backflow/test_backflow_kernel_inverse_pyscf.py @@ -1,8 +1,7 @@ import unittest import torch -from pyscf import gto -from torch.autograd import Variable, grad, gradcheck +from torch.autograd import Variable, grad import numpy as np from qmctorch.scf import Molecule diff --git a/tests/wavefunction/orbitals/backflow/test_backflow_transformation_pyscf.py b/tests/wavefunction/orbitals/backflow/test_backflow_transformation_pyscf.py index 4334c918..a649f03f 100644 --- a/tests/wavefunction/orbitals/backflow/test_backflow_transformation_pyscf.py +++ b/tests/wavefunction/orbitals/backflow/test_backflow_transformation_pyscf.py @@ -1,8 +1,7 @@ import unittest import torch -from pyscf import gto -from torch.autograd import Variable, grad, gradcheck +from torch.autograd import Variable, grad import numpy as np from qmctorch.scf import Molecule from qmctorch.wavefunction.orbitals.backflow.backflow_transformation import BackFlowTransformation diff --git a/tests/wavefunction/orbitals/backflow/test_orbital_dependent_backflow_transformation_pyscf.py b/tests/wavefunction/orbitals/backflow/test_orbital_dependent_backflow_transformation_pyscf.py index eb5d1d03..d7ac6573 100644 --- a/tests/wavefunction/orbitals/backflow/test_orbital_dependent_backflow_transformation_pyscf.py +++ b/tests/wavefunction/orbitals/backflow/test_orbital_dependent_backflow_transformation_pyscf.py @@ -1,7 +1,6 @@ import unittest import torch -from pyscf import gto from torch.autograd import Variable, grad import numpy as np from qmctorch.scf import Molecule diff --git a/tests/wavefunction/orbitals/test_ao_derivatives_adf.py b/tests/wavefunction/orbitals/test_ao_derivatives_adf.py index 6038d514..f3322694 100644 --- a/tests/wavefunction/orbitals/test_ao_derivatives_adf.py +++ b/tests/wavefunction/orbitals/test_ao_derivatives_adf.py @@ -1,6 +1,5 @@ from ...path_utils import PATH_TEST import unittest -import numpy as np import torch from .base_test_ao import BaseTestAO diff --git a/tests/wavefunction/orbitals/test_backflow_ao_derivatives_pyscf.py b/tests/wavefunction/orbitals/test_backflow_ao_derivatives_pyscf.py index c4a19bc5..0bffd269 100644 --- a/tests/wavefunction/orbitals/test_backflow_ao_derivatives_pyscf.py +++ b/tests/wavefunction/orbitals/test_backflow_ao_derivatives_pyscf.py @@ -1,11 +1,9 @@ import unittest import torch -from pyscf import gto -from torch.autograd import Variable, grad, gradcheck +from torch.autograd import Variable, grad import numpy as np from qmctorch.scf import Molecule -from qmctorch.wavefunction import SlaterJastrow from qmctorch.wavefunction.orbitals.atomic_orbitals_backflow import AtomicOrbitalsBackFlow from qmctorch.wavefunction.orbitals.backflow.backflow_transformation import BackFlowTransformation from qmctorch.wavefunction.orbitals.backflow.kernels import BackFlowKernelInverse diff --git a/tests/wavefunction/orbitals/test_cartesian_harmonics.py b/tests/wavefunction/orbitals/test_cartesian_harmonics.py index ccc1c754..7614c1c1 100644 --- a/tests/wavefunction/orbitals/test_cartesian_harmonics.py +++ b/tests/wavefunction/orbitals/test_cartesian_harmonics.py @@ -1,6 +1,5 @@ import unittest -import numpy as np import torch from torch.autograd import grad, Variable diff --git a/tests/wavefunction/orbitals/test_orbital_dependent_backflow_ao_derivatives_pyscf.py b/tests/wavefunction/orbitals/test_orbital_dependent_backflow_ao_derivatives_pyscf.py index d2351fd3..fd2245d0 100644 --- a/tests/wavefunction/orbitals/test_orbital_dependent_backflow_ao_derivatives_pyscf.py +++ b/tests/wavefunction/orbitals/test_orbital_dependent_backflow_ao_derivatives_pyscf.py @@ -1,11 +1,9 @@ import unittest import torch -from pyscf import gto -from torch.autograd import Variable, grad, gradcheck +from torch.autograd import Variable, grad import numpy as np from qmctorch.scf import Molecule -from qmctorch.wavefunction import SlaterJastrow from qmctorch.wavefunction.orbitals.atomic_orbitals_backflow import AtomicOrbitalsBackFlow from qmctorch.wavefunction.orbitals.backflow.backflow_transformation import BackFlowTransformation from qmctorch.wavefunction.orbitals.backflow.kernels import BackFlowKernelInverse diff --git a/tests/wavefunction/orbitals/test_radial_gto.py b/tests/wavefunction/orbitals/test_radial_gto.py index b7e90ebe..19aef652 100644 --- a/tests/wavefunction/orbitals/test_radial_gto.py +++ b/tests/wavefunction/orbitals/test_radial_gto.py @@ -4,7 +4,6 @@ import torch from qmctorch.scf import Molecule -from qmctorch.wavefunction import SlaterJastrow from qmctorch.wavefunction.orbitals.atomic_orbitals import AtomicOrbitals from .second_derivative import second_derivative diff --git a/tests/wavefunction/orbitals/test_radial_sto.py b/tests/wavefunction/orbitals/test_radial_sto.py index 9883c120..91f74f58 100644 --- a/tests/wavefunction/orbitals/test_radial_sto.py +++ b/tests/wavefunction/orbitals/test_radial_sto.py @@ -8,7 +8,6 @@ from ...path_utils import PATH_TEST from .second_derivative import second_derivative -import matplotlib.pyplot as plt class TestRadialSlater(unittest.TestCase): diff --git a/tests/wavefunction/orbitals/test_spherical_harmonics.py b/tests/wavefunction/orbitals/test_spherical_harmonics.py index 4d6b3d4c..0300faf3 100644 --- a/tests/wavefunction/orbitals/test_spherical_harmonics.py +++ b/tests/wavefunction/orbitals/test_spherical_harmonics.py @@ -1,6 +1,5 @@ import unittest -import numpy as np import torch from qmctorch.wavefunction.orbitals.spherical_harmonics import Harmonics diff --git a/tests/wavefunction/test_slaterjastrow_ee_cusp.py b/tests/wavefunction/test_slaterjastrow_ee_cusp.py index 4dc1ffbc..8f0ca6b7 100644 --- a/tests/wavefunction/test_slaterjastrow_ee_cusp.py +++ b/tests/wavefunction/test_slaterjastrow_ee_cusp.py @@ -9,7 +9,7 @@ from qmctorch.utils import set_torch_double_precision from qmctorch.wavefunction.jastrows.elec_elec.jastrow_factor_electron_electron import JastrowFactorElectronElectron -from qmctorch.wavefunction.jastrows.elec_elec.kernels import FullyConnectedJastrowKernel, PadeJastrowKernel +from qmctorch.wavefunction.jastrows.elec_elec.kernels import PadeJastrowKernel torch.set_default_tensor_type(torch.DoubleTensor)