Skip to content

Add single-walled nanotube creation via 2D→cylindrical folding#275

Draft
Copilot wants to merge 1 commit into
mainfrom
copilot/add-single-walled-nanotube-creation
Draft

Add single-walled nanotube creation via 2D→cylindrical folding#275
Copilot wants to merge 1 commit into
mainfrom
copilot/add-single-walled-nanotube-creation

Conversation

Copilot AI commented Jun 1, 2026

Copy link
Copy Markdown

Adds create_nanotube() to made, constructing single-walled nanotubes by folding a 2D nanoribbon into a cylinder — the same builder-chain pattern used for nanoribbons.

Approach

  • Internally builds a rectangular-lattice nanoribbon (rectangular lattice is required; non-rectangular distorts the tube)
  • Applies _fold_to_nanotube(): maps nanoribbon y-coordinates (width dimension) to angular position θ = 2π(y − y_min)/C, wrapping atoms onto a cylinder of radius R = C/2π
  • The (z − z_center) radial offset term generalizes correctly to multilayer materials
  • New lattice: a = tube axis length (unchanged), b = c = 2R + vacuum_around_tube

New module: pristine_structures/one_dimensional/nanotube/

  • NanotubeConfiguration — wraps NanoribbonConfiguration + vacuum_around_tube
  • NanotubeBuilderBaseSingleBuilder subclass; _generate() delegates to NanoribbonBuilder, _post_process() applies the cylindrical fold
  • create_nanotube() — convenience function (main API)

Usage

from mat3ra.made.tools.build.pristine_structures.one_dimensional.nanotube import create_nanotube

nanotube = create_nanotube(
    material=graphene,
    miller_indices_2d=(0, 1),   # (0,1) = zigzag, (1,1) = armchair
    width=4,
    length=4,
    vacuum_around_tube=10.0,    # Å of vacuum around cross-section
)

Copilot AI changed the title Add single-walled nanotube creation via 2D-to-cylindrical folding Add single-walled nanotube creation via 2D→cylindrical folding Jun 1, 2026
Copilot AI requested a review from VsevolodX June 1, 2026 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants