pymatgen.analysis.adsorption module

This module provides classes used to enumerate surface sites and to find adsorption sites on slabs

class AdsorbateSiteFinder(slab, selective_dynamics=False, height=0.9, mi_vec=None)[source]

Bases: object

This class finds adsorbate sites on slabs and generates adsorbate structures according to user-defined criteria. The algorithm for finding sites is essentially as follows:

  1. Determine “surface sites” by finding those within

    a height threshold along the miller index of the highest site

  2. Create a network of surface sites using the Delaunay

    triangulation of the surface sites

  3. Assign on-top, bridge, and hollow adsorption sites

    at the nodes, edges, and face centers of the Del. Triangulation

  4. Generate structures from a molecule positioned at

    these sites

Create an AdsorbateSiteFinder object.

Parameters
  • slab (Slab) – slab object for which to find adsorbate sites

  • selective_dynamics (bool) – flag for whether to assign non-surface sites as fixed for selective dynamics

  • height (float) – height criteria for selection of surface sites

  • mi_vec (3-D array-like) – vector corresponding to the vector concurrent with the miller index, this enables use with slabs that have been reoriented, but the miller vector must be supplied manually

  • top_surface (bool) – Which surface to adsorb, True for the surface above the center of mass, False for the surface below center of mass

add_adsorbate(molecule, ads_coord, repeat=None, reorient=True)[source]

Adds an adsorbate at a particular coordinate. Adsorbate represented by a Molecule object, and is positioned relative to the input adsorbate coordinate.

Parameters
  • molecule (Molecule) – molecule object representing the adsorbate

  • ads_coord (array) – coordinate of adsorbate position

  • repeat (3-tuple or list) – input for making a supercell of slab prior to placing the adsorbate

  • reorient (bool) – flag on whether to reorient the molecule to have its z-axis concurrent with miller index

adsorb_both_surfaces(molecule, repeat=None, min_lw=5.0, reorient=True, find_args={})[source]

Function that generates all adsorption structures for a given molecular adsorbate on both surfaces of a slab. This is useful for calculating surface energy where both surfaces need to be equivalent or if we want to calculate nonpolar systems.

Parameters
  • molecule (Molecule) – molecule corresponding to adsorbate

  • repeat (3-tuple or list) – repeat argument for supercell generation

  • min_lw (float) – minimum length and width of the slab, only used if repeat is None

  • reorient (bool) – flag on whether or not to reorient adsorbate along the miller index

  • find_args (dict) – dictionary of arguments to be passed to the call to self.find_adsorption_sites, e.g. {“distance”:2.0}

assign_selective_dynamics(slab)[source]

Helper function to assign selective dynamics site_properties based on surface, subsurface site properties

Parameters

slab (Slab) – slab for which to assign selective dynamics

assign_site_properties(slab, height=0.9)[source]

Assigns site properties.

ensemble_center(site_list, indices, cartesian=True)[source]

Finds the center of an ensemble of sites selected from a list of sites. Helper method for the find_adsorption_sites algorithm.

Parameters
  • site_list (list of sites) – list of sites

  • indices (list of ints) – list of ints from which to select sites from site list

  • cartesian (bool) – whether to get average fractional or cartesian coordinate

find_adsorption_sites(distance=2.0, put_inside=True, symm_reduce=0.01, near_reduce=0.01, positions=['ontop', 'bridge', 'hollow'], no_obtuse_hollow=True)[source]

Finds surface sites according to the above algorithm. Returns a list of corresponding cartesian coordinates.

Parameters
  • distance (float) – distance from the coordinating ensemble of atoms along the miller index for the site (i. e. the distance from the slab itself)

  • put_inside (bool) – whether to put the site inside the cell

  • symm_reduce (float) – symm reduction threshold

  • near_reduce (float) – near reduction threshold

  • positions (list) –

    which positions to include in the site finding “ontop”: sites on top of surface sites “bridge”: sites at edges between surface sites in Delaunay

    triangulation of surface sites in the miller plane

    ”hollow”: sites at centers of Delaunay triangulation faces “subsurface”: subsurface positions projected into miller plane

  • no_obtuse_hollow (bool) – flag to indicate whether to include obtuse triangular ensembles in hollow sites

find_surface_sites_by_height(slab, height=0.9, xy_tol=0.05)[source]

This method finds surface sites by determining which sites are within a threshold value in height from the topmost site in a list of sites

