| 查看: 707 | 回复: 5 | ||
| 【奖励】 本帖被评价5次,作者TIGERYZZ增加金币 5 个 | ||
| 当前主题已经存档。 | ||
[资源]
【分享】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 ] |
» 猜你喜欢
博士延得我,科研能力直往上蹿
已经有7人回复
退学或坚持读
已经有27人回复
面上基金申报没有其他的参与者成吗
已经有5人回复
有70后还继续奋斗在职场上的吗?
已经有5人回复
遇见不省心的家人很难过
已经有22人回复
多组分精馏求助
已经有6人回复
» 本主题相关商家推荐: (我也要在这里推广)
4楼2009-11-23 09:10:46
5楼2009-11-24 10:54:21
6楼2010-02-27 22:35:48
简单回复
zdhlover2楼
2009-05-11 09:59
回复



wwxq3楼
2009-11-22 23:26
回复
















. For Linux, same thing, except that
回复此楼