MWNTGenerator¶
-
class
sknano.generators.MWNTGenerator(*args, from_scaling_matrix=False, **kwargs)[source] [edit on github][source]¶ Bases:
sknano.generators.NanotubeBundleGeneratorBase,sknano.generators.MWNTGeneratorBase,sknano.core.structures.MWNTClass for generating multi-walled nanotubes (MWNT).
Changed in version 0.4.0:
MWNTGeneratornow generates both single MWNTs and MWNT bundles.New in version 0.2.8.
Parameters: - Ch_list (
list, optional) – (n,m) for eachSWNTwall inMWNT. - Nwalls (int, optional) – Number of
SWNTwalls inMWNT. - Lz (float, optional) –
MWNTlength in Angstroms. - min_wall_diameter (float, optional) – Minimum
MWNTwall diameter, in units of Angstroms. - max_wall_diameter (float, optional) – Maximum
MWNTwall diameter, in units of Angstroms. - max_walls (int, optional) – Maximum number of
MWNTwalls. - chiral_types ({None, 'armchair', 'zigzag', 'achiral', 'chiral'}, optional) – If
None, thechiral_typeof eachMWNTwalls will be random and determined by the set of randomly selected chiral indices (n,m). - wall_spacing (float, optional) – Inter-wall spacing in units of Angstroms. Default value is the van der Waals interaction distance of 3.4 Angstroms.
- ny (nx,) – Number of repeat unit cells in the \(x, y\) dimensions.
- vdw_radius (float, optional) – van der Waals radius of nanotube atoms
- basis ({
list}, optional) –List of
strs of element symbols or atomic number of the two atom basis (default: [‘C’, ‘C’])New in version 0.3.10.
- element2 (element1,) –
Element symbol or atomic number of basis
Atom1 and 2Deprecated since version 0.3.10: Use
basisinstead - bond (float, optional) – \(\mathrm{a}_{\mathrm{CC}} =\) distance between nearest neighbor atoms, in units of Angstroms.
- bundle_packing ({'hcp', 'ccp'}, optional) – Packing arrangement of MWNT bundles. If
bundle_packingisNone, then it will be determined by thebundle_geometryparameter ifbundle_geometryis notNone. If bothbundle_packingandbundle_geometryareNone, thenbundle_packingdefaults tohcp. - bundle_geometry ({'triangle', 'hexagon', 'square', 'rectangle'}, optional) –
- autogen (bool, optional) – if
True, automatically callgenerate. - verbose (bool, optional) – if
True, show verbose output
Examples
>>> from sknano.generators import MWNTGenerator >>> MWNTGenerator(Nwalls=5, min_wall_diameter=10, Lz=50).save()
The above command generated a 5 wall, 50 Angstrom long
MWNT. The only constraints on theMWNTwall chiralities were the diameter constraints imposed by themin_wall_diameterparameter, which set the minimum wall diameter to 10 Angstroms, as well as the minimum wall-to-wall separation, which defaults to the van der Waals distance of 3.4 Angstroms.This
MWNTchirality may be written as:\(\mathbf{C}_{\mathrm{h}} = (8,7)@(17,8)@(9,24)@(27,18)@(22,32)\)
Here’s a colorful rendering of the generated
MWNTstructure:
In the next example, we generate a
MWNTbundle.>>> mwntbundle = MWNTGenerator(Nwalls=5, min_wall_diameter=5, Lz=50, ... bundle_geometry='hexagon') >>> mwntbundle.save()
Attributes
Ch_listList of chiralities. LxAxis-aligned length along the x-axis in Angstroms.LyAxis-aligned length along the y-axis in Angstroms.LzMWNT length in Angstroms. Lz_listMWNT length \(L_z = L_{\mathrm{tube}}\) in Angstroms. NatomsN atoms. Natoms_listlistofNatomsper nanotube in bundle.Natoms_per_bundleAlias for Natoms.Natoms_per_tubeAlias for Natoms_list.Natoms_per_wallAlias for MWNT.Natoms_listNtubesNumber of nanotubes in bundle. NwallsNumber of MWNTwalls.T_listLength of MWNTunit cell \(|\mathbf{T}|\) in Å.atomsStructure Atoms.basisNanoStructureBasebasis objects.bundle_densityCompute the nanotube bundle density. bundle_geometryBundle geometry. bundle_massAn alias for mass.bundle_packingBundle packing. chiral_setSet of all chiral types in MWNT.chiral_typesList of chiral types for each MWNTwall.crystal_cellStructure CrystalCell.dtMWNTwall diameters \(d_t=\frac{|\mathbf{C}_h|}{\pi}\) in Å.dt_listList of MWNTSWNTwall diametersdt\(d_t=\frac{|\mathbf{C}_h|}{\pi}\) in Å.element1Basis element 1 element2Basis element 2 fmtstrFormat string. latticeStructure Crystal3DLattice.lattice_shiftLattice displacement vector. massTotal mass of atoms. max_wall_diameterMaximum wall diameter. max_wallsMaximum number of walls. min_wall_diameterMinimum wall diameter. nxNumber of nanotubes along the \(x\)-axis. nyNumber of nanotubes along the \(y\)-axis. nzNumber of nanotube unit cells along the \(z\)-axis. nz_listNumber of nanotube unit cells along the \(z\)-axis. rtMWNTwall radii \(r_t=\frac{|\mathbf{C}_h|}{2\pi}\) in Å.rt_listList of MWNTSWNTwall radiirt\(r_t=\frac{|\mathbf{C}_h|}{2\pi}\) in Å.scaling_matrixCrystalCell.scaling_matrix.structureAn alias to self.tube_massAn alias for mass.unit_cellStructure UnitCell.vdw_distanceVan der Waals distance. vdw_radiusVan der Waals radius wall_diametersAlias for MWNTMixin.dt_list.wall_massesList of MWNTSWNTwall diametersdt\(d_t=\frac{|\mathbf{C}_h|}{\pi}\) in Å.wall_radiiAlias for MWNTMixin.rt_list.wall_spacingWall-to-wall spacing. wallsList of MWNTSWNTwall structures.Methods
clear()Clear list of StructureMixin.atoms.finalize()Finalize structure data by clipping region bounds if fix_LzisTrue.generate([finalize])Generate structure data. generate_Ch_list([Nwalls, max_walls, ...])Generate list of chiralities. generate_bundle_coords()Generate coordinates of bundle tubes. generate_dt_mask(dt[, max_dt_diff])Generate boolean mask array. generate_fname([Ch_list, Nwalls, Ntubes, ...])Generate a filename string. generate_unit_cell()Generate Nanotube unit cell. get_wall(Ch)Return the SWNTstructure with chiralityCh.init_bundle_parameters()Initialize bundle attributes. make_supercell(scaling_matrix[, wrap_coords])Make supercell. rotate(**kwargs)Rotate crystal cell lattice, basis, and unit cell. save([fname, outpath, structure_format, ...])Save structure data. todict()Return dictof constructor parameters.transform_lattice(scaling_matrix[, ...])Transform structure lattice. translate(t[, fix_anchor_points])Translate crystal cell lattice, basis, and unit cell. update_Ch_list([Nwalls, min_wall_diameter, ...])Update MWNTMixin.Ch_list.write(*args, **kwargs)Write structure data to file. write_data(**kwargs)Write LAMMPS data file. write_dump(**kwargs)Write LAMMPS dump file. write_pdb(**kwargs)Write pdb file. write_xyz(**kwargs)Write xyz file. Methods Summary
finalize()Finalize structure data by clipping region bounds if fix_LzisTrue.generate_fname([Ch_list, Nwalls, Ntubes, ...])Generate a filename string. save([fname, outpath, structure_format, ...])Save structure data. Methods Documentation
-
finalize()[source] [edit on github][source]¶ Finalize structure data by clipping region bounds if
fix_LzisTrue.
-
classmethod
generate_fname(Ch_list=None, Nwalls=None, Ntubes=None, Lz=None, nx=None, ny=None, nz=None, bundle_geometry=None, bundle_packing=None, **kwargs)[source] [edit on github][source]¶ Generate a filename string.
-
save(fname=None, outpath=None, structure_format=None, center_centroid=True, **kwargs)[source] [edit on github][source]¶ Save structure data.
See
savemethod for documentation.
- Ch_list (