Parameters
  • site_list (list) – list of sites from which to select surface sites

  • height (float) – threshold in angstroms of distance from topmost site in slab along the slab c-vector to include in surface site determination

  • xy_tol (float) – if supplied, will remove any sites which are within a certain distance in the miller plane.

Returns

list of sites selected to be within a threshold of the highest

classmethod from_bulk_and_miller(structure, miller_index, min_slab_size=8.0, min_vacuum_size=10.0, max_normal_search=None, center_slab=True, selective_dynamics=False, undercoord_threshold=0.09)[source]

This method constructs the adsorbate site finder from a bulk structure and a miller index, which allows the surface sites to be determined from the difference in bulk and slab coordination, as opposed to the height threshold.

Parameters
  • structure (Structure) – structure from which slab input to the ASF is constructed

  • miller_index (3-tuple or list) – miller index to be used

  • min_slab_size (float) – min slab size for slab generation

  • min_vacuum_size (float) – min vacuum size for slab generation

  • max_normal_search (int) – max normal search for slab generation

  • center_slab (bool) – whether to center slab in slab generation

  • dynamics (selective) – whether to assign surface sites to selective dynamics

  • undercoord_threshold (float) – threshold of “undercoordation” to use for the assignment of surface sites. Default is 0.1, for which surface sites will be designated if they are 10% less coordinated than their bulk counterpart

generate_adsorption_structures(molecule, repeat=None, min_lw=5.0, reorient=True, find_args={})[source]

Function that generates all adsorption structures for a given molecular adsorbate. Can take repeat argument or minimum length/width of precursor slab as an input

Parameters
  • molecule (Molecule) – molecule corresponding to adsorbate

  • repeat (3-tuple or list) – repeat argument for supercell generation

  • min_lw (float) – minimum length and width of the slab, only used if repeat is None

  • reorient (bool) – flag on whether or not to reorient adsorbate along the miller index

  • find_args (dict) – dictionary of arguments to be passed to the call to self.find_adsorption_sites, e.g. {“distance”:2.0}

generate_substitution_structures(atom, target_species=[], sub_both_sides=False, range_tol=0.01, dist_from_surf=0)[source]
Function that performs substitution-type doping on the surface and

returns all possible configurations where one dopant is substituted per surface. Can substitute one surface or both.

Parameters
  • atom (str) – atom corresponding to substitutional dopant

  • sub_both_sides (bool) – If true, substitute an equivalent site on the other surface

  • target_species (list) – List of specific species to substitute

  • range_tol (float) – Find viable substitution sites at a specific distance from the surface +- this tolerance

  • dist_from_surf (float) – Distance from the surface to find viable substitution sites, defaults to 0 to substitute at the surface

get_extended_surface_mesh(repeat=(5, 5, 1))[source]

Gets an extended surface mesh for to use for adsorption site finding by constructing supercell of surface sites

Parameters

repeat (3-tuple) – repeat for getting extended surface mesh

near_reduce(coords_set, threshold=0.0001)[source]

Prunes coordinate set for coordinates that are within threshold

Parameters
  • coords_set (Nx3 array-like) – list or array of coordinates

  • threshold (float) – threshold value for distance

subsurface_sites()[source]

convenience method to return list of subsurface sites

property surface_sites

convenience method to return a list of surface sites

symm_reduce(coords_set, threshold=1e-06)[source]

Reduces the set of adsorbate sites by finding removing symmetrically equivalent duplicates

Parameters
  • coords_set – coordinate set in cartesian coordinates

  • threshold – tolerance for distance equivalence, used as input to in_coord_list_pbc for dupl. checking

