|
|
__init__(self,
a=None,
b=None,
c=None,
alpha=None,
beta=None,
gamma=None,
baserot=array([[ 1., 0., 0...,
base=None)
define new coordinate system, the default is Cartesian
There are 4 ways how to create Lattice instance:
Lattice() -- create cartesian coordinates
Lattice(a, b, c, alpha, beta, gamma) -- define coordinate system
from specified lattice parameters. |
source code
|
|
|
|
setLatPar(self,
a=None,
b=None,
c=None,
alpha=None,
beta=None,
gamma=None,
baserot=None)
set lattice parameters and all related tensors
a, b, c, alpha, beta, gamma -- lattice parameters, unit cell angles
are in degrees. |
source code
|
|
|
|
setLatBase(self,
base)
Set matrix of unit cell base vectors and calculate corresponding
lattice parameters and stdbase, baserot and metrics tensors. |
source code
|
|
|
|
abcABG(self)
Return a tuple of 6 lattice parameters. |
source code
|
|
|
|
reciprocal(self)
Return the reciprocal lattice to self. |
source code
|
|
|
|
cartesian(self,
u)
return cartesian coordinates of a lattice vector |
source code
|
|
|
|
fractional(self,
rc)
return fractional coordinates of a cartesian vector |
source code
|
|
|
|
dot(self,
u,
v)
return dot product of 2 lattice vectors |
source code
|
|
|
|
norm(self,
u)
return norm of a lattice vector |
source code
|
|
|
|
dist(self,
u,
v)
Return distance of 2 points in lattice coordinates. |
source code
|
|
|
|
angle(self,
u,
v)
Return angle(u, v) --> angle of 2 lattice vectors in degrees. |
source code
|
|
|
|
__repr__(self)
String representation of this lattice. |
source code
|
|