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

Re: [modeller_usage] parallel modeling _automodel class



On 7/13/16 11:37 AM, Sajad Ahrari wrote:
I am trying to do a parallel job for protein loop refinement by
MODELLER9.17. I prepared the scripts as follows and provided all the
input files in my working directory and I am running MODELLER through
python2.7 (by typing: "python ModellerModelling.py" ). Although I
encounter no error through the modeling process, but I doubt if I am
doing a parallel job since when I check my workstation CPU usage, only
one CPU is engaged (the usage percent does not exceed 100%). Could you
please help me know what am I missing?

There are many errors in your scripts, but the most fundamental problem is that the customized "MyModel" class should only be declared, not instantiated, in mymodel.py. All of the logic should be in the file you run (ModellerModeling.py). So you want something like

ModellerModeling.py:

from modeller import *
from modeller.automodel import *
from modeller.parallel import *
from mymodel import MyModel

j = job()
for i in range(16):
    j.append(local_slave())

env = environ()
a = MyModel(env, alnfile=..., etc.)
a.starting_model=...
a.ending_model  =...
a.use_parallel_job(j)
a.make()



mymodel.py:

from modeller import *
from modeller.automodel import *

class MyModel(loopmodel):
    def select_loop_atoms(self):
        from modeller import selection
        return selection(
            self.residue_range('256', '309'))
    def select_atoms(self):
        from modeller import selection
        return selection(
            self.residue_range('256', '309'))

	Ben Webb, Modeller Caretaker
--
             https://salilab.org/modeller/
Modeller mail list: https://salilab.org/mailman/listinfo/modeller_usage