Crystal Tools#
- crystal_tools.get_cell(crystal, vol_per_atom, c_over_a=1.632993161855452, coord_type='fractional')#
Crystal utility function
This is a convenience function that returns the lattice vectors and ionic coordinates of simple crystal structures given the volume per atom in the cell and possibly the \(c/a\) ratio.
The crystal structures supported and their
crystalarguments are as follows.simple cubic -
scbody-centred cubic -
bcc(primitive cell) orbcc-c(conventional cell)face-centred cubic -
fcc(primitive cell) orfcc-c(conventional cell)diamond cubic -
dc(primitive cell) ordc-c(conventional cell)hexagonal close-packed -
hcp
- Parameters:
crystal (string) – Crystal structure
vol_per_atom (float) – Volume per atom of the cell
c_over_a (float) – \(c/a\) ratio
coord_type (string) – Whether the ionic coordinates returned are
fractional(default) orcartesiancoordinates
- Returns:
Lattice vectors, Ionic coordinates
- Return type:
torch.Tensor, torch.Tensor