vibe-sketcherDocumentation

vibesketcher.document.cnt_junctions

Explicit CNT-linker-metal junction models (#240).

A junction is assembled from three explicitly chosen parts by explicit graph and geometry edits; nothing is perceived or guessed:

  • a finite single-walled carbon nanotube segment, hydrogen-capped at both rims, with the attachment carbon chosen by index: end_on takes a rim carbon of the open lower end (its free valence goes to the linker instead of a hydrogen cap), sidewall takes a wall carbon of the central period and converts it from sp2 to sp3 (its three tube bonds become single bonds; the edit is recorded);

  • a linker given as SMILES with two connection markers, [*:1] towards the tube and [*:2] towards the metal, embedded with RDKit (fixed seed) and placed by the marker vectors (the connection-point convention of #202);

  • a metal slab cut from the Cu or Au template (#190/#232) with one surface site chosen explicitly: top, bridge (short/long on fcc(110)) or hollow (fcc/hcp on fcc(111), four-fold on (100) and (110)).

Every bond the assembly adds is listed with its rationale. The structure is an unrelaxed construction: it is not a relaxed geometry, a binding energy, a conductance or transport result, nor a validated atomistic junction.

Source reconstruction (primary acceptance source)

C. P. Nawarathne, A. Hoque, G. R. Dangel and N. T. Alvarez, Nanoscale Adv. 6, 428 (2024), doi:10.1039/d3na00500c, main text section 2.2 and Tables 1-2 (the ESI is not in the literature library, so nothing here comes from it). The paper states: open-ended semiconducting (8,0) SWCNTs 15 angstrom long carrying COOH groups; an aminophenyl linker grafted on Cu from the p-phenylenediamine-derived diazonium salt; CNT attachment by amide formation between the CNT carboxyl and the linker amine, releasing water; the aminophenyl para carbon bonded to Cu(100), (110) or (111). From top or hollow (“hole”) starting sites the optimised Cu-C geometry is a bridge (two Cu-C bonds) on every facet except Cu(111) top, which stays a single Cu-C bond (Table 1). The Table 1 Cu-C distances of the final geometries are used as placement distances below and nothing else is taken from the paper’s optimised structures. Sidewall bonding of carboxylated aligned CNTs to aminophenyl-grafted Cu and Au (C. P. Nawarathne et al., ACS Appl. Nano Mater. 6, 22001 (2023), doi:10.1021/acsanm.3c04137) and to Au films (ACS Appl. Mater. Interfaces (2025), doi:10.1021/acsami.4c19859) is reported experimentally, with the same amide chemistry and no atomistic model; any Au-C or hollow-site distance is therefore illustrative (the sum of RDKit covalent radii, Cordero et al., Dalton Trans. 2008, 2832) and labelled so.

Geometry

Surface sites are the points above the top layer equidistant from one (top), two (bridge), three (hollow, fcc(111)) or four (hollow, fcc(100) and (110)) top-layer atoms; an fcc(111) hollow is hcp when a second-layer atom lies beneath it and fcc otherwise. The bonded linker carbon sits at height sqrt(d^2 - rho^2) above the site, where d is the metal-carbon distance and rho the site’s in-plane radius; d <= rho is refused. Vector alignment uses Rodrigues rotations; the tube’s rotation about the linker-tube bond is the 5-degree grid value with the largest closest contact (smallest angle on ties), or the stated cnt_rotation_deg.

Module Attributes

DEFAULT_LINKER

CNT-C(=O)-NH-C6H4-metal.

FACETS

Metal and Miller index pairs this builder places sites on.

NOT_CLAIMED

What a junction model is not; carried in every record.

Functions

attachment_candidates([n, m, periods, ...])

The explicit list attachment_carbon indexes, in the tube's own frame.

build_cnt_junction(recipe[, document])

Assemble the junction the recipe states, or refuse with a coded reason.

preview(recipe[, document])

Build without storing: the record and structure, or the coded refusal.

surface_sites(metal, miller, *[, layers, ...])

The explicit site catalogue around one top-layer atom of a template slab.

Classes

CntJunctionRecipe(*[, kind, layers, repeat, ...])

A CNT-linker-metal junction; every choice explicit (#240).

Exceptions

JunctionRefused(code, message)

A junction the builder will not construct; code names the rule.

vibesketcher.document.cnt_junctions.DEFAULT_LINKER = '[*:1]C(=O)Nc1ccc([*:2])cc1'

CNT-C(=O)-NH-C6H4-metal.

Type:

The amide-aminophenyl linker of the source

vibesketcher.document.cnt_junctions.NOT_CLAIMED = ['relaxation (positions, linker conformation, metal-carbon distance or cell)', 'the stable or lowest-energy site (the source reports hollow and most top starts relaxing to bridge)', 'binding, adsorption or reaction energy', 'conductance, interface resistance or electron transport', 'a validated atomistic CNT-metal junction']

What a junction model is not; carried in every record.

class vibesketcher.document.cnt_junctions.CntJunctionRecipe(*, kind='cnt_junction', identifier, metal, miller, layers=3, repeat=(6, 6), vacuum=15.0, site, site_variant=None, surface_atom=None, site_index=0, metal_carbon_distance=None, n=8, m=0, periods=4, attachment, attachment_carbon, cnt_rotation_deg=None, linker_smiles='[*:1]C(=O)Nc1ccc([*:2])cc1', linker_rotation_deg=0.0, tube_linker_distance=1.5, boundary='slab_2d', clash_fraction=0.75, min_image_separation=3.0, max_atoms=1500, charge=None, multiplicity=None, charge_spin_source=None)[source]

Bases: BaseModel

A CNT-linker-metal junction; every choice explicit (#240).

Parameters:
model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

kind: Literal['cnt_junction']
identifier: str
metal: Literal['Cu', 'Au']
miller: tuple[int, int, int]
layers: int
repeat: tuple[int, int]
vacuum: float
site: Literal['top', 'bridge', 'hollow']
site_variant: Literal['short', 'long', 'fcc', 'hcp'] | None

short/long bridge on fcc(110); fcc/hcp hollow on fcc(111); none elsewhere.

surface_atom: str | None

nearest the cell centre.

Type:

The top-layer reference atom (a slab site id); None

site_index: int

Which of the equivalent sites around the reference atom (sorted by azimuth).

metal_carbon_distance: float | None

Table 1 or illustrative.

Type:

Metal-carbon placement distance (angstrom); None

n: int
m: int
periods: int
attachment: Literal['end_on', 'sidewall']
attachment_carbon: int

Index into attachment_candidates() for this tube and attachment mode.

cnt_rotation_deg: float | None
linker_smiles: str
linker_rotation_deg: float
tube_linker_distance: float
boundary: Literal['slab_2d', 'slab_3d', 'cluster']
clash_fraction: float
min_image_separation: float
max_atoms: int
charge: int | None
multiplicity: int | None
charge_spin_source: str | None
facet()[source]
Return type:

str

exception vibesketcher.document.cnt_junctions.JunctionRefused(code, message)[source]

Bases: BuildRefused

A junction the builder will not construct; code names the rule.

Parameters:
Return type:

None

vibesketcher.document.cnt_junctions.attachment_candidates(n=8, m=0, periods=4, attachment='end_on')[source]

The explicit list attachment_carbon indexes, in the tube’s own frame.

Parameters:
Return type:

dict[str, Any]

vibesketcher.document.cnt_junctions.build_cnt_junction(recipe, document=None)[source]

Assemble the junction the recipe states, or refuse with a coded reason.

Parameters:
Return type:

PeriodicStructure

vibesketcher.document.cnt_junctions.preview(recipe, document=None)[source]

Build without storing: the record and structure, or the coded refusal.

Parameters:
Return type:

dict[str, Any]

vibesketcher.document.cnt_junctions.surface_sites(metal, miller, *, layers=3, repeat=(6, 6), surface_atom=None)[source]

The explicit site catalogue around one top-layer atom of a template slab.

Parameters:
Return type:

dict[str, Any]