
Thank for the script. I have collected into a module to get a smaller file. All my seqeunces files is build except the one I am sending. I get this error message. The seqeunces is sent as attachment and as the following patter MLXP where the third aminoacid can be anything.
Best regards Knut J
Number of sequences in the alignment: 1 Traceback (most recent call last): File "/home/knut/workspace/ligand_petide/src/create_seqeunce.py", line 35, in <module> buildseqeunce('hNatE.txt','hNatE') File "/home/knut/workspace/ligand_petide/src/create_seqeunce.py", line 27, in buildseqeunce mdl.build_sequence(line.rstrip('\n')) File "/usr/lib/python2.6/dist-packages/modeller/model.py", line 133, in build_sequence self.generate_topology(a[0], patch_default=patch_default) File "/usr/lib/python2.6/dist-packages/modeller/model.py", line 238, in generate_topology self.env.libs.modpt, alnseq._num, patch_default) _modeller.ModellerError: generat_477E> No templates in the alignment. Number of sequences in the alignment: 1
from modeller import *
def buildseqeunce(filename,out): env = environ() aln = alignment(env) mdl=model(env)
env.libs.topology.read('${LIB}/top_heav.lib') env.libs.parameters.read('${LIB}/par.lib')
file=open(filename,'r')
for (n, line) in enumerate(file):
mdl.build_sequence(line.rstrip('\n')) mdl.write(file=out + "%g.pdb" %n) file.close()
buildseqeunce('hNatE.txt','hNatE')
> Date: Tue, 6 Apr 2010 15:39:34 -0700 > From: modeller-care@salilab.org > To: knutjbj@hotmail.com > CC: modeller_usage@salilab.org > Subject: Re: [modeller_usage] build short 1000 olioopeptid from fasta file > > On 04/06/2010 06:24 AM, Knut J Bjuland wrote: > > I have 1000 or more short peptid seqeunce which are 4 amino acid long. > > Can I use modeller to build them just as a linear structure without any > > 3d structure. > > If by "linear structure without any 3d structure" you mean an extended > chain, then sure, you can use model.build_sequence(): > http://salilab.org/modeller/9v7/manual/node166.html > > As an example, if your 1000 sequences are in a file called seqs.txt, one > per line, then the following script will make a set of PDB files, one > for each sequence: > > > import modeller > > env = modeller.environ() > env.libs.topology.read('${LIB}/top_heav.lib') > env.libs.parameters.read('${LIB}/par.lib') > > for (n, line) in enumerate(open('seqs.txt')): > mdl = modeller.model(env) > mdl.build_sequence(line.rstrip('\r\n')) > mdl.write(file='seq-%d.pdb' % n) > > > > > Ben Webb, Modeller Caretaker > -- > modeller-care@salilab.org http://www.salilab.org/modeller/ > Modeller mail list: http://salilab.org/mailman/listinfo/modeller_usage _________________________________________________________________ Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. https://signup.live.com/signup.aspx?id=60969