| 9 | 1/1 | 返回列表 |
| 查看: 6408 | 回復(fù): 8 | |||
[交流]
ovito軟件分析Voronoi
|
|
使用ovito分析Voronoi,輸入?yún)?shù)后,怎么得到結(jié)果?不明白?有會的嗎? 發(fā)自小木蟲Android客戶端 |
至尊木蟲 (職業(yè)作家)
|
采用python script來計算吧: https://www.ovito.org/manual/pyt ... ute-voronoi-indices |
|
老師好,我把路徑改了,在ovito圖形界面,run scripts,但是ovito圖形界面只是閃了下,沒報錯,也沒結(jié)果,啥也沒有,是腳本的問題嗎?我用的是vasp的POSAR文件,下面是ovito計算voro的腳本,我直接復(fù)制的,不知道對不對 # Import OVITO modules. from ovito.io import * from ovito.modifiers import * # Import NumPy module. import numpy # Load a simulation snapshot of a Co-B metallic glass. node = import_file("E:/ovito/Co65B35/POSCAR" ![]() # Set atomic radii (required for polydisperse Voronoi tessellation). atypes = node.source.particle_properties.particle_type.type_list atypes[0].radius = 1.25 # Co atomic radius (atom type 1 in input file) atypes[1].radius = 0.82 # B atomic radius (atom type 2 in input file) # Set up the Voronoi analysis modifier. voro = VoronoiAnalysisModifier( compute_indices = True, use_radii = True, edge_count = 6, # Length after which Voronoi index vectors are truncated edge_threshold = 0.1 ) node.modifiers.append(voro) # Let OVITO compute the results. node.compute() # Make sure we did not lose information due to truncated Voronoi index vectors. if voro.max_face_order > voro.edge_count: print("Warning: Maximum face order in Voronoi tessellation is {0}, " "but computed Voronoi indices are truncated after {1} entries. " "You should consider increasing the 'edge_count' parameter to {0}." .format(voro.max_face_order, voro.edge_count)) # Note that it would be possible to automatically increase the 'edge_count' # parameter to 'max_face_order' here and recompute the Voronoi tessellation: # voro.edge_count = voro.max_face_order # node.compute() # Access computed Voronoi indices as NumPy array. # This is an (N)x(edge_count) array. voro_indices = node.output.particle_properties['Voronoi Index'].array # This helper function takes a two-dimensional array and computes a frequency # histogram of the data rows using some NumPy magic. # It returns two arrays (of equal length): # 1. The list of unique data rows from the input array # 2. The number of occurences of each unique row # Both arrays are sorted in descending order such that the most frequent rows # are listed first. def row_histogram(a): ca = numpy.ascontiguousarray(a).view([('', a.dtype)] * a.shape[1]) unique, indices, inverse = numpy.unique(ca, return_index=True, return_inverse=True) counts = numpy.bincount(inverse) sort_indices = numpy.argsort(counts)[::-1] return (a[indices[sort_indices]], counts[sort_indices]) # Compute frequency histogram. unique_indices, counts = row_histogram(voro_indices) # Print the ten most frequent histogram entries. for i in range(10): print("%s\t%i\t(%.1f %%)" % (tuple(unique_indices), counts, 100.0*float(counts)/len(voro_indices))) |
新蟲 (初入文壇)
木蟲 (小有名氣)
新蟲 (小有名氣)
新蟲 (小有名氣)
新蟲 (小有名氣)
| 9 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 315求調(diào)劑 +6 | 小羊小羊_ 2026-04-02 | 6/300 |
|
|---|---|---|---|---|
|
[考研] 材料專碩322分 +9 | 哈哈哈吼吼吼哈 2026-04-02 | 9/450 |
|
|
[考研] 321求調(diào)劑 一志愿 浙江工業(yè)大學(xué)生物醫(yī)藥 +5 | 嘿嘿HC 2026-04-01 | 6/300 |
|
|
[考研] 348求調(diào)劑 +6 | 吳彥祖24k 2026-04-02 | 6/300 |
|
|
[考研] 292分,材料與化工,申請調(diào)劑 +19 | 程晴之 2026-04-01 | 23/1150 |
|
|
[考研] 一志愿9初試366 本雙非求調(diào)劑 +4 | 運氣來得若有似?/a> 2026-04-02 | 4/200 |
|
|
[考研] 070305高分子化學(xué)與物理 304分求調(diào)劑 +14 | c297914 2026-03-28 | 14/700 |
|
|
[考研] 考研調(diào)劑 +12 | Amber00 2026-03-31 | 12/600 |
|
|
[考研] 一志愿南昌大學(xué)324求調(diào)劑 +12 | hanamiko 2026-03-27 | 12/600 |
|
|
[考研] 292求調(diào)劑 +17 | 木蟲er12138 2026-04-01 | 17/850 |
|
|
[考研] 070300化學(xué)279求調(diào)劑 +15 | 哈哈哈^_^ 2026-03-31 | 17/850 |
|
|
[考研] 339求調(diào)劑,想調(diào)回江蘇 +7 | 烤麥芽 2026-03-27 | 10/500 |
|
|
[考研] 張芳銘-中國農(nóng)業(yè)大學(xué)-環(huán)境工程專碩-298 +9 | 手機(jī)用戶 2026-03-26 | 9/450 |
|
|
[考研] 318求調(diào)劑 +10 | 陳晨79 2026-03-30 | 10/500 |
|
|
[考研] 江蘇蘇北高校誠邀調(diào)劑同學(xué) +3 | zzll406 2026-03-31 | 3/150 |
|
|
[考研]
|
小羊36 2026-03-30 | 4/200 |
|
|
[考研] 08工科,295,接受跨專業(yè)調(diào)劑 +6 | lmnlzy 2026-03-30 | 6/300 |
|
|
[考研] 293分求調(diào)劑,外語為俄語 +5 | 加一一九 2026-03-31 | 5/250 |
|
|
[考研] 一志愿北京工業(yè)大學(xué),324分求調(diào)劑 +6 | 零八# 2026-03-28 | 6/300 |
|
|
[考研] 一志愿吉大071010,316分求調(diào)劑 +3 | xgbiknn 2026-03-27 | 3/150 |
|