moire-lattice-generator

Simple python code to interactively generate visualizations of moire patterns of hexagonal lattices such as magic angle bilayer graphene.

https://github.com/tadejong/moire-lattice-generator

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 7 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org, nature.com, zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.5%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Simple python code to interactively generate visualizations of moire patterns of hexagonal lattices such as magic angle bilayer graphene.

Basic Info
  • Host: GitHub
  • Owner: TAdeJong
  • License: mit
  • Language: Jupyter Notebook
  • Default Branch: main
  • Size: 3.18 MB
Statistics
  • Stars: 70
  • Watchers: 2
  • Forks: 12
  • Open Issues: 0
  • Releases: 3
Created over 5 years ago · Last pushed almost 3 years ago
Metadata Files
Readme License Citation

README.md

Moiré lattice generator

Binder build PyPI Documentation Status DOI

test

Easily generate renders of lattices, moiré lattices and even quasi-lattices in Python.

Documentation: https://moire-lattice-generator.readthedocs.io

Magic angle bilayer graphene was shown to be superconducting in 2018 [1]. Despite the considerable hype concerning this discovery, little code exists to visualize the moiré pattern of two graphene layers.

To illustrate the work as done in our own paper "Direct evidence for flat bands in twisted bilayer graphene from nano-ARPES" (arXiv version here), I created this repository.

This repository contains Python code to generate lattices with values reasonably like experimental (e.g. STM or TEM) results. If you are looking to generate more schematic like hexagonal lattice drawings, have a look at @alexkaz2's excellent hexalattice.

  • Trigonal, hexagonal, square lattices as well as quasi lattices can be created and combined.
  • Linear distortions, such as a uniaxial strain along an arbitrary direction and rotations are supported. In addition, arbitrary deformations can be rendered (by passing a deformation tensor to the shift parameter).
  • Edge dislocations can be added to the lattice as well.

A simple Python notebook to interactively generate visualizations of moire patterns of hexagonal lattices at different angles is included.

A high resolution resulting movie of varying twist angle can be found here.

Furthermore, the effect of uniaxial deformation along a single direction as described in e.g. "Measuring local moiré lattice heterogeneity of twisted bilayer graphene " can be visualized.

Click the "Launch binder" button above to open an interactive notebook directly in your browser. (Note: performance in the mybinder environment is somewhat slow. Download and run the notebook on a local machine for better performance.)

moire pattern

Installation

Using pip

The package is available on pypi:

bash pip install latticegen

From source

If you want to install from source, that is of course also possible:

git clone https://github.com/TAdeJong/moire-lattice-generator.git cd moire-lattice-generator pip install .

If you want to be able to play around with the functions themselves, consider using pip install -e ..

Using conda:

Not yet available in conda-forge, but you can install it in a conda environment using pip. There is an environment.yml located in the binder folder in this project which can be used to create the environment: conda env create -f binder/environment.yml

Development

Testing

This project uses pytest and hypothesis to run tests.

Install the test dependencies:

$ pip install -r requirements_test.txt To run the tests:

$ pytest

Releasing

Releases are published to PyPI by github actions when a tag is pushed to GitHub. (Note: we are using versioneer for version management)

Acknowledgement

This work was financially supported by the Netherlands Organisation for Scientific Research (NWO/OCW) as part of the Frontiers of Nanoscience (NanoFront) program.

Owner

  • Name: Tobias de Jong
  • Login: TAdeJong
  • Kind: user
  • Location: Netherlands
  • Company: SRON Netherlands Institute for Space Research

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you find this software useful and use it in scientific work, please cite it as below."
authors:
- family-names: "de Jong"
  affiliation: "Leiden Institute of Physics"
  given-names: "Tobias A."
  orcid: "https://orcid.org/0000-0002-5211-8081"
title: "Moiré lattice generator"
version: 0.0.4
doi: 10.5281/zenodo.5156831
license: MIT
date-released: 2021-08-03
url: "https://moire-lattice-generator.readthedocs.io"
repository-code: "https://github.com/TAdeJong/moire-lattice-generator"

GitHub Events

Total
  • Watch event: 9
  • Fork event: 2
Last Year
  • Watch event: 9
  • Fork event: 2

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 84
  • Total Committers: 1
  • Avg Commits per committer: 84.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
T.A. de Jong t****2@g****m 84

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 1
  • Total pull requests: 4
  • Average time to close issues: 11 days
  • Average time to close pull requests: 3 minutes
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 5.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • daeing (1)
Pull Request Authors
  • TAdeJong (4)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

docs/requirements_docs.txt pypi
  • ipykernel *
  • matplotlib *
  • nbsphinx ==0.8.6
  • sphinx ==3.5.4
  • sphinx-autobuild *
  • sphinx_rtd_theme ==0.5.2
requirements.txt pypi
  • dask *
  • numpy *
  • scikit-image *
requirements_test.txt pypi
  • flake8 * test
  • hypothesis * test
  • pytest * test
.github/workflows/ci-binder.yml actions
  • jupyterhub/repo2docker-action master composite
.github/workflows/python-package.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/release.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v1 composite
  • pypa/gh-action-pypi-publish master composite
binder/environment.yml pypi
setup.py pypi