MIT License

项目介绍

jewettaij/moltemplate 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 MIT License 许可证,目前获得 325 个 Star、106 次 Fork。

仓库全名
jewettaij/moltemplate
开源许可证
MIT License
Star 数
325
Fork 数
106
未关闭 Issue
16

README 摘要

Moltemplate =========== Description Moltemplate is a general cross-platform text-based molecule builder for LAMMPS. Moltemplate was intended for building custom coarse-grained molecular models, but it can be used to prepare realistic all-atom simulations as well. It currently supports the ATB molecule database, the OPLSAA(2023), OPLSUA(2008), LOPLS(2015), AMBER(GAFF,GAFF2), DREIDING, COMPASS, TraPPE(1998), EFF,…

完整内容见 GitHub 原始 README 或本页 。

常见问题

moltemplate 用什么语言开发?

主要使用 Python 编写,采用 MIT License 许可证,目前有 325 个 Star。

moltemplate 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 moltemplate 的源码?

可以直接克隆仓库:git clone https://github.com/jewettaij/moltemplate.git,默认分支为 master;安装与运行步骤见仓库 README。

moltemplate 最近还在维护吗?

仓库最近一次更新为 2025年11月17日,当前有 16 个未关闭 Issue;Star 数为 325,可作为社区活跃度的参考。

关于

A general cross-platform tool for preparing simulations of molecules and complex molecular assemblies

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

语言占比

Awk
Python
Shell

README

CircleCI CodeQL Requires Python 3.4+ PyPI - Version PyPI Downloads Conda Downloads Paper Website

Moltemplate

Description

Moltemplate is a general cross-platform text-based molecule builder for LAMMPS. Moltemplate was intended for building custom coarse-grained molecular models, but it can be used to prepare realistic all-atom simulations as well. It currently supports the ATB molecule database, the OPLSAA(2023), OPLSUA(2008), LOPLS(2015), AMBER(GAFF,GAFF2), DREIDING, COMPASS, TraPPE(1998), EFF, force fields, and the MOLC, mW, ELBA(water), and oxDNA2, molecular models (and others). (New force fields and examples are added continually by users.) Moltemplate is inter-operable with ATB, Open Babel, AmberTools, LigParGen, RED-server, VMD, topotools, PACKMOL, EMC, CellPACK, Vipster, struc2lammpsdf, and any other program that generates MOL2 or LAMMPS DATA (.lmpdat) files (by using the mol22lt.py and ltemplify.py file converters).

This repository contains 3 folders:

Documentation

The best way to learn how to use moltemplate is to find an example which is similar to the system that you wish to simulate and modify it. This repository includes approximately 50 examples. Some of the moltemplate examples are also demonstrated (with pictures) here.

All moltemplate users should read chapter 4 of the reference manual (It’s only 6 pages long. The first 3 chapters can be skipped.) Chapters 6, 7, and 5.1-5.3 also also recommended. (13 pages.)

In addition, there are also several talks/tutorials online.

Strategies for preparing all-atom simulations

Moltemplate was originally designed for preparing coarse-grained simulations. Fully atomistic simulations usually require choosing force-field specific atom types (“atom typing”), and the calculation of atomic charge. Moltemplate does not do this. Moltemplate also does not repair incomplete PDB files. To get around these limitations:

  • Users can use use 3rd-party molecule-builder tools such as: the ATB database (LT format), AmberTools (MOL2 format), LigParGen (DATA format), OpenBabel, and EMC (DATA format). These tools can generate MOL2 or LAMMPS-DATA files which can be converted into moltemplate format (LT format) using mol22lt.py or ltemplify.py. (If you want to try and select the atom types manually instead of using 3rd-party tools, read these suggestions.) Alternatively, users can use the DREIDING force field which has relatively simple atom type rules.
  • For atomic partial charges the RED-server is useful (which can generate a MOL2 file), in addition to the tools listed above. Alternatively, users can try using LAMMPS’ built-in fix qeq feature.

Typical usage

    moltemplate.sh [-atomstyle style] [-pdb/-xyz coord_file] [-vmd] system.lt

Installation Instructions

Moltemplate depends on other software to work (such as BASH, python3, pip3, or conda). Once these dependencies have been met, installing moltemplate is relatively easy. However many users find it difficult to install these prerequisites correctly. A detailed installation guide is located here.

Installation for conda users

If you have installed conda, you can download moltemplate using:

conda install conda-forge::moltemplate

This will omit the moltemplate examples and documentation. You can browse examples online and/or download them using:

git clone https://github.com/jewettaij/moltemplate DESTINATION_DIRECTORY

Installation for pip users

You can download moltemplate using:

git clone https://github.com/jewettaij/moltemplate DESTINATION_DIRECTORY

(See below if you don’t have git installed.) Then enter the directory where this README file is located:

cd DESTINATION_DIRECTORY

…and run the following command:

pip3 install .              # (or "pip", if that fails)

(Note: In some environments, “pip3” is called “pip” instead.)

If the command above fails (with both “pip” and “pip3”), then try this instead:

pip3 install . --user       # (or "pip", if that fails)

This will install moltemplate for a single user. If you are on a shared computer and you want to install moltemplate system-wide, then use:

sudo pip3 install .         # (or "pip", if that fails)

Later, you can uninstall moltemplate using:

pip3 uninstall moltemplate
# (use "pip" and/or prepend "sudo" if you did that earlier)

If this fails then read the installation troubleshooting guide. This guide will offer several different installation methods and explain how to install the prerequisites needed.

Note: Alternatively, you can download and install moltemplate using a single command:

pip3 install git+https://github.com/jewettaij/moltemplate.git   # (or "pip", if that fails)

…however this will omit all of the examples and documentation.

Web page

Additional suggestions and supporting code can be found at:

http://www.moltemplate.org

Requirements

Moltemplate requires BASH and Python (3.4+), NumPy, and can run on MacOS, linux, or windows.

(Note: On MacOS, it may eventually become necessary to use 3rd-party tools like “brew” to install BASH if apple removes BASH support in future updates. Python 2.7 may also work, but you must edit your PATH to install moltemplate instead of using pip/pip3. Pip no longer works with old versions of python.)

To use LAMMPS and moltemplate, you will also need to install (and learn how to use) a (unix-style) text editor. (Word, Wordpad, and Notepad will not work.) Popular graphical text editors include Atom, Sublime, Notepad++, and VSCode. Older, non-graphical programs include vim, emacs, nano, ne, and jove. (Apple’s TextEdit can be used if you save the file as plain text.)

License

With the exception of one file (ttree_lex.py), moltemplate is available under the terms of the MIT license.

The remaining file, (ttree_lex.py), is a modified version of the shlex.py module, which was released using the PSF license. Hence ttree_lex.py must also use this license. (The PSF is not a copyleft license. It is similar to the BSD and MIT licenses and is compatible with the the GPL license.)

Citation

If you find this program useful, please cite:

“Moltemplate: A Tool for Coarse-Grained Modeling of Complex Biological Matter and Soft Condensed Matter Physics”, J. Mol. Biol., 2021, 433(11):166841, Jewett AI, Stelter D, Lambert J, Saladi SM, Roscioni OM, Ricci M, Autin L, Maritan M, Bashusqeh SM, Keyes T, Dame RT, Shea J-E, Jensen GJ, Goodsell DS https://doi.org/10.1016/j.jmb.2021.166841

评论

暂无评论