24小时热门版块排行榜    

查看: 710  |  回复: 5
【奖励】 本帖被评价5次,作者TIGERYZZ增加金币 5
当前主题已经存档。

TIGERYZZ

金虫 (小有名气)


[资源] 【分享】ATK_adaptive_current

这是个计算电流的函数,应该还算是beta版的。貌似可以设置精度==
具体的功能我也不太清楚,安装和使用方法在下面。
希望虫子们用了以后一起来说一下这个程序~~~

This is not just a simple NanoLanguage script, it's actually quite
complex. So, there are binary and script files involved. I have attached
the Windows and 32-bit Linux versions in a zip file. 64-bit Linux
version is not available right now, but we can do it later.

To use it:

1) Extract the zip file in some convenient directory; it will create a
subdirectory "ATK_adaptive_current"

2) In this directory there is a subdirectory "win32" and inside it
another subdirectory called "quadpack". Copy this directory to the "lib"
directory in your ATK installation on Windows (so that "quadpack"
becomes a subdirectory of "lib". For Linux, same thing, except that
"quadpack" should become a subdirectory of lib/python2.4/site-packages.

3) To calculate the current using the new routine, edit the script
"calc_current_adaptive.py" to set the checkpoint file name (with path if
necessary), k-points (or, wait, you have hydrogen-terminated edges? if
so, 1x1 is fine), and level of accuracy.

About the accuracy:

* The syntax to the function calculateCurrentAdaptive closely resembles
that of calculateCurrent, with an import difference. Instead of setting
the number of integration points, you set the desired accuracy (and a
verbosity).
* You can specify the max absolute error you want in the result. The
routine will use as many points, with more points in areas of quickly
varying T(E), as needed to obtain this accuracy, up to a maximum of
interval subdivisions (so that it doesn't run forever).
* There is also a "relative accuracy", and the routine is not converged
until both errors are below the threshold, so if your current is 1e-8
Ampere, it will not converge until the error is less than 1e-11 Ampere,
even if epsabs=1e-6 Ampere.
* So, in some sense there is no need to use epsabs, since usually it's
more important to have a good relative accuracy. Thus you can actually
leave epsabs at 1e-6 Ampere (default).
* I would suggest using 1e-2 for epsrel to begin with, and see how many
evaluations that requires, before trying 1e-3 (default).
* If you set verbosity>0, the routine will print the current, the error,
and the number of iterations used. This will be very useful to see that
you have a good accuracy!
* If you set verbosity>1, it will also print the points E where T(E) is
evaluated, and T(E). You can pipe this output to a file, bring it into
Excel, sort it, and use this to plot T(E), and at the same see how the
routine distributes the points irregularly; more points will be used
where T(E) varies quickly.

纳米盘地址:
http://www.namipan.com/d/ATK_ada ... 456600e82d04fa20200
zdhlover说下不下来,额我传了个到小木虫~~

[ Last edited by TIGERYZZ on 2009-5-11 at 13:42 ]
回复此楼

» 猜你喜欢

» 本主题相关商家推荐: (我也要在这里推广)

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

freer007

木虫 (正式写手)


★★★★★ 五星级,优秀推荐

谢谢分享,我试试看能不能用。
4楼2009-11-23 09:10:46
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

freshgirl

木虫 (正式写手)


★★★★★ 五星级,优秀推荐

试用一下
5楼2009-11-24 10:54:21
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

cjl6137

新虫 (初入文坛)


★★★★★ 五星级,优秀推荐

顶,不错的东西!
6楼2010-02-27 22:35:48
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
简单回复
zdhlover2楼
2009-05-11 09:59   回复  
 
wwxq3楼
2009-11-22 23:26   回复  
 
相关版块跳转 我要订阅楼主 TIGERYZZ 的主题更新
☆ 无星级 ★ 一星级 ★★★ 三星级 ★★★★★ 五星级
普通表情 高级回复 (可上传附件)
信息提示
请填处理意见