计算化学公社

 找回密码 Forget password
 注册 Register
Views: 8017|回复 Reply: 2
打印 Print 上一主题 Last thread 下一主题 Next thread

[Material Studio] 请问linux下怎么使用amorphous?

[复制链接 Copy URL]

111

帖子

0

威望

711

eV
积分
822

Level 4 (黑子)

跳转到指定楼层 Go to specific reply
楼主
各位老师好,我想在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;
复制代码


68

帖子

0

威望

1646

eV
积分
1714

Level 5 (御坂)

2#
发表于 Post on 2021-7-16 11:45:24 | 只看该作者 Only view this author
这个玩意就windows跑也很快的吧

111

帖子

0

威望

711

eV
积分
822

Level 4 (黑子)

3#
 楼主 Author| 发表于 Post on 2021-7-16 12:50:55 | 只看该作者 Only view this author
心向暖阳 发表于 2021-7-16 11:45
这个玩意就windows跑也很快的吧

windows版MS没装好,跑不了

本版积分规则 Credits rule

手机版 Mobile version|北京科音自然科学研究中心 Beijing Kein Research Center for Natural Sciences|京公网安备 11010502035419号|计算化学公社 — 北京科音旗下高水平计算化学交流论坛 ( 京ICP备14038949号-1 )|网站地图

GMT+8, 2026-2-23 04:19 , Processed in 0.165412 second(s), 20 queries , Gzip On.

快速回复 返回顶部 返回列表 Return to list