Code examples ============= The easiest way to start out is to look at examples. You can find them in the ``simple`` module. Run them by including it:: from envtb import simple simple.NameOfExample() Example input files ------------------- The folder ``exampledata`` contains example data from third-party applications that you can use. .. rubric:: 01_graphene_vasp_wannier90 A DFT-LDA calculation of Graphene, as well as the Wannier orbital matrix elements resulting from it. The data was calculated using VASP and wannier90. VASP files: * EIGENVAL - kpoints and energies of the bandstructure * POSCAR - unit cell configuration (lattice vectors, atom positions) * PROCAR - electronic density of the ground state, projected on atomic orbitals * OUTCAR - output protocol, containing the Fermi energy The easiest way to use the files is probably to start python in the example data directory. Then, you don't have to supply an absolute path to the files:: cd /path/to/envtb/exampledata/01_graphene_vasp_wannier90 python >>> from wannier90.w90hamiltonian import Hamiltonian >>> ham=Hamiltonian.from_file("wannier90_hr.dat","POSCAR","wannier90.wout","OUTCAR") If you run the IPython web interface, you can start it anyway you like and then execute the above ``cd`` command in IPython. wannier90 files: * wannier90_hr.dat - matrix elements in the Wannier-orbital basis * wannier90.wout - output protocol, containing the orbital positions and spreads .. rubric:: 02_graphene_3rdnn Nth-nearest-neighbor parameterization files for the \pi system of Graphene. It contains valid parameters for 1st-NN and 3rd-NN. If you have own parameters, you can use up to 10th-NN with the supplied neighbor lists. Electrostatics -------------- .. autofunction:: envtb.simple.SimpleElectrostaticProblem .. autofunction:: envtb.simple.PotentialOfSimpleConductor2D .. autofunction:: envtb.simple.PotentialOfGluedRectangles2D Quantum capacitance ------------------- .. autofunction:: envtb.simple.GrapheneQuantumCapacitance .. autofunction:: envtb.calculations.graphenequantumcapacitance.LoopQuantumCapacitanceWithSidegatesFixedSystem Tight-Binding ------------- .. autofunction:: envtb.simple.PlotGraphenenthNNBandstructure .. autofunction:: envtb.simple.PlotGrapheneWannierBandstructure .. autofunction:: envtb.simple.plot_zigzag_graphene_nanoribbon_pz_bandstructure .. autofunction:: envtb.simple.plot_armchair_graphene_nanoribbon_pz_bandstructure .. autofunction:: envtb.simple.plot_zigzag_graphene_nanoribbon_pz_bandstructure_nn .. autofunction:: envtb.simple.plot_armchair_graphene_nanoribbon_pz_bandstructure_nn