Open rkurchin opened 3 years ago
unit_cell
as it is, because I think sometimes crystallographic basis
is referred to as such. Also, I don't want to change the names of Cell types.basis
, I would call it primitive_vecs
or something like that (primitive_cell
introduces element of confusion if we have unit_cell
refer to crystallographic basis
)lattice_dims
can be renamed to supercell_dims
.What do you think about that?
Sounds like an improvement to me!
I gave it a bit more thought.
With unit_cell
, it is important to keep cell
in the name, so it can be renamed to basis_cell
.
primitive_vecs
is a good name so it stays.
On the other hand, I am not so sure about using supercell_dims
. I think the term supercell
might not be familiar to the general audience who just needs some lattice implementation. Also, for some reason, I have completely different association with this term. One can describe the same crystal as a combination of different basis and set of primitive vectors. As such, one can stack several basis cells together to use as a new basis cell. I believe it is called supercell in this context.
That's fair. Of course it's your package and so you get the final say. I think this sounds sensible, and still definitely an improvement in my eyes over the current state of things! Thanks for your openness to feedback! :)
IMO "basis" should never be used for what is also called "motif", since in linear-algebra terms the set of primitive translation vectors do form a basis of the direct space, and a basis of the lattice (the lattice is generated by the set of all possible integer components, in this basis). So I'd rather support keeping
"""
Coordinates of the basis vectors of the underlying Bravais lattice.
`basis[:, i]` gives the ``i``-th basis vector.
"""
basis::SMatrix{D,D, T}
In RegularLattice, these are some of the fields:
And here is the relevant bit of signature of the constructor:
However, some of this terminology is a bit counter to convention (see e.g. this). In particular, in crystallography, we think of a crystal as being composed of a (Bravais) lattice (which we can specify purely by the three primitive cell translation vectors) and a basis, i.e. which atoms occupy a single unit cell and where.
To "fully" resolve this, the package and types would need to refer to crystals rather than lattice, but I don't personally think such a dramatic change is necessary. Since there are people other than crystallographers that use lattices, I don't think it's reasonable to ask that the terminology of this package be fully consistent with crystallographic terminology. But it would probably be nice if it were not directly counter to it. 😉
My suggestion would be to remame
basis
to something likeprimtive_cell
. This is also nice because it distinguishes from what I think of as a "supercell" (repeating tiling of primitive cell), and you specify aslattice_dims
. As far as what to callunit_cell
, it's perhaps too confusing to suggest the crystallographic term ofbasis
, but I also don't have any other great ideas right now...