9 Nov
2009
9 Nov
'09
7:55 p.m.
João Rodrigues wrote: > I use two scripts to model my stuff when I want to define my custom > restraints. I use two scripts because parallel processing just doesn't > like putting everything in one script, don't ask me why :x
Parallel processing relies on Python's "pickle" module to send objects from one machine to another, and "pickle" only works on "classes that are defined at the top level of a module": http://www.python.org/doc/2.3.5/lib/node65.html
This means that any object you want to use in a parallel run must be defined in a module, i.e. it can't be in your main script but you must say something like "from mymodel import MyModel" in the script to get the MyModel class from the mymodel.py module.
Ben Webb, Modeller Caretaker
--
modeller-care@salilab.org http://www.salilab.org/modeller/
Modeller mail list: http://salilab.org/mailman/listinfo/modeller_usage