Perl Flow control

Hi

I am having a very simple problem in understanding how the results between each task is being transferred. I want to run a very simple script: optimisation followed by a series of NVT runs (script below). Two questions:
1. When I run I get an error message: he trajectory document does not contain a trajectory object in Forcite.Dynamics (function/property "Run") at -e line 18. Why? I understand \\\$doc object should contain the trajectory after optimization. Or not?
2. If so or not where the trajectory after the task is performed is stored? 

Best

Lukasz

#!perl

use strict;
use Getopt::Long;
use MaterialsScript qw(:all);

my \\\$doc = \\\$Documents{'sc_test.xsd'};


#Geometry optimization
my \\\$results = Modules->Forcite->GeometryOptimization->Run(\\\$doc, Settings(
    Quality => "Fine", 
    CurrentForcefield => "pcff"));
#\\\$doc = \\\$results->Trajectory;
#Equlibration from 750 to 303 for 50 ps each

for (my \\\$i = 1;\\\$i<=6;++\\\$i) {
my \\\$results = Modules->Forcite->Dynamics->Run(\\\$doc, Settings(
    Quality => "Fine", 
    CurrentForcefield => "pcff", 
    TrajectoryRestart => "Yes", 
    AppendTrajectory => "Yes", 
    Ensemble3D => "NVT", 
    Temperature => 750-(750-303)/5*(\\\$i-1), 
    NumberOfSteps => 500, 
    TrajectoryFrequency => 50, 
    Thermostat => "Berendsen"));
}
Answers 2
JD
JD 2016-03-14 Best Answer
Hi Lukasz,

The problem arises from the fact that you are using the TrajectoryRestart and AppendTrajectory options. These require an XTD rather XSD as input to the Dynamics. You can get the trajectory from the results object using $results->Trajectory. But the first run cannot be a restart run obviously.
ŁR
ŁR 2016-03-14
Thanks Jason, everyday is a lesson of humilty. What about q. 2? Is there a description in API of the calculations result object?