Parser

class MagInt.Parser.Wien2kStruct(filename)

The Wien2kStruct class initializes the structure file as in dft_tools

__init__(filename)
calc_a_brav()

Calculates the Bravais lattice vectors in Cartesian coordinates based on the provided Bravais matrix and lattice type. The resulting lattice vectors are stored in the a_brav attribute of the class.

Attributes Modified

a_bravndarray

The Bravais lattice vectors in Cartesian coordinates.

frac_to_carth(coor)

Converts fractional coordinates to Cartesian coordinates based on the given lattice vectors and Bravais matrix. The conversion considers different lattice types and angles.

Parameters:

coor (ndarray) – Fractional coordinates to be converted.

Returns:

Cartesian coordinates corresponding to the given fractional coordinates.

Return type:

ndarray

parse_struct_file()

Parses the input file to extract lattice information, atom positions, and other relevant structural data. It updates the class attributes accordingly.

Attributes Modified

lattypestr

Lattice type (e.g., “P”, “C”, etc.).

atom_positionsdict

Dictionary mapping atom names to their positions.

el_nameslist

List of element names found in the file.

q_typeslist

List of atomic positions for each element type.

nionslist

List of the number of ions for each element type.

lattice_vecsndarray

Lattice vectors.

anglesndarray

Lattice angles.

bravaisndarray

The Bravais matrix for the structure.

ntypesint

The number of unique atom types.

nqint

Total number of atoms.

type_of_ionlist

Type of ion corresponding to each atom in the system.

orthbool

Whether the system is orthorhombic.