Material Model#

Dict data#

This class has the following dict data.

  • General info.

    • model: (str) model name.

    • version: (str) MultiPie version.

    • created: (str) created time stamp.

  • Structural info.

    • group: (str) group tag.

    • crystal: (str) crystal class.

    • cell: (dict) unit-cell parameters.

      • a: (float) a.

      • b: (float) b.

      • c: (float) c.

      • alpha: (float) alpha (deg.).

      • beta: (float) beta (deg.).

      • gamma: (float) gamma (deg.).

    • cell_info: (dict) unit-cell information

      • cell: (dict) = cell.

      • volume: (float) volume.

      • A: (list) [a1,a2,a3,t] (4x4, each column).

      • G: (list) metric matrix (4x4).

    • unit_vector: (list) unit vectors, a1, a2, a3 (conventional cell).

    • unit_vector_primitive: (list) unit vectors, a1p, a2p, a3p (primitive cell).

  • Generation condition.

    • SAMB_select: (dict) SAMB selection.

    • atomic_select: (dict) atomic SAMB selection.

    • site_select: (dict) site-cluster SAMB selection.

    • bond_select: (dict) bond-cluster SAMB selection.

    • max_neighbor: (int) max. neighbor in search of bonds.

    • search_cell_range: (tuple) cell range in search of bonds, (a1,a2,b1,b2,c1,c2).

    • toroidal_priority: (bool) toroidal priority, false=Q-G or true=G-Q.

  • Site and bond info.

    • site_grid: (dict) site grid.

    • site: (dict) site info.

      • representative: (dict) representative site, dict[name, RepSiteType].

      • cell: (dict) conventional cell site, dict[name, [CellSiteType]].

    • bond: bond info.

      • representative: (dict) representative bond, dict[name, RepBondType].

      • cell: (dict) conventional cell bond, dict[name, [CellBondType]].

      • info: (list) bond properties, [BondInfoType].

  • SAMB.

    • SAMB_number: (int) total number of SAMBs.

    • SAMB_number_min: (int) total number of SAMBs excluding duplicated ones.

    • atomic_samb: (dict) atomic SAMB, dict[BraketInfoType, SAMB Dict].

    • atomic_id: (dict) atomic SAMB ID, dict[tag, (BraketInfoType, index, component)].

    • cluster_samb: (dict) site/bond cluster SAMB, dict[wyckoff, SAMB Dict].

    • cluster_id: (dict) site/bond cluster SAMB ID, dict[tag, (wyckoff, index, component)].

    • combined_samb: (dict) combined SAMB, dict[SAMBType, SAMB Dict].

    • combined_id: (dict) combined SAMB ID, dict[tag, (symbol, UniqueSAMBType, index, component)].

    • irrep_id: (dict) combined SAMB ID by irrep., dict[irrep, combined_id].

    • common_id: (dict) common ID of combined SAMB, dict[SAMBType, ([Ztag_list], [site/bond-tag])].

    • cluster_info: (dict) cluster info, dict[site/bond_name, dict[(bra_rank,ket_rank), (wyckoff,z_list)] ].

  • Misc.

    • basis_type: (str) atomic basis type.

    • full_matrix: (dict) full matrix info.

      • ket: (list) ket info., [(atom,sublattice,rank,orbital)].

      • index: (dict) index info., dict[(atom,SL,rank), (top,size)].

    • braket: (dict) braket info., dict[site/bond-tag, [BraketInfoType]].

    • wyckoff: (dict) wyckoff info., dict[site/bond-tag, wyckoff].

    • qtdraw_prop: (dict) QtDraw properties.

    • pdf_ctrl: (dict) PDF creation control.

SAMB Dict data#

