External file as reference for AtomicStrainModifier

Im new to using the python-API and was wondering how to use an external file as reference structure when using the AtomicStrainModifier, or if this is not possible?

Im running something like

from ovito.io import import_file
from ovito.modifiers import AtomicStrainModifier
import matplotlib

# setup
pipeline = import_file('MoS2_AB_rlx.extxyz')
asm = AtomicStrainModifier(cutoff=4.0)
data = pipeline.compute()

Hi Erik,

Please have a look at this code example. It shows you how to call the FileSource.load() method to load a separate reference structure for the calculation. That method works exactly like the import_file() function and accepts the same parameters.


1 Like

It works without problem :+1: , thanks Alexander!