KMC lattice

Created on Tue Sep 13 10:59:52 2016

@author: mpnun

class Lattice.Lattice[source]

Class which handles the KMC lattice

Build_neighbor_list(cut=3.0, cut_mat=[])[source]

Builds the neighbor list based on distances between sites

Parameters:
  • cut – Maximum distance between nearest neighbor sites or their periodic images.
  • cut_mat – List of nearest neighbor cutoff distances between different site types. If empty, it will assume the same distance for all site types.
PlotLattice(cutoff=3.0, plot_neighbs=False, type_symbols=['o', 's', '^', 'v', '<', '>', '8', 'd', 'D', 'H', 'h', '*', 'p', '+', ',', '.', '1', '2', '3', '4', '_', 'x', '|', 0, 1, 10, 11, 2, 3, 4, 5, 6, 7, 8], ms=4)[source]
Parameters:
  • cutoff – Maximum distance to draw connections between nearest neighbor sites. This prevents drawing line segments between sites which are neighbors only though their periodic images.
  • plot_neighbs – Flag to plot line segments between lattice sites which are first nearest neighbors to each other
  • type_symbols – List of symbols for each lattice site type.
  • ms – Marker size
Returns:

pyplot object with the lattice graphed on it

ReadIn(fldr)[source]

Read lattice_input.dat

Parameters:fldr – Folder directory from which to read lattice_input.dat
Read_lattice_output(fldr)[source]

Read lattice_output.txt

WriteIn(fldr)[source]

Write lattice_input.dat

Parameters:fldr – Folder directory from which to read lattice_input.dat
Write_lattice_input(fldr)[source]

Write lattice_input.dat

coord_shift(a_ind, b_ind)[source]

Give the coordinates of the periodic image of B which is closest to A

Parameters:
  • a_ind – Index of atom A
  • b_ind – Index of atom B
set_cart_coords(cc)[source]

Set the Cartesian and fractional coordinates

Parameters:fc – n x 3 array (or list of lists) of Cartesian coordinates to set for each atom
set_frac_coords(fc)[source]

Set the fractional and Cartesian coordinates

Parameters:fc – n x 3 array (or list of lists) of fractional coordinates to set for each atom