Author Topic: Time (ps) of each frame in a movie  (Read 1147 times)

Xtof

  • Jr. Member
  • **
  • Posts: 68
Time (ps) of each frame in a movie
« on: June 01, 2017, 01:38:37 PM »
Dear all,

I generated a movie of how SIA and V form during a cascade (WS + CoordinationNumber modifiers) using a dump file obtained with LAMMPS.
Is there a way to print the time (in ps) at each frame?

Best regards,
Christophe

Alexander Stukowski

  • Administrator
  • Hero Member
  • *****
  • Posts: 638
Re: Time (ps) of each frame in a movie
« Reply #1 on: June 01, 2017, 05:21:51 PM »
Hi Christophe,

Printing the timestep number in the rendered frames can be done using the Text Label viewport overlay.

However, if you need to convert the timestep to a simulation time in picoseconds first, like in your case, then the Python Script viewport overlay is your friend.

Alternatively, you can insert a Python Script modifier into the data pipeline that performs the numeric conversion of the global "Timestep" attribute (requires just a single line of Python code). Then you can use the  Text Label viewport overlay to print the value of the new attribute. Let me know if you need help with that.

-Alex

Xtof

  • Jr. Member
  • **
  • Posts: 68
Re: Time (ps) of each frame in a movie
« Reply #2 on: June 02, 2017, 08:57:08 AM »
Great!
I will have a look at it.

Best regards,
Christophe

Xtof

  • Jr. Member
  • **
  • Posts: 68
Re: Time (ps) of each frame in a movie
« Reply #3 on: June 02, 2017, 09:03:47 AM »
I forgot to mention that the timestep is adaptive in my LAMMPS simulation. Is it still possible to print it? Is it still possible to convert the timestep number into a time in ps in that case?

Xtof

Alexander Stukowski

  • Administrator
  • Hero Member
  • *****
  • Posts: 638
Re: Time (ps) of each frame in a movie
« Reply #4 on: June 02, 2017, 09:08:35 PM »
I don't think so. The LAMMPS dump file format only stores the timestep number. So that's the only information available to OVITO.

If, however, you have a lookup table available, perhaps a text or log file with the tilmestep numbers and corresponding simulation times, you could load it as part of the Python viewport overlay script and do the conversion yourself.