sknano.generators.SWNTBundleGenerator¶
-
class
sknano.generators.SWNTBundleGenerator(autogen=True, **kwargs)[source][source]¶ Class for generating nanotube bundles.
New in version 0.2.4.
Parameters: n, m : int
Chiral indices defining the nanotube chiral vector \(\mathbf{C}_{h} = n\mathbf{a}_{1} + m\mathbf{a}_{2} = (n, m)\).
nx, ny, nz : int, optional
Number of repeat unit cells in the \(x, y, z\) dimensions.
element1, element2 : {str, int}, optional
Element symbol or atomic number of basis
Atom1 and 2bond : float, optional
\(\mathrm{a}_{\mathrm{CC}} =\) distance between nearest neighbor atoms. Must be in units of Angstroms.
vdw_spacing : float, optional
van der Waals distance between nearest neighbor tubes
New in version 0.2.5.
bundle_packing : {‘hcp’, ‘ccp’}, optional
Packing arrangement of nanotubes bundles. If
bundle_packingis None, then it will be determined by the bundle_geometry parameter if bundle_geometry is not None. If bothbundle_packingand bundle_geometry are None, thenbundle_packingdefaults to hcp.New in version 0.2.5.
bundle_geometry : {‘triangle’, ‘hexagon’, ‘square’, ‘rectangle’}, optional
Force a specific geometry on the nanotube bundle boundaries.
New in version 0.2.5.
Lx, Ly, Lz : float, optional
length of bundle in \(x, y, z\) dimensions in nanometers. Overrides the \(n_x, n_y, n_z\) cell values.
New in version 0.2.5.
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 bygenerate_structure_data.verbose : bool, optional
if True, show verbose output
Examples
Using the
SWNTBundleGeneratorclass, you can generate structure data for nanotube bundles with either cubic close packed (ccp) or hexagonal close packed (hcp) arrangement of nanotubes. The bundle packing arrangement is set using thebundle_packingparameter.You can also enforce a specific bundle geometry which will try and build the nanotube bundle such that it “fits inside” the boundaries of a specified geometric shape. This allows you to generate hcp bundles that are trianglar, hexagonal, or rectangular in shape, as some of the examples below illustrate.
To start, let’s generate an hcp bundle of \(C_{\mathrm{h}} = (10, 5)\) SWCNTs and cell count \(n_x=10, n_y=3, n_z=5\).
>>> from sknano.generators import SWNTBundleGenerator >>> SWCNTbundle = SWNTBundleGenerator(n=10, m=5, nx=10, ny=3, nz=5) >>> SWCNTbundle.save_data()
The rendered structure looks like:
Now let’s generate a nice hexagon bundle, 3 tubes wide, with \(C_{\mathrm{h}} = (6, 5)\).
>>> SWCNTbundle = SWNTBundleGenerator(n=6, m=5, nz=5, ... bundle_geometry='hexagon') >>> SWCNTbundle.save_data()
which looks like:
Remember, all of the
save_datamethods allow you to rotate the structure data before saving:>>> SWCNTbundle.save_data(fname='0605_hcp_7tube_hexagon_rot-30deg.xyz', ... rot_axis='z', rotation_angle=30)
Now, just because we can, let’s make a big ass hexagon bundle with \(C_{\mathrm{h}} = (10, 0)\).
>>> BIGASSHEXABUN = SWNTBundleGenerator(10, 0, nx=25, ny=25, nz=1, ... bundle_geometry='hexagon') >>> BIGASSHEXABUN.save_data()
Take a look at the 469 \((10, 0)\) unit cells in this big ass bundle!
Lastly, here’s a look at a bundle generated with cubic close packed bundle arrangement:
>>> SWCNTbundle = SWNTBundleGenerator(10, 10, nx=3, ny=3, nz=5, ... bundle_packing='ccp') >>> SWCNTbundle.save_data()
The rendered ccp structure looks like:
Attributes
ChSWNT circumference \(|\mathbf{C}_h|\) in Å LxLyLzSWNT length \(L_z = L_{\mathrm{tube}}\) in nanometers. M\(M = np - nq\) NNumber of graphene hexagons in nanotube unit cell. NatomsNumber of atoms in nanotube. Natoms_per_bundleNatoms_per_tubeNumber of atoms in nanotube \(N_{\mathrm{atoms/tube}}\). Natoms_per_unit_cellNumber of atoms in nanotube unit cell. NtubesRSymmetry vector \(\mathbf{R} = (p, q)\). TLength of nanotube unit cell \(|\mathbf{T}|\) in Å. atomsReturn structure Atoms.bondBond length in Å. bundle_densitybundle_massbundle_packingchiral_angleChiral angle \(\theta_c\) in degrees. chiral_typed\(d=\gcd{(n, m)}\) dR\(d_R=\gcd{(2n + m, 2m + n)}\) dtNanotube diameter \(d_t = \frac{|\mathbf{C}_h|}{\pi}\) in Å. electronic_typeSWNT electronic type. element1Element symbol of Atom1.element2Element symbol of Atom2.fix_Lzlinear_mass_densityLinear mass density of nanotube in g/nm. mChiral index \(m\). nChiral index \(n\). nxNumber of nanotubes along the \(x\)-axis. nyNumber of nanotubes along the \(y\)-axis. nzNumber of nanotube unit cells along the \(z\)-axis. rtNanotube radius \(r_t = \frac{|\mathbf{C}_h|}{2\pi}\) in Å. structureAlias to structure_data.structure_dataReturn StructureDatainstance.t1\(t_{1} = \frac{2m + n}{d_{R}}\) t2\(t_2 = -\frac{2n + m}{d_R}\) tube_lengthAlias for SWNT.Lztube_massSWNT mass in grams. unit_cell_massUnit cell mass in atomic mass units. unit_cell_symmetry_paramsMethods
compute_bundle_params()Compute/update nanotube bundle parameters. generate_bundle()generate_structure_data()Generate structure data. generate_unit_cell()Generate the nanotube unit cell. save_data([fname, outpath, ...])Save structure data. todict()Return dictof SWNT attributes.