clauswilke/PeptideBuilder

How to create a peptide model based on an amino acid sequence?

Closed this issue · 1 comments

Hi,

Thank you for making this great package.
I have this code, which supposes to produce the same identical PDB file with your initial simpleExample.py.

It basically takes a string and makes a 3D model out of it.

from PeptideBuilder import Geometry
import PeptideBuilder
import Bio.PDB

def split(word):
    return [char for char in word]

wanted_peptide = "GGGGGG"
res = split(wanted_peptide)
geo = Geometry.geometry(res[0])
geo.phi = -60
geo.psi_im1 = -40

structure = PeptideBuilder.initialize_res(geo)
nres = res[1:len(res)]

for r in nres:
    print(r)
    rgeo = Geometry.geometry(r)
    PeptideBuilder.add_residue(structure, rgeo)

PeptideBuilder.add_terminal_OXT(structure)

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

But the corresponding output it produces with Pymol is this:

Screen Shot 2021-03-11 at 16 53 56

Whereas with your initial simpleExample.py
it produces this:

Screen Shot 2021-03-11 at 16 53 30

Why my code doesn't produce identical results?
At the end of the day, I'd like to take an amino acid string like "LKTW" as input and make the model.
How can I approach that?

Ed

Why my code doesn't produce identical results?

Because it's different code?

You're not setting backbone angles in your for loop, so you're getting default angles, which (if I remember correctly) correspond to the extended conformation.