Moltemplate安装

软件介绍

Moletemplate

Moltemplate is a general cross-platform text-based molecule builder for LAMMPS. Moltemplate was designed for inventing new kinds of complex coarse-grained toy models of molecules, molecular machines, and assemblies. However it is well suited for preparing realistic all-atom simulations as well. It supports a wide variety of existing force fields and models including: OPLS, AMBER(GAFF,GAFF2), COMPASS, LOPLS(2015), EFF, TraPPE(1998), MOLC, MARTINI, SDK, mW, ELBA(water), and oxDNA2. However it can be used to build molecules using any of the force fields (and atom styles) available in LAMMPS, including new force fields created by modifying the LAMMPS source code. Molecules can be copied, combined, and linked together as building-blocks to define new molecules (hierarchically). Once built, individual molecules and subunits can be customized (atoms, bonds, and subunits can be moved and deleted). Moltemplate is currently interoperable with: VMD , PACKMOL , OVITO , CellPACK , VIPSTER , and the ATB, and LigParGen molecule servers (by using the ltemplify.py converter).

安装需要

以下软件版本为个人推荐

  • Windows下子系统(WSL),Ubuntu 16.04 LTS
  • Python安装,Python3.8.2
  • Moltemplate安装包,可git,可直接download压缩包,Package download

Windows子系统安装

可参考Windows下Ubuntu子系统安装
系统文件都在C盘指定目录下,可能因为版本或者用户名不同有些许出入,刚安装完子系统Localstate文件夹是空的,再进行账户密码设置之后,会得到两个文件夹。换句话说卸载也很简单,你把这俩文件夹删了就可,到时候进bash再次初始化就ok了,初始化后就会多了rootfs, temp两个文件夹。

C:\Users\**个人用户名**\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu16.04onWindows_79rhkp1fndgsc\LocalState

在这里插入图片描述
在这里插入图片描述

Python安装

  • 勾选Add Python to PATH
  • 注意安装目录不能有有空格字符,否则软件运行会提示找不到路径或者相关文件,Moltemplate运行会出问题
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

Moltemplate安装(tar.gz+pip)

此方法不需要在bash中添加PATH路径,只需使用win下的PATH即可。

  • 获取文件包有git方式和下载压缩包的方式,前者git后会全部解压到c盘,不太可取,而且这个要求后续的python也有路径要求,所以我下载到d盘进行解压就ok。cmd中解压命令:tar -xzvf moltemplate_2020-3-10.tar.gz,具体细节后续也可以参照doc中的manual。
  • 解压完继续输入pip install moltemplate,显示moltemplate安装成功
    在这里插入图片描述

运行Example

  • 运行前确认PATH路径已有以下内容
    在这里插入图片描述
  • 下载Example进行测试,space.lt, ions.lt, system.lt,将其放置在一个文件夹内,我新建了一个测试文件夹:E:\moltemplate_test
  • Ubuntu中运行:
cd /mnt/e/moltemplate_test 	#切换目录,mnt可以访问win盘
 moltemplate.sh system.lt	#moltemplate运行命令

我备注一下,懂行的请忽略:

cd ~/						#直接访问home路径

提示报错

moltemplate.sh v2.16.2 2020-3-10

Error: Missing file "/mnt/d/Programs/Python38/Scripts/../ttree.py"

INSTALLATION ERROR:
Follow the instructions in the "Installation" chapter of the moltemplate manual.
(Note: You may need to log out and log in again before the changes take effect.)

这是因为目前你的D:\Programs\Python38\Scripts下缺少文件,该文件目前还在你解压的moltemplate文件中,只需要将D:\moltemplate_2020-3-10\moltemplate中的相关文件复制进去即可。

在这里插入图片描述
再次进行测试
会发现显示moltemplate正常运行的界面,额外得到的文件后续可用于lammps的输入,操作过lammps的人可以看看相关文件,其实和lammps很相似,后续我再更新如何与lammps进行结合操作。
在这里插入图片描述
在这里插入图片描述

  • 7
    点赞
  • 24
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

YuanbaoQiang

你的鼓励将是我创作的最大动力~

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值