HTMACat.descriptor package

Submodules

HTMACat.descriptor.Construct_descriptor module

HTMACat.descriptor.Construct_descriptor.Construct_descriptor(poscar, feature_surf, feature_ads, feature_site, adspecies, facet='100')[source]

Construct a descriptor for a given catalytic system based on its geometry and adsorption properties.

Parameters:
poscarstr

The POSCAR file path of the catalyst-adsorbate system.

feature_surflist

A list of strings specifying the features to extract from the surface of the catalytic system. Possible options are ‘valence electron’, ‘atomic radius’, ‘mean valence electron’, and ‘mean atomic radius’.

feature_adslist

A list of strings specifying the features to extract from the adsorbate molecule. Possible options are ‘mean electronegativity’ and ‘mean valence electron’.

feature_sitelist

A list of strings specifying the features to extract from the binding site of the catalytic system. Possible options are ‘mean valence electron’, ‘mean atomic radius’, and ‘binding type’.

adspecieslist

A list of strings specifying the adsorbate species that can bind to the catalytic system.

facetstr, optional

The surface facet of the catalytic system. Possible options are ‘100’ and ‘111’. The default is ‘100’.

Returns:
descriptorarray_like

A 1D array containing the descriptor for the catalytic system. The descriptor is constructed by concatenating the following features: surface valence electron, surface atomic radius, mean valence electron of surface and subsurface atoms, mean atomic radius of surface and subsurface atoms, mean electronegativity of adsorbate molecule, mean valence electron of adsorbate molecule, mean valence electron of binding site atoms, mean atomic radius of binding site atoms, and binding type of binding site (‘top’, ‘bridge’, ‘fcc’, ‘hcp’, or ‘4-fold’).

HTMACat.descriptor.Construct_descriptor_NEB module

HTMACat.descriptor.Construct_descriptor_NEB.get_adsorbate_info(poscar, feature_ads, base_info)[source]

Extract the adsorbate information from the POSCAR file.

Parameters:
poscarstr

The path of the POSCAR file.

feature_adslist

A list of descriptors to calculate for the adsorbate.

base_infostr

The path of the file containing information about the elements.

Returns:
descriptor_adslist

A list of the calculated descriptors for the adsorbate.

HTMACat.descriptor.Construct_descriptor_NEB.get_file_name(reaction)[source]

This function constructs the file name for a given reaction.

Parameters:
reactionstr

The string representing the reaction, in the format “reactants = products”.

Returns:
str

The file name constructed based on the reaction, in the format “reactant1+reactant2+…=product1+product2+…”.

Examples

>>> get_file_name("2H2 + O2 = 2H2O")
>>> '2H2+O2=2H2O'
HTMACat.descriptor.Construct_descriptor_NEB.get_reaction_info(react='react.log', File_adsE='adsE_coad_radical')[source]

Extract the information of a chemical reaction, including reaction type, reactant info, product info, barrier and enthalpy. Extract the reactant and product adsorption energy from a file named adsE_coad_radical in the current directory.

Parameters:
reactstr, optional

The name of the reaction file, by default ‘react.log’.

File_adsEstr, optional

The name of the adsorption energy file, by default ‘adsE_coad_radical’.

Returns:
tuple of np.ndarray or None

A tuple of descriptor reaction array and reaction barrier. If the NEB of the given file is not calculated, return None for both values.

HTMACat.descriptor.Construct_descriptor_NEB.get_site_info(poscar)[source]

This function extracts site information from a given POSCAR file.

Parameters:
poscar (str): The name of the POSCAR file.
Returns:
descriptor_site (list): A list of the site descriptors.

Notes

The function extracts the binding adatoms, adspecie, binding type symbols, and binding surface atoms from the POSCAR file. The function then assigns numerical values to the binding types based on the following dictionary: {None: 0, ‘top’: 1, ‘bri’: 2, ‘fcc’: 3, ‘hcp’: 3, ‘4-fold’: 4}. The function then adds up the numerical values for each binding type symbol and returns a list of the resulting descriptor.

HTMACat.descriptor.Construct_descriptor_NEB.get_surface_info(poscar, feature_surf, base_info)[source]

Extract surface information from a given POSCAR file.

Parameters:
poscarstr

The path to the POSCAR file.

feature_surflist
A list of features to be extracted from the surface. Each feature is a string, and can be one of the following:

‘Valence_electron’: the valence electron number of the atom. ‘Atomic_radius’: the atomic radius of the atom.

base_infostr

The path to the file containing the base information about the atoms.

Returns:
descriptor_surflist

A list of the surface descriptors. The order of the descriptors is the same as the order of the features provided. If the structure does not have a standard or integrated surface configuration, an empty list is returned.

HTMACat.descriptor.Construct_descriptor_coad module

HTMACat.descriptor.Construct_descriptor_coad.Construct_descriptor_coad(poscar, feature_surf, feature_ads, feature_site)[source]

Construct a descriptor for a catalyst-adsorbate system.

Parameters:
poscarstr

The POSCAR file path of the catalyst-adsorbate system.

feature_surflist

A list of features of the catalyst surface for constructing the descriptor. The features include:

  • surface valence electron

  • surface atomic radius

  • surf+subsurf mean valence electron

  • surf+subsurf mean atomic radius

feature_adslist

A list of features of the adsorbate for constructing the descriptor. The features include:

  • mean enegativity

  • mean valence_electron

feature_sitelist

A list of features of the binding site for constructing the descriptor. The features include:

  • mean valence electron

  • mean atomic radius

  • binding type

Returns:
descriptornumpy.ndarray

A descriptor array for the catalyst-adsorbate system, including the following features:

  • descriptor_surf: the descriptor of the catalyst surface, including the features specified in feature_surf.

  • descriptor_ads: the descriptor of the adsorbate, including the features specified in feature_ads.

  • descriptor_site: the descriptor of the binding site, including the features specified in feature_site.

  • descriptor_distance: the distance of adsorbed species.

Notes

This function first extracts the atom types and coordinates from the POSCAR file of the catalyst-adsorbate system, and then distinguishes the adsorbate, surface atoms, and subsurface atoms. The features of the surface and subsurface atoms are calculated based on the feature_surf input list, while the features of the adsorbate and binding site are calculated based on the feature_ads and feature_site input lists, respectively. If multiple adsorbates are found in the system, the descriptors are constructed for each adsorbate and then combined into a single descriptor. If no adsorbate is found, an error message will be printed.

HTMACat.descriptor.Construct_descriptor_surface module

HTMACat.descriptor.Construct_descriptor_surface.Construct_des_module(adspecies, facet, dop_typ_all)[source]

Constructs the descriptor module for a given set of adsorbates on a surface with a particular facet and doping type.

Parameters:
adspecieslist of str

A list of adsorbate species to consider.

facetstr

The surface facet to consider.

dop_typ_alllist of str

A list of doping types to consider.

Returns:
None

The function writes the descriptor and energy information to an output file.

HTMACat.descriptor.Construct_descriptor_surface.Construct_descriptor(poscar, feature_surf, feature_ads, feature_site, adspecies, facet='100')[source]

HTMACat.descriptor.Construct_descriptor_surface_single module

HTMACat.descriptor.Construct_descriptor_surface_single.Construct_des_module(adspecies, facet, dop_typ_all)[source]

Constructs the descriptor module for a given set of adsorbates on a surface with a particular facet and doping type.

Parameters:
adspecieslist of str

A list of adsorbate species to consider.

facetstr

The surface facet to consider.

dop_typ_alllist of str

A list of doping types to consider.

Returns:
None

The function writes the descriptor and energy information to an output file.

HTMACat.descriptor.Construct_descriptor_surface_single.Construct_des_module_2(adspecies, facet, dop_typ_all)[source]

Construct descriptor module for a given adsorbate species, facet, and dopant type(s).

Parameters:
adspeciesstr

The adsorbate species to construct the descriptor for.

facetstr

The facet to construct the descriptor for.

dop_typ_alllist

A list of dopant types to consider.

Returns:
None
This function does not return anything. It writes the constructed descriptors to a file.

Notes

This function reads energy information from a file named ‘all’ and uses the function Construct_descriptor_info_E to obtain information on the energy of a given adsorbate on a given facet and dopant type. The function Construct_descriptor is then used to construct a descriptor for a given system, and the descriptor is written to a file named ‘descriptor-{facet}-{adspecies[0]}’.

HTMACat.descriptor.Construct_descriptor_surface_single.Construct_descriptor(poscar, feature_surf, feature_ads, feature_site, adspecies, facet='100', label='all')[source]
HTMACat.descriptor.Construct_descriptor_surface_single.Construct_descriptor_info_E(ele, facet, specie, facet_dop=True)[source]

Construct descriptor information based on element, crystal plane and doping species class.

Parameters:
elestr

The chemical symbol of an element.

facetstr

crystal face

speciestr

The chemical symbol of the dopant.

facet_dopbool, optional

Whether the doping type is included (default True).

Returns:
str

The energy value in the descriptor information.

Notes

If ‘facet_dop’ is True, the doping type will be included when building descriptor information.

Module contents