You are on page 1of 1

#!

perl
use strict;
use Getopt::Long;
use MaterialsScript qw(:all);
#give the atom a velocity
my $doc = $Documents{"export.xsd"};
my $fixatoms = $doc->DisplayRange->Sets("BOTTOMWALL")->Atoms;
$fixatoms->Fix("XYZ");
my $moveatoms = $doc->DisplayRange->Sets("TOPWALL")->Atoms;
foreach my $atom (@$moveatoms)
{
my $velocity = Point(X=>1, Y=>0, Z=>0);
$atom ->Translate($velocity);
}

#start the calculation


my $forcite = Modules->Forcite;
$forcite->ChangeSettings([Ensemble3D=> "NVT",WriteForces=> "no",InitialVeloci
ties
=> "Current",Temperature=>300,NumberOfSteps => 20000,TrajectoryFrequency => 5
0,CurrentForcefield => "COMPASS",TimeStep => 0.5,Thermostat => "Nose"]);
my $results= Modules->Forcite->Dynamics->Run($doc);

You might also like