Hello,everyone
I am a new user of MS script and hope some experienced users can give me some advice.
I want to simulate the melting point of LiCl-KCl by cooling it from 723K to another lower temperature with a Perl script to observe the MSD (or density or some other property of it).
Here is my code:
==========================================
#!perl
{
use strict;
use Getopt::Long;
use MaterialsScript qw(:all);
my \$deltaT=20;
my \$Tempchangetimes=1;
my \$NumberOfSteps = 20000;
my \$doc = \$Documents{"H2O.xsd"};
my \$newdoc = Documents->New("Hello.xtd");
sub Run {
my (\$doc) = @_;
}
my \$forcite = Modules->Forcite;
my \$dynamics = Modules->Forcite->Dynamics;
for (my \$i = 0) {
\$forcite->ChangeSettings([
Ensemble3D =>"NVT",
CurrentForcefield => "COMPASS", # force field to be used in the simulations
Temperature=>723-\$deltaT*\$i,
Thermostat => "Nose", # type of thermostat to use
BerendsenThermostatDecayConstant => 0.1, # thermostat parameter
"3DPeriodicvdWSummationMethod" => "Atom based", # van der Waals method to use
TimeStep => 1, # time step (in fs)
NumberOfSteps => \$NumberOfSteps,
]);
my \$results = Modules->Forcite->Dynamics->Run(\$doc, \$forcite);
my \$docdelete = \$Documents{"H2O.xtd"};
\$newdoc->Trajectory->AppendFramesFrom(\$doc,Frames(Start=>1,End=>\$NumberOfSteps));
\$docdelete->Delete;
}
for (my \$i = 1; \$i <= \$Tempchangetimes; ++\$i) {
\$forcite->ChangeSettings([
Ensemble3D =>"NVT",
CurrentForcefield => "COMPASS", # force field to be used in the simulations
Temperature=>723-\$deltaT*\$i,
Thermostat => "Nose", # type of thermostat to use
BerendsenThermostatDecayConstant => 0.1, # thermostat parameter
"3DPeriodicvdWSummationMethod" => "Atom based", # van der Waals method to use
TimeStep => 1, # time step (in fs)
NumberOfSteps => \$NumberOfSteps,
InitialVelocities => "Current"
]);
my \$results = Modules->Forcite->Dynamics->Run(\$doc, \$forcite);
my \$docdelete = \$Documents{"H2O.xtd"};
\$newdoc->Trajectory->AppendFramesFrom(\$doc,Frames(Start=>1,End=>\$NumberOfSteps));
\$docdelete->Delete;
}
}
But when i analyze the MSD of the xtd file, it shows "Mean square displacement analysis failed. The times associated with the first two selected fames are both zero"
I guess it because all the trajectories are counted from zero not continued.
Are there any method can fixed this problem??
Thanks in advance,
Regards,
Bill