class Control(ngrid=None, lfactor=0.1, scalebroad=0.5, t=300, **kwargs)[source]

Bases: dict, monty.json.MSONable

Class for reading, updating, and writing ShengBTE CONTROL files. See for more detailed description and default values of CONTROL arguments.

  • ngrid (size 3 list) – number of grid planes along each axis in reciprocal space

  • lfactor (float) – unit of measurement for lattice vectors (nm)

  • scalebroad (float) – scale parameter for Gaussian smearing. A value of 1.0 is theoretically guaranteed to work, but significant speedups can sometimes be achieved by reducing it with negligible loss of precision.

  • t (int or float) – temperature (Kelvin)

  • **kwargs

    Other ShengBTE parameters. Several parameters are required for ShengBTE to run - we have listed these parameters below: - nelements (int): number of different elements in the compound - natoms (int): number of atoms in the unit cell - lattvec (size 3x3 array): real-space lattice vectors, in units

    of lfactor

    • types (size natom list): a vector of natom integers, ranging from 1 to nelements, assigning an element to each atom in the system

    • elements (size natom list): a vector of element names

    • positions (size natomx3 array): atomic positions in lattice coordinates

    • scell (size 3 list): supercell sizes along each crystal axis used for the 2nd-order force constant calculation

allocations_keys = ['nelements', 'natoms', 'ngrid', 'norientations']

A JSON serializable dict representation of an object.

crystal_keys = ['lfactor', 'lattvec', 'types', 'elements', 'positions', 'masses', 'gfactors', 'epsilon', 'born', 'scell', 'orientations']
flags_keys = ['nonanalytic', 'convergence', 'isotopes', 'autoisotopes', 'nanowires', 'onlyharmonic', 'espresso']
classmethod from_dict(sdict)[source]

Write a CONTROL file from a Python dictionary. Description and default parameters can be found at Note some parameters are mandatory. Optional parameters default here to None and will not be written to file.


dict – A Python dictionary of ShengBTE input parameters.

classmethod from_file(filepath)[source]

Read a CONTROL namelist file and output a ‘Control’ object


filepath (String) – Path of the CONTROL file.


‘Control’ object with parameters instantiated.

params_keys = ['t', 't_min', 't_max', 't_step', 'omega_max', 'scalebroad', 'rmin', 'rmax', 'dr', 'maxiter', 'nticks', 'eps']
required_params = ['nelements', 'natoms', 'ngrid', 'lattvec', 'types', 'elements', 'positions', 'scell']

Writes ShengBTE CONTROL file from ‘Control’ object