This is Mathematica and partially Python code to reproduce results of the paper "2N+4-rule and an atlas of bulk optical resonances of zigzag graphene nanoribbons", Nat. Commun. 11, 82 (2020).
- OS: The code was tested on Windows 7 and 10.
- Mathematica 10.4, 11.3 or 12.
- Packages MaTeX by Szabolcs Horvát and CustomTicks by Mark A. Caprio are required in Mathematica.
- Python 3.7.1
- Packages numpy, scipy, matplotlib, re, os and datetime are required in the python script Figure1.py.
The code does not require any specific installation other then configuration of Mathematica and Python. However, compilation to C code is used in Mathematica to speed up optical absorption spectra calculations. See how to make Mathematica working with C compiler on Windows.
To use this code:
- Copy the repository to a separate folder on your PC.
- Run code from the code directories Mathematica and python.
- Tight-binding calculations can be repeated in the Mathematica notebook in Sections 'Fitting TB model' and 'Optical absorption calculations in TB model'
- The output shall appear in the test directory and will be the same as what can be found in raw data directory
- Expected run time can be found in the output files in raw data directory
For Figure reproduction this code uses precalculated data from raw data directory of the repository.
- Copy the repository to a separate folder on your computer.
- Navigate to the code-Mathematica and open Mathemaitca notebook `2N+4-rule and an atlas of bulk optical resonances of zigzag graphene nanoribbons.nb'
- In Evaluation tab click `Evaluate Initialization Cells'
- Find the required section for a Figure reproduction, open the section and evaluate each cell of the Section. The output figure must appear in the `test' folder of the parent directory.
GNU Lesser General Public License v3.0