Schrodinger equation solver using plane wave method, currently support 2D system, will be extended to include 1D and 3D cases.
- write test cases and enable pytest
- support 1D system
- lattice.py: use
__slots__
in definition ofLattice
class to speed up the initiation process
- solver.py:
hamilton
: replace full numpy array withscipy.sparse
matrixsolve
: replace thenp.linalg.eigh
byscipy.sparse.linalg.eigsh
- lattice.py: create 2D Bravais lattice with given primitive cell, parameters include
primitive_cell
,n_kpoints
(used to build up Brillouine zone),n_basis
(used to build up reciprocal space grids for FFT). - solver.py:
hamilton
: function to build Hamiltonian matrix, acceptesV_KxKy
(potential in reciprocal space),k
(Brillouine zone vector),fourier_grids
(reciprocal space grids).solve
: diagonalize the Hamiltonian matrix to compute electron density in reciprocal space and kinetic energy (per cell).