计算化学公社

标题: 请问linux下怎么使用amorphous? [打印本页]

作者
Author:
九月九    时间: 2021-7-16 11:16
标题: 请问linux下怎么使用amorphous?
各位老师好,我想在linux下使用MS的amorphous模块,保存文件后会生成一个perl脚本以及其它输入文件,我想这个应该需要按照RunMatScript.sh来提交,于是按照说明,RunMatScript -np 4 -project test -- ../../graphene.xsd,提交之后报错Unable to import document "……graphene-box/.arc": the file does not exist (function/property "Import") at -e line 9,于是我找到.perl文件的第九行,发现好像没法修改,请问要如何处理呢?整个.perl脚本如下:
  1. #!perl

  2. use strict;
  3. use Getopt::Long;
  4. use MaterialsScript qw(:all);

  5. my %Args;
  6. GetOptions(\%Args, "Structure=s", "JobDir=s", "Forcefield=s", "DoRefine=s");
  7. my $xtd = Documents->Import("$Args{JobDir}/$Args{Structure}.arc");       ##(第九行)
  8. my $trj = $xtd->Trajectory;
  9. my $xtdNew = Documents->New($xtd->Name . "_.xtd");
  10. my $trjNew = $xtdNew->Trajectory;

  11. my $currentForcefield = $Args{Forcefield};
  12. $currentForcefield = "COMPASS" if($currentForcefield eq "compass");

  13. Modules->Forcite->ChangeSettings([
  14.    CurrentForcefield => $currentForcefield,
  15.    "3DPeriodicvdWSummationMethod" => "Atom based",
  16.    "3DPeriodicvdWChargeGroupCubicSplineCutOff" => 8.5,
  17.    "3DPeriodicvdWChargeGroupCubicSplineWidth" => 0.0,
  18.    "3DPeriodicNonBond2BodyListBufferWidth" => 0.5,
  19.    "3DPeriodicElectrostaticSummationMethod" => "Ewald",
  20.    WriteLevel => "Silent"
  21. ]);

  22. my $doRefine = $Args{DoRefine} =~ /[YyTt]/;
  23. my $dynamics = Modules->Forcite->Dynamics;
  24. my $dynamicsSettings = Settings(
  25.    NumberOfSteps => 1000,
  26.    Temperature => 298,
  27.    Ensemble3D => "NVT",
  28.    Thermostat => "Velocity Scale",
  29. );
  30. my $failed;
  31. my $numFrames = $trj->NumFrames;
  32. for(my $frame = 1; $frame <= $numFrames && !defined $failed; $frame++)
  33. {
  34.    $trj->CurrentFrame = $frame;
  35.    my $doc = Documents->New("temp.xsd");
  36.    $doc->CopyFrom($xtd);
  37.    if ( $doRefine )
  38.    {
  39.        eval
  40.        {
  41.           print "Refining frame $frame of $numFrames...";
  42.           $dynamics->Run($doc,$dynamicsSettings)->Trajectory->Delete;
  43.        };
  44.        $failed = ($@) ? $@ : undef;
  45.        my $status = (defined $failed) ? "failed" : "OK";
  46.        print "$status\n";
  47.    }
  48.    $trjNew->AppendFramesFrom($doc);
  49.    $doc->Discard;
  50. }
  51. $xtdNew->Export("$Args{JobDir}/$Args{Structure}.xtd");
  52. die $failed if defined $failed;
  53. print "Refinement finished successfully" if $doRefine;
复制代码



作者
Author:
心向暖阳    时间: 2021-7-16 11:45
这个玩意就windows跑也很快的吧
作者
Author:
九月九    时间: 2021-7-16 12:50
心向暖阳 发表于 2021-7-16 11:45
这个玩意就windows跑也很快的吧

windows版MS没装好,跑不了




欢迎光临 计算化学公社 (http://bbs.keinsci.com/) Powered by Discuz! X3.3