Forum Navigation
You need to log in to create posts and topics.

Dislocation data extraction

Hello!I want to extract dislocation line length data through python script how to achieve? Thank you very much!

Uploaded files:
  • 微信图片_20190921223013.png

Hello,

in the latest developer version you can directly export the dislocation line length from the GUI by using the export options from the Data inspector panel (as shown in the screenshot below). In the scripting interface, this information is stored as Data Series, you can look them up like this:

from ovito.data import *

def modify(frame, data):
    print(list(data.series.keys()))
    length = data.series['disloc-lengths'].as_table()

In OVITO 2.9 the DXA modifier stores the length of each dislocation type as global attributes, here's the corresponding section from the manual:
http://www.ovito.org/manual/python/modules/ovito_modifiers.html#ovito.modifiers.DislocationAnalysisModifier

def modify(frame, input, output):	
    print(input.attributes["DislocationAnalysis.length.1/2<110>"])

-Constanze

Uploaded files:
  • dislocation_length.png

新的OVITO微信频道!
New for our users in China: OVITO on WeChat 

Official OVITO WeChat channel operated by Foshan Diesi Technology Co., Ltd.