Combined, atomic, and site/bond-cluster SAMBs have the following dict data.

  • Combined SAMB, \(Z_i\), Dict[index, SAMB].

    • index: (PGMultipoleType) (X,l,\(\Gamma\),s,k,n,p,x)

    • SAMB: (tuple) SAMB data for set of components.

      • (list) [[(coeff, X_index, X_component, Y_index, Y_component)]],

      • (list) [symmetry].

  • Atomic SAMB, \(X_j\), Dict[index, SAMB].

    • index: (PGMultipoleType) (X,l,\(\Gamma\),s,k,n,p,x)

    • SAMB: (tuple) SAMB data for set of components.

      • (list) [matrix],

      • (list) [symmetry]

  • Site/bond-cluster SAMB, \(Y_k\), Dict[index, SAMB].

    • index: (PGMultipoleType) (X,l,\(\Gamma\),s,k,n,p,x)

    • SAMB: (tuple) SAMB data for set of components.

      • (list) [vector],

      • (list) [symmetry]

MaterialModel Class#

Material model analyzer class.

This module provides material model analyzer.

class MaterialModel(topdir=None, verbose=False)[source]#

Bases: BinaryManager

Material model analyzer.

Parameters:
  • topdir (str, optional) – top directory. [default: cwd]

  • verbose (bool, optional) – verbose comment ?

X(tag, hc=False)[source]#

Get atomic SAMB.

Parameters:
  • tag (str) – atomic tag, e.g. x1.

  • hc (bool, optional) – hermite conjugation ?

Returns:

  • (ndarray) – atomic SAMB matrix.

  • (sympy) – symmetry.

Y(tag)[source]#

Get site/bond-cluster SAMB.

Parameters:

tag (str) – cluster tag, e.g., y1.

Returns:

  • (ndarray) – cluster SAMB vector.

  • (sympy) – symmetry.

Z(tag, symbol=False)[source]#

Get combined SAMB.

Parameters:
  • tag (str) – combined tag, e.g., z1.

  • symbol (bool, optional) – symbol expression ?

Returns:

  • (list or sympy) – combined SAMB linear combination list or expression.

  • (sympy) – symmetry.

  • (str or sympy) – symbol in LaTex or expression.

analyze(model_in)[source]#

Set model.

Parameters:

model_in (dict or str) – model input dict or file name.

cell_site_primitive()[source]#

Get site position in primitive unit cell.

Returns:

  • (dict) – site dict, dict[name, [position]].

clear()[source]#

Clear all data.

get_atomic_samb(select)[source]#

Get all atomic SAMB.

Parameters:

select (dict) – select dict.

