pybec.analysis.select_cell_segment¶
- pybec.analysis.select_cell_segment(cell_df, lattice, frac_dir)[source]¶
Select a portion of the unit cell along a given set of directions.
The fractional direction is a vector of coefficients for the lattice vectors of the unit cell. For lattice vectors a, b, c, a direction vector of [0.5, 1, 0.5] means that we want the cell up to 0.5a and 0.5c, with all values of b.
A negative value for direction means that we want values greater than (1 - fraction) times the lattice vector. Thus, [-0.3, 1, 1] means that we want the cell segment greater than 0.7a. [-0.3,-0.3,-0.3] would mean we want all cell positions from that lie within [0.7a, a], [0.7b, b], and [0.7c, c].