sknano.generators.GrapheneGenerator¶
-
class
sknano.generators.GrapheneGenerator(autogen=True, **kwargs)[source][source]¶ N-layer graphene generator class.
Parameters: length : float
Length of graphene sheet in nanometers
width : float
Width of graphene sheet in nanometers
edge : {‘AC’, ‘armchair’, ‘ZZ’, ‘zigzag’}, optional
ArmChair or ZigZag edge along the length of the sheet.
element1, element2 : {str, int}, optional
Element symbol or atomic number of basis
Atom1 and 2bond : float, optional
bond length between nearest-neighbor atoms in Angstroms.
nlayers : int, optional
Number of graphene layers.
layer_spacing : float, optional
Distance between layers in Angstroms.
stacking_order : {‘AA’, ‘AB’}, optional
Stacking order of graphene layers
autogen : bool, optional
automatically generate unit cell and full structure
verbose : bool, optional
verbose output
Notes
The
GrapheneGeneratorclass and its subclasses generate graphene with either an armchair or zigzag edge using a 4-atom conventional unit cell. If you want to generate graphene as an unrolled nanotube, see theUnrolledSWNTGeneratorclass.See also
Examples
Start an interactive python or ipython session, then import the
GrapheneGeneratorclass.>>> from sknano.generators import GrapheneGenerator
Now generate a 20 nm x 1 nm armchair edge graphene nano-ribbon.
>>> ACG = GrapheneGenerator(length=20, width=1, edge='AC')
Save structure data in xyz format:
>>> ACG.save_data()
The rendered structure look like:
Now let’s generate a 20 nm x 1 nm zigzag edge graphene nano-ribbon.
>>> ZZG = GrapheneGenerator(length=20, width=1, edge='ZZ') >>> ZZG.save_data()
The rendered structure looks like:
Now generate 25 nm x 5 nm, armchair edge, 5 layer, AB-stacked graphene.
>>> ACG_5layers = GrapheneGenerator(length=25, width=5, edge='AC', ... nlayers=5) >>> ACG_5layers.save_data()
The rendered structure looks like:
Now generate single layer, 10 nm x 10 nm sheet of BN Graphene.
>>> BN_graphene = GrapheneGenerator(length=10, width=10, edge='AC', ... element1='B', element2='N') >>> BN_graphene.save_data()
The rendered structure looks like:
Now, just because we can, generate a 5 nm x 5 nm sheet of Uranium-Einsteinium Graphene.
>>> UEs_graphene = GrapheneGenerator(width=5, length=5, edge='zigzag', ... element1='U', element2='Es') >>> UEs_graphene.save_data()
The rendered structure looks like:
Attributes
atomsReturn structure Atoms.bondBond length in Å. element1Element symbol of Atom1.element2Element symbol of Atom2.structureAlias to structure_data.structure_dataReturn StructureDatainstance.Methods
generate_structure_data()Generate the full structure coordinates. generate_unit_cell()Generate the graphene unit cell. save_data([fname, outpath, ...])Save structure data.