博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Accelrys Materials Studio - ScriptingLauncher
阅读量:4197 次
发布时间:2019-05-26

本文共 5221 字,大约阅读时间需要 17 分钟。

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

Accelrys Materials Studio

accelrys_ms.jpg

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!

Fold
Table of Contents

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 .

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 from ActiveState or , as suggested in the Perl's .
There is another option though: install the standard distribution of perl (and its modules, if required) via . 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:

#!perluse 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

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

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.

转载地址:http://npuli.baihongyu.com/

你可能感兴趣的文章
Yii2.0 rules验证规则大全
查看>>
FEC CProfile 使用
查看>>
mongodb 加载多个文件
查看>>
MongoDB 工具
查看>>
MongoDB 应用案例
查看>>
MongoDb web 用户界面
查看>>
mongodb 特殊作用的数据库
查看>>
MongoDB 数据类型
查看>>
默认 redis 安装存在漏洞, 可以直接 获取 root 权限
查看>>
mongodb mapreduce 文档
查看>>
mongodb mapreduce 参数的详细说明
查看>>
mongodb mapreduce 结果数据 与历史数据 再次合并
查看>>
mongdb mapreduce 排查 map reduce
查看>>
mongodb mapreduce 分片
查看>>
mongodb mapreduce 总结
查看>>
iptables 设置
查看>>
APF的安装配置以及使用规则
查看>>
mongodb 分片配置 以及mapreduce
查看>>
mongodb 分片 副本集 集群
查看>>
js 创建对象
查看>>