aplowman / bravais Goto Github PK
View Code? Open in Web Editor NEWA simple package for representing Bravais lattices in Python.
License: Mozilla Public License 2.0
A simple package for representing Bravais lattices in Python.
License: Mozilla Public License 2.0
Consider doing one initial alignment, and then rotating from that?
Arbitrary orientations would involve specifying two direction vectors. Firstly, the direction in which one of the lattice vectors should point, and secondly, the orientation of a plane in which a second lattice vector should lie?
Should be done after #9.
The Sites
class can then be used more visibly in atomistic
to provide common methods for things like finding which atom/lattice/interstic sites are within a bounded volume. In bravais
it will be used internally.
For example, in the monoclinic case, we might want to specify the restrictions as "two of the angle parameters must be 90 degrees" as opposed to "angles alpha and beta must be 90 degrees".
Implement BravaisLattice.__eq__
method.
The following should evaluate to True, but it currently does not:
blA = BravaisLattice('cubic')
blB = BravaisLattice('cubic')
blA == blB
Specifically in the method BravaisLattice._compute_unit_cell
, but also need to add alignment
attribute to BravaisLattice
and BravaisLattice.__init__
docstrings.
bl = BravaisLattice('cubic')
bl.row_or_column = 'row'
bl.lattice_sites
Produces:
array([[0.],
[0.],
[0.]])
...when it should produce:
array([[0., 0., 0.]])
Allow this to be toggled after instantiation in the same way as the row_or_column
attribute. If True, angles will be reported in degrees, otherwise in radians.
At the moment, we only allow the rhombohedral centring type for the rhombohedral lattice (which is like a hexagonal unit cell with three lattice sites along the diagonal). The primitive setting would be the system that looks like a cube stretched along its diagonal.
See here.
Should be able to do:
import bravais
bravais.__version__
Got this warning regarding the BravaisLattice._validate_params
method, when running on Python 3.7.2:
YAMLLoadWarning:
calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
The following attributes should act like properties after initial assignment:
a
, b
, c
alpha
, beta
, gamma
lattice_system
centring_type
At the moment, we only accept the single digit code.
P -> primitive
B -> base
I -> body
F -> face
R -> rhombohedral
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.