Multiple instance reading the same restraint file
Dear all,
I'm manually parallelizing homology modelling (using the excellent pydoit http://pydoit.org/). However, sometimes I get an error of the type
Traceback (most recent call last): > File "d:\data\modeller\cocopod\cocopod/make_homology_model.py", line > 138, in <module> > a.make() > File "c:\bin\Modeller\modlib\modeller\automodel\automodel.py", line 116, > in make > self.rd_restraints() > File "c:\bin\Modeller\modlib\modeller\automodel\automodel.py", line 204, > in rd_restraints > self.restraints.append(file=self.csrfile) > File "c:\bin\Modeller\modlib\modeller\restraints.py", line 77, in append > return _modeller.mod_restraints_read(self.__mdl.modpt, fh.file_pointer) > TypeError: dstr_token_E> Could not read an integer at position -1 in input > R 3 1
I'm guessing this happens as one instance of modeller reads an incomplete *.rsr file another instance is writing. (The error does not happen if I run the modelling sequentially, and happens at a random interval otherwise).
*My question is: can I rename the *.rsr and *.ini and *.sch files that automodel is using, so **that each instance will have a unique ID?*
Thanks & best, Ajasja Ljubetič
PS: Currently I'm using automodel with some additional alpha restraints
a = AlphaModel(env, alnfile=args.alnfile, knowns=knowns, sequence=sequence, inifile=args.initial_model, assess_methods=[assess.DOPE, assess.GA341, assess.normalized_dope])
a.max_var_iterations = int(args.max_var_iterations) a.md_level = md_opt_dict[args.md_level]
a.repeat_optimization = int(args.repeat) a.initial_malign3d = True
a.starting_model = int(args.start_index) a.ending_model = int(args.end_index)
On 05/22/2018 06:21 AM, Ajasja Ljubetič wrote: > *My question is: can I rename the *.rsr and *.ini and *.sch files that > automodel is using, so **that each instance will have a unique ID?*
Sure - just override the set_defaults() method in your automodel subclass, or set self.csrfile, self.inifile, and self.schfile somewhere else in your custom class to unique values.
Ben Webb, Modeller Caretaker
Thanks, that works great!
On Tue, 22 May 2018 at 22:45, Modeller Caretaker modeller-care@salilab.org wrote:
> On 05/22/2018 06:21 AM, Ajasja Ljubetič wrote: > > *My question is: can I rename the *.rsr and *.ini and *.sch files that > > automodel is using, so **that each instance will have a unique ID?* > > Sure - just override the set_defaults() method in your automodel > subclass, or set self.csrfile, self.inifile, and self.schfile somewhere > else in your custom class to unique values. > > Ben Webb, Modeller Caretaker > -- > modeller-care@salilab.org https://salilab.org/modeller/ > Modeller mail list: https://salilab.org/mailman/listinfo/modeller_usage >
participants (2)
-
Ajasja Ljubetič
-
Modeller Caretaker