Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH]: Remove old imports #37

Merged
merged 3 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions TB2J/Jdownfolder.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import os
import pickle
from collections import defaultdict
import numpy as np
from ase.dft.kpoints import monkhorst_pack
from TB2J.io_exchange import SpinIO
from TB2J.Jtensor import decompose_J_tensor, combine_J_tensor
from TB2J.Jtensor import decompose_J_tensor


def ind_to_indn(ind, n=3):
Expand Down
1 change: 0 additions & 1 deletion TB2J/Jtensor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import numpy as np
from dataclasses import dataclass


def decompose_J_tensor(Jtensor):
Expand Down
2 changes: 1 addition & 1 deletion TB2J/Oiju.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import copy
from TB2J.myTB import MyTB, merge_tbmodels_spin
from TB2J.exchange import ExchangeCL, ExchangeNCL, ExchangePert
from TB2J.exchange_pert import ExchangePert
from TB2J.utils import read_basis, auto_assign_basis_name
from ase.io import read

Expand Down
1 change: 0 additions & 1 deletion TB2J/epc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import numpy as np
from numpy.linalg import norm
from .utils import match_k

class WannierUmat():
Expand Down
6 changes: 1 addition & 5 deletions TB2J/exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@
import numpy as np
from TB2J.green import TBGreen
from TB2J.pauli import (pauli_block_all, pauli_block_sigma_norm, pauli_mat)
from TB2J.utils import symbol_number, read_basis, kmesh_to_R
from TB2J.myTB import MyTB
from ase.io import read
from TB2J.utils import auto_assign_basis_name
from TB2J.utils import symbol_number, kmesh_to_R
from TB2J.io_exchange import SpinIO
from tqdm import tqdm
from TB2J.external import p_map
from TB2J.contour import Contour
from TB2J.utils import simpson_nonuniform, trapezoidal_nonuniform
from TB2J.orbmap import map_orbs_matrix
from pathos.multiprocessing import ProcessPool
import pickle


Expand Down
7 changes: 0 additions & 7 deletions TB2J/exchangeCL2.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,13 @@
"""

from collections import defaultdict
import os
import shutil
import numpy as np
from TB2J.green import TBGreen
from TB2J.utils import symbol_number, read_basis
from TB2J.myTB import MyTB
from ase.io import read
from TB2J.utils import auto_assign_basis_name
from TB2J.io_exchange import SpinIO
from tqdm import tqdm
from TB2J.external import p_map
from .exchange import ExchangeCL
from .utils import simpson_nonuniform, trapezoidal_nonuniform
from pathos.multiprocessing import ProcessPool


class ExchangeCL2(ExchangeCL):
Expand Down
9 changes: 1 addition & 8 deletions TB2J/exchange_qspace.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
import numpy as np
from TB2J.green import TBGreen
from TB2J.utils import symbol_number, read_basis, kmesh_to_R
from TB2J.myTB import MyTB
from ase.io import read
from TB2J.utils import auto_assign_basis_name
from TB2J.io_exchange import SpinIO
from TB2J.utils import kmesh_to_R
from functools import lru_cache
from .exchange import ExchangeCL
from .utils import simpson_nonuniform, trapezoidal_nonuniform
from pathos.multiprocessing import ProcessPool
from ase.dft.kpoints import monkhorst_pack
from TB2J.exchangeCL2 import ExchangeCL2

Expand Down
1 change: 0 additions & 1 deletion TB2J/green.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import numpy as np
import scipy.linalg as sl
from collections import defaultdict
from ase.dft.kpoints import monkhorst_pack
from shutil import rmtree
Expand Down
3 changes: 1 addition & 2 deletions TB2J/io_exchange/io_exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
from TB2J.kpoints import monkhorst_pack
import pickle
from TB2J import __version__
from TB2J.Jtensor import decompose_J_tensor, combine_J_tensor
from TB2J.Jtensor import combine_J_tensor
from datetime import datetime
import matplotlib.pyplot as plt
from ase import Atoms


class SpinIO(object):
Expand Down
3 changes: 1 addition & 2 deletions TB2J/io_exchange/io_multibinit.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import numpy as np
import xml.etree.cElementTree as ET
from xml.dom import minidom
from ase.units import eV, Hartree, Bohr, Ry, J
from ase.units import Bohr
import os


Expand Down
1 change: 0 additions & 1 deletion TB2J/io_exchange/io_tomsasd.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import numpy as np
from ase.units import eV, Hartree, Bohr, Ry, J
import os
from itertools import groupby

Expand Down
1 change: 0 additions & 1 deletion TB2J/io_exchange/io_txt.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import numpy as np
from ase.units import eV, Hartree, Bohr, Ry, J
import os
from TB2J.utils import symbol_number
from numpy import array_str
Expand Down
2 changes: 1 addition & 1 deletion TB2J/manager.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
from TB2J.myTB import MyTB, merge_tbmodels_spin
import numpy as np
from TB2J.exchange import ExchangeCL, ExchangeNCL
from TB2J.exchange import ExchangeNCL
from TB2J.exchangeCL2 import ExchangeCL2
from TB2J.exchange_qspace import ExchangeCLQspace
from TB2J.utils import read_basis, auto_assign_basis_name
Expand Down
3 changes: 1 addition & 2 deletions TB2J/myTB.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import os
import numpy as np
import copy
from scipy.linalg import eigh, eigvalsh
from scipy.linalg import eigh
from scipy.sparse import csr_matrix
from scipy.io import netcdf_file
from collections import defaultdict
#from tbmodels import Model
from ase.io import read
from ase.atoms import Atoms
from TB2J.utils import auto_assign_basis_name
from TB2J.wannier import parse_ham, parse_xyz, parse_atoms
Expand Down
2 changes: 0 additions & 2 deletions TB2J/pert.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import numpy as np
import scipy.linalg as sl
from ase.dft.kpoints import monkhorst_pack
import matplotlib.pyplot as plt


def eigen_to_G(evals, evecs, efermi, energy):
Expand Down
3 changes: 0 additions & 3 deletions TB2J/plot.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import matplotlib.pyplot as plt
from TB2J.spinham.spin_api import SpinModel
from TB2J.io_exchange.io_exchange import SpinIO
from TB2J.io_exchange.io_txt import write_Jq_info
from ase.dft.kpoints import monkhorst_pack
from ase.cell import Cell
import numpy as np
from TB2J import __version__

Expand Down
1 change: 0 additions & 1 deletion TB2J/spinham/hamiltonian_terms.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"""
import numpy as np
from collections import defaultdict
from .constants import mu_0, Boltzmann
import scipy.sparse as ssp


Expand Down
8 changes: 1 addition & 7 deletions TB2J/spinham/plot.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
#!/usr/bin/env python
from __future__ import division
import ase
from ase.atoms import Atoms
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
import numpy as np
import numpy.linalg
from ase.geometry import cell_to_cellpar, cellpar_to_cell
from ase.dft.kpoints import (get_special_points, bandpath, special_paths,
parse_path_string)
from ase.dft.kpoints import get_special_points, parse_path_string
#from minimulti.spin.hamiltonian import SpinHamiltonian
#from minimulti.spin.mover import SpinMover
from .qsolver import QSolver
from .constants import mu_B, meV



Expand Down
2 changes: 1 addition & 1 deletion TB2J/utest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from TB2J.pauli import * # pauli_block
from TB2J.green_SOC import TBGreen
from TB2J.utils import auto_assign_basis_name
from TB2J.exchange import ExchangeNCL, gen_exchange
from TB2J.manager import gen_exchange


class AssignTest(unittest.TestCase):
Expand Down