all guys
How are you!
Recently,I want to calculate the radius of gyration(Rg) vs time,the script of it has been found from the bbs in Accelrys community ,this is the link :https://community.accelrys.com/message/9323#. but there is a problem which i don't understand about the script:
my \\\$trace = \\\$axes->PrincipalMoment1
+\\\$axes->PrincipalMoment2
+\\\$axes->PrincipalMoment3; ,
what does this section describe?the perl script usually calls the functions or modules which have existed in the materials studio,so it is hard for me to understand the perl script.my another purpose is to calculate the Rg(x),Rg(y),Rg(z)vs time through modifying the script:
my \\\$doc = \\\$Documents{"my_trajectory.xtd"};
my \\\$atoms = \\\$doc->UnitCell->Sets("polymer")->Atoms;
my \\\$axes = \\\$doc->CreatePrincipalAxes(\\\$atoms);
my \\\$mass;
foreach my \\\$atom (@\\\$atoms)
{ \\\$mass += \\\$atom->Mass; }
my \\\$trj = \\\$doc->Trajectory;
for (my \\\$i = 1; \\\$i <= \\\$trj->NumFrames; \\\$i++)
{ \\\$trj->CurrentFrame = \\\$i;
my \\\$time = \\\$trj->FrameTime;
my \\\$trace = \\\$axes->PrincipalMoment1
+\\\$axes->PrincipalMoment2
+\\\$axes->PrincipalMoment3;
my \\\$Rg = sqrt(\\\$trace*0.5/\\\$mass);
printf "%g %g\\n", \\\$time, \\\$Rg; }
Could you help me ?thanks!
