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.MWNT

Class for generating multi-walled nanotubes (MWNT).

Changed in version 0.4.0: MWNTGenerator now generates both single MWNTs and MWNT bundles.

New in version 0.2.8.

Parameters:
  • Ch_list (list, optional) – (n, m) for each SWNT wall in MWNT.
  • Nwalls (int, optional) – Number of SWNT walls in MWNT.
  • Lz (float, optional) – MWNT length in Angstroms.
  • min_wall_diameter (float, optional) – Minimum MWNT wall diameter, in units of Angstroms.
  • max_wall_diameter (float, optional) – Maximum MWNT wall diameter, in units of Angstroms.
  • max_walls (int, optional) – Maximum number of MWNT walls.
  • chiral_types ({None, 'armchair', 'zigzag', 'achiral', 'chiral'}, optional) – If None, the chiral_type of each MWNT walls 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 Atom 1 and 2

    Deprecated since version 0.3.10: Use basis instead

  • 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_packing is None, then it will be determined by the bundle_geometry parameter if bundle_geometry is not None. If both bundle_packing and bundle_geometry are None, then bundle_packing defaults to hcp.
  • bundle_geometry ({'triangle', 'hexagon', 'square', 'rectangle'}, optional) –
  • autogen (bool, optional) – if True, automatically call generate.
  • 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 the MWNT wall chiralities were the diameter constraints imposed by the min_wall_diameter parameter, 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 MWNT chirality 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 MWNT structure:

../_images/5wall_mwnt_(8,7)@(17,8)@(9,24)@(27,18)@(22,32)-04.png

In the next example, we generate a MWNT bundle.

>>> mwntbundle = MWNTGenerator(Nwalls=5, min_wall_diameter=5, Lz=50,
...                            bundle_geometry='hexagon')
>>> mwntbundle.save()
../_images/5wall_mwnt_(1,6)@(11,7)@(18,9)@(31,2)@(41,0)_hcp_7tube_hexagon-perspective_view-01.png

Attributes

Ch_list List of chiralities.
Lx Axis-aligned length along the x-axis in Angstroms.
Ly Axis-aligned length along the y-axis in Angstroms.
Lz MWNT length in Angstroms.
Lz_list MWNT length \(L_z = L_{\mathrm{tube}}\) in Angstroms.
Natoms N atoms.
Natoms_list list of Natoms per nanotube in bundle.
Natoms_per_bundle Alias for Natoms.
Natoms_per_tube Alias for Natoms_list.
Natoms_per_wall Alias for MWNT.Natoms_list
Ntubes Number of nanotubes in bundle.
Nwalls Number of MWNT walls.
T_list Length of MWNT unit cell \(|\mathbf{T}|\) in Å.
atoms Structure Atoms.
basis NanoStructureBase basis objects.
bundle_density Compute the nanotube bundle density.
bundle_geometry Bundle geometry.
bundle_mass An alias for mass.
bundle_packing Bundle packing.
chiral_set Set of all chiral types in MWNT.
chiral_types List of chiral types for each MWNT wall.
crystal_cell Structure CrystalCell.
dt MWNT wall diameters \(d_t=\frac{|\mathbf{C}_h|}{\pi}\) in Å.
dt_list List of MWNT SWNT wall diameters dt \(d_t=\frac{|\mathbf{C}_h|}{\pi}\) in Å.
element1 Basis element 1
element2 Basis element 2
fmtstr Format string.
lattice Structure Crystal3DLattice.
lattice_shift Lattice displacement vector.
mass Total mass of atoms.
max_wall_diameter Maximum wall diameter.
max_walls Maximum number of walls.
min_wall_diameter Minimum wall diameter.
nx Number of nanotubes along the \(x\)-axis.
ny Number of nanotubes along the \(y\)-axis.
nz Number of nanotube unit cells along the \(z\)-axis.
nz_list Number of nanotube unit cells along the \(z\)-axis.
rt MWNT wall radii \(r_t=\frac{|\mathbf{C}_h|}{2\pi}\) in Å.
rt_list List of MWNT SWNT wall radii rt \(r_t=\frac{|\mathbf{C}_h|}{2\pi}\) in Å.
scaling_matrix CrystalCell.scaling_matrix.
structure An alias to self.
tube_mass An alias for mass.
unit_cell Structure UnitCell.
vdw_distance Van der Waals distance.
vdw_radius Van der Waals radius
wall_diameters Alias for MWNTMixin.dt_list.
wall_masses List of MWNT SWNT wall diameters dt \(d_t=\frac{|\mathbf{C}_h|}{\pi}\) in Å.
wall_radii Alias for MWNTMixin.rt_list.
wall_spacing Wall-to-wall spacing.
walls List of MWNT SWNT wall structures.

Methods

clear() Clear list of StructureMixin.atoms.
finalize() Finalize structure data by clipping region bounds if fix_Lz is True.
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 SWNT structure with chirality Ch.
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 dict of 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_Lz is True.
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_Lz is True.

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 save method for documentation.