File: simpleExample.py

package info (click to toggle)
peptidebuilder 1.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,072 kB
  • sloc: python: 3,033; sh: 31; makefile: 11
file content (25 lines) | stat: -rwxr-xr-x 690 bytes parent folder | download | duplicates (2)
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
"""
Simple example script demonstrating how to use the PeptideBuilder library.

The script generates a peptide consisting of six arginines in alpha-helix
conformation, and it stores the peptide under the name "example.pdb".
"""

from PeptideBuilder import Geometry
import PeptideBuilder

# create a peptide consisting of 6 glycines
geo = Geometry.geometry("G")
geo.phi = -60
geo.psi_im1 = -40
structure = PeptideBuilder.initialize_res(geo)
for i in range(5):
    PeptideBuilder.add_residue(structure, geo)
# add terminal oxygen (OXT) to the final glycine
PeptideBuilder.add_terminal_OXT(structure)

import Bio.PDB

out = Bio.PDB.PDBIO()
out.set_structure(structure)
out.save("example.pdb")