Published/scientific-latex-templates/computational-physics / code / __pycache__ / condensed_matter.cpython-312.pyc
289 viewsubuntu2404
�
�8�h�4 � �� � d Z ddlZddlmZ ddlmZ ej j d� G d� d� Z
G d� d� Z G d � d
� Zd� Z
d� Zd
� Zd� Zd� Zedk( r� e
� Z e� \ ZZZ e� Z e� Z ee� Z ed� ed� eded d j6 � d�� ed ee� � d�� ed eed � � d�� ed ee� � d�� yy)a*
Condensed Matter Physics Simulations
=====================================
This module implements fundamental condensed matter physics calculations:
- Electronic band structure using tight-binding models
- Fermi surface calculations and visualization
- Phonon dispersion relations
- Many-body systems (Hubbard model)
Keywords: band structure calculation python, tight binding model, fermi surface calculation,
phonon dispersion python, hubbard model simulation, electronic properties condensed matter
Author: CoCalc Scientific Templates
License: MIT
� N)�eigh�* c �8 � e Zd ZdZdd�Zd d�Zd
d�Zdd�Zdd�Zy)
�TightBindingModelz�
Tight-binding model for electronic band structure calculations.
Supports various lattice geometries and can calculate:
- Energy dispersion relations E(k)
- Density of states
- Fermi surfaces
c � � || _ y)z�
Parameters:
-----------
lattice_type : str
Type of lattice ('square', 'triangular', 'honeycomb')
N��lattice_type��selfr s �code/condensed_matter.py�__init__zTightBindingModel.__init__$ � � � )��� c �j � |d|z t j |� t j |� z z z
S )u1
Energy dispersion for 2D square lattice.
E(k) = ε₀ - 2t(cos(kₓ) + cos(kᵧ))
Parameters:
-----------
kx, ky : array
k-space coordinates
t : float
Hopping parameter
epsilon_0 : float
On-site energy
� ��np�cos)r �kx�ky�t� epsilon_0s r �dispersion_square_2dz&TightBindingModel.dispersion_square_2d- s- � � �1�Q�3����r�
�R�V�V�B�Z� 7�8�8�8r c �� � dt j d|z � z t j d|dz t j d� |z dz z z � z }|t j |� z }|| fS )a
Energy dispersion for graphene (honeycomb lattice).
Returns both conduction and valence bands.
Parameters:
-----------
kx, ky : array
k-space coordinates
t : float
Hopping parameter
� y �?r � )r �exp�sqrt�abs)r r r r �f�energy_magnitudes r �dispersion_graphenez%TightBindingModel.dispersion_graphene>