A Python package for tight-binding model calculations
Project description
PyAMTB
A Python package for tight-binding model calculations in materials science.
Features
- Tight-binding model calculations for materials
- Support for various lattice structures
- Band structure calculations
- Easy configuration through TOML files
- Command-line interface for quick calculations
Installation
From PyPI
pip install pyamtb
From source
git clone https://github.com/wangdinghui/pyamtb.git
cd pyamtb
pip install -e .
Usage
Python API
from pyamtb import Parameters, TightBindingModel
# Load parameters from TOML file
params = Parameters.from_toml('config.toml')
# Create tight-binding model
model = TightBindingModel(params)
# Calculate energy bands
k_path = np.array([[0.0, 0.0, 0.0], [0.5, 0.5, 0.5]])
bands = model.calculate_bands(k_path)
Command Line Interface
# Show help
pyamtb --help
# Calculate bands using configuration file
pyamtb calculate --config config.toml
Configuration
The package uses TOML files for configuration. Here's an example configuration:
lattice_constant = 1.0
hopping_parameters = { t1 = 1.0, t2 = 0.5 }
Development
Running Tests
pip install -e ".[dev]"
pytest
Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Citation
If you use this package in your research, please cite:
@software{pyamtb,
author = {Wang Dinghui},
title = {PyAMTB: A Python package for tight-binding model calculations},
year = {2024},
url = {https://github.com/wangdinghui/pyamtb}
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyamtb-0.1.0.tar.gz.
File metadata
- Download URL: pyamtb-0.1.0.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ba41e69f2adc9a35503c4b286a8fae7c5b1b9fd9d71898910ab86dcf30bef8d
|
|
| MD5 |
e707db572b5555224d19527f4cf76ae3
|
|
| BLAKE2b-256 |
d9c43386f737351202cd36ead841b28052f159efe3e88eefa5e254b9cafc2380
|
File details
Details for the file pyamtb-0.1.0-py2.py3-none-any.whl.
File metadata
- Download URL: pyamtb-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb802b6c5c10e3ba4967862ca0d0b36a4d1a41efbe8d4312a4a125004759adb1
|
|
| MD5 |
e25f55acc46ed09cb73eec78e78cc9ef
|
|
| BLAKE2b-256 |
dd3c412477a1f37f61e249cca435bec1142d267c481a5a4d35f049a73bd06060
|