<jupyter_start><jupyter_text>Initialise the latticeSet up a honeycomb lattice with lattice constant $a_0 = 30~\mathrm{nm}$.<jupyter_code>test_lattice = lattices.Honeycomb(lattice_constant = 30E-9 * sqrt(3))
print(test_lattice)<jupyter_output>Breathing honeycomb lattice: a0 = 51.96 nm, R0 = 30.00 nm<jupyter_text>Initialise the nanoparticleSet up a spherical silver NP with $r = h = 10~\mathrm{nm}$.<jupyter_code>silver = particles.Metal()
sphere_np = particles.Particle(radius = 10E-9, height = 10E-9, material = silver)
print(sphere_np)<jupyter_output>Particle: r = 10.0 nm, h = 10.0 nm, w_p = 8.9 eV, loss = 0.038 eV, eps_inf = 5, eps_m = 1<jupyter_text>Set up solverCalculate quasistatic band structure with grid size = 64.<jupyter_code>qs = qs_solver.Quasistatic(test_lattice, sphere_np, neighbours = 50)
grid = 128
xy, z = qs.bands(grid)<jupyter_output>t = 0.58s<jupyter_text>Plot the bands<jupyter_code>fig, ax = plt.subplots(1, figsize = (4, 4))

ax.plot(z/EV, c='b')
ax.plot(xy/EV, c='r')

labels = test_lattice.get_bz_labels(grid)
ax.set_xticks(list(labels.keys()))
ax.set_xticklabels(labels.values())

ax.set_xlim(0, grid-1)

ax.set_ylabel(r'Frequency, $\omega$ (eV)')

plt.show()<jupyter_output><empty_output><jupyter_text>Another example with a kagome latticeLet the lattice constant $a_0 = 50\sqrt{3}~\mathrm{nm}$. We will use spheroidal silver NPs, with $r = 10~\mathrm{nm}$ and $h = 20~\mathrm{nm}$ to split the in-plane and out-of-plane modes.<jupyter_code>kagome = lattices.Kagome(lattice_constant = 50E-9 * sqrt(3))

spheroid_np = particles.Particle(radius = 10E-9, height = 20E-9)

qs = qs_solver.Quasistatic(kagome, spheroid_np, neighbours = 50)
grid = 128
xy, z = qs.bands(grid)

fig, ax = plt.subplots(1, 2, figsize = (9, 4))
fig.subplots_adjust(wspace=0.5)

ax[0].plot(z/EV, c='b')
ax[1].plot(xy/EV, c='r')

for axis in ax:
    labels = test_lattice.get_bz_labels(grid)
    axis.set_xticks(list(labels.keys()))
    axis.set_xticklabels(labels.values())

    axis.set_xlim(0, grid-1)

    axis.set_ylabel(r'Frequency, $\omega$ (eV)')

plt.show()<jupyter_output>t = 0.92s<jupyter_text>Breathing honeycomb lattice<jupyter_code>kagome = lattices.BreathingHoneycomb(lattice_constant = 40E-9 * 3, scale = 1.1)

spheroid_np = particles.Particle(radius = 10E-9, height = 10E-9)

qs = qs_solver.Quasistatic(kagome, spheroid_np, neighbours = 40)
grid = 128
xy, z = qs.bands(grid)

fig, ax = plt.subplots(1, 2, figsize = (9, 4))
fig.subplots_adjust(wspace=0.5)

ax[0].plot(z/EV, c='b')
ax[1].plot(xy/EV, c='r')

for axis in ax:
    labels = test_lattice.get_bz_labels(grid)
    axis.set_xticks(list(labels.keys()))
    axis.set_xticklabels(labels.values())

    axis.set_xlim(0, grid-1)

    axis.set_ylabel(r'Frequency, $\omega$ (eV)')

plt.show()<jupyter_output>t = 1.77s
{'fraction_non_alphanumeric': 0.15506101938262742, 'fraction_numerical': 0.043072505384063174, 'mean_word_length': 5.348519362186789, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '625557', 'license': 'MIT', 'n_tokens_mistral': 1279, 'n_tokens_neox': 1149, 'n_words': 223, 'path': 'qs_bands_examples.ipynb', 'repo_name': 'mtthwprctr/coupledpypole', 'size': '2786'}