allomorph
Nanoparticle structure generation toolkit.
A package for generating monometallic to trimetallic nanoparticle structural datasets for machine learning applications.
Submodules
Attributes
Functions
|
Load an element dictionary from a JSON file. |
|
Parse a concatenated element combination string into individual symbols. |
|
Validate a user-supplied element dictionary. |
|
Generates a BNP alloy structure based on specified distribution type. |
|
Generates and writes a specific BNP alloy structure. |
|
Generate a hard core-shell structure by combining shell and core atoms. |
|
Orchestrates the generation of hard core-shell BNPs. |
|
Generates a monometallic nanoparticle structure based on specified shape. |
|
Write a monometallic nanoparticle to LAMMPS data and XYZ files. |
|
Generates a TNP alloy structure based on specified distribution types. |
|
Generates and writes TNP alloy structures. |
Package Contents
- allomorph.TNP_DISTRIB_LIST = ['L10R', 'CS', 'CL10S', 'CRALS', 'RRAL', 'CSRAL', 'CSL10', 'CRSR', 'LL10'][source]
- allomorph.load_ele_dict_from_file(path)[source]
Load an element dictionary from a JSON file.
- Parameters:
path – Path to a JSON file containing the element dictionary.
- Returns:
Validated element dictionary.
- allomorph.parse_ele_comb(ele_comb, ele_dict=None)[source]
Parse a concatenated element combination string into individual symbols.
- Parameters:
ele_comb – String like ‘AuPtPd’ or ‘CuAgAu’.
ele_dict – Optional element dictionary to use for matching. If None, the built-in ELE_DICT is used.
- Returns:
List of element symbols, e.g. [‘Au’, ‘Pt’, ‘Pd’].
- Raises:
ValueError – If the string cannot be parsed.
- allomorph.validate_ele_dict(ele_dict)[source]
Validate a user-supplied element dictionary.
- Parameters:
ele_dict – Dictionary mapping element symbols to property dicts.
- Returns:
The validated dictionary.
- Raises:
ValueError – If required keys are missing or invalid.
- allomorph.gen_bnp(obj, element1, element2, shape, ratio2, distrib, rseed, ele_dict=None)[source]
Generates a BNP alloy structure based on specified distribution type.
- allomorph.write_bnp(element1, element2, diameter, shape, ratio2, distrib, replace=False, vis=False, ele_dict=None)[source]
Generates and writes a specific BNP alloy structure.
- allomorph.gen_hard_core_shell(shell_atoms, core_atoms, del_cutoff)[source]
Generate a hard core-shell structure by combining shell and core atoms. Shell atoms overlapping with core atoms within del_cutoff are deleted.
- allomorph.write_hard_core_shell(replace=False, vis=False, ele_dict=None)[source]
Orchestrates the generation of hard core-shell BNPs. Iterates through elements, sizes, and shapes.
- allomorph.gen_mnp(shape, diameter, element, latConst, custom_shapes=None)[source]
Generates a monometallic nanoparticle structure based on specified shape.
- allomorph.write_mnp(element, diameter, lat_const, shape, replace=False, vis=False, custom_shapes=None)[source]
Write a monometallic nanoparticle to LAMMPS data and XYZ files.