Pthon批量处理将pdb文件生成dssp文件
作者:junjie 时间:2021-10-07 13:11:04
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 20 19:36:34 2015
@author: chaofn
"""
import os
"""
这个程序的目的是将linux下/ifs/home/fanchao/Manesh_pdb目录中的所有文件(一共有215个文件)
批处理
将pdb文件生成dssp文件
"""
#listdir返回文件名的列表
fileLine=os.listdir('/ifs/home/fanchao/Manesh_pdb')
#遍历整个列表
for i in range(len(fileLine)-1):
#将字符串用变量表示
input_file='/ifs/home/fanchao/Manesh_pdb/'+fileLine[i]
#先去掉文件名的后缀,然后形成后缀为dssp的文件名
out_file=fileLine[i].split('.')[0]+'.dssp'
output_file='/ifs/home/fanchao/Manesh_dssp/'+out_file
#注意:参数的传递(先是%s,然后是%变量名),多个变量的传入要用元组表示,在元组前用%
os.system('/ifs/share/lib/dssp/dssp2 -i %s -o %s' %(input_file,output_file))
标签:Pthon,批量处理,pdb,生成,dssp
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
关于文件命名
2009-09-18 16:29:00
Python在画图时使用特殊符号的方法总结
2021-12-27 22:29:34
![](https://img.aspxhome.com/file/2023/2/115102_0s.jpg)
使用Python的datetime库处理时间(RPA流程)
2023-04-23 22:53:15
用Python实现换行符转换的脚本的教程
2021-12-10 23:25:42
Python算法练习之二分查找算法的实现
2023-08-27 14:29:29
![](https://img.aspxhome.com/file/2023/8/104388_0s.jpg)
Python urlopen 使用小示例
2022-08-23 19:54:55
Python3中FuzzyWuzzy库实例用法
2022-01-30 18:49:49
总结Python中逻辑运算符的使用
2023-01-10 14:54:40
![](https://img.aspxhome.com/file/2023/0/102720_0s.jpg)
python3代码输出嵌套式对象实例详解
2021-09-16 07:35:55
网站发布后Bootstrap框架引用woff字体无法正常显示的解决方法
2023-08-13 00:26:58
Python如何遍历numpy数组
2023-04-15 00:40:17
Python中的Numpy 面向数组编程常见操作
2021-08-21 20:31:32
![](https://img.aspxhome.com/file/2023/9/71409_0s.png)
Python 中制作偶数列表的方法
2022-08-20 20:15:56
![](https://img.aspxhome.com/file/2023/8/63928_0s.webp)
Python如何处理异常报错方法(建议收藏!)
2022-08-09 03:19:13
![](https://img.aspxhome.com/file/2023/9/107969_0s.png)
ASP如何使用CDONTS来发送电子邮件?
2010-06-05 12:35:00
python 字典操作提取key,value的方法
2021-06-01 04:40:39
![](https://img.aspxhome.com/file/2023/0/67250_0s.jpg)
PyCharm 2020 激活到 2100 年的教程
2021-01-19 12:30:43
![](https://img.aspxhome.com/file/2023/7/80627_0s.jpg)
Facebook的特别之处是什么?
2008-08-04 12:57:00
![](https://img.aspxhome.com/file/UploadPic/20088/4/20088413183866s.gif)
Python实现Windows上气泡提醒效果的方法
2021-08-13 07:58:46
10个顶级Python实用库推荐
2023-08-27 17:41:46
![](https://img.aspxhome.com/file/2023/8/65518_0s.jpg)