Accelrys Materials Studio - ScriptingLauncher

http://chembytes.wikidot.com/materials-studio

Accelrys Materials Studio

accelrys_ms.jpg

Accelrys Materials Studio (MS) is a commercial program, so I think I should be extra-careful writing about it. Let's start with the usual disclaimer: I am not connected in any way with Accelrys and what I write is what I think about Materials Studio (MS) as a sporadic user, and do not reflect in any way the opinion of my laboratory and of the people working there. Being a sporadic user, I honestly cannot tell too much about the use MS, so I will not. Let me just say that I consider MS is a really nice piece of software for certain things, for example the 3D editor is amazing, and a pain for others. Plus, is Windows only. Personally I see MS a product tuned more for the industry than for academic research, where flexibility and portability should be taken in much higher consideration (again, my personal opinion).

There is one aspect in the last versions of MS that is worthy to explore and that can improve tremendously the flexibility of MS: perl scripting. Now it is possible to program in perl within MS, which make possible to use and combine almost all the functions you can access via the graphical interface. Furthermore, perl scripting make finally easy to make MS interact with the "external" world, meaning you can export your results as you prefer and also add new capabilities to MS. I have recently give a small introductory seminar to perl scripting in MS to my colleagues, and I have thought that it could be useful to collect in Chembytes those scripts and those I will make for the next meetings. All the script you will find here are made by me or published with the consent of the author and are free to be used and modified. If for any reason this page is illegal (I cannot see why, but I may be wrong), please contact me and I will procede to remove this page and/or all the illegal contents. Also, please note that the script are made to illustrate some procedures, and are far to be complete, efficient or bug free. Take them as a starting point and backup your data before execute the scripts. I am not responsible for any loss of data due to the use of these scripts. Use them at your own risk!

Let's start: what do you need?

Well, the only thing you need to have installed is MS. That assuming you are not interested in Accelrys pipeline pilot.
I strongly recommend you to get a perl installation also outside MS: perl is free and having a perl installation will let you easily create small script to get familiar with the syntax of perl. In Windows you can install ActivePerl from ActiveState or strawberry perl, as suggested in the Perl's official website.
There is another option though: install the standard distribution of perl (and its modules, if required) via cygwin. This will allows to work in a bash terminal under Windows, that is so much better than the standard Windows consolle.

What you should do writing your code

Comment the scripts, use appropriate and meaningful names for your variables and indent the code. These three requirements will make your code much more easy to understand and eventually modify for anyone (yes, also you).

Materials Studio perl environment

To write a new script, just select script from the File->New menu. You can also open an existing script, with File->Open.
By default, when you create a new perl script, the following lines are present:

#!perl
use strict;
use MaterialsScript qw(:all);

The use of strict is optional, but I would advise you to keep using it, while the MaterialsScript module is required to access to the MS functionalities.

The scripts

Numbering the atoms

One of the major problems I have encounter in using MS, is find a way to display a label showing the number in the structure for the atoms. Which is the first atom in the structure? and the last? and if I want to calculate a distance between the atoms 10 and 23, which ones I should select? Sure, you can display the cartesian coordinates and then edit the xtd file and try to figure out which atom is which. This script will modify the atom names as ElementSymbol-N, where N is the position of the atom in the structure. The modified document is not saved by the script, so you can save or save as, if you wish to maintain the original file.

Download

Download the script here

Export a MS xtd trajectory as XYZ trajectory.

This script export a xtd trajectory from MS Forcite module as XYZ trajectory. The script creates two text files in the current directory: xtd2mol.txt, which contains a short log and trj.txt, containing the XYZ trajectory. The extension txt is due to the fact that when you create a document, the format of the document must be recognized by MS, and xyz/xmol are not known formats. Therefore, you will have to deal with .txt extension for your files.
Backup copies of the files, are managed by MS in the usual way, appending (N) to the name of the flle, where N is a progressive number.

Download

Download the script here

Disclaimer

use the software and the scripts in this wiki at your own risk. The software is freeware and it come without any (as in nothing, nada, niente, rien) WARRANTY. Therefore I cannot be responsible for loss of data, time, bad results or anything else deriving by the use of my software or this wiki.


  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
1.1量子力学方法 1.1.1 CASTEP CASTEP由Cambridge大学Mike Payne教授发布,采用密度泛函理论、平面波赝势法(用平面波描述外层价电子,内层电子用赝势代替),进行第一性原理量子力学计算的程序。其中总能量包含动能、静电能和交换关联能三部分,各部分能量都可以表示成密度的函数。电子与电子相互作用的交换和相关效应采用局域密度近似(LDA)或广义密度近似(GGA),静电势只考虑作用在系统价电子的有效势(即赝势:Ultrasoft 或norm-conserving),电子波函数用平面波基组扩展(基组数由Ecut-off确定),电子状态方程采用数值求解(积分点数由FFT mesh确定),电子气的密度由分子轨道波函数构造,分子轨道波函数采用原子轨道的线性组合(LCAO)构成。计算总能量采用SCF迭代。CASTEP在计算分子、固体、表面、界面、掺杂、错位等方面非常有优势。 主要功能及特性:  支持 PBE、PBE0、HSE03、HSE06以及SCAN meta-GGA 等交换关联泛函;  能量计算:形成能、吸附能、缺陷形成能、内聚能、表面能等;  结构优化:力与应力的计算、几何驰豫(原子坐标、晶胞参数、键长、键角、)等;  过渡态:过渡态搜索等;  电子结构:能带、态密度(局域、分波)、声子谱、电荷密度、差分电荷密度、电子局域函数、电子轨道、扫描隧道显微镜STM模拟、共价键级、静电势(支持可视化)、静电荷(Mulliken、Hirshfeld)、功函数、自旋极化(共线、非共线)、支持旋轨耦合、费米面、支持利用On-the-fly 生成模守恒(normconserving)赝势,特别适用于计算磁性材料和包含f电子的元素;  介电性质:波恩有效电荷、静态介电常数张量、极化率张量;  力学性质:弹性力常数张量,体模量,剪切模量,杨氏模量,泊松比;热力学性质:声子态密度、色散谱、熵、焓、自由能、零点能、德拜温度、等容热容随温度的变化曲线;  光学性质:红外光谱、拉曼光谱5.0、核磁共振谱(NMR CASTEP,可用DFT+U)、电子能量损失谱4.4(旋轨耦合效应5.5)、X射线吸收谱4.4(旋轨耦合效应5.5)、光频介电常数虚(实)部、吸收系数、折射率、能量损失函数、光导率虚(实)部;  动力学计算:支持NVE、NVT、NPT以及NPH等系综,以及多种控温控压函数;

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值