### Author Topic: Sum of spatial Burgers vector  (Read 529 times)

#### SC

• Newbie
• Posts: 7
##### Sum of spatial Burgers vector
« on: September 02, 2018, 06:21:26 PM »
Dear Constanze,

I wonder if you could tell me whether there is any way to calculate the sum of spatial Burgers vector of the whole dislocations in the sample calculated by DXA?

Regards,

#### Alexander Stukowski

• Hero Member
• Posts: 638
##### Re: Sum of spatial Burgers vector
« Reply #1 on: September 03, 2018, 10:08:37 AM »
Dear SC,

It is not clear to me what the physical meaning of the quantity is that you are asking for, but in principle ispossible to calculate it using OVITO's scripting capabilities. For example, you could insert the following user-defined modifier function into the data pipeline to analyze the results of the DXA modifier:

Code: [Select]
`import numpy as npdef modify(frame, input, output):    total_b = np.zeros(3)    for segment in input.dislocations.segments:         total_b += segment.spatial_burgers_vector    print(total_b)`
This function simply computes the vector sum of the Burgers vectors of all spatial dislocations. Note however that this approach ignores the line sense of the dislocations, which may vary from line to line (as will the sign of the Burgers vector). So the Burgers vector summation doesn't make much sense, unless you know that all lines are pointing in the same direction.

-Alex