gyroid Package — gyroid 0.1 documentation

### Navigation

- index
- modules |
- previous |
- gyroid 0.1 documentation »

# gyroid Package

## `gyroid` Package

### gyroid

gyroid is a python package that generates symmetry adapted basis functions based on the space group of a unit cell.

#### References

- Qin, J., PhD Thesis, advisor: D. C. Morse, 2009
- Ranjan, A., PhD Thesis, advisor: D. C. Morse, 2007
- Tyler, C. A., PhD Thesis, advisor: D. C. Morse, 2004
- Tyler, C. A.; Morse, D. C. Macromolecules, 2003, 36, 3764

## `basis` Module

### gyroid.basis

class `gyroid.basis.` `Basis`(group, grid)

  Bases: `object`

  `generate_structure`(real_grid, c)

    real_grid is a tuple contains the discrete numbers for a, b, and c unit vectors in real space. c is an array contains the coefficients for each basis.

class `gyroid.basis.` `Star`(group, grid, Gsq)

  Bases: `object`

  A StarSet is a collection of stars with all waves have same magnitude.

  `f`(x, shape)

    the value of basis function f(r) at position r. r is a Bravais type real space vector.

## `common` Module

### gyroid.common

## `grid` Module

### gyroid.grid

class `gyroid.grid.` `Grid`(ngrid, g)

  Bases: `object`

  Discrete form of a unit cell in reciprocal space.

  `is_wave_cancel`(G, g)

    A wave is canceled if and only if following conditions are met: 1) Leaves G invariant (i.e. G.R == G), and 2) Produces a non-zero phase, such that G.t % 1.0 != 0

  `max_Gabs`
  `to_BZ`(G)

`gyroid.grid.` `wave_norm`(G, shape)

  G is a wave vector with 1, 2, or 3 elements shape is a shape matrix

## `group` Module

### gyroid.group

class `gyroid.group.` `Group`(dim, basis_type, shape_matrix, HM_symbol=None, ITA_number=None)

  Bases: `object`

  A representaion of a space group.

  All symmetries in a space group must have the same basis, i.e. they must all be either the Bravais or the Cartesian bases.

  The space group is constructed either by providing a Hermann-Mauguin Symbol (HM_symbol) or a sequential number as given in the International Tables for Crystallography, Vol. A (ITA_number)

class `gyroid.group.` `CayleyTable`(symm)

  Bases: `object`

  Make a full Cayley table from a group.

## `space_group` Module

### gyroid.space_group

`gyroid.space_group.` `symmetry_generator1`(ITA_number, b, h)

`gyroid.space_group.` `symmetry_generator2`(ITA_number, b, h)

  There are 17 2D space groups. Currently, Only following 2D space groups are supported:

  > [17]

  > ITA_number - a sequential number as given in the
  >   International Tables for Crystallography, Vol. A

  > b - Basis type h - Shape instance that describes the unit cell

  > A list of Symmetry instances that contains the minimun number of symmetries which can be further expanded to the full set of point group symmetries.

`gyroid.space_group.` `symmetry_generator3`(ITA_number, b, h)

## `symmetry` Module

### gyroid.symmetry

class `gyroid.symmetry.` `Symmetry`(dim, basis_type, shape_matrix, R=None, t=None)

  Bases: `object`

  A representation of a symmetry element in a group.

  The basis type of a symmetry element should be either ‘Cartesian’ or ‘Bravais’. A symmetry element contains a point group matrix and a translational vector.

  `inverse`()

## `unitcell` Module

### gyroid.unitcell

Define a standard unit cell and its (real space) lattice basis vectors according to the cystal system.

class `gyroid.unitcell.` `UnitCell`(dim, cell_type='Default', cell_param=None)

  Bases: `object`

class `gyroid.unitcell.` `Shape`(dim, a1, a2=None, a3=None)

  Bases: `object`

  Shape matrix constructed from unit vectors in Cartesian Coordinate.

  The Morse convention is used. That is each row in the shape matrix represents a unit vector, e.g. h = (a1,a2,a3) where a_i = (x_i,y_i,z_i) is the unit vector of the Bravis lattice in Cartesian Coordinate.

  `g`

    The shape matrix in Reciprocal Space.

  `h`

    The shape matrix in Real Space.

  `l`

    return (|a1|,|a2|,|a3|), the length vector.

  `shift`(t, basis_type)

    Shift position or translation vector so as to lie in the first unit cell.

## `util` Module

### gyroid.util

`gyroid.util.` `render_structure_1d`(basis, Na, c, save_data=True, data_name='struct1d.mat', save_img=True, show_img=True, img_name='struct1d.png', **kwargs)

  basis - An instance of Basis class Na - Number of grids to discretes the side a of the unit cell. c - coefficients for each basis function.

`gyroid.util.` `render_structure_2d`(basis, Na, Nb, c, save_data=True, data_name='struct2d.mat', save_img=True, show_img=True, img_name='struct2d.png', levels=None, cmap=None, **kwargs)

  basis - An instance of Basis class Na,Nb - Number of grids to discrete the side a of the unit cell. c - coefficients for each basis function.

`gyroid.util.` `render_structure_3d`(basis, Na, Nb, Nc, c, save_data=True, data_name='struct3d.mat', save_img=True, show_img=True, img_name='struct3d.png', levels=None, cmap=None, **kwargs)

  basis - An instance of Basis class Na,Nb,Nc - Number of grids to discrete the side a of the unit cell. c - coefficients for each basis function. NOTE: the best way to view 3D volume data is: first save the data to mat, and let Matlab (C) render the volume data.

### Navigation

- index
- modules |
- previous |
- gyroid 0.1 documentation »