catkit.pawprint package¶
Submodules¶
catkit.pawprint.generator module¶
-
class
catkit.pawprint.generator.
Fingerprinter
(images=None)[source]¶ Parent class for all fingerprint generators.
-
get_fp
(parameters, operation_list)[source]¶ Return the fingerprints for a list of images of single atoms object for the given parameters. Convolutions will be performed for specific operations if the parameters is provided as a list of lists.
Parameters: - parameters (list of str | list of lists (M,)) – Names of seeding parameters available in the parameters database. If a list lists is provided, the number of lists must be equal to the number of operations.
- operation_list (list of func | str (M,)) – A list of operation functions to produce the fingerprints from. The names (str) of operations functions can also be used.
Returns: fingerprints – Fingerprints for the images produced from the provided seed parameters.
Return type: ndarray (N, X)
-
-
catkit.pawprint.generator.
get_connectivity
(atoms, method=None)[source]¶ Returns an estimate of the connectivity matrix for a given atoms-object from CatGen.
Parameters: Returns: connectivity – Estimated connectivity matrix where n is the number of atoms in the atoms-object.
Return type: ndarray (N, N)
catkit.pawprint.operations module¶
-
catkit.pawprint.operations.
autocorrelation
(atoms=None, atoms_parameters=None, connectivity=None, d=0)[source]¶ Autocorrelation convolution for systems without pbc.
-
catkit.pawprint.operations.
bonding_convolution
(atoms=None, atoms_parameters=None, connectivity=None)[source]¶ Perform convolution of metal atoms with bonded adsorbates.
-
catkit.pawprint.operations.
derived_fp
(atoms=None, atoms_parameters=None, connectivity=None, fp_1=None, fp_2=None, n_1=None, n_2=None, op=None)[source]¶ NOTE : This is a work in progress. I’ll redesign the whole thing to allow for arithmetic manipulation of two fingerprints.
Given two fingerprints vector, it will perform arithmetic operation to design new fingerprints.
Parameters: op (str ('add' | 'subtract' | 'divide' | 'multiply')) – add - Adds two fingerprints of equal length raised to their given power subtract - subtracts two fingerprints of equal length raised to
their given power- mulltiply - multiply two fingerprints of equal length raised to
- their given power
- divide - divide two fingerprints of equal length raised to their
- given power
-
catkit.pawprint.operations.
layered_sum
(atoms=None, atoms_parameters=None, connectivity=None)[source]¶ Sum of the properties in a layer as indicated by catkit tags.
-
catkit.pawprint.operations.
local_ads_metal_fp
(atoms=None, atoms_parameters=None, connectivity=None, fuse=False)[source]¶ Sum of the differences in properties of the atoms in the metal-adsorbate interface
Module contents¶
-
class
catkit.pawprint.
Fingerprinter
(images=None)[source]¶ Parent class for all fingerprint generators.
-
get_fp
(parameters, operation_list)[source]¶ Return the fingerprints for a list of images of single atoms object for the given parameters. Convolutions will be performed for specific operations if the parameters is provided as a list of lists.
Parameters: - parameters (list of str | list of lists (M,)) – Names of seeding parameters available in the parameters database. If a list lists is provided, the number of lists must be equal to the number of operations.
- operation_list (list of func | str (M,)) – A list of operation functions to produce the fingerprints from. The names (str) of operations functions can also be used.
Returns: fingerprints – Fingerprints for the images produced from the provided seed parameters.
Return type: ndarray (N, X)
-
-
class
catkit.pawprint.
FingerprintDB
(db_name='fingerprints.db', verbose=False)[source]¶ A class for accessing a temporary SQLite database. This function works as a context manager and should be used as follows:
- with FingerprintDB() as fpdb:
- (Perform operation here)
This syntax will automatically construct the temporary database, or access an existing one. Upon exiting the indentation, the changes to the database will be automatically committed.
-
create_table
()[source]¶ Creates the database table framework used in SQLite. This includes 3 tables: images, parameters, and fingerprints.
The images table currently stores ase_id information and a unqiue string. This can be adapted in the future to support atoms objects.
The parameters table stores a symbol (10 character maximum) for convenient reference and a description of the parameter.
The fingerprints table holds a unique image and parmeter ID along with a float value for each. The ID pair must be unique.
-
fingerprint_entry
(ase_id, param_id, value)[source]¶ Enters a fingerprint value to the database for a given ase and parameter id.
Parameters:
-
get_fingerprints
(ase_ids=None, params=[])[source]¶ Get the array of values associated with the provided parameters for each ase_id.
Parameters: Returns: fingerprint – An array of values associated with the given parameters (a fingerprint) for each ase_id.
Return type: array (n,)
-
get_parameters
(selection=None, display=False)[source]¶ Get an array of integer values which correspond to the parameter IDs for a set of provided symbols.
Parameters: Returns: parameter_ids – Integer values of selected parameters.
Return type: array (n,)
-
image_entry
(d, identity=None)[source]¶ Enters a single ase-db image into the fingerprint database. The ase-db ID with identity must be unique. If not, it will be skipped.
This table can be expanded to contain atoms objects in the future.
Parameters: - d (ase-db object) – Database entry to parse.
- identity (str) – An identifier of the users choice.
Returns: ase_id – The ase id collected.
Return type: