Subject: [modeller_usage] A better way to do this?
From: Stéphane Téletchéa <>
Date: Thu, 25 Nov 2010 10:11:47 +0100
Dear users,
I'm willing to create a peptide sequence from a fasta sequence, and add
a disulfide bridge in it.
At the moment, my code "which works" is like this pseudo-code:
1 - create a model object, and model.build('sequence'), I am not
applying any time of secondary structure constraint
2 - write this pdb (peptide.pdb)
3 - create a special align where target and template are identical
(peptide.ali)
4 - create a new object, Mymodel derived from automodel to add the patch
for disulfides
5 - generate models
6 - select the best one (peptide-cys.pdb)
I'm only willing to retrieve the "peptide-cys.pdb" file, can I bypass
steps 2,3 and act directly on the initial model object created?
The implementation of the pseudo-code above is:
#####################################################################
# This demonstrates the use of alignment.append_sequence() and
# model.build_sequence() to build residue sequences from one-letter codes
# http://salilab.org/modeller/manual/node171.html
from modeller import *
from modeller.automodel import *
env.libs.topology.read('${LIB}/top_heav.lib')
env.libs.parameters.read('${LIB}/par.lib')
# Create a new empty alignment and model:
aln = alignment(env)
mdl = model(env)
mdl.build_sequence('ACAAAAACYAAAA')
mdl.write(file='pept.pdb')
class MyModel(automodel):
def special_patches(self, aln):
# The disulfide bridge is taken from the input sequence
self.patch(residue_type='DISU', residues=(self.residues['2',
self.residues['8']))
a = MyModel(env,
alnfile = "tmppiralign.ali",
knowns = "pept",
sequence = "pept-cys")
a.starting_model= 1
a.ending_model = 10
a.make()
#####################################################################
tmppiralign.ali is of the form:
#####################################################################
>P1;pept
structureX:pept:1: :13: ::::
ACAAAAACYAAAA*
>P1;pept-cys
sequence:pept-cys::FIRST:@ END :::::
ACAAAAACYAAAA*
#####################################################################
Thanks a lot for corrections, suggestions,..
Stéphane
begin:vcard
fn;quoted-printable:St=C3=A9phane T=C3=A9letch=C3=A9a
n;quoted-printable;quoted-printable:T=C3=A9letch=C3=A9a;St=C3=A9phane
org;quoted-printable:INSERM U957 - EA 3822;Laboratoire de Physiopathologie de la R=C3=A9sorption Osseuse et Th=C3=A9=
rapie des Tumeurs Osseuses Primitives
adr;quoted-printable:;;Facult=C3=A9 de M=C3=A9decine, 1 rue Gaston Veil;Nantes cedex 1;;44035;France
email;internet:
title:Drug design, molecular modelling
tel;work:+33 240 412 960
tel;fax:+33 240 412 860
url:http://www.u957.univ-nantes.fr/ - http://steletch.free.fr
version:2.1
end:vcard