defdap.crystal module

class defdap.crystal.Phase(name, laue_group, space_group, lattice_params)[source]

Bases: object

property c_over_a
print_slip_systems()[source]

Print a list of slip planes (with colours) and slip directions.

class defdap.crystal.CrystalStructure(name, symmetries, vertices, faces)[source]

Bases: object

class defdap.crystal.SlipSystem(slip_plane, slip_dir, crystal_structure, c_over_a=None)[source]

Bases: object

Class used for defining and performing operations on a slip system.

property slip_plane_label

Return the slip plane label. For example ‘(111)’.

Returns:

Slip plane label.

Return type:

str

property slip_dir_label

Returns the slip direction label. For example ‘[110]’.

Returns:

Slip direction label.

Return type:

str

generate_family()[source]

Generate the family of slip systems which this system belongs to.

Returns:

The family of slip systems.

Return type:

list of SlipSystem

static load(name, crystal_structure, c_over_a=None, group_by='plane')[source]

Load in slip systems from file. 3 integers for slip plane normal and 3 for slip direction. Returns a list of list of slip systems grouped by slip plane.

Parameters:
  • name (str) – Name of the slip system file (without file extension) stored in the defdap install dir or path to a file.

  • crystal_structure (defdap.crystal.CrystalStructure) – Crystal structure of the slip systems.

  • c_over_a (float, optional) – C over a ratio for hexagonal crystals.

  • group_by (str, optional) – How to group the slip systems, either by slip plane (‘plane’) or slip system family (‘family’) or don’t group (None).

Returns:

A list of list of slip systems grouped slip plane.

Return type:

list of list of SlipSystem

Raises:

IOError – Raised if not 6/8 integers per line.

static group(slip_systems, group_by)[source]

Groups slip systems by their slip plane.

Parameters:
  • slip_systems (list of SlipSystem) – A list of slip systems.

  • group_by (str) – How to group the slip systems, either by slip plane (‘plane’) or slip system family (‘family’).

Returns:

A list of list of grouped slip systems.

Return type:

list of list of SlipSystem

static print_slip_system_directory()[source]

Prints the location where slip system definition files are stored.