User:Wayne Decatur/I-Ppo Morph Methods: Difference between revisions

From Proteopedia
Jump to navigationJump to search
Wayne Decatur (talk | contribs)
No edit summary
Wayne Decatur (talk | contribs)
No edit summary
Line 9: Line 9:
<nowiki>
<nowiki>
<code>
<code>
from Bio.PDB.PDBParser import PDBParser
from Bio.PDB.PDBParser import PDBParser <br>


parser = PDBParser()
parser = PDBParser()<br>


structure = parser.get_structure('test', 'test.pdb')
structure = parser.get_structure('test', 'test.pdb')<br>
header = parser.get_header()
header = parser.get_header()<br>
trailer = parser.get_trailer()
trailer = parser.get_trailer()<br>


for model in structure:
for model in structure:<br>
     for chain in model:
     for chain in model:<br>
         i = 2493
         i = 2493<br>
         for residue in chain:
         for residue in chain:<br>
             residue.id = (' ', i, ' ')
             residue.id = (' ', i, ' ')<br>
             i += 1
             i += 1<br>


from Bio.PDB import PDBIO
from Bio.PDB import PDBIO<br>


w = PDBIO()
w = PDBIO()<br>
w.set_structure(structure)
w.set_structure(structure)<br>
w.save('test-r1.pdb')
w.save('test-r1.pdb')
 
<br>
</code>
</code>
</nowiki>
</nowiki>