读写化学轨迹文件

chemfiles的Python项目详细描述


chemfiles库的python绑定

chemfiles是一个读写分子轨迹文件的库。这些 文件由您最喜欢的理论化学程序创建,其中包含 有关原子或残留物名称和位置的信息。Chemfiles提供 这些格式之上的抽象,以及用于加载和 将数据保存到这些文件中

此存储库包含chemfiles库的python绑定。这个 绑定是用cTypes模块创建的,它直接调用 chemfiles,因此与Python 2和3以及 努比。

安装

您可以使用喜爱的包管理器(^{}^{})来安装 支持linux/windows/macos和python的chemfiles的预构建版本 2.7和3

# Using pip
pip install chemfiles
# Using conda
conda install -c conda-forge chemfiles

源代码编译

如果您拥有 计算机上安装的C++化学文件库的{a3}。

# To get the latest development version:
git clone https://github.com/chemfiles/chemfiles.py
cd chemfiles.py
git submodule update --init
# Install development dependencies
pip install -r dev-requirements.txt
# Install chemfiles
pip install .
# Optionally run the test suite
tox

用法示例

下面是chemfiles模块的一个简单用法示例。请看 examples其他例子的文件夹。

fromchemfilesimportTrajectory,Frametrajectory=Trajectory("filename.xyz")frame=trajectory.read()print("There are {} atoms in the frame".format(frame.natoms()))positions=frame.positions()# Do awesome things with the positions here !

错误报告、功能请求

请以github issue形式报告您发现的任何错误和您可能需要的任何功能

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java无法使用Apache POI获取/设置Word文档(.doc)中的复选框值   在Java中,数字格式是接近INR货币的正确方法   使用java的数组。util。将文本的打印行反向堆叠   java OpenCV:如何实现“Keystone更正”?   更新后缺少java IDEA资源文件   使用Google日历API进行java身份验证   SeleniumWebDriver中的java捕获上载文件大小   java正在运行多个单一的“select where id=…”比运行单个“选择(…)中的位置id”更糟糕?   java我们可以使用frameset提交特定的html表单并在某种意义上给人ajax的感觉吗?   如何使用java在selenium中单击展开和折叠按钮   ArrayList<String>的java HashMap,字符串工作不正常?   无法使用Java连接到MySQL   解析Java简单行解析器   scala java。尼奥。ByteBuffer包裹法部分用于sbt运行