[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[modeller_usage] Bug in documentation: automodel.get_model_filename() takes five arguments



Hi!

In the documentation the signature for automodel.get_model_filename()  is declared as 

get_model_filename(sequence, id1, id2, file_ext) 

But I got the following error:
Traceback (most recent call last):
  File "d:/data/modeller/poly_modeller/ppmod/make_homology_model.py", line 97, in <module>
    a.make()
  File "c:\bin\Modeller\modlib\modeller\automodel\automodel.py", line 121, in make
    self.multiple_models(atmsel)
  File "c:\bin\Modeller\modlib\modeller\automodel\automodel.py", line 225, in multiple_models
    self.outputs.append(self.single_model(atmsel, num))
  File "c:\bin\Modeller\modlib\modeller\automodel\automodel.py", line 308, in single_model
    self.pdb_ext)
TypeError: get_model_filename() takes exactly 4 arguments (5 given)


Of course one must include self as well, so the following works:

def get_model_filename(self, sequence, id1, id2, file_ext):

Perhaps in the documentation the self could be included as well? It's obvious in hindsight, but still took me 15 minutes to figure out. 

Or maybe a quick example could be added: How to move the pdb files into subfolder outdir

class MyModel(automodel):
    def get_model_filename(self, sequence, id1, id2, file_ext):
        print self, sequence, id1, id2, file_ext

        return "outdir/test-prefix-{id1:02}-{id2:02}{file_ext}".format(
             id1=id1, id2=id2, file_ext=file_ext)


PS:
Is there some way to move all the generated files (including traces and sch and rsr files) into a subfolder? Scanning the sourcecode I see that redefining modfile.default could work.


Thanks & All the best,
Ajasja