From PR description:
What?
- Store trajectory in modifier
- Input validation and optional max iteration counter
- Add seed for random number generation
- Output key properties in graphs
Why?
- Multiple matrix user inputs are error prone so input validation should be helpful to users
- Max iteration to prevent unintentional infinite loops
- Remove limitation of only having the last frame of the MC available
- Random number seed allows for reproducible results
How?
- Use the data_cache of the custom modifier / pipeline system to calculate the MC trajectory when necessary. When skipping through the the resulting trajectory only cached results are shown. Therefore, after the initial calculation visualization is really fast.
- The notify_trajectory_length_changed() mechanism is used to inform the pipeline system about the current trajectory length.
- Key metrics like WC parameters and error are shown in table / graph form to visualize convergence. See OVITO DataTable for additional details.
- Random number seeding is implemented using np.random.default_rng()
Known limitations
- The initial system needs to have the correct number of species -> if you give 3x3 target WC parameters there need to be 3 different species in the initial system.
- New calculations can only be started from frame 0.
- Former terminal output is only visible the first time the modifier is run making it rather useless. I removed this "print" based output since all information is available in the data tables.