sknano.generators.SWNTGenerator

class sknano.generators.SWNTGenerator(autogen=True, **kwargs)[source][source]

Class for generating nanotube structures.

Parameters:

n, m : int

Chiral indices defining the nanotube chiral vector \(\mathbf{C}_{h} = n\mathbf{a}_{1} + m\mathbf{a}_{2} = (n, m)\).

nz : int, optional

Number of repeat unit cells in the \(z\) direction, along the length of the nanotube.

element1, element2 : {str, int}, optional

Element symbol or atomic number of basis Atom 1 and 2

bond : float, optional

\(\mathrm{a}_{\mathrm{CC}} =\) distance between nearest neighbor atoms. Must be in units of Angstroms.

Lz : float, optional

Length of nanotube in units of nanometers. Overrides the nz value.

New in version 0.2.5.

tube_length : float, optional

Length of nanotube in units of nanometers. Overrides the nz value.

Deprecated since version 0.2.5: Use Lz instead

fix_Lz : bool, optional

Generate the nanotube with length as close to the specified \(L_z\) as possible. If True, then non integer \(n_z\) cells are permitted.

New in version 0.2.6.

autogen : bool, optional

if True, automatically call generate_unit_cell, followed by generate_structure_data.

verbose : bool, optional

if True, show verbose output

Examples

First, load the SWNTGenerator class.

>>> from sknano.generators import SWNTGenerator

Now let’s generate a \(\mathbf{C}_{\mathrm{h}} = (10, 5)\) SWCNT unit cell.

>>> nt = SWNTGenerator(n=10, m=5)
>>> nt.save_data(fname='10,5_unit_cell.xyz')

The rendered structure looks like (orhographic view):

../_images/10,5_unit_cell_orthographic_view.png

and the perspective view:

../_images/10,5_unit_cell_perspective_view.png

Attributes

Ch SWNT circumference \(|\mathbf{C}_h|\) in
Lz SWNT length \(L_z = L_{\mathrm{tube}}\) in nanometers.
M \(M = np - nq\)
N Number of graphene hexagons in nanotube unit cell.
Natoms Number of atoms in nanotube.
Natoms_per_tube Number of atoms in nanotube \(N_{\mathrm{atoms/tube}}\).
Natoms_per_unit_cell Number of atoms in nanotube unit cell.
Ntubes Number of nanotubes.
R Symmetry vector \(\mathbf{R} = (p, q)\).
T Length of nanotube unit cell \(|\mathbf{T}|\) in Å.
atoms Return structure Atoms.
bond Bond length in .
chiral_angle Chiral angle \(\theta_c\) in degrees.
chiral_type
d \(d=\gcd{(n, m)}\)
dR \(d_R=\gcd{(2n + m, 2m + n)}\)
dt Nanotube diameter \(d_t = \frac{|\mathbf{C}_h|}{\pi}\) in Å.
electronic_type SWNT electronic type.
element1 Element symbol of Atom 1.
element2 Element symbol of Atom 2.
fix_Lz
linear_mass_density Linear mass density of nanotube in g/nm.
m Chiral index \(m\).
n Chiral index \(n\).
nz Number of nanotube unit cells along the \(z\)-axis.
rt Nanotube radius \(r_t = \frac{|\mathbf{C}_h|}{2\pi}\) in Å.
structure Alias to structure_data.
structure_data Return StructureData instance.
t1 \(t_{1} = \frac{2m + n}{d_{R}}\)
t2 \(t_2 = -\frac{2n + m}{d_R}\)
tube_length Alias for SWNT.Lz
tube_mass SWNT mass in grams.
unit_cell_mass Unit cell mass in atomic mass units.
unit_cell_symmetry_params

Methods

generate_structure_data() Generate structure data.
generate_unit_cell() Generate the nanotube unit cell.
save_data([fname, outpath, ...]) Save structure data.
todict() Return dict of SWNT attributes.