Extract frames from a trajectory - script

The attached script extracts frames from a trajectory.

The default is to extract the LAST frame. Another allowed keyword is ALL.


It is also allowed to have a comma and space separated list and intervals via 1-3 for example



Please do the following to add it to the User menu.

  1. Import the FEX_v0.01.pl file into a Materials Studio project.
  2. Open Tools->Scripting->Library to add the file to your script library.
  3. Go to the User Menu tab.
  4. Import User Menu_FEX_v0.01.xml
  5. Under Script: point to the imported script.



The FEX_v0.01 command should now be in the User menu and not greyed out any more when the active document is a trajectory.

Comments 2
MZ
MZ 2019-11-26

Hello Carsten, I followed your procedures but I have some issues to run your script. (1) After Procedure 1-5, I tried to run the Perl script, but I got this error: No choice of active document has been made (function/property "ActiveDocument") at -e line 17. (2) I modified the script: my $doc = "kerogen II-A afterGEO.xtd", then I have this error: Can't locate object method "Name" via package "kerogen II-A afterGEO.xtd" (perhaps you forgot to load "kerogen II-A afterGEO.xtd"?) at -e line 29. Now I am thinking maybe I should not have run the Perl script directly, right? Thanks!

CM
CM 2024-01-22

You have to follow the procedure in the post for the script to add it to the user menu.​