|
|
Morita提出的离子在两相界面转移时,产生水指,并定义了”水指“坐标。支持材料上给出了计算水指的伪代码:
# calculation of w
# d: the array of sorted distances.
# return: the value of w
function calculate_w (d)
# binary search
left = 1; right = size(d)
do
if ( left > right ) exit
mid = (left + right)/2
graph = make_graph(d(mid))
# making the graph edged by the shorter distances than d(mid)
# return the created graph
connected = judge_reachability(graph)
# judging the reachability of the graph by using the breadth first search
# return “ true ” if the graph is reachable and
# “ false ” if the graph is not reachable.
if (connected == “ true ”) then
irwf = mid
right = mid - 1
else
left = mid + 1
irwf = left
endif
enddo
rwf = d(irwf)
return rwf
endfunction
我对代码并不了解。因此想请教各位如何将这个计算水指的代码应用带gromacs的分析中。原文及支撑材料见附件
|
|