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.


Messages - armitatz

Pages: [1]
1
Support Forum / Re: Jump to a specific frame
« on: July 22, 2019, 10:21:58 PM »
got it!

I used

Code: [Select]
from ovito import dataset

pipeline = import_file("G:/Temp/cluster/tr3.gsd")
#output = pipeline.compute(1)
dataset.anim.current_frame=1

2
Support Forum / Jump to a specific frame
« on: July 22, 2019, 08:38:50 PM »
Hi,

I try to run the following script. I want to compute a simple quantity in the last frame but for some reason ovito always calculats the first frame. Is there a way to jump to a specific frame?

Even if I put the output = pipeline.compute(1) after the import command I still get the same results.

I use the latest  version 3.0.0 den 419.

kind regards

Andrew

script...

Code: [Select]
from ovito.modifiers import *
from ovito.pipeline import StaticSource, Pipeline
from ovito.data import DataCollection, SimulationCell, Particles
from ovito.io import import_file, export_file

pipeline = import_file("G:/Temp/cluster/tr3.gsd")

pipeline.modifiers.append(CreateBondsModifier(cutoff = 2.7))

modif2=ComputePropertyModifier(output_property = 'bl',expressions = ['BondLength'],operate_on="bonds")
pipeline.modifiers.append(modif2)

modifier = HistogramModifier(bin_count=200, property='bl',operate_on="bonds")
pipeline.modifiers.append(modifier)
output = pipeline.compute(1)

export_file(pipeline, "G:/Temp/cluster/bl4.txt", "txt/series", key="histogram[bl]")

Pages: [1]