Tutorials and Examples

The current state of the tutorial leaves much to be desired. For now, please see the module doc pages for examples to help get you started.

Tutorial: structure generator classes

The generators module provides the following classes for generating nanostructures:

Nanotube Structure Generators

For example, if you have a list of chiralities that you want structure data for, you can do something like this from within an interactive session:

>>> from sknano.core.structures import generate_Ch_list
>>> from sknano.generators import SWNTGenerator
>>> # Generate your list of (n, m) chiralities
>>> Ch_list = generate_Ch_list(ni=5, nf=25, mi=0, mf=25, handedness='right')
>>> for Ch in Ch_list:
...     SWNTGenerator(Ch).save(structure_format='data')
In [1]: from sknano.generators import SWNTGenerator

In [2]: bundle = SWNTGenerator((10, 5), nz=2, bundle_geometry='hexagon')

In [3]: bundle.save()
writing 1005_1cellx1cellx2cells_hcp_7tube_hexagon

Tutorial: command-line scripts

The tutorials below describe the scripts available in the scripts package.

nanogen script

The nanogen script provides a command-line interface to the structure generator classes in the generators package.

nanogenui script

The nanogenui script launches the Nanogen GUI app.

Examples

Most module doc pages include relevant examples. Below is a list with links to all examples.

Todo

Write script to walk the package directories, parse examples from docstrings, autogenerate literalincludes directive, and reproduce the content here.