get_random_packed_structure

atomate2.common.jobs.mpmorph.get_random_packed_structure(composition, target_atoms=100, vol_multiply=1.0, tol=2.0, return_as_job=False, vol_per_atom_source='mp', db_kwargs=None, packmol_seed=1, packmol_output_dir=None)[source]

Generate a random packed structure with a target number of atoms.

Designed to make amorphous/glassy structures. Defaults to using cached MP data.

Parameters:
  • composition (Composition | str) – The composition of the target structure.

  • target_atoms (int) – The target number of atoms in the structure.

  • vol_multiply (float) – The factor to multiply the structure volume by.

  • tol (float) – The tolerance to apply to the box size.

  • return_as_job (bool) – Whether to return the structure as a jobflow job object.

  • vol_per_atom_source (float | str) – If float - the volume per atom used to generate lattice size If str - “mp” to use the Materials Project API to estimate volume per atom. If str - “icsd” to use the ICSD database to estimate volume per atom.

  • db_kwargs (dict | None = None) – kwargs to pass to the volume-determining function.

  • packmol_seed (int) – The seed to use for the packmol random number generator.

  • packmol_output_dir (str | Path | None) – The directory to output the packmol files to. If None, a temporary directory is used and will be removed after.

Returns:

The random packed structure.

Return type:

Structure | Job