Skip to content

Repository files navigation

Generate Random Solution

OVITO Python modifier to change the particle type values to create a random solution of a given composition.

Description

Python modifier for OVITO that changes the particle types in the whole data collection or a selected subset of particles to match a user-provided target concentration. The new particle types are distributed randomly to approximate a perfect random solution. The modifier can be installed either into OVITO Pro or the OVITO Python module Python module using pip.

Parameters

GUI namePython nameDescriptionDefault Value
Only selectedonly_selectedApply the modifier only to the selected particles.False
ConcentrationsconcentrationsList defining the target concentrations. Their sum has to be equal to 1.[0.5, 0.5]
SeedseedStarting value for the random number generation.1323

Examples

  • All examples rely on fcc.lmp as input structure.
  1. Example 01 loads the structure file and changes its composition from purely type 1 to a random solid solution containing 3 types with concentrations of 0.25, 0.5, and 0.25, respectively.
  2. Example 02 loads the same structure file, selects all atoms with a relative position < 0.5 and changes the composition of the selected atoms from type 1 to a random solid solution containing 3 types with concentrations of 0.25, 0.5, and 0.25, respectively. The overall sample composition will not match these concentrations as the unselected region will still be of type 1.
  • The following two figures show the same two examples in the OVITO Pro GUI. Example 01Example 02

Installation

Technical information / dependencies

  • Tested on OVITO 3.9.1

Contact

About

OVITO Python modifier to chang the particle type values to create a random solid solution of a given composition.

Topics

Resources

Stars

2 stars

Watchers

2 watching

Forks

Used by

Contributors

Languages