PAOFLOW.models.dual_params#
Attributes#
Classes#
Multi-parameter tight-binding model with site-labeled atoms. |
|
Dual-parameter tight-binding model (backward-compatible wrapper). |
Functions#
|
Label atoms as 'bulk' or 'surface' based on coordination number. |
|
Label atoms based on distance from the vacuum surface. |
|
Label atoms from an explicit list of surface atom indices. |
Module Contents#
- PAOFLOW.models.dual_params.label_atoms_coordination(geometry, r_cut_bohr=8.0, threshold=None, r_taper_frac=0.8)[source]#
Label atoms as ‘bulk’ or ‘surface’ based on coordination number.
The smooth coordination number is defined as:
Z_i = Σ_{k ≠ i} f_c(d_{ik})
where f_c is a cosine-tapered cutoff function. Atoms with Z_i ≥ threshold are labeled ‘bulk’; others ‘surface’.
- Parameters:
- Returns:
labels (list of str) – ‘bulk’ or ‘surface’ for each atom.
coord (ndarray) – Smooth coordination numbers.
- PAOFLOW.models.dual_params.label_atoms_geometric(geometry, n_surface_layers=2, surface_normal=None)[source]#
Label atoms based on distance from the vacuum surface.
For slab geometries, atoms near the top/bottom surfaces are labeled ‘surface’. The surface normal is identified from the longest lattice vector (slab direction).
- Parameters:
- Returns:
labels (list of str)
projections (ndarray) – Signed distances along the surface normal.
- PAOFLOW.models.dual_params.label_atoms_manual(n_atoms, surface_indices)[source]#
Label atoms from an explicit list of surface atom indices.
- class PAOFLOW.models.dual_params.MultiParamModel(params_map, geometry, labels, *, mixing='geometric', ref_label=None)[source]#
Multi-parameter tight-binding model with site-labeled atoms.
Uses an arbitrary number of independently fitted parameter sets, with atoms labeled by environment. Supports multi-species systems. Interface bonds (between atoms with different labels) are handled with configurable mixing rules.
Construction#
model = MultiParamModel( params_map={ 'Si_bulk': si_bulk_params, 'Ge_bulk': ge_bulk_params, 'interface': sige_params, }, geometry=superlattice_geometry, labels=['Si_bulk']*8 + ['Ge_bulk']*8, )
From files:
model = MultiParamModel.from_files( params_files={'bulk': 'Si_params.json', 'surface': 'Si_surf_params.json'}, geometry='slab_geometry.json', labels=[...], )
Hamiltonian#
HRs, meta = model.build_hamiltonian() model_dict = model.to_model_dict() pao = PAOFLOW(model=model_dict) arry, attr = pao.data_controller.data_dicts() arry['HRs'] = HRs pao.bands(ibrav=0, band_path='G-X-M-G', nk=500)
- classmethod from_edtb_models(models, geometry, labels, **kwargs)[source]#
Create from a dict of EDTBModel objects and a new geometry.
- to_model_dict()[source]#
Return a PAOFLOW-compatible model dict.
Uses the reference label’s parameters for metadata. Replace
arry['HRs']with the multi-parameter H(R) frombuild_hamiltonian()before callingpao.bands().
- class PAOFLOW.models.dual_params.DualParamModel(params_bulk, params_surf, geometry, *, labels=None, mixing='geometric', labeling='coordination', label_kwargs=None)[source]#
Dual-parameter tight-binding model (backward-compatible wrapper).
Thin wrapper around
MultiParamModelthat preserves the original two-parameter(P_bulk, P_surf)API with automatic ‘bulk’/’surface’ labeling.Construction#
From files:
model = DualParamModel.from_files( params_bulk="Si_SK_params.json", params_surf="Si_surface_EDTB_params.json", geometry="Surface_Si/Si_111_slab_geom.json", )
Labeling is applied automatically (default: coordination-based). Override with
labeling='geometric',labeling='manual', or pass explicitlabels=[...].Hamiltonian#
HRs, meta = model.build_hamiltonian() model_dict = model.to_model_dict() pao = PAOFLOW(model=model_dict) arry, attr = pao.data_controller.data_dicts() arry['HRs'] = HRs pao.bands(ibrav=0, band_path='G-M-K-G', nk=500)
- classmethod from_files(params_bulk, params_surf, geometry, **kwargs)[source]#
Load bulk and surface parameters and geometry from JSON files.
- Parameters:
- Return type:
- classmethod from_edtb_models(model_bulk, model_surf, geometry, **kwargs)[source]#
Create a dual-parameter model from two fitted
EDTBModelobjects.- Parameters:
- Return type:
- property coord: numpy.ndarray | None[source]#
Coordination numbers (if coordination labeling was used).