hexrd.material.material module

Module for XRD material class

Use the Material class directly for new materials. Known materials are defined by name in materialDict.

class hexrd.material.material.Material(name=None, material_file=None, dmin=None, kev=None, sgsetting=0)[source]

Bases: object

Simple class for holding lattice parameters, accessible by name.

The class references materials by name and contains lattice and space group data. default data is for nickel, but name is material

DFLT_ATOMINFO = array([[0., 0., 0., 1.]])
DFLT_ATOMTYPE = array([28])
DFLT_CHARGE = array(['0'], dtype='<U1')

the dmin parameter is used to figure out the maximum sampling for g-vectors this parameter is in angstroms

DFLT_DMIN = valWUnit("lp","LENGTH",0.75,"angstrom")

default stiffness tensor in voight notation

DFLT_KEV = valWUnit("wavelength","ENERGY",80.725,"keV")
DFLT_LPARMS = [valWUnit("lp","LENGTH",3.61,"angstrom"), valWUnit("lp","LENGTH",3.61,"angstrom"), valWUnit("lp","LENGTH",3.61,"angstrom"), valWUnit("lp","ANGLE",90.0,"degrees"), valWUnit("lp","ANGLE",90.0,"degrees"), valWUnit("lp","ANGLE",90.0,"degrees")]
DFLT_NAME = 'material.xtal'
DFLT_SGNUM = 225
DFLT_SGSETTING = 0
DFLT_SSMAX = 100
DFLT_STIFFNESS = array([[1., 0., 0., 0., 0., 0.],        [0., 1., 0., 0., 0., 0.],        [0., 0., 1., 0., 0., 0.],        [0., 0., 0., 1., 0., 0.],        [0., 0., 0., 0., 1., 0.],        [0., 0., 0., 0., 0., 1.]])

some materials have more than one space group setting. for ex the diamond cubic system has two settings with the origin either at (0,0,0) or at (1/4,1/4,1/4) etc. this handle takes care of these cases. but the defaiult is always 0

default space group setting

DFLT_STR = 0.0025
DFLT_TTH = 0.004363323129985824
DFLT_TTHMAX = None

ATOMINFO Fractional Atom Position of an atom in the unit cell followed by the site occupany and debye waller (U) factor in A^(-2) B is related to U by B = 8 pi^2 U

ATOMTYPE atomic number of all the different species in the unitcell

DFLT_U = array([0.00633])
DFLT_XTAL = 'Ni'
property U
property absorption_length
property aniU
property atom_pos
property atom_type
property atominfo

Information about atomic positions and electron number

property atomtype

Information about atomic types

property beamEnergy

03/11/2021 SS 1.0 original

calc_lp_at_PT(pressure=None, temperature=None)[source]

calculate the lattice parameters for a given pressure and temperature using the BM EoS. This is the main function which will be called from the GUI.

calc_lp_factor(pressure=None, temperature=None)[source]

calculate the factor to multiply the lattice constants by. only the lengths will be modified, the angles will be kept constant.

calc_pressure(volume=None, temperature=None)[source]

calculate the pressure given the volume and temperature using the third order birch-murnaghan equation of state.

calc_volume(pressure=None, temperature=None)[source]

solve for volume in the birch-murnaghan EoS to compute the volume. this number will be propagated to the Material object as updated lattice constants.

property charge
compute_powder_overlay(ttharray=array([0.000000e+00, 4.002001e-02, 8.004002e-02, ..., 7.991996e+01, 7.995998e+01, 8.000000e+01]), fwhm=0.25, scale=1.0)[source]

this function computes a simulated spectra for using in place of lines for the powder overlay. inputs are simplified as compared to the typical LeBail/Rietveld computation. only a fwhm (in degrees) and scale are passed

requested feature from Amy Jenei

property dmin
dump_material(file, path=None)[source]

get the atominfo dictionaary aand the lattice parameters

enable_hkls_below_index(index=5)[source]
enable_hkls_below_tth(tth_threshold=90.0)[source]

enable reflections with two-theta less than @tth_threshold degrees

enable_hkls_from_file()[source]
invalidate_structure_factor()[source]
kt(temperature=None)[source]

calculate bulk modulus for high temperature

ktp(temperature=None)[source]

calculate bulk modulus derivative for high temperature

property latticeParameters
property latticeType
property lparms
property lparms0
property name

Name of material

property natoms
property pgnum
property planeData

(read only) Return the planeData attribute (lattice parameters)

property pt_lp_factor
property reduced_lattice_parameters
remove_duplicate_atoms()[source]

this function calls the same function in the unitcell class and updates planedata structure factors etc.

reset_v0()[source]
set_default_exclusions()[source]
property sgnum

Space group number

property spaceGroup

(read only) Space group

property thermal_expansion
property thermal_expansion_dt
property unitcell
property vol
property vol_per_atom
vt(temperature=None)[source]

calculate volume at high temperature

hexrd.material.material.loadMaterialList(cfgFile)[source]

Load a list of materials from a file

The file uses the config file format. See ConfigParser module.