首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >从单个残基pdb中创建一条非标准残留物的聚合物链

从单个残基pdb中创建一条非标准残留物的聚合物链
EN

Stack Overflow用户
提问于 2017-12-04 10:18:22
回答 1查看 163关注 0票数 2

我创建了一个简单的PDB文件,该文件含有非标准的聚乙二醇重复单元(CH2-O-CH2),如下所示

代码语言:javascript
运行
复制
REMARK   Materials Studio PDB file
REMARK   Created:  Mon Dec 04 09:52:49  2017
ATOM      1  CT1 EGR H   1     -14.882   2.339   0.134  1.00  0.00           C    
ATOM      2 HC11 EGR H   1     -14.677   2.559   1.234  1.00  0.00           H    
ATOM      3 HC12 EGR H   1     -14.774   3.298  -0.472  1.00  0.00           H    
ATOM      4  OS1 EGR H   1     -13.892   1.317  -0.371  1.00  0.00           O    
ATOM      5  CT2 EGR H   1     -12.493   1.852  -0.184  1.00  0.00           C    
ATOM      6 HC21 EGR H   1     -12.292   2.009   0.928  1.00  0.00           H    
ATOM      7 HC22 EGR H   1     -12.392   2.846  -0.732  1.00  0.00           H     
TER       8  
CONECT    1    2    3    4
CONECT    2    1
CONECT    3    1
CONECT    4    1    5
CONECT    5    4    7    8    6
CONECT    6    5
CONECT    7    5
END

我能够使用下面的代码使用bioPDB类成功地读取这个pdb文件

代码语言:javascript
运行
复制
parser = PDBParser()
structure = parser.get_structure('EGR', pdb_file)

如何使用此结构对象创建‘n’残基聚合物链的pdb文件?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-12-11 09:42:42

假设你想在x轴上复制10次你的残余物,每个残余物之间的距离是5埃。你可以尝试这样的方法:

代码语言:javascript
运行
复制
import numpy as np
from Bio.PDB import PDBParser
from Bio.PDB.Residue import Residue
from Bio.PDB.Atom import Atom

parser = PDBParser()
io = PDBIO()
structure = parser.get_structure('EGR', pdb_file)
chain = list(structure.get_chains())[0]
atoms = list(structure.get_atoms())
serial_number = len(atoms)
gap = 5.0

for resnum in range(10):
    resnum += 2  # position along the sequence
    res_id = ('', resnum, '')
    res_name = "EGR" + str(resnum)  # define name of residue
    res_segid = '    '
    new_res = Residue(res_id, res_name, res_segid)
    chain.add(new_res)
    for atom in atoms:
        serial_number += 1
        atom_name = atom.name
        atom_coord = atom.coord + [gap * (resnum + 1), 0, 0]
        atom_bfactor = atom.bfactor
        atom_occ = atom.occupancy
        atom_altloc = atom.altloc
        atom_fullname = atom.fullname
        atom_serial = serial_number
        atom_element = atom.element
        new_atom = Atom(atom_name, atom_coord, atom_bfactor, atom_occ, atom_altloc, atom_fullname, atom_serial, element=atom_element)
        new_res.add(new_atom)
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47631064

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档