Hi, I would like to run a job on a QuadCore PC running linux, but I do not have any experience of parallel programming.
Can you tell me how to parallelize a script like this?
---------- (script)
from modeller import * from modeller.automodel import * from modeller.scripts import complete_pdb
log.verbose()
class mymodel(allhmodel): def special_restraints(self, aln): s1 = selection(self.chains['A']) s2 = selection(self.chains['B']) self.restraints.symmetry.append(symmetry(s1, s2, 1.0)) def user_after_single_model(self): self.restraints.symmetry.report(1.0)
env = environ()
env.io_atom_files_directory = './'
a = mymodel(env, alnfile = 'HpUreE.ali', knowns = 'dimerBp', sequence = 'HpUreE', assess_methods=(assess.DOPE, assess.GA341))
a.starting_model = 1 a.ending_model = 25
a.make()
# Output data ok_models = filter(lambda x: x['failure'] is None, a.outputs) key = 'DOPE score' ok_models.sort(lambda a,b: cmp(a[key], b[key])) m = ok_models[0] print "Top model: %s (DOPE score %.3f)" % (m['name'], m[key])
env.libs.topology.read(file='$(LIB)/top_heav.lib') env.libs.parameters.read(file='$(LIB)/par.lib')
# read model file mdl = complete_pdb(env, m['name'])
# Assess with DOPE: s = selection(mdl) s.assess_dope(output='ENERGY_PROFILE NO_REPORT', file='HpUreE.best.profile', normalize_profile=True, smoothing_window=15)
---------- (end script)
Thanks
Francesco
--- Francesco Musiani francesco.musiani@unibo.it ---