Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Constanze Kalcher

Pages: [1]
Support Forum / New OVITO Website and User Forum!
« on: August 06, 2019, 03:16:48 PM »
Dear OVITO users,

we are happy to announce that we just published our new OVITO website at, which also features a new and improved user forum. We will keep the old forum running for a while to respond to pending requests. To post new questions, however, we encourage you to go to the new forum at Please note that you need to create a new user account for the new website.

The OVITO team

Let's say you want to calculate the average value of a particle property for only a subset of atoms, for example the shear strain.
First you may want to use one of the Selection modifiers, e.g., Expression select, Select particle type, Slice or Manual selection to select the atoms of interest.

Then, insert a Python script modifier that calculates the mean value of the per-atom shear strain of your selection and saves it as a global attribute.
Code: [Select]
from import *
import numpy as np

def modify(frame, input, output):
    shear_strain = input.particle_properties["Shear Strain"].array
    selection = input.particle_properties["Selection"].array
    output.attributes["Average shear strain"] = np.mean( shear_strain[selection == 1] )

Global attributes can be exported as Calculation Results Text File output file format.

Pages: [1]