pymatgen.io.lmto module

class LMTOCopl(filename='COPL', to_eV=False)[source]

Bases: object

Class for reading COPL files, which contain COHP data.

Parameters:
  • filename – filename of the COPL file. Defaults to “COPL”.
  • to_eV – LMTO-ASA gives energies in Ry. To convert energies into eV, set to True. Defaults to False for energies in Ry.
class LMTOCtrl(structure, header=None, version='LMASA-47')[source]

Bases: object

Class for parsing CTRL files from the Stuttgart LMTO-ASA code. Currently, only HEADER, VERS and the structure can be used.

Args/attributes:

structure: The structure as a pymatgen Structure object.

header: The header for the CTRL file .
Defaults to None.
version: The LMTO version that is used for the VERS category.
Defaults to the newest version (4.7).
as_dict()[source]

Returns the CTRL as a dictionary. “SITE” and “CLASS” are of the form {‘CATEGORY’: {‘TOKEN’: value}}, the rest is of the form ‘TOKEN’/’CATEGORY’: value. It gets the conventional standard structure because primitive cells use the conventional a-lattice parameter as the scaling factor and not the a-lattice parameter of the primitive cell.

classmethod from_dict(d)[source]

Creates a CTRL file object from a dictionary. The dictionary must contain the items “ALAT”, PLAT” and “SITE”.

Valid dictionary items are:

ALAT: the a-lattice parameter PLAT: (3x3) array for the lattice vectors SITE: list of dictionaries: {‘ATOM’: class label,

‘POS’: (3x1) array of fractional
coordinates}

CLASS (optional): list of unique atom labels as str SPCGRP (optional): space group symbol (str) or number (int) HEADER (optional): HEADER text as a str VERS (optional): LMTO version as a str

Parameters:d – The CTRL file as a dictionary.
Returns:An LMTOCtrl object.
classmethod from_file(filename='CTRL', **kwargs)[source]

Creates a CTRL file object from an existing file.

Parameters:filename – The name of the CTRL file. Defaults to ‘CTRL’.
Returns:An LMTOCtrl object.
classmethod from_string(data, sigfigs=8)[source]

Creates a CTRL file object from a string. This will mostly be used to read an LMTOCtrl object from a CTRL file. Empty spheres are ignored.

Parameters:data – String representation of the CTRL file.
Returns:An LMTOCtrl object.
get_string(sigfigs=8)[source]

Generates the string representation of the CTRL file. This is the mininmal CTRL file necessary to execute lmhart.run.

write_file(filename='CTRL', **kwargs)[source]

Writes a CTRL file with structure, HEADER, and VERS that can be used as input for lmhart.run.