读取和操作Gromacs能量文件
panedr的Python项目详细描述
panedr读取gromacs edr文件并将其内容作为pandas返回 数据帧。库公开了一个函数edr_to_df 获取EDR文件路径并返回pandas的函数 数据帧。
panedr与Python2.7及更高版本兼容,并且与 Python3.5及更高版本。
示例
importpanedr# Read the EDR filepath='ener.edr'df=panedr.edr_to_df(path)# The `verbose` optional parameter can be set to True to display the# progress on stderrdf=panedr.edr_to_df(path,verbose=True)# Get the average pressure after the first 10 nspressure_avg=df[u'Pressure'][df[u'Time']>10000].mean()
安装
pip install panedr
许可证
panedr在python中翻译gromacs源代码的一部分。 因此,panedr分布在同一个gnu小将下 作为gromacs的公共许可版本2.1。
Panedr — a library to manipulate Gromacs EDR file in python
Copyright (C) 2016 Jonathan Barnoud
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA