Hello,
I’m new in this forum.
I have a question about Ovito. I did a simulation with Lammps and I want to analyze the RDF. I would be interested in averaging the latest RDFs. I was looking at the OVITO Python Reference manual and found how to do a general average. However, I didn’t manage to define a frame interval. Could you explain to me how I define a frame interval to do the averaging?
This is my code
from ovito.io import import_file, export_file
from ovito.modifiers import CoordinationAnalysisModifier, TimeAveragingModifier
import numpy
pipeline = import_file(“md.lammpstrj”)
print(“Number of MD frames:”, pipeline.source.num_frames)
pipeline.modifiers.append(CoordinationAnalysisModifier(cutoff = 5.0, number_of_bins = 100, partial=True))
pipeline.modifiers.append(TimeAveragingModifier(operate_on=‘table:coordination-rdf’))
partial_rdf = pipeline.compute()
print(partial_rdf.tables[‘coordination-rdf[average]’].xy())
export_file(pipeline, “partial_rdf_average.txt”, “txt/table”, key=“coordination-rdf[average]”)
I found this definition of interval
modifier.interval = (pipeline.source.num_frames//2, pipeline.source.num_frames-1)
but I couldn’t define the initial frame (for example a number 46502) to reach the final frame
Thank you very much for your help