利用ovito來計算MSD


1.python script:

import numpy

def modify(frame, data):
# Access the per-particle displacement magnitudes computed by the
# 'Displacement Vectors' modifier preceding this user-defined modifier in the
# data pipeline:
displacement_magnitudes = data.particles['Displacement Magnitude']

# Compute MSD:
msd = numpy.sum(displacement_magnitudes ** 2) / len(displacement_magnitudes)

# Output value as a global attribute to make it available within OVITO:
data.attributes["MSD"] = msd

 

2.ovito中的操作

(1)打開unwrap trajectories  ,目的是不考慮周期性原子,計算會才會准。

(2)打開以下的功能,運行后,再選擇“File”——“export file”,導出數據。

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM