其他
Python脚本BUG引发学界震动,影响有多大?
代码网址: https://media.nature.com/original/nature-assets/nprot/journal/v9/n3/extref/nprot.2014.042-S2.zip 论文阅读: https://www.nature.com/articles/nprot.2014.042
def read_gaussian_outputfiles():
list_of_files = []
for file in glob.glob('*.out'):
list_of_files.append(file)
return list_of_files
def main():
lofc = read_gaussian_outputfiles()
lofc_freq = read_gaussian_freq_outfiles(lofc)
lofc_nmr = read_gaussian_nmr_outfiles(lofc)
locs = prepare_list_of_chemical_shifts(lofc_nmr)
lofe = get_list_of_free_energies(lofc_freq)
lofe = boltzmann_analysis(lofe)
lofe = report_chemical_shifts(lofc_nmr, lofe)
summed_proton_shifts = final_proton_chemical_shifts(lofe)
summed_carbon_shifts = final_carbon_chemical_shifts(lofe)
lofe = count_imaginary_freq(lofc_freq, lofe)
write_final_shift_csv(summed_proton_shifts,summed_carbon_shifts)
write_master_csv(lofe)
def glob(pathname, *, recursive=False):
"""Return a list of paths matching a pathname pattern.
The pattern may contain simple shell-style wildcards a la
fnmatch. However, unlike fnmatch, filenames starting with a
dot are special cases that are not matched by '*' and '?'
patterns.
If recursive is true, the pattern '**' will match any files and
zero or more directories and subdirectories.
"""
def _iterdir(dirname, dironly):
if not dirname:
if isinstance(dirname, bytes):
dirname = bytes(os.curdir, 'ASCII')
else:
dirname = os.curdir
try:
with os.scandir(dirname) as it:
for entry in it:
try:
if not dironly or entry.is_dir():
yield entry.name
except OSError:
pass
except OSError:
return
版权声明:本文为CSDN博主「beyondma」的原创文章,转载请附上原文出处链接及本声明。 原文链接: https://blog.csdn.net/BEYONDMA/article/details/102555199
换个姿势阅读?扫码试试~
◆
精彩推荐
◆
推荐阅读
网红“AI大佬”被爆论文剽窃,Jeff Dean都看不下去了
AI大佬“互怼”:Bengio和Gary Marcus隔空对谈深度学习发展现状
有了这套模板,再不担心刷不动LeetCode了
Google图嵌入工业界最新大招,高效解决训练大规模深度图卷积神经网络问题
太鸡冻了!我用Python偷偷查到暗恋女生的名字
苹果 5G 芯片“难产”
【角度刁钻】如果把线程当作一个人来对待,秒懂
C 语言这么厉害,它自身是用什么语言写的?
一文了解超级账本DLT、库、开发工具有哪些, Hyperledger家族成员你认识几个?
你点的每个“在看”,我都认真当成了AI