本文整理匯總了Python中NN.init方法的典型用法代碼示例。如果您正苦於以下問題:Python NN.init方法的具體用法?Python NN.init怎麽用?Python NN.init使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類NN
的用法示例。
在下文中一共展示了NN.init方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: len
# 需要導入模塊: import NN [as 別名]
# 或者: from NN import init [as 別名]
sample_dirs.sort()
if nsmpl != len(sample_dirs):
print '{0:*>20}: num_samples in in.fitpot is wrong.'.format(' Error')
exit()
read_pos()
#.....initial data
gather_ref_data(maindir)
#.....read bases data if needed
if potential in ('linreg') and not fmethod in ('test','TEST'):
read_bases(maindir)
if regularize:
vars= scale_vars(vars,bmax)
elif potential in ('NN') and not fmethod in ('test','TEST'):
NN.init(maindir,params,sample_dirs,samples,nprcs,fmatch \
,ergrefs,frcrefs,fmethod,parfile,runmode,rcut,pranges \
,vranges)
#.....1st call of func
func(vars,maindir)
if potential in ('linreg') and not fmethod in ('test','TEST'):
ergs,frcs= calc_ef_from_bases(vars,maindir)
elif potential in ('NN') and not fmethod in ('test','TEST'):
ergs,frcs= NN.calc_ef_from_bases(vars)
else:
ergs,frcs= gather_smd_data(maindir)
if fmethod in ('test','TEST') and potential in ('NN'):
NN.init(maindir,params,sample_dirs,samples,nprcs,fmatch \
,ergrefs,frcrefs,fmethod,parfile,runmode \
,rcut,pranges,vranges)