hikari.dataframes.res ===================== .. py:module:: hikari.dataframes.res Attributes ---------- .. autoapisummary:: hikari.dataframes.res.res_instructions Classes ------- .. autoapisummary:: hikari.dataframes.res.ResInstructionType hikari.dataframes.res.ResFrame Module Contents --------------- .. py:data:: res_instructions .. py:class:: ResInstructionType Bases: :py:obj:`enum.Enum` Generic enumeration. Derive from this class to define new enumerations. .. py:attribute:: UNIQUE_INT :value: 1 .. py:attribute:: UNIQUE_LIST :value: 2 .. py:attribute:: UNIQUE_MULTILINE :value: 3 .. py:attribute:: REPEATING_SINGLET :value: -1 .. py:class:: ResFrame Bases: :py:obj:`hikari.dataframes.BaseFrame` This class stores and manipulates basic information present in majority of crystallographic information files such as unit cell parameters stored in scalars and vectors. BaseFrame utilises the following notation for stored attributes: - The name begins from a unit cell property we are interested in: - "a", "b", "c" describe unit cell lengths/vectors *a*, *b*, *c*, - "al", "be", "ga" describe unit cell angles *alpha*, *beta*, *gamma*, - "v" describes unit cell volume, - "x", "y", "z" describe directions - normalised unit cell vectors. - "A", "G" describe stacked vector and metric matrix, respectively. - The unit cell parameter symbol is then followed by an underscore "_". - The name ends with a single letter denoting type of space and variable: - "d" (from Direct) denotes direct space scalars/matrices, - "r" (from Reciprocal) denotes reciprocal space scalars/matrices, - "v" (from Vector) denotes direct space vectors, - 'w" (similar to "v") denotes reciprocal space vectors. The values can be accessed by referencing a given attribute in the object, for example :class:`BaseFrame`. :attr:`a_d` stores information about the lattice constant *a* in direct space as a floating point, but :class:`BaseFrame`. :attr:`a_v` is a direct space vector. Available attributes have been once again presented in a table below: +----------+------------+------------------+------------------+------------+ | | Available | in direct | in reciprocal |Unit (^-1 in| | | constants | space | space |reciprocal) | +==========+============+==================+==================+============+ | Scalars | a, b, c | a_d, b_d, c_d | a_r, b_r, c_r | Angstrom | | +------------+------------------+------------------+------------+ | | al, be, ga | al_d, be_d, ga_d | al_r, be_r, ga_r | Radian | | +------------+------------------+------------------+------------+ | | v | v_d | v_r | Angstrom^3 | +----------+------------+------------------+------------------+------------+ | Vectors | a, b, c | a_v, b_v, c_v | a_w, b_w, c_w | Angstrom | | +------------+------------------+------------------+------------+ | | x, y, z | x_v, y_v, z_v | x_w, y_w, z_w | Angstrom | +----------+------------+------------------+------------------+------------+ | Matrices | A | A_d | A_r | Angstrom^2 | | +------------+------------------+------------------+------------+ | | G | G_d | G_r | Angstrom^2 | +----------+------------+------------------+------------------+------------+ .. py:attribute:: data .. py:method:: atomic_form_factor(atom, hkl) Calculate X-ray atomic form factors for a single atom and a hkl array :param atom: Atom/ion name/identifier interpreted by form factor table :type atom: str :param hkl: A 2D array listing all hkls to consider :type hkl: np.array :return: A 1D array listing atomic form factors for desired hkls :rtype: np.array .. py:method:: temperature_factor(hkl, u) Calculate temperature factor for single u matrix and a hkl array :param hkl: A 2D array listing all hkls to consider :type hkl: np.array :param u: A classical anisotropic displacement parameters matrix :type u: np.array :return: A 1D array listing temperature factors for desired hkls :rtype: np.array .. py:method:: form_factor(hkl, space_group) Calculate form factors based on current structure, hkls, and space group :param hkl: A 2D array listing all hkls to consider :type hkl: np.array :param space_group: Space group describing the internal crystal symmetry :type space_group: hikari.symmetry.Group :return: A 1D array listing total form factors for desired hkls :rtype: np.array .. py:method:: read(path) Read data from specified ins/res file and return an dict :param path: Relative or absolute path to the res file to be read :type path: str :return: None :rtype: None