sknano.generators.BilayerGrapheneGenerator¶
-
class
sknano.generators.BilayerGrapheneGenerator(**kwargs)[source][source]¶ Bilayer graphene structure generator class.
Parameters: armchair_edge_length : float, optional
Length of armchair edge in nanometers
New in version 0.3.10.
zigzag_edge_length : float, optional
Length of zigzag edge in nanometers
New in version 0.3.10.
length : float, optional
Length of armchair edge in nanometers
Deprecated since version 0.3.10: Use armchair_edge_length instead
width : float, optional
Width of graphene sheet in nanometers
Deprecated since version 0.3.10: Use zigzag_edge_length instead
edge : {‘AC’, ‘armchair’, ‘ZZ’, ‘zigzag’}, optional
ArmChair or ZigZag edge along the length of the sheet.
Deprecated since version 0.3.10: No longer used!
basis : {
list}, optionalList of
strs of element symbols or atomic number of the two atom basis (default: [‘C’, ‘C’])New in version 0.3.10.
element1, element2 : {str, int}, optional
Element symbol or atomic number of basis
Atom1 and 2Deprecated since version 0.3.10: Use
basisinsteadbond : float, optional
bond length between nearest-neighbor atoms in Angstroms.
layer_spacing : float, optional
Distance between layers in Angstroms.
stacking_order : {‘AA’, ‘AB’}, optional
Stacking order of graphene layers
layer_rotation_angle : {None, float}, optional
Rotation angle of second layer specified in degrees. If specified in degrees, then you must set degrees=True
degrees : bool, optional
The layer_rotation_angle is specified in degrees and needs to be converted to radians.
autogen : bool, optional
if True, automatically generate unit cell and full structure
verbose : bool, optional
verbose output
Examples
Import the BilayerGrapheneGenerator class
>>> from sknano.generators import BilayerGrapheneGenerator
Generate 10 nm wide by 1 nm long AB stacked bilayer-graphene:
>>> blg = BilayerGrapheneGenerator(armchair_edge_length=10, ... zigzag_edge_length=1)
Save structure data in xyz format:
>>> blg.save()
The rendered structure looks like (after rotating 90 degrees so that it better fits the page):
Now generate bilayer-graphene with top layer rotated by 45 degrees.
>>> rotated_bilayer = BilayerGrapheneGenerator(armchair_edge_length=10, ... zigzag_edge_length=10, ... layer_rotation_angle=45, ... degrees=True) >>> rotated_bilayer.save(fname='rotated_bilayer.xyz')
The rendered structure looks like:
Now generate BN bilayer-graphene with top layer rotated 45 degrees.
>>> rotated_BN_bilayer = BilayerGrapheneGenerator(armchair_edge_length=10, ... zigzag_edge_length=10, ... basis=['B', 'N'], ... layer_rotation_angle=45, ... degrees=True) >>> rotated_BN_bilayer.save(fname='BN_bilayer_rotated_45deg.xyz')
The rendered structure looks like:
Attributes
NNumber of graphene unit cells. NatomsTotal number of atoms. Natoms_per_layerNumber of atoms per layer. Natoms_per_unit_cellNumber of atoms per unit cell. areaTotal area of graphene supercell. atomsStructure StructureAtoms.basisNanoStructureBasebasis atoms.crystal_cellStructure CrystalCell.element1Basis element 1 element2Basis element 2 fmtstrFormat string. latticeStructure Crystal3DLattice.n1n2r1r2scaling_matrixCrystalCell.scaling_matrix.structurePointer to self. structure_dataAlias for BaseStructureMixin.structure.unit_cellStructure UnitCell.vdw_distancevan der Waals distance. vdw_radiusvan der Waals radius Methods
clear()Clear list of BaseStructureMixin.atoms.from_conventional_cell(**kwargs)See the ConventionalCellGraphene structure class documentation. from_primitive_cell(**kwargs)See the PrimitiveCellGraphene structure class documentation. generate()Generate the full structure coordinates. generate_fname([armchair_edge_length, ...])make_supercell(scaling_matrix[, wrap_coords])Make supercell. read_data(*args, **kwargs)read_dump(*args, **kwargs)read_xyz(*args, **kwargs)rotate(**kwargs)Rotate crystal cell lattice, basis, and unit cell. save([fname])Save structure data. todict()transform_lattice(scaling_matrix[, ...])translate(t[, fix_anchor_points])Translate crystal cell basis. write_data(**kwargs)write_dump(**kwargs)write_xyz(**kwargs)