Skip to content

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

License

Notifications You must be signed in to change notification settings

ovito-org/GenerateRandomSolution

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 name Python name Description Default Value
Only selected only_selected Apply the modifier only to the selected particles. False
Concentrations concentrations List defining the target concentrations. Their sum has to be equal to 1. [0.5, 0.5]
Seed seed Starting 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 01 Example 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

License

Stars

Watchers

Forks

Languages