Returns:

  • (dict) – atomic SAMB, dict[BraketInfoType, SAMB Dict].

  • (dict) – atomic id, dict[“x#”, (SAMB index, comp)].

get_cluster_samb(site_select, bond_select)[source]#

Get all cluster SAMB.

Parameters:
  • site_select (dict) – site select dict.

  • bond_select (dict) – bond select dict.

Returns:

  • (dict) – cluster SAMB, dict[wyckoff, SAMB Dict].

  • (dict) – cluster id, dict[“y#”, (wyckoff, SAMB index, comp)].

get_combined_samb(atomic_samb, cluster_samb, select, toroidal_priority=False)[source]#

Get all combined SAMB.

Parameters:
  • atomic_samb (dict) – all atomic SAMB, Dict[braket_info, SAMB].

  • cluster_samb (dict) – alll cluster SAMB, Dict[“site/bond”, SAMB].

  • select (dict) – SAMB select.

  • toroidal_priority (bool, optional) – use (G,T) prior to (Q,M) in creation ?

Returns:

  • (dict) – combined SAMB (minimal), dict[SAMBType, SAMB].

  • (dict) – id to SAMB info, dict[str, (tag, UniqueSAMBType, component)].

  • (int) – no. of minimal SAMBs.

  • (int) – no. of all SAMBs.

  • (dict) – comomon id, dict[SAMBType, [id]].

  • (dict) – cluster info, dict[site/bond_name, dict[(bra_rank,ket_rank), (wyckoff,z_list)] ].

get_combined_samb_matrix(select=None, fmt='sympy', digit=14)[source]#

Get combined SAMBs in matrix form (real-space).

Parameters:
  • select (dict, optional) – select conditions for multipoles with keywords (see, select_combined_samb).

  • fmt (str, optional) – sympy/value.

  • digit (int, optional) – digit for value output.

Returns:

  • (dict) – combined SAMB in matrix form, dict[zj, dict[ (n1, n2, n3, m, n), matrix element] ].

Note

  • R = (n1,n2,n3) and m and n are lattice indices, bra and ket indexes, respectively.

get_hr(parameter, select=None, combined_samb_matrix=None, fmt='sympy', digit=14)[source]#

Get Hamiltonian matrix (real-space).

Parameters:
  • parameter (dict) – parameter of SAMBs, dict[zj, float/sympy].

  • select (dict, optional) – select conditions for multipoles with keywords (see, select_combined_samb).

  • combined_samb_matrix (dict, optional) – combined SAMBs in matrix form (real-space), { zj: {(n1, n2, n3, m, n): matrix element} }.

  • fmt (str, optional) – sympy/value.

  • digit (int, optional) – digit for value output.

Returns:

  • (dict) – Hamiltonian matrix (real-space), dict[(n1, n2, n3, m, n), matrix element].

Note

  • R = (n1,n2,n3) and m and n are a lattie vector, bra and ket indexes, respectively.

get_multipole_expression()[source]#

Get all of harmonics expression.

Returns:

  • (dict) – harmonics expression, dict[(X,Gamma,l,n), [expression]].

ket()[source]#

Get ket string list.

Returns:

  • (list) – ket string in LaTeX.

load(name)[source]#

Load model.

Parameters:

name (str) – model name.

plot_atomic_samb(qtdraw, atomic_id, site_bond=None, label=True)[source]#

Plot atomic SAMB.

Parameters:
  • qtdraw (QtDraw) – QtDraw object.

  • atomic_id (str) – atomic id.

  • site_bond (str, optional) – site or bond, see “wyckoff”.

  • label (boo, optional) – display label ?

plot_cluster_samb(qtdraw, site_bond, cluster_id, label=True)[source]#

Plot cluster SAMB.

Parameters:
  • qtdraw (QtDraw) – QtDraw object.

  • site_bond (str) – site or bond, see “wyckoff”.

  • cluster_id (str) – cluster id.

  • label (boo, optional) – display label ?

plot_site_bond(qtdraw, site_bond, rep=True)[source]#

Plot definition of site or bond.

Parameters:
  • qtdraw (QtDraw) – QtDraw object.

  • site_bond (str) – site or bond, see “wyckoff”.

  • rep (bool, optional) – highlight representative ?

save()[source]#

Save model data in subdir.

save_atomic_samb()[source]#

Save atomic SAMB QtDraw file.

save_cluster_samb(site_bond)[source]#

Save cluster SAMB QtDraw file.

Parameters:

site_bond (str or list) – (list of) site or bond.

save_pdf(verbose=None)[source]#

Save model as PDF file.

save_samb_matrix(select, parameter=None, verbose=None)[source]#

Save SAMB matrix (and hr).

Parameters:
  • select (dict) – select dict (see, select_combined_samb).

  • parameter (dict, optional) – parameter dict, dict[z#, value].

save_samb_qtdraw(verbose=None)[source]#

Save SAMB QtDraw file.

save_site_bond(site_bond)[source]#

Save site/bond cluster QtDraw file.

Parameters:

site_bond (str or list) – (list of) site or bond.

save_view()[source]#

Save model view QtDraw file.

select_combined_samb(select)[source]#

Select combined SAMB.

Parameters:

select (dict) – select conditions for multipoles with keywords, “site/bond/X/l/Gamma/s”.

Returns:

  • (dict) – selected combined IDs.

  • (dict) – SAMB select dict.

  • (dict) – other select dict.

Note

  • site = [(site, [orbital_rank])]. ( omittable).

  • bond = [(site1;site2, *rank1;rank2, *[neighbor])] or [(*site1;site2, *rank1;rank2, [neighbor])].

  • X = Q/G/T/M, []=all.

  • l = [0,1,2,3,4,5,6,7,8,9,10,11], []=all.

  • Gamma = [irreps.], “IR”=identity, []=all.

  • s = [0,1], []=all.

property group#

Group class.

Returns:

  • (Group) – group class.