hikari.dataframes.res

Attributes

res_instructions

Classes

ResInstructionType

Generic enumeration.

ResFrame

This class stores and manipulates basic information present

Module Contents

hikari.dataframes.res.res_instructions
class hikari.dataframes.res.ResInstructionType[source]

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

UNIQUE_INT = 1
UNIQUE_LIST = 2
UNIQUE_MULTILINE = 3
REPEATING_SINGLET = -1
class hikari.dataframes.res.ResFrame[source]

Bases: 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 BaseFrame. a_d stores information about the lattice constant a in direct space as a floating point, but BaseFrame. a_v is a direct space vector. Available attributes have been once again presented in a table below:

Available constants

in direct space

in reciprocal space

Unit (^-1 in 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

data
atomic_form_factor(atom, hkl)[source]

Calculate X-ray atomic form factors for a single atom and a hkl array

Parameters:
  • atom (str) – Atom/ion name/identifier interpreted by form factor table

  • hkl (np.array) – A 2D array listing all hkls to consider

Returns:

A 1D array listing atomic form factors for desired hkls

Return type:

np.array

temperature_factor(hkl, u)[source]

Calculate temperature factor for single u matrix and a hkl array

Parameters:
  • hkl (np.array) – A 2D array listing all hkls to consider

  • u (np.array) – A classical anisotropic displacement parameters matrix

Returns:

A 1D array listing temperature factors for desired hkls

Return type:

np.array

form_factor(hkl, space_group)[source]

Calculate form factors based on current structure, hkls, and space group

Parameters:
  • hkl (np.array) – A 2D array listing all hkls to consider

  • space_group (hikari.symmetry.Group) – Space group describing the internal crystal symmetry

Returns:

A 1D array listing total form factors for desired hkls

Return type:

np.array

read(path)[source]

Read data from specified ins/res file and return an dict

Parameters:

path (str) – Relative or absolute path to the res file to be read

Returns:

None

Return type:

None