sknano.generators.SWNTGenerator¶
-
class
sknano.generators.
SWNTGenerator
(*args, *, autogen=True, **kwargs)[source][source]¶ Class for generating
SWNT
structures.Parameters: nz :
int
, optionalNumber of repeat unit cells in the z direction, along the length of the nanotube.
basis : {
list
}, optionalList of
str
s 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
Atom
1 and 2Deprecated since version 0.3.10: Use
basis
insteadbond : float, optional
aCC= 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
fix_Lz : bool, optional
Generate the nanotube with length as close to the specified Lz as possible. If True, then non integer nz cells are permitted.
New in version 0.2.6.
autogen : bool, optional
if True, automatically 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 Ch=(10,5)
SWNT
unit cell.>>> swnt = SWNTGenerator((10, 5)) >>> swnt.save(fname='10,5_unit_cell.xyz') >>> # note that there are two other alternative, but equivalent >>> # means of passing arguments to SWNTGenerator constructor: >>> # SWNTGenerator(10, 5) and SWNTGenerator(n=10, m=5)
Here’s a nice ray traced rendering of the generated (10,5)
SWNT
unit cell.Attributes
Ch
SWNT circumference |Ch| in Å Ch_vec
SWNT chiral vector. Lz
SWNT length Lz=Ltube 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 Natoms/tube. Natoms_per_unit_cell
Number of atoms in nanotube unit cell. Ntubes
Number of nanotubes. R
Symmetry vector R=(p,q). T
Length of nanotube unit cell |T| in Å. Tvec
SWNT translation vector. atoms
Structure StructureAtoms
.basis
NanoStructureBase
basis atoms.chiral_angle
Chiral angle θc in degrees. chiral_type
SWNT chiral type. crystal_cell
Structure CrystalCell
.d
d=gcd 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
Basis element 1 element2
Basis element 2 fix_Lz
fmtstr
Format string. lattice
Structure Crystal3DLattice
.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 Å. scaling_matrix
CrystalCell.scaling_matrix
.structure
Pointer to self. structure_data
Alias for BaseStructureMixin.structure
.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
Structure UnitCell
.unit_cell_mass
Unit cell mass in atomic mass units. unit_cell_symmetry_params
Tuple of SWNT unit cell symmetry parameters. vdw_distance
van der Waals distance. vdw_radius
van der Waals radius Methods
clear
()Clear list of BaseStructureMixin.atoms
.generate
()Generate structure data. generate_fname
([n, m, nz, fix_Lz])generate_unit_cell
()Generate the nanotube unit cell. 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, outpath, structure_format, ...])Save structure data. todict
()Return dict
of SWNT attributes.transform_lattice
(scaling_matrix[, ...])translate
(t[, fix_anchor_points])Translate crystal cell basis. write_data
(**kwargs)write_dump
(**kwargs)write_xyz
(**kwargs)