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
    评论
Class 1 -- Materials Studio 快速入门教程 该教程将介绍Materials Studio 软件的基本功能,在这一部分,你将学到: 一. 生成Projects 二. 打开并且观察3D 文档 三. 绘制苯甲酰胺分子 四. 观察并且处理研究表格文档 五. 处理分子晶体:尿素 六. 建造Alpha 石英晶体 七. 建造多甲基异丁烯酸盐 八. 保存Project 并结束 在d盘上建文件夹class 1: d:\class 1 -Materials-Studio-培训教程全文共77页,当前为第1页。 1. 建立一个新文件夹D:\ MS teach \ class1 2. 运行 Materials Studio,生成名称为My quickstart 的Project 或从运行菜单中运行:所有程序\ Accelrys Materials Studio 4.4 \ Materials Studio 生成一个Project 目的: 介绍Materials Studio 中 project 概念 模块: Materials Visualizer 在桌面双击快捷 式 -Materials-Studio-培训教程全文共77页,当前为第2页。 选择此文件夹存放数据 生成了名称为My Quickstart 的Project 写入My quickstart 这样就产生了新的 Materials Studio project,开始了Materials Studio 运行 -Materials-Studio-培训教程全文共77页,当前为第3页。 3. 恢复project 的默认设置(初学者不要做此操作) 本教学过程中,每一个新的 project 都使用 Materials Studio 自动产生的template project 的设置。保证 My quickstart project 也一样。 选择 Tools \ Settings Organizer ,打开Settings Organizer 对话框。 1. 点击此处的Materials Studio icon,选中所有的模块和图示工具。 2. 单击Reset,所有的模块和图示工具都恢复Accelrys默认值。 3. 在此可改变模块和图示工具的设置值。初学者慎用。 在layer builder中试试。 若干次操作后,已有一些参数设置。由于错误等原因,要重复前面的一个过程。为保存两次操作一样,需返回MS的默认设置。 -Materials-Studio-培训教程全文共77页,当前为第4页。 二. 打开并且观察3D 文档 目的: 介绍Materials Studio 中文档 documents 的概念模块: Materials Visualizer前提: 已生成一个Project Materials Studio 使用了多种类型的文件,如3D Atomistic and Mesoscale、text、chart、 HTML、 study table、grid、script、 和 forcefield documents。在后面进行计算时,这些文件将逐个显示在projects中,反映了计算的过程。 现在的教学中, 主要出现的是 3D Atomistic 类型的文件。 本节课包括以下内容: 1. 输入一个结构 2. 调整显示方式 3. 改变3D 结构的视图 4. 选择对象的不同类型 -Materials-Studio-培训教程全文共77页,当前为第5页。 1. 输入一个结构 File / Import,打开输入文件对话框 (注意,此对话框也可用工具栏上的输入按钮 打开)。 选择 Examples / Documents / 3D Model / TON.msi,单击 Import 按钮。 zeolite Theta-1 unit cell 右键旋转 -Materials-Studio-培训教程全文共77页,当前为第6页。 这个 3D Viewer 显示通常的 zeolite Theta-1 单胞。 文件 TON.xsd 是Project Explorer 中My quickstart project 的一部分。注意文件的扩展名已由.msi 变为 .xsd,这是3D 结构的 XML-based native Materials Studio 格式。 msi ? -Materials-Studio-培训教程全文共77页,当前为第7页。 2.调整显示方式 在 3D Viewer 上按右键,出右键菜单,选 Display Style ,Display Style 对话框中的各选项的意义如下: Atom 栏: Display Style: Line:线状模型。 Stick:棍状模型。 Ball and
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、付费专栏及课程。

余额充值