Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chiral GNRs and [n]-triangulene #644

Merged
merged 15 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ we hit release version 1.0.0.

## [0.14.4] - YYYY-MM-DD

### Added
- Creation of chiral GNRs (`kind=chiral` in `sisl.geom.nanoribbon`/`sisl.geom.graphene_nanoribbon` as well as `sisl.geom.cgnr`)
- Creation of [n]-triangulenes (`sisl.geom.triangulene`)


### Changed
- `vacuum` is now an optional parameter for all ribbon structures


## [0.14.3] - 2023-11-07
Expand Down
12 changes: 10 additions & 2 deletions docs/api/default_geom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ Surfaces (slabs)
fcc_slab
rocksalt_slab

0D materials
============

.. autosummary::
:toctree: generated/

honeycomb_flake
graphene_flake
triangulene

1D materials
============
Expand All @@ -52,6 +61,7 @@ Surfaces (slabs)
nanoribbon
agnr
zgnr
cgnr
graphene_nanoribbon
nanotube
heteroribbon
Expand All @@ -67,8 +77,6 @@ Surfaces (slabs)
honeycomb
bilayer
graphene
honeycomb_flake
graphene_flake


Helpers
Expand Down
43 changes: 40 additions & 3 deletions src/sisl/geom/flat.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

from ._common import geometry_define_nsc

__all__ = ["honeycomb", "graphene", "honeycomb_flake", "graphene_flake"]
__all__ = ["honeycomb", "graphene", "honeycomb_flake", "graphene_flake", "triangulene"]


@set_module("sisl.geom")
def honeycomb(bond: float, atoms, orthogonal: bool = False):
def honeycomb(bond: float, atoms, orthogonal: bool = False) -> Geometry:
"""Honeycomb lattice with 2 or 4 atoms per unit-cell, latter orthogonal cell

This enables creating BN lattices with ease, or graphene lattices.
Expand Down Expand Up @@ -65,7 +65,7 @@ def honeycomb(bond: float, atoms, orthogonal: bool = False):


@set_module("sisl.geom")
def graphene(bond: float = 1.42, atoms=None, orthogonal: bool = False):
def graphene(bond: float = 1.42, atoms=None, orthogonal: bool = False) -> Geometry:
"""Graphene lattice with 2 or 4 atoms per unit-cell, latter orthogonal cell

Parameters
Expand Down Expand Up @@ -204,3 +204,40 @@ def graphene_flake(
if atoms is None:
atoms = Atom(Z=6, R=bond * 1.01)
return honeycomb_flake(shells, bond, atoms, vacuum)


@set_module("sisl.geom")
def triangulene(
n: int, bond: float = 1.42, atoms=None, vacuum: float = 20.0
) -> Geometry:
"""Construction of an [n]-triangulene geometry

Parameters
----------
n :
size of the triangulene
bond :
bond length between atoms (*not* lattice constant)
atoms :
the atom (or atoms) that the honeycomb lattice consists of.
Default to Carbon atom.
vacuum:
Amount of vacuum to add to the cell on all directions
"""
if atoms is None:
atoms = Atom(Z=6, R=bond * 1.01)
geom = graphene(bond=bond, atoms=atoms) * (n + 1, n + 1, 1)
idx = np.where(geom.xyz[:, 0] <= geom.cell[0, 0] + 0.01)[0]
geom = geom.sub(idx[1:])

# Set the cell according to the requested vacuum
size = geom.xyz.max(axis=0) - geom.xyz.min(axis=0)
geom.cell[:] = np.diag(size + vacuum)

# Center the molecule in cell
geom = geom.move(geom.center(what="cell") - geom.center())

# Set boundary conditions
geometry_define_nsc(geom, [False, False, False])

return geom
Loading