color_dict = {'Ac': [0.43749829102230076, 0.6679661407572627, 0.9765586853176356], 'Ag': [0.7499970703239441, 0.7499970703239441, 0.7499970703239441], 'Al': [0.7460908355826735, 0.64843496705091, 0.64843496705091], 'Am': [0.32812371826672554, 0.3593735961968899, 0.9453088073874713], 'Ar': [0.4999980468826294, 0.8164030609255434, 0.8867152862684131], 'As': [0.7382783661001325, 0.4999980468826294, 0.8867152862684131], 'At': [0.45702946472865347, 0.30859254456037283, 0.2695301971476674], 'Au': [0.9960898590239883, 0.8164030609255434, 0.13671821594446898], 'B': [0.9960898590239883, 0.7070284881699681, 0.7070284881699681], 'Ba': [0.0, 0.785153182995379, 0.0], 'Be': [0.7578095398064852, 0.9960898590239883, 0.0], 'Bh': [0.8749965820446015, 0.0, 0.21874914551115038], 'Bi': [0.6171850891207457, 0.30859254456037283, 0.7070284881699681], 'Bk': [0.5390603942953348, 0.30859254456037283, 0.8867152862684131], 'Br': [0.64843496705091, 0.16015562439209224, 0.16015562439209224], 'C': [0.5624978027429581, 0.5624978027429581, 0.5624978027429581], 'Ca': [0.2382803192175031, 0.9960898590239883, 0.0], 'Cd': [0.9960898590239883, 0.8476529388557077, 0.5585915680016875], 'Ce': [0.9960898590239883, 0.9960898590239883, 0.777340713512838], 'Cf': [0.6289037933445573, 0.21093667602860927, 0.828121765149355], 'Cl': [0.12109327697938681, 0.9374963379049301, 0.12109327697938681], 'Cm': [0.46874816895246507, 0.3593735961968899, 0.8867152862684131], 'Co': [0.9374963379049301, 0.5624978027429581, 0.6249975586032868], 'Cr': [0.5390603942953348, 0.5976539154143929, 0.777340713512838], 'Cs': [0.3398424224905372, 0.08984339904922248, 0.5585915680016875], 'Cu': [0.7812469482541085, 0.4999980468826294, 0.19921797180479767], 'Db': [0.8164030609255434, 0.0, 0.30859254456037283], 'Dy': [0.12109327697938681, 0.9960898590239883, 0.777340713512838], 'Er': [0.0, 0.8984339904922247, 0.45702946472865347], 'Es': [0.6992160186874271, 0.12109327697938681, 0.828121765149355], 'Eu': [0.3789047699032426, 0.9960898590239883, 0.777340713512838], 'F': [0.5624978027429581, 0.8749965820446015, 0.3124987793016434], 'Fe': [0.8749965820446015, 0.39843594360959533, 0.19921797180479767], 'Fm': [0.6992160186874271, 0.12109327697938681, 0.7265596618763208], 'Fr': [0.2578114929238558, 0.0, 0.39843594360959533], 'Ga': [0.7578095398064852, 0.5585915680016875, 0.5585915680016875], 'Gd': [0.2695301971476674, 0.9960898590239883, 0.777340713512838], 'Ge': [0.39843594360959533, 0.5585915680016875, 0.5585915680016875], 'H': [0.9960898590239883, 0.9960898590239883, 0.9960898590239883], 'He': [0.8476529388557077, 0.9960898590239883, 0.9960898590239883], 'Hf': [0.3007800750778318, 0.7578095398064852, 0.9960898590239883], 'Hg': [0.7187471923937798, 0.7187471923937798, 0.8124968261842728], 'Ho': [0.0, 0.9960898590239883, 0.6093726196382045], 'Hs': [0.8984339904922247, 0.0, 0.17968679809844496], 'I': [0.5781227417080402, 0.0, 0.5781227417080402], 'In': [0.64843496705091, 0.45702946472865347, 0.44921699524611236], 'Ir': [0.08984339904922248, 0.32812371826672554, 0.5273416900715232], 'K': [0.5585915680016875, 0.2499990234413147, 0.828121765149355], 'Kr': [0.3593735961968899, 0.7187471923937798, 0.8164030609255434], 'La': [0.43749829102230076, 0.828121765149355, 0.9960898590239883], 'Li': [0.7968718872191907, 0.4999980468826294, 0.9960898590239883], 'Lr': [0.777340713512838, 0.0, 0.39843594360959533], 'Lu': [0.0, 0.6679661407572627, 0.14062445068573953], 'Md': [0.6992160186874271, 0.05078105163651705, 0.64843496705091], 'Mg': [0.5390603942953348, 0.9960898590239883, 0.0], 'Mn': [0.6093726196382045, 0.4765606384350062, 0.777340713512838], 'Mo': [0.32812371826672554, 0.7070284881699681, 0.7070284881699681], 'Mt': [0.9179651641985774, 0.0, 0.1484369201682806], 'N': [0.18749926758098603, 0.3124987793016434, 0.9687462158350945], 'Na': [0.6679661407572627, 0.3593735961968899, 0.9453088073874713], 'Nb': [0.44921699524611236, 0.7578095398064852, 0.785153182995379], 'Nd': [0.777340713512838, 0.9960898590239883, 0.777340713512838], 'Ne': [0.6992160186874271, 0.8867152862684131, 0.9570275116112829], 'Ni': [0.3124987793016434, 0.8124968261842728, 0.3124987793016434], 'No': [0.7382783661001325, 0.05078105163651705, 0.5273416900715232], 'Np': [0.0, 0.4999980468826294, 0.9960898590239883], 'O': [0.9960898590239883, 0.05078105163651705, 0.05078105163651705], 'Os': [0.1484369201682806, 0.39843594360959533, 0.5859352111905813], 'P': [0.9960898590239883, 0.4999980468826294, 0.0], 'Pa': [0.0, 0.6289037933445573, 0.9960898590239883], 'Pb': [0.3398424224905372, 0.34765489197307825, 0.3789047699032426], 'Pd': [0.0, 0.41015464783340694, 0.5195292205889821], 'Pm': [0.6367162628270984, 0.9960898590239883, 0.777340713512838], 'Po': [0.6679661407572627, 0.3593735961968899, 0.0], 'Pr': [0.8476529388557077, 0.9960898590239883, 0.777340713512838], 'Pt': [0.8124968261842728, 0.8124968261842728, 0.8749965820446015], 'Pu': [0.0, 0.41796711731594804, 0.9960898590239883], 'Ra': [0.0, 0.4882793426588178, 0.0], 'Rb': [0.43749829102230076, 0.17968679809844496, 0.6874973144636154], 'Re': [0.1484369201682806, 0.4882793426588178, 0.6679661407572627], 'Rf': [0.7968718872191907, 0.0, 0.34765489197307825], 'Rh': [0.03906234741270542, 0.4882793426588178, 0.5468728637778759], 'Rn': [0.2578114929238558, 0.5078105163651705, 0.5859352111905813], 'Ru': [0.14062445068573953, 0.5585915680016875, 0.5585915680016875], 'S': [0.9960898590239883, 0.9960898590239883, 0.18749926758098603], 'Sb': [0.6171850891207457, 0.3867172393857837, 0.7070284881699681], 'Sc': [0.8984339904922247, 0.8984339904922247, 0.8984339904922247], 'Se': [0.9960898590239883, 0.6289037933445573, 0.0], 'Sg': [0.8476529388557077, 0.0, 0.2695301971476674], 'Si': [0.9374963379049301, 0.7812469482541085, 0.6249975586032868], 'Sm': [0.5585915680016875, 0.9960898590239883, 0.777340713512838], 'Sn': [0.39843594360959533, 0.4999980468826294, 0.4999980468826294], 'Sr': [0.0, 0.9960898590239883, 0.0], 'Ta': [0.3007800750778318, 0.64843496705091, 0.9960898590239883], 'Tb': [0.18749926758098603, 0.9960898590239883, 0.777340713512838], 'Tc': [0.23046784973496198, 0.6171850891207457, 0.6171850891207457], 'Te': [0.828121765149355, 0.4765606384350062, 0.0], 'Th': [0.0, 0.7265596618763208, 0.9960898590239883], 'Ti': [0.7460908355826735, 0.7578095398064852, 0.777340713512838], 'Tl': [0.64843496705091, 0.32812371826672554, 0.3007800750778318], 'Tm': [0.0, 0.828121765149355, 0.3203112487841845], 'U': [0.0, 0.5585915680016875, 0.9960898590239883], 'V': [0.64843496705091, 0.64843496705091, 0.6679661407572627], 'W': [0.1289057464619279, 0.5781227417080402, 0.8359342346318961], 'Xe': [0.2578114929238558, 0.6171850891207457, 0.6874973144636154], 'Y': [0.5781227417080402, 0.9960898590239883, 0.9960898590239883], 'Yb': [0.0, 0.7460908355826735, 0.21874914551115038], 'Zn': [0.4882793426588178, 0.4999980468826294, 0.6874973144636154], 'Zr': [0.5781227417080402, 0.8749965820446015, 0.8749965820446015]}
colors = {'Jmol': {'Ac': [112, 171, 250], 'Ag': [192, 192, 192], 'Al': [191, 166, 166], 'Am': [84, 92, 242], 'Ar': [128, 209, 227], 'As': [189, 128, 227], 'At': [117, 79, 69], 'Au': [255, 209, 35], 'B': [255, 181, 181], 'Ba': [0, 201, 0], 'Be': [194, 255, 0], 'Bh': [224, 0, 56], 'Bi': [158, 79, 181], 'Bk': [138, 79, 227], 'Br': [166, 41, 41], 'C': [144, 144, 144], 'Ca': [61, 255, 0], 'Cd': [255, 217, 143], 'Ce': [255, 255, 199], 'Cf': [161, 54, 212], 'Cl': [31, 240, 31], 'Cm': [120, 92, 227], 'Co': [240, 144, 160], 'Cr': [138, 153, 199], 'Cs': [87, 23, 143], 'Cu': [200, 128, 51], 'Db': [209, 0, 79], 'Dy': [31, 255, 199], 'Er': [0, 230, 117], 'Es': [179, 31, 212], 'Eu': [97, 255, 199], 'F': [144, 224, 80], 'Fe': [224, 102, 51], 'Fm': [179, 31, 186], 'Fr': [66, 0, 102], 'Ga': [194, 143, 143], 'Gd': [69, 255, 199], 'Ge': [102, 143, 143], 'H': [255, 255, 255], 'He': [217, 255, 255], 'Hf': [77, 194, 255], 'Hg': [184, 184, 208], 'Ho': [0, 255, 156], 'Hs': [230, 0, 46], 'I': [148, 0, 148], 'In': [166, 117, 115], 'Ir': [23, 84, 135], 'K': [143, 64, 212], 'Kr': [92, 184, 209], 'La': [112, 212, 255], 'Li': [204, 128, 255], 'Lr': [199, 0, 102], 'Lu': [0, 171, 36], 'Md': [179, 13, 166], 'Mg': [138, 255, 0], 'Mn': [156, 122, 199], 'Mo': [84, 181, 181], 'Mt': [235, 0, 38], 'N': [48, 80, 248], 'Na': [171, 92, 242], 'Nb': [115, 194, 201], 'Nd': [199, 255, 199], 'Ne': [179, 227, 245], 'Ni': [80, 208, 80], 'No': [189, 13, 135], 'Np': [0, 128, 255], 'O': [255, 13, 13], 'Os': [38, 102, 150], 'P': [255, 128, 0], 'Pa': [0, 161, 255], 'Pb': [87, 89, 97], 'Pd': [0, 105, 133], 'Pm': [163, 255, 199], 'Po': [171, 92, 0], 'Pr': [217, 255, 199], 'Pt': [208, 208, 224], 'Pu': [0, 107, 255], 'Ra': [0, 125, 0], 'Rb': [112, 46, 176], 'Re': [38, 125, 171], 'Rf': [204, 0, 89], 'Rh': [10, 125, 140], 'Rn': [66, 130, 150], 'Ru': [36, 143, 143], 'S': [255, 255, 48], 'Sb': [158, 99, 181], 'Sc': [230, 230, 230], 'Se': [255, 161, 0], 'Sg': [217, 0, 69], 'Si': [240, 200, 160], 'Sm': [143, 255, 199], 'Sn': [102, 128, 128], 'Sr': [0, 255, 0], 'Ta': [77, 166, 255], 'Tb': [48, 255, 199], 'Tc': [59, 158, 158], 'Te': [212, 122, 0], 'Th': [0, 186, 255], 'Ti': [191, 194, 199], 'Tl': [166, 84, 77], 'Tm': [0, 212, 82], 'U': [0, 143, 255], 'V': [166, 166, 171], 'W': [33, 148, 214], 'Xe': [66, 158, 176], 'Y': [148, 255, 255], 'Yb': [0, 191, 56], 'Zn': [125, 128, 176], 'Zr': [148, 224, 224]}, 'VESTA': {'Ac': [112, 171, 250], 'Ag': [192, 192, 192], 'Al': [129, 178, 214], 'Am': [84, 92, 242], 'Ar': [207, 254, 196], 'As': [116, 208, 87], 'At': [117, 79, 69], 'Au': [255, 209, 35], 'B': [31, 162, 15], 'Ba': [0, 201, 0], 'Be': [94, 215, 123], 'Bh': [224, 0, 56], 'Bi': [158, 79, 181], 'Bk': [138, 79, 227], 'Br': [126, 49, 2], 'C': [76, 76, 76], 'Ca': [90, 150, 189], 'Cd': [255, 217, 143], 'Ce': [255, 255, 199], 'Cf': [161, 54, 212], 'Cl': [49, 252, 2], 'Cm': [120, 92, 227], 'Co': [0, 0, 175], 'Cr': [0, 0, 158], 'Cs': [87, 23, 143], 'Cu': [34, 71, 220], 'Db': [209, 0, 79], 'Dy': [31, 255, 199], 'Er': [0, 230, 117], 'Es': [179, 31, 212], 'Eu': [97, 255, 199], 'F': [176, 185, 230], 'Fe': [181, 113, 0], 'Fm': [179, 31, 186], 'Fr': [66, 0, 102], 'Ga': [158, 227, 115], 'Gd': [69, 255, 199], 'Ge': [126, 110, 166], 'H': [255, 204, 204], 'He': [252, 232, 206], 'Hf': [77, 194, 255], 'Hg': [184, 184, 208], 'Ho': [0, 255, 156], 'Hs': [230, 0, 46], 'I': [148, 0, 148], 'In': [166, 117, 115], 'Ir': [23, 84, 135], 'K': [161, 33, 246], 'Kr': [250, 193, 243], 'La': [90, 196, 73], 'Li': [134, 223, 115], 'Lr': [199, 0, 102], 'Lu': [0, 171, 36], 'Md': [179, 13, 166], 'Mg': [251, 123, 21], 'Mn': [167, 8, 157], 'Mo': [84, 181, 181], 'Mt': [235, 0, 38], 'N': [176, 185, 230], 'Na': [249, 220, 60], 'Nb': [115, 194, 201], 'Nd': [199, 255, 199], 'Ne': [254, 55, 181], 'Ni': [183, 187, 189], 'No': [189, 13, 135], 'Np': [0, 128, 255], 'O': [254, 3, 0], 'Os': [38, 102, 150], 'P': [192, 156, 194], 'Pa': [0, 161, 255], 'Pb': [87, 89, 97], 'Pd': [0, 105, 133], 'Pm': [163, 255, 199], 'Po': [171, 92, 0], 'Pr': [217, 255, 199], 'Pt': [208, 208, 224], 'Pu': [0, 107, 255], 'Ra': [0, 125, 0], 'Rb': [112, 46, 176], 'Re': [38, 125, 171], 'Rf': [204, 0, 89], 'Rh': [10, 125, 140], 'Rn': [66, 130, 150], 'Ru': [36, 143, 143], 'S': [255, 250, 0], 'Sb': [158, 99, 181], 'Sc': [181, 99, 171], 'Se': [154, 239, 15], 'Sg': [217, 0, 69], 'Si': [27, 59, 250], 'Sm': [143, 255, 199], 'Sn': [154, 142, 185], 'Sr': [0, 255, 0], 'Ta': [77, 166, 255], 'Tb': [48, 255, 199], 'Tc': [59, 158, 158], 'Te': [212, 122, 0], 'Th': [0, 186, 255], 'Ti': [120, 202, 255], 'Tl': [166, 84, 77], 'Tm': [0, 212, 82], 'U': [0, 143, 255], 'V': [229, 25, 0], 'W': [33, 148, 214], 'Xe': [66, 158, 176], 'Y': [148, 255, 255], 'Yb': [0, 191, 56], 'Zn': [143, 143, 129], 'Zr': [0, 255, 0]}}
get_mi_vec(slab)[source]

Convenience function which returns the unit vector aligned with the miller index.

get_rot(slab)[source]

Gets the transformation to rotate the z axis into the miller index

plot_slab(slab, ax, scale=0.8, repeat=5, window=1.5, draw_unit_cell=True, decay=0.2, adsorption_sites=True)[source]

Function that helps visualize the slab in a 2-D plot, for convenient viewing of output of AdsorbateSiteFinder.

Parameters
  • slab (slab) – Slab object to be visualized

  • ax (axes) – matplotlib axes with which to visualize

  • scale (float) – radius scaling for sites

  • repeat (int) – number of repeating unit cells to visualize

  • window (float) – window for setting the axes limits, is essentially a fraction of the unit cell limits

  • draw_unit_cell (bool) – flag indicating whether or not to draw cell

  • decay (float) – how the alpha-value decays along the z-axis

put_coord_inside(lattice, cart_coordinate)[source]

converts a cartesian coordinate such that it is inside the unit cell.

reorient_z(structure)[source]

reorients a structure such that the z axis is concurrent with the normal to the A-B plane