allomorph

Nanoparticle structure generation toolkit.

A package for generating monometallic to trimetallic nanoparticle structural datasets for machine learning applications.

Submodules

Attributes

__version__

BNP_DIR

BNP_DISTRIB_LIST

DIAMETER_LIST

ELE_DICT

GOLDEN_RATIO

LMP_DATA_DIR

MNP_DIR

RANDOM_DISTRIB_NO

RATIO_LIST

SHAPE_LIST

TNP_DIR

TNP_DISTRIB_LIST

VACUUM_THICKNESS

Functions

load_ele_dict_from_file(path)

Load an element dictionary from a JSON file.

parse_ele_comb(ele_comb[, ele_dict])

Parse a concatenated element combination string into individual symbols.

validate_ele_dict(ele_dict)

Validate a user-supplied element dictionary.

gen_bnp(obj, element1, element2, shape, ratio2, ...[, ...])

Generates a BNP alloy structure based on specified distribution type.

write_bnp(element1, element2, diameter, shape, ratio2, ...)

Generates and writes a specific BNP alloy structure.

gen_hard_core_shell(shell_atoms, core_atoms, del_cutoff)

Generate a hard core-shell structure by combining shell and core atoms.

write_hard_core_shell([replace, vis, ele_dict])

Orchestrates the generation of hard core-shell BNPs.

gen_mnp(shape, diameter, element, latConst[, ...])

Generates a monometallic nanoparticle structure based on specified shape.

write_mnp(element, diameter, lat_const, shape[, ...])

Write a monometallic nanoparticle to LAMMPS data and XYZ files.

gen_tnp(obj, element1, element2, element3, ele1Ratio, ...)

Generates a TNP alloy structure based on specified distribution types.

write_tnp(element1, element2, element3, diameter, ...)

Generates and writes TNP alloy structures.

Package Contents

allomorph.__version__ = '0.1.0'[source]
allomorph.BNP_DIR = 'BNP'[source]
allomorph.BNP_DISTRIB_LIST = ['L10', 'RAL', 'RCS'][source]
allomorph.DIAMETER_LIST = [10, 15, 20][source]
allomorph.ELE_DICT[source]
allomorph.GOLDEN_RATIO[source]
allomorph.LMP_DATA_DIR = '.'[source]
allomorph.MNP_DIR = 'MNP'[source]
allomorph.RANDOM_DISTRIB_NO = 3[source]
allomorph.RATIO_LIST = [20, 40][source]
allomorph.SHAPE_LIST = ['OT', 'SP', 'IC', 'CU', 'DH', 'TH', 'RD', 'TO', 'CO'][source]
allomorph.TNP_DIR = 'TNP'[source]
allomorph.TNP_DISTRIB_LIST = ['L10R', 'CS', 'CL10S', 'CRALS', 'RRAL', 'CSRAL', 'CSL10', 'CRSR', 'LL10'][source]
allomorph.VACUUM_THICKNESS = 40.0[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.

allomorph.gen_tnp(obj, element1, element2, element3, ele1Ratio, ele2Ratio, ele3Ratio, distrib1, distrib2, rseed=0, shape=None, ele_dict=None)[source]

Generates a TNP alloy structure based on specified distribution types.

allomorph.write_tnp(element1, element2, element3, diameter, shape, ele1Ratio, ele2Ratio, ele3Ratio, distrib1, distrib2, rep1=0, replace=False, vis=False, ele_dict=None)[source]

Generates and writes TNP alloy structures.