Skip to content

stb-nanotube

Nanotube/Nanoribbon Builder · menu code 4.4 · guide: 4.4 Nanotube/Nanoribbon Builder

usage: stb-nanotube [-h] -f FILENAME --chirality N M [--mode {tube,ribbon}]
                    [--repeats REPEATS] [--vacuum-gap VACUUM_GAP]
                    [--min-vacuum-size MIN_VACUUM_SIZE] [--lattice-tol LATTICE_TOL]
                    [--search-bound SEARCH_BOUND] [--symprec SYMPREC] [--passivate]
                    [--passivant PASSIVANT] [--cutoff CUTOFF]
                    [--bond-length BOND_LENGTH] [--ml-relax] [--ml-relax-cell]
                    [--model {small,medium,large}] [--custom-model PATH]
                    [--custom-model-card JSON] [--device {cpu,cuda}] [--view]
                    [-o OUTPUT] [-v] [--no-intro]

Rolls a 2D monolayer FDF into a nanotube or nanoribbon.
Chirality (n, m) picks the vector to roll around (tube) or the finite
width direction (ribbon); works for any oblique 2D lattice, not just
hexagonal (no gcd/(n-m)%3d hexagonal-only shortcut is used).

options:
  -h, --help            show this help message and exit
  -f FILENAME, --file FILENAME
                        Path to the input 2D monolayer structure file (.fdf).
  --chirality N M       Chirality indices (n, m), e.g. --chirality 6 0
  --mode {tube,ribbon}  'tube': roll into a cylinder. 'ribbon': finite-width flat strip. Default: tube.
  --repeats REPEATS     Axial repeats (tube) or width repeats along the chirality vector (ribbon). Default: 1.
  --vacuum-gap VACUUM_GAP
                        Minimum empty span (Angstrom) used to detect which axis of the INPUT monolayer is vacuum-padded (default: 10.0). Same meaning as stb-kgrid/stb-kpath's --vacuum-gap.
  --min-vacuum-size MIN_VACUUM_SIZE
                        Vacuum padding (Angstrom) added around the generated tube/ribbon (default: 15.0). Same meaning as stb-slab's --min-vacuum-size.
  --lattice-tol LATTICE_TOL
                        Fractional-coordinate tolerance for the C x T cell-membership test (default: 1e-6).
  --search-bound SEARCH_BOUND
                        Override the search range for the translation vector T (default: auto, 3*(|n|+|m|)+5).
  --symprec SYMPREC     Symmetry tolerance, Ang, for the before/after symmetry table (default: 0.01).
  --passivate           Cap dangling bonds on the built tube/ribbon with a passivating atom (same logic as stb-passivate/stb-slab). A properly closed, axially-periodic tube has no dangling bonds to begin with (every atom already has 3 real neighbors) -- this mainly matters for --mode ribbon, whose two finite edges are real, physical dangling bonds. Only single-missing-bond sites are auto-passivated; sites missing 2+ bonds are reported instead of guessed.
  --passivant PASSIVANT
                        Element to cap dangling bonds with, only with --passivate (default: H).
  --cutoff CUTOFF       Neighbor-search radius in Angstrom for --passivate. Default: auto-detected (see stb-passivate --help).
  --bond-length BOND_LENGTH
                        Passivant bond length in Angstrom for --passivate. Default: auto per species pair (see stb-passivate --help).
  --ml-relax            Pre-relax the built tube/ribbon with a MACE potential before writing it out (needs the optional 'ml' extra: pip install stb_suite[ml]) -- positions only by default. Off by default.
  --ml-relax-cell       With --ml-relax, also relax the axial period (the vacuum-padded width/thickness axes always stay exactly fixed). Only valid together with --ml-relax.
  --model {small,medium,large}
                        MACE-MP-0 foundation model size for --ml-relax (default: medium).
  --custom-model PATH   Path to a custom fine-tuned .model file for --ml-relax, instead of a MACE-MP-0 foundation size.
  --custom-model-card JSON
                        Model card of the --custom-model file: the mlff_model_card.json that stb-mlffAnalysis wrote next to it (training data, level of theory, accuracy, energy scale). Required with --custom-model -- the card is checked against the model file and used to warn when a structure is outside what the model was trained on.
  --device {cpu,cuda}   Device to run the MACE model on (default: cpu).
  --view                Open an interactive 3D view (via ASE) comparing the input monolayer and the final tube/ribbon (page through frames in ase-gui) after writing the output file. Needs a display. Off by default.
  -o OUTPUT, --output OUTPUT
                        Output .fdf file name (default: nanotube.fdf).
  -v, --version         show program's version number and exit
  --no-intro            Do not show the introduction

Usage examples:
  stb-nanotube -f graphene.fdf --chirality 6 0 --mode tube
  stb-nanotube -f graphene.fdf --chirality 6 0 --mode ribbon --repeats 4
  stb-nanotube -f graphene.fdf --chirality 6 0 --mode ribbon --repeats 4 --passivate
  stb-nanotube -f graphene.fdf --chirality 6 0 --ml-relax --view