pysimm
======
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)
pysimm stands for <b>Py</b>thon <b>S</b>imulation <b>I</b>nterface for <b>M</b>olecular <b>M</b>odeling. It is an open-source python package designed to assist in the setup and executation of molecular simulations through high level APIs and abstraction from underlying third party simulation software.
Documentation for the python package can be found at http://pysimm.org/documentation
### Sections
1. [Getting Started](#getting-started)
2. [Integration with LAMMPS](#integration-with-lammps)
3. [Integration with Cassandra](#integration-with-cassandra)
4. [Complete Installation](#complete-installation-pysimm-and-lammps)
5. [Using Docker image](#using-docker-image)
6. [Acknowledgments](#acknowledgments)
Getting Started
===============
Those who need to install LAMMPS (or wish to build a new version of LAMMPS with the optional packages utilized in the examples included in the repository) should skip to the Complete Installation section below, which provides instructions on how to setup pysimm, build a LAMMPS version suitable for the examples included here, and configure the integration between the two pieces of software. If you have already installed LAMMPS and simply wish to setup pysimm, continue following the directions below.
To get started, clone the repository, cd into the new directory, and install using complete_install.py. The --pysimm command line argument passed to the script should be the directory in which you cloned the pysimm repository (one directory up). The following example assumes you cloned the repository in your home directory.
```
git clone https://github.com/polysimtools/pysimm
python pysimm/complete_install.py --pysimm $PWD
```
This adds the pysimm package to your PYTHONPATH, and adds a pysimm command line tool to your PATH. Parts of pysimm require the use of the numpy package. To use the complete_install script to install numpy as well, include the --apt-install command line argument.
Integration with LAMMPS
=======================
If you are using your own build of LAMMPS, be sure that the following packages were included in your installation as some functionality in the example scripts require some subset of these packages:
- molecule
- class2
- kspace
- user-misc
- misc
- qeq
- manybody
pysimm can integrate seamlessly with parts of the LAMMPS simulation software package through the pysimm.lmps module. To configure the integration, locate your LAMMPS executable. For example, if the path to your LAMMPS executable is /usr/bin/lmp_mpi, add this path as an environment variable "LAMMPS_EXEC":
```echo "export LAMMPS_EXEC=/usr/bin/lmp_mpi" >> ~/.bashrc```
Correct configuration can be checked by using the following code:
```
from pysimm import lmps
lmps.check_lmps_exec()
```
If the LAMMPS_EXEC environment variable is not set, you will see a warning. Once configured, try the examples in the repository which highlight some of the features of pysimm.
Integration with Cassandra
==========================
<a name="CSintegration"></a>
Cassandra is a versatile software for the Monte-Carlo simulations suitable for the variety of the molecular systems. For more details please refer the [web-page](https://cassandra.nd.edu/) of the Cassandra project. This explains how to integrate already installed Cassandra software to the pysimm. The integration is done through the environment variable CASSANDRA_EXEC. It defines the path to the Cassandra executable (it might be either serial or the parallel Cassandra compilation). If, for example, the Cassandra executable named *cs_omp_gfort.exe* was installed to */usr/lib/cassandra/*, the following should be set:
```export CASSANDRA_EXEC=/usr/lib/cassandra/Src/cs_omp_gfort.exe```
The cassandra module of the pysimm will check whether the CASSANDRA_EXEC is set right before the running a simulation. Additionally, in the same way as in the lammps module, the setting can be checked using the code:
```
from pysimm import cassandra
cassandra.check_cs_exec()
```
<i>NOTE: The parallel Cassandra version uses OpenMP, so the number of parallel tasks (number of threads) is normally controlled through OMP_NUM_THREADS environment variable. Set it to required value if you want to use the specific number of parallel threads.</i>
Complete Installation (pysimm and LAMMPS)
=========================================
*** Please be aware LAMMPS is a separate software, developed separately, and protected under a separate license. The following information is installation directions <i>suggested</i> by pysimm developers that may be used to generate a functional version of LAMMPS for integration with pysimm. LAMMPS has much more functionality than is represented by these installation directions, and those interested in these functionalities should visit [LAMMPS documentation](http://lammps.sandia.gov/doc/Manual.html) to learn more.
<i>NOTE: The complete_install.py script is designed to work on debian-based linux machines only. It uses apt-get to install dependencies for pysimm and LAMMPS.</i>
Included in the repository is a python script complete_install.py that will configure pysimm, install LAMMPS from their git repository, and configure the integration between the two pieces of software. First clone the pysimm repository, and run complete_install.py. You must provide the path prefix to the recently cloned pysimm directory and the prefix for the new lammps source code directory. The following assumes pysimm was cloned into your home directory and will also install lammps in your home directory:
```
git clone https://github.com/polysimtools/pysimm
python pysimm/complete_install.py --pysimm $PWD --lammps $PWD
```
Afterwords be sure to source your ~/.bashrc file:
```source ~/.bashrc```
Using Docker image
==================
The root folder now contains a 'Dockerfile' that will help you to create a Docker
image of Debian 10 with pysimm and pre-installed LAMMPS,
CASSANDRA, Zeo++ v0.3, and PoreBlazer v4.0.
To compile the Docker image from the file run the following from the root pysimm directory
(optionally changing 'my_tag' to any text tag you like):
```commandline
docker build -t pysimm:my_tag -f Dockerfile .
```
Please refer the [Docker documentation](https://docs.docker.com/engine/reference/commandline/build/)
for the detailed description of the `build` function.
If the build is successful the list of your Docker images will contain freshly built
pysimm image. The full list can be shown by:
```commandline
docker images
```
Finally, to run the corresponding pysimm image call:
```commandline
docker run -it pysimm:my_tag bash
```
Please see [Docker reference page](https://docs.docker.com/engine/reference/run/) for the
detailed description of `docker run` command.
The pysimm source files are kept in `/usr/local/pysimm` folder. Thus you can quickly test the
LAMMPS or CASSANDRA modules by running one of the examples.
```commandline
cd /usr/local/pysimm/Examples/08_ethanol_acetone_mixture
python run.py
```
To transfer output files from the docker image back to host one can use `docker cp` command.
```commandline
docker cp ContainerName:/container/path/to/file /host/path/to/file
```
and the `ContainerName` one can use either the name or ID of a running container
which can be listed by calling `docker ps`.
Acknowledgments
================
This material is based upon work supported by:
* National Science Foundation under Grant No. (ACI-1613155)
* U.S. Departement of Energy under Grant No. (DE-FG02-17ER16362)
没有合适的资源?快使用搜索试试~ 我知道了~
用于分子建模的python模拟接口___下载.zip
共361个文件
txt:80个
py:76个
html:72个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 154 浏览量
2023-04-16
20:21:21
上传
评论
收藏 4.35MB ZIP 举报
温馨提示
用于分子建模的python模拟接口___下载.zip
资源推荐
资源详情
资源评论
收起资源包目录
用于分子建模的python模拟接口___下载.zip (361个子文件)
testfile.ac_input.ac 4KB
atomtypes.atp 23KB
.buildinfo 230B
testfile.cml_input.cml 3KB
theme.css 101KB
basic.css 9KB
pygments.css 4KB
badge_only.css 3KB
loadings.dat 167B
Dockerfile 2KB
.gitpod.dockerfile 361B
testfile.lammpstrj.dump 78KB
fontawesome-webfont.eot 69KB
ajax-loader.gif 673B
.gitignore 33B
system.html 890KB
cassandra.html 252KB
lmps.html 205KB
pysimm.system.html 152KB
pcff.html 83KB
gaff2.html 80KB
gaff.html 80KB
genindex.html 71KB
polymatic.html 69KB
random_walk.html 64KB
dreiding.html 63KB
gasteiger.html 59KB
pysimm.lmps.html 56KB
poreblazer.html 55KB
calc.html 53KB
pysimm.cassandra.html 50KB
forcefield.html 48KB
utils.html 41KB
tip3p.html 39KB
mc_md.html 30KB
complete_install.html 26KB
pysimm.calc.html 20KB
amber.html 20KB
pysimm.forcefield.gaff2.html 17KB
pysimm.forcefield.pcff.html 17KB
pysimm.forcefield.dreiding.html 17KB
pysimm.forcefield.gaff.html 16KB
pysimm.forcefield.tip3p.html 16KB
equilibrate.html 16KB
pysimm.apps.polymatic.html 16KB
pysimm.html 15KB
pe.html 14KB
pysimm.apps.random_walk.html 13KB
ps.html 13KB
py-modindex.html 13KB
pysimm.apps.poreblazer.html 12KB
ps.html 12KB
ps.html 12KB
pysimm.forcefield.forcefield.html 12KB
pmma.html 12KB
pmma.html 12KB
pmma.html 11KB
pe.html 11KB
pe.html 11KB
pysimm.utils.html 11KB
pysimm.amber.html 10KB
pysimm.apps.mc_md.html 10KB
pysimm.html 10KB
pysimm.models.html 9KB
pysimm.models.monomers.html 9KB
pysimm.models.monomers.dreiding.pe.html 8KB
complete_install.html 8KB
pysimm.apps.equilibrate.html 8KB
pysimm.models.monomers.dreiding.pmma.html 7KB
pysimm.models.monomers.dreiding.ps.html 7KB
pysimm.models.monomers.gaff2.pmma.html 7KB
pysimm.models.monomers.gaff.pmma.html 7KB
pysimm.models.monomers.gaff2.pe.html 7KB
pysimm.models.monomers.gaff.ps.html 7KB
pysimm.models.monomers.gaff.pe.html 7KB
pysimm.models.monomers.gaff2.ps.html 7KB
pysimm.forcefield.html 7KB
pysimm.models.monomers.dreiding.html 7KB
pysimm.models.monomers.gaff2.html 7KB
pysimm.models.monomers.gaff.html 7KB
pysimm.apps.html 7KB
pysimm.forcefield.gasteiger.html 7KB
modules.html 6KB
index.html 6KB
pysimm.cli.html 6KB
index.html 5KB
search.html 4KB
mc_default.inp 747B
props.inp 688B
props.inp 686B
run_props.inp 654B
props.inp 643B
props.inp 642B
objects.inv 3KB
rnd_walk.pilot_tutorial.ipynb 930KB
ffnonbonded.itp 1.76MB
ffbonded.itp 1.17MB
jquery.js 278KB
jquery-3.1.0.js 258KB
underscore.js 46KB
共 361 条
- 1
- 2
- 3
- 4
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功