Skip to content

Latest commit

 

History

History
225 lines (127 loc) · 5.12 KB

API.md

File metadata and controls

225 lines (127 loc) · 5.12 KB

class Box

A box representing the bounds of the system.

Parameters

  • lengths : list-like, shape=(3,), dtype=float Lengths of the edges of the box.

  • angles : list-like, shape=(3,), dtype=float, default=None
    Angles (in degrees) that define the tilt of the edges of the box. If None is given, angles are assumed to be [90.0, 90.0, 90.0]. These are also known as alpha, beta, gamma in the crystallography community.

  • precision : int, optional, default=None Control the precision of the floating point representation of box attributes. If none provided, the default is 6 decimals.

Attributes

  • vectors : np.ndarray, shape=(3,3), dtype=float Vectors that define the parallelepiped (Box).

  • lengths : tuple, shape=(3,), dtype=float
    Lengths of the box in x,y,z angles : tuple, shape=(3,), dtype=float

  • angles : tuple, shape=(3,), dtype=float Angles defining the tilt of the box.

  • Lx : float Length of the Box in the x dimension

  • Ly : float Length of the Box in the y dimension

  • Lz : float
    Length of the Box in the z dimension

  • xy : float Tilt factor needed to displace an orthogonal box's xy face to its parallelepiped structure.

  • xz : float
    Tilt factor needed to displace an orthogonal box's xz face to its parallelepiped structure.

  • yz : float Tilt factor needed to displace an orthogonal box's yz face to its parallelepiped structure.

  • precision : int Precision of the floating point numbers when accessing values.

Notes

Box vectors are expected to be provided in row-major format.

method __init__

__init__(lengths, angles=None, precision=None)

property Lx

Length in the x direction.


property Ly

Length in the y direction.


property Lz

Length in the z direction.


property angles

Angles defining the tilt of the box (alpha, beta, gamma).


property box_parameters

Lengths and tilt factors of the box.


property bravais_parameters

Return the Box representation as Bravais lattice parameters.

Based on the box vectors, return the parameters to describe the box in terms of the Bravais lattice parameters:

a,b,c = the edges of the Box alpha, beta, gamma = angles(tilt) of the parallelepiped, in degrees

Returns

parameters : tuple of floats, (a, b, c, alpha, beta, gamma)


property lengths

Lengths of the box.


property precision

Amount of decimals to represent floating point values.


property tilt_factors

Return the 3 tilt_factors (xy, xz, yz) of the box.


property vectors

Box representation as a 3x3 matrix.


property xy

Tilt factor xy of the box.


property xz

Tilt factor xz of the box.


property yz

Tilt factor yz of the box.


classmethod from_lengths_angles

from_lengths_angles(lengths, angles, precision=None)

Generate a box from lengths and angles.


classmethod from_lengths_tilt_factors

from_lengths_tilt_factors(lengths, tilt_factors=None, precision=None)

Generate a box from box lengths and tilt factors.


classmethod from_lo_hi_tilt_factors

from_lo_hi_tilt_factors(lo, hi, tilt_factors, precision=None)

Generate a box from a lo, hi convention and tilt factors.


classmethod from_mins_maxs_angles

from_mins_maxs_angles(mins, maxs, angles, precision=None)

Generate a box from min/max distance calculations and angles.


classmethod from_uvec_lengths

from_uvec_lengths(uvec, lengths, precision=None)

Generate a box from unit vectors and lengths.


classmethod from_vectors

from_vectors(vectors, precision=None)

Generate a box from box vectors.