nanotools.dielectric module

Created on 2021-06-08

@author: Vincent Michaud-Rioux

class nanotools.dielectric.DielectricConstant(reference_calculator, amplitude=<Quantity(1.0, 'electron_volt')>, axis=2, dielectric_constant=None, external_calculator=None)[source]

Bases: Base

DielectricConstant class.

Examples:

from nanotools import Atoms, Cell, System, TotalEnergy
from nanotools.dielectric import DielectricConstant
a = 3.562
cell = Cell(avec=[[a,0.,0.],[0.,a,0.],[0.,0.,a]], resolution=0.15)
atoms = Atoms(fractional_positions="diamond.fxyz")
sys = System(cell=cell, atoms=atoms)
sys.supercell([4,1,1])
ecalc = TotalEnergy(sys)
ecalc.solver.set_mpi_command("mpiexec -n 16")
calc = DielectricConstant(ecalc, axis=0, amplitude=0.1)
calc.solve()
amplitude

Sawtooth potential amplitude.

Type:

pint.registry.Quantity

axis

Direction of the sawtooth potential ([0,1,2] == [x,y,z]).

Type:

int

external_calculator

Stores the calculator under external field.

dielectric_constant

Dielectric constant.

reference_calculator

Total energy calculator.

Type:

nanotools.totalenergy.TotalEnergy

plot_external_potential(filename=None, show=True)[source]

Generates a plot of the external potential (+screened potential).

Parameters:
  • filename (str, optional) – If not None, then the figure is saved to filename.

  • show (bool, optional) – If True block and show figure. If False, do not show figure.

Returns:

A figure handle.

Return type:

fig (matplotlib.figure.Figure)