Code author: Niklaus Johner <niklaus.johner@a3.epfl.ch>
This module contains some functions to work with periodic boundary conditions.
This function project the vector v on the unit cell vectors ucell_vecs, of which the first vector is assumed to be along x and the second in the xy plane.
Returns the length of the unit cell vectors and the angles alpha, beta and gamma The first vector has to be along x and the second in the xy plane. First angle is between v1 and v2, the second one between v1 and v3 and the third one between v2 and v3.
Returns a view containing all the atoms within radius of a point pos (Vec3), using periodic boundary conditions (orthogonal unit cell).
Returns a view containing all the atoms within radius of a point pos (Vec3), using periodic boundary conditions (orthogonal and non-orthogonal unit cell). By default it searches in all neighboring unit cells (first shell of neighboring unit cells), except if a list of vectors to the neighboring unit cells in which to search is passed.
Extends an Entity to surrounding unit cells by replicating it and translating it for each vector in vecs_to_neighbor_ucells. For each replica the chains will have the same name as in the original Entity followed by a number corresponding to the index of the vector used for the translation (starting at 1). The translations can be obtained for example from the function VectorsToNeighboringUnitCells().
Parameters: |
|
---|
This function extends an entity to its neighboring unit cell vectors, by a size given by the extension_size in each direction. It’s slower than ExtendEntityToNeighboringUnitCells but allows to extend to small parts of the surrounding unit cells.
Returns the unit cell vectors from their length and angles