简体   繁体   English

关于使用 MDAnalysis 计算生存概率中的 tau_max python package

[英]Regarding tau_max in Survival Probability calculation using MDAnalysis python package

I am newbie in using MDAnalysis as well as python in general.我是一般使用 MDAnalysis 以及 python 的新手。 I have performed a 100 ns simulation on a protein and wanted to calculate the survival probability of my water molecules within my selection.我对一种蛋白质进行了 100 ns 的模拟,想计算我选择的水分子的存活概率。 The thing is using the given code of MDAnalsyis survival probability, I am successfully generating the graph (x=time, y=SP) but cannot understand whether the time is in frames/ns/ps.事情是使用给定的 MDAnalsyis 生存概率代码,我成功生成了图形(x=时间,y=SP)但无法理解时间是否以帧/ns/ps 为单位。

For trial purpose, i tried to run my last 1000 frames ie 2ns.出于试用目的,我尝试运行最后 1000 帧,即 2ns。 The following is the code that i have used for this以下是我为此使用的代码

import MDAnalysis
from MDAnalysis.analysis.waterdynamics import SurvivalProbability as SP
import numpy as np
import matplotlib.pyplot as plt
u = MDAnalysis.Universe("md.psf", "md1000f.dcd", in_memory= True)
select = "byres name OH2 and sphzone 3.5 (name N and resid 143 144 145)"
sp = SP(u, select, verbose=True)
sp.run(start=0, stop=1000, tau_max=20)
tau_timeseries = sp.tau_timeseries
sp_timeseries = sp.sp_timeseries

# print in console
for tau, sp in zip(tau_timeseries, sp_timeseries):
      print("{time} {sp}".format(time=tau, sp=sp))

Here, i wanted all the water molecules within a sphere radius of 3.5 Å forming H-bonds with N atoms of residue Ids 143, 144 and 145.在这里,我想要 3.5 Å 球体半径内的所有水分子与残基 ID 为 143、144 和 145 的 N 原子形成氢键。

This is the result that i have got while running the code: 0 1 1 0.8738224637681159 2 0.8059945504087194 3 0.7505464480874317 4 0.7115068493150685 5 0.6736263736263736 6 0.6382920110192837 7 0.6041436464088398 8 0.573961218836565 9 0.5491666666666666 10 0.5242339832869081 11 0.5033519553072625 12 0.4809523809523809 13 0.45983146067415726 14 0.43999999999999995 15 0.4186440677966101 16 0.3985835694050991 17 0.37698863636363633 18 0.3566951566951567 19 0.33485714285714285 20 0.31432664756446993 This is the result that i have got while running the code: 0 1 1 0.8738224637681159 2 0.8059945504087194 3 0.7505464480874317 4 0.7115068493150685 5 0.6736263736263736 6 0.6382920110192837 7 0.6041436464088398 8 0.573961218836565 9 0.5491666666666666 10 0.5242339832869081 11 0.5033519553072625 12 0.4809523809523809 13 0.45983146067415726 14 0.43999999999999995 15 0.4186440677966101 16 0.3985835694050991 17 0.37698863636363633 18 0.3566951566951567 19 0.33485714285714285 20 0.31432664756446993

My question is:我的问题是:

  1. we have already input the start and stop, why we still need a tau_max?我们已经输入了开始和停止,为什么我们还需要一个 tau_max? Should it calculate the probability of water molecules present within that selection from 1 to 1000 frames (0 to 2ns)?它是否应该计算从 1 到 1000 帧(0 到 2ns)的选择中出现水分子的概率?

  2. What does tau_max=20 means? tau_max=20 是什么意思? what is the unit of tau_max is it picosecond or nanosecond? tau_max 的单位是皮秒还是纳秒?

  3. What will be the optimal tau_max value for 100ns simulation? 100ns 模拟的最佳 tau_max 值是多少?

Looking forward to your reply, thanks.期待您的回复,谢谢。

I have tried to increase the tau_max values ranging from 50 to 1000. Thinking that it is asking for number of frames.我试图将 tau_max 值从 50 增加到 1000。认为它要求的是帧数。 Since I have loaded 1000 frames, i have assigned tau_max as 1000. However, the values of SP is only ending at 56 tau number and from there onwards the values are either 0.0 or NaN.因为我已经加载了 1000 帧,所以我将 tau_max 指定为 1000。但是,SP 的值仅以 56 tau 数字结束,并且从那里开始,值要么是 0.0 要么是 NaN。

The analysis is agnostic to time and the time depends on the frames which here you use (start, stop, tau_max).分析与时间无关,时间取决于您在此处使用的帧(开始、停止、tau_max)。 Please recheck the documentation.请重新检查文档。 In your code here, tau_max means analyse the survival probability within 20 frames stretch anywhere along the trajectory defined by frames 0 to 1000. The optimal value of tau_max depends on the problem: the temperature, the pocket shape, the diffusion rate, the strength of the interaction etc. Here your result shows that within 11 frames, only half of the water molecules survive.在此处的代码中, tau_max表示分析沿 0 到 1000 帧定义的轨迹延伸到任何位置的 20 帧内的生存概率tau_max的最佳值取决于问题:温度、口袋形状、扩散速率、强度相互作用等。您的结果显示在 11 帧内,只有一半的水分子存活。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM