A simple package for representing Bravais lattices. Primarily useful to check the passed parameters represent a valid Bravais lattice.
Project description
bravais
A simple package for representing Bravais lattices. Primarily useful to check the passed parameters represent a valid Bravais lattice. If a lattice parameter is not specified, it will be assigned randomly (such that all lattice parameters remain compatible with the specified lattice system).
Installation
pip install bravais
Examples
Import the BravaisLattice
class:
from bravais import BravaisLattice
Quickly generate a monoclinic Bravais lattice without specifying any lattice parameters:
mon_lat = BravaisLattice('monoclinic')
print(mon_lat)
P-centred monoclinic lattice (a=5.9417, b=4.7245, c=5.7335, alpha=90.00, beta=90.00, gamma=51.01)
Generate a body-centred tetragonal Bravais lattice with particular lattice parameters:
tet_lat = BravaisLattice('tetragonal', 'I', a=3)
print(tet_lat)
I-centred tetragonal lattice (a=3.0000, b=3.0000, c=3.5708, alpha=90.00, beta=90.00, gamma=90.00)
Note that the following single-digit codes are used to specify centring-types:
P -> primitive
B -> base
I -> body
F -> face
R -> rhombohedral
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
File details
Details for the file bravais-0.1.4.tar.gz
.
File metadata
- Download URL: bravais-0.1.4.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191201 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a56666183eab1faeb7fd9a227ab4e7bb01403288159fc22afaf10e3fa3f93c9 |
|
MD5 | 212f898f0a19f9c225760afd24f8404a |
|
BLAKE2b-256 | c8e170ae0b3ebee9e33d59615ec1ab248033cef61f1b655031907877629bd2b9 |
File details
Details for the file bravais-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: bravais-0.1.4-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191201 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfda3b7b70405858767632d9f38c4a0ddfb013ba263708cb14b4f1a21949b03c |
|
MD5 | f72b37546c32162a4f8c223da7841ce1 |
|
BLAKE2b-256 | ae2a823d7db6743107ab719134252a71eb4f9ed451afdeddf13d09003214540b |