pysipfenn.descriptorDefinitions
pysipfenn.descriptorDefinitions.KS2022 module
- class pysipfenn.descriptorDefinitions.KS2022.LocalAttributeGenerator(struct, local_env_func, nn_generator=VoronoiNN())[source]
Bases:
objectA wrapper class which contains an instance of an NN generator (the default is a VoronoiNN), a structure, and a function which computes the local environment attributes.
- pysipfenn.descriptorDefinitions.KS2022.cite()[source]
Citation/s for the descriptor.
- Return type:
List[str]
- pysipfenn.descriptorDefinitions.KS2022.generate_descriptor(struct)[source]
Main functionality. Generates the KS2022 descriptor for a given structure.
- Parameters:
struct (
Structure) – A pymatgen Structure object.- Return type:
ndarray- Returns:
A 271-lenght numpy array of the descriptor.
- pysipfenn.descriptorDefinitions.KS2022.generate_voronoi_attributes(struct, local_funct=<function local_env_function>)[source]
Generates the local environment attributes for a given structure using a VoronoiNN generator.
- Parameters:
struct – A pymatgen Structure object.
local_funct – A function which computes the local environment attributes for a given site.
- pysipfenn.descriptorDefinitions.KS2022.local_env_function(local_env, site)[source]
A prototype function which computes a weighted average over neighbors, weighted by the area of the voronoi cell between them.
- Parameters:
local_env – A dictionary of the local environment of a site, as returned by a VoronoiNN generator.
site – The site number for which the local environment is being computed.
element_dict – A dictionary of the elements in the structure.
- Returns:
A list of the local environment attributes.
- pysipfenn.descriptorDefinitions.KS2022.magpie_mode(attribute_properties, axis=0)[source]
Calculates the attributes corresponding to the most common elements.
- pysipfenn.descriptorDefinitions.KS2022.onlyStructural(descriptor)[source]
Returns the structure-dependent part of the KS2022descriptor.
- Parameters:
descriptor (
ndarray) – A 256-length numpy array of the KS2022 descriptor.- Return type:
ndarray- Returns:
A 103-length numpy array of the structure-dependent part of the KS2022 descriptor. Useful in cases where the descriptor is used as a fingerprint to compare polymorphs of the same compound.
pysipfenn.descriptorDefinitions.KS2022_dilute module
- class pysipfenn.descriptorDefinitions.KS2022_dilute.LocalAttributeGenerator(struct, local_env_func, nn_generator=VoronoiNN())[source]
Bases:
object
- pysipfenn.descriptorDefinitions.KS2022_dilute.generate_descriptor(struct, baseStruct='pure')[source]
pysipfenn.descriptorDefinitions.Ward2017 module
- class pysipfenn.descriptorDefinitions.Ward2017.LocalAttributeGenerator(struct, local_env_func, element_dict, nn_generator=VoronoiNN())[source]
Bases:
objectA wrapper class which contains an instance of an NN generator (the default is a VoronoiNN), a structure, and a function which computes the local environment attributes.
- pysipfenn.descriptorDefinitions.Ward2017.cite()[source]
Citation/s for the descriptor.
- Return type:
List[str]
- pysipfenn.descriptorDefinitions.Ward2017.generate_WC_attributes(strc, neighbor_dict_raw, levels)[source]
Generates the WC attributes for a given structure. The WC attributes are the ordering parameters for each shell of the Voronoi tessellation. Slightly different than what is implemented by Ward-Wolverton. Only considers immediate backtracking.
- Parameters:
strc (
Structure) – A pymatgen Structure object.neighbor_dict_raw – A dictionary of the neighbors of each site in the structure.
levels – The number of shells to consider.
- Return type:
List[float]
- pysipfenn.descriptorDefinitions.Ward2017.generate_descriptor(struct)[source]
Main functionality. Generates the Ward2017 descriptor for a given structure.
- Parameters:
struct (
Structure) – A pymatgen Structure object.- Return type:
ndarray- Returns:
A 271-lenght numpy array of the descriptor.
- pysipfenn.descriptorDefinitions.Ward2017.generate_voronoi_attributes(struct, local_funct=<function local_env_function>)[source]
- Generates the local environment attributes for a given structure using a VoronoiNN generator.
The local environment attributes consist of averages over the neighbors of each site in the structure.
- Parameters:
struct (
Structure) – A pymatgen Structure object.local_funct – A function which computes the local environment attributes for a given site.
- pysipfenn.descriptorDefinitions.Ward2017.local_env_function(local_env, site, element_dict)[source]
A prototype function which computes a weighted average over neighbors, weighted by the area of the voronoi cell between them.
- Parameters:
local_env – A dictionary of the local environment of a site, as returned by a VoronoiNN generator.
site – The site number for which the local environment is being computed.
- Return type:
list- Returns:
A list of the local environment attributes.
- pysipfenn.descriptorDefinitions.Ward2017.magpie_mode(attribute_properties, axis=0)[source]
Calculates the attributes corresponding to the most common elements.