## 简化版蛋白质二级结构分类器
### 使用方法
- 首先通过pip进行安装:
```bash
$ python3 -m pip install restraint-fold --upgrade -i https://pypi.org/simple
```
- 然后直接在命令行进行使用:
```bash
$ python3 -m fold -h
usage: __main__.py [-h] [-i I] [-o O] [-oh OH] [--simplified SIMPLIFIED] [--addh ADDH]
optional arguments:
-h, --help show this help message and exit
-i I Set the input pdb file path.
-o O Set the output txt file path.
-oh OH Write the hbonds into txt file.
--simplified SIMPLIFIED
Return the simplified information, default to be 0.
--addh ADDH Decide to rebuild hydrogen atoms or not, default to be 0.
```
### 示例
- 执行一个生成完整的alpha和beta序列的命令:
```bash
$ python3 -m fold -i examples/pdb/case2-optimized.pdb -o examples/case2-secondary.txt
Analysing alpha:
100%|████████████████████████████████████████████████████████████████████████████████████████████| 154/154 [00:00<00:00, 14563.23it/s]
Analysing beta:
100%|█████████████████████████████████████████████████████████████████████████████████████████████| 746/746 [00:00<00:00, 6425.08it/s]
```
得到的结果如下所示:
```txt
# case2-secondary.txt
alpha:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 31 32 33 34 35 36 37 39 40 41 42 43 44 45 46 78 79 80 81 82 83 84 85 86 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
beta:
23 24 25 26 27 28 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 93 94 95 96 97 98 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
```
```bash
$ python3 -m fold -i examples/pdb/case2-optimized.pdb -o examples/case2-secondary.txt --simplified 1
Analysing alpha:
100%|████████████████████████████████████████████████████████████████████████████████████████████| 154/154 [00:00<00:00, 17623.61it/s]
Analysing beta:
100%|█████████████████████████████████████████████████████████████████████████████████████████████| 746/746 [00:00<00:00, 6416.04it/s]
```
得到的结果如下所示:
```txt
# case2-secondary.txt
alpha:
1~25
31~37
39~46
78~86
94~109
beta:
23~28
46~72
93~98
118~157
```
### 提示
如果输入的pdb文件中氢原子有缺失,需要加上`--addh 1`自动补充氢原子的选项,或者手动通过Xponge或者Hadder等工具进行补氢,然后再对结构进行解析:
```bash
$ python3 -m fold -i examples/pdb/case2.pdb -o examples/case2-secondary.txt --simplified 1 --addh 1
1 H-Adding task with 2529 atoms complete in 0.09 seconds.
The new pdb file path is in: /tmp/restraint-fold/92de3be6-12f6-11ee-b491-b07b25070cd2.pdb
Analysing alpha:
100%|████████████████████████████████████████████████████████████████████████████████████████████| 154/154 [00:00<00:00, 15845.42it/s]
Analysing beta:
100%|█████████████████████████████████████████████████████████████████████████████████████████████| 746/746 [00:00<00:00, 6003.69it/s]
```
Raw data
{
"_id": null,
"home_page": "https://gitee.com/dechin/restraint-fold/",
"name": "restraint-fold",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Dechin CHEN",
"author_email": "dechin.phy@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/44/65/92a40eba75938646e09c625cf2574ac4f25beab769b4738051d109a81695/restraint-fold-0.1.4.tar.gz",
"platform": "any",
"description": "## \u7b80\u5316\u7248\u86cb\u767d\u8d28\u4e8c\u7ea7\u7ed3\u6784\u5206\u7c7b\u5668\n### \u4f7f\u7528\u65b9\u6cd5\n- \u9996\u5148\u901a\u8fc7pip\u8fdb\u884c\u5b89\u88c5\uff1a\n```bash\n$ python3 -m pip install restraint-fold --upgrade -i https://pypi.org/simple\n```\n- \u7136\u540e\u76f4\u63a5\u5728\u547d\u4ee4\u884c\u8fdb\u884c\u4f7f\u7528\uff1a\n```bash\n$ python3 -m fold -h\nusage: __main__.py [-h] [-i I] [-o O] [-oh OH] [--simplified SIMPLIFIED] [--addh ADDH]\n\noptional arguments:\n -h, --help show this help message and exit\n -i I Set the input pdb file path.\n -o O Set the output txt file path.\n -oh OH Write the hbonds into txt file.\n --simplified SIMPLIFIED\n Return the simplified information, default to be 0.\n --addh ADDH Decide to rebuild hydrogen atoms or not, default to be 0.\n```\n\n### \u793a\u4f8b\n- \u6267\u884c\u4e00\u4e2a\u751f\u6210\u5b8c\u6574\u7684alpha\u548cbeta\u5e8f\u5217\u7684\u547d\u4ee4\uff1a\n```bash\n$ python3 -m fold -i examples/pdb/case2-optimized.pdb -o examples/case2-secondary.txt\nAnalysing alpha:\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 154/154 [00:00<00:00, 14563.23it/s]\nAnalysing beta:\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 746/746 [00:00<00:00, 6425.08it/s]\n```\n\u5f97\u5230\u7684\u7ed3\u679c\u5982\u4e0b\u6240\u793a\uff1a\n```txt\n# case2-secondary.txt\nalpha:\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 31 32 33 34 35 36 37 39 40 41 42 43 44 45 46 78 79 80 81 82 83 84 85 86 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109\nbeta:\n23 24 25 26 27 28 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 93 94 95 96 97 98 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157\n```\n\n```bash\n$ python3 -m fold -i examples/pdb/case2-optimized.pdb -o examples/case2-secondary.txt --simplified 1\nAnalysing alpha:\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 154/154 [00:00<00:00, 17623.61it/s]\nAnalysing beta:\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 746/746 [00:00<00:00, 6416.04it/s]\n```\n\u5f97\u5230\u7684\u7ed3\u679c\u5982\u4e0b\u6240\u793a\uff1a\n```txt\n# case2-secondary.txt\nalpha:\n1~25\n31~37\n39~46\n78~86\n94~109\n\nbeta:\n23~28\n46~72\n93~98\n118~157\n```\n### \u63d0\u793a\n\u5982\u679c\u8f93\u5165\u7684pdb\u6587\u4ef6\u4e2d\u6c22\u539f\u5b50\u6709\u7f3a\u5931\uff0c\u9700\u8981\u52a0\u4e0a`--addh 1`\u81ea\u52a8\u8865\u5145\u6c22\u539f\u5b50\u7684\u9009\u9879\uff0c\u6216\u8005\u624b\u52a8\u901a\u8fc7Xponge\u6216\u8005Hadder\u7b49\u5de5\u5177\u8fdb\u884c\u8865\u6c22\uff0c\u7136\u540e\u518d\u5bf9\u7ed3\u6784\u8fdb\u884c\u89e3\u6790\uff1a\n```bash\n$ python3 -m fold -i examples/pdb/case2.pdb -o examples/case2-secondary.txt --simplified 1 --addh 1\n1 H-Adding task with 2529 atoms complete in 0.09 seconds.\nThe new pdb file path is in: /tmp/restraint-fold/92de3be6-12f6-11ee-b491-b07b25070cd2.pdb\nAnalysing alpha:\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 154/154 [00:00<00:00, 15845.42it/s]\nAnalysing beta:\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 746/746 [00:00<00:00, 6003.69it/s]\n```\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Simple Protein Structure Parser",
"version": "0.1.4",
"project_urls": {
"Homepage": "https://gitee.com/dechin/restraint-fold/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "475320427c7e4158dbf257e1a4d98df88b9c0f2d77870f0f45c28fb719b4456f",
"md5": "b72b70abd14ca538926138fe2182ac97",
"sha256": "9951d665be95fe8006afd4209aa5ef4cddbe1714eef08007d2a126c8c143e9ea"
},
"downloads": -1,
"filename": "restraint_fold-0.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b72b70abd14ca538926138fe2182ac97",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 10297,
"upload_time": "2023-06-27T02:36:37",
"upload_time_iso_8601": "2023-06-27T02:36:37.455647Z",
"url": "https://files.pythonhosted.org/packages/47/53/20427c7e4158dbf257e1a4d98df88b9c0f2d77870f0f45c28fb719b4456f/restraint_fold-0.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "446592a40eba75938646e09c625cf2574ac4f25beab769b4738051d109a81695",
"md5": "24810744f261d301a1363582525b2a29",
"sha256": "cef58d118f82a1c2a8be6f1535932d00c9fc3693d950d1a2c10af03b9c682db8"
},
"downloads": -1,
"filename": "restraint-fold-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "24810744f261d301a1363582525b2a29",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10164,
"upload_time": "2023-06-27T02:36:39",
"upload_time_iso_8601": "2023-06-27T02:36:39.353277Z",
"url": "https://files.pythonhosted.org/packages/44/65/92a40eba75938646e09c625cf2574ac4f25beab769b4738051d109a81695/restraint-fold-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-27 02:36:39",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "restraint-fold"
}