Skip to main content

A simple package for representing Bravais lattices. Primarily useful to check the passed parameters represent a valid Bravais lattice.

Project description

PyPI version

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.

Files for bravais, version 0.1.4
Filename, size File type Python version Upload date Hashes
Filename, size bravais-0.1.4-py3-none-any.whl (15.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size bravais-0.1.4.tar.gz (9.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page