Change ROOT_NAME for automodel.make()
Hi,
I thought this would be extremely easy to find if you can do, but I guess not. I would like to be able to change the ROOT_NAME of the model from automodel.make().
For instance:
a = automodel(env, alnfile = 'TSC2_6ssh.ali', knowns = ('6ssh'), sequence = 'TSC2_HUMAN')
a.make() # Here I want the prefix to be 'TSC2_6ssh' and not 'TSC2_HUMAN' so all files and pdb file at end would be TSC2_6ssh.B99990001.pdb
Is this possible?
Brian Wiley JHU
On 8/7/20 2:21 PM, Brian Wiley wrote: > a = automodel(env, > alnfile = 'TSC2_6ssh.ali', > knowns = ('6ssh'), > sequence = 'TSC2_HUMAN') > > a.make() # Here I want the prefix to be 'TSC2_6ssh' and not > 'TSC2_HUMAN' so all files and pdb file at end would be > TSC2_6ssh.B99990001.pdb
automodel is written under the assumption that files are named for the sequence. If you want to name the output PDB files differently, that's straightforward; just override get_model_filename() as per https://salilab.org/modeller/9.24/manual/node76.html
If you want to name the other output files differently, there isn't currently a mechanism for that, but it would be easy enough to modify the Python code to do so.
Ben Webb, Modeller Caretaker
Thanks,
I would like to change the root_name for all the output file. It's kind of silly there is not class root_name attribute in automodel. Then you could just name that. I am having trouble overriding the __init__ in automodel because it calls self.set_defaults().
Brian
-----Original Message----- From: Modeller Caretaker modeller-care@salilab.org Sent: Friday, August 7, 2020 6:34 PM To: Brian Wiley bwiley4@jhu.edu; modeller_usage@salilab.org Subject: Re: [modeller_usage] Change ROOT_NAME for automodel.make()
External Email - Use Caution
On 8/7/20 2:21 PM, Brian Wiley wrote: > a = automodel(env, > alnfile = 'TSC2_6ssh.ali', > knowns = ('6ssh'), > sequence = 'TSC2_HUMAN') > > a.make() # Here I want the prefix to be 'TSC2_6ssh' and not > 'TSC2_HUMAN' so all files and pdb file at end would be > TSC2_6ssh.B99990001.pdb
automodel is written under the assumption that files are named for the sequence. If you want to name the output PDB files differently, that's straightforward; just override get_model_filename() as per https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsalilab.or...
If you want to name the other output files differently, there isn't currently a mechanism for that, but it would be easy enough to modify the Python code to do so.
Ben Webb, Modeller Caretaker -- modeller-care@salilab.org https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsalilab.or... Modeller mail list: https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsalilab.or...
Dear Ben,
I asked a similar question some time ago and unfortunately get_model_filename is not enough. The problem is that the code has “file = self.sequence + '.xxx'” and “root_name=self.sequence” and “root_name=sequence” sprinkled all over the place (and also loopmodel has a separate get_loop_model_filename).
I second the request to provide a nice get_root_name or get_job_name hook (defaulting to self.sequence) it would be very convenient because often one has to play with various model parameters for the same sequence and alignment.
Thank you Eugene
-----Original Message----- From: Modeller Caretaker Sent: Saturday, August 8, 2020 1:33 AM To: Brian Wiley ; modeller_usage@salilab.org Subject: Re: [modeller_usage] Change ROOT_NAME for automodel.make()
On 8/7/20 2:21 PM, Brian Wiley wrote: > a = automodel(env, > alnfile = 'TSC2_6ssh.ali', > knowns = ('6ssh'), > sequence = 'TSC2_HUMAN') > > a.make() # Here I want the prefix to be 'TSC2_6ssh' and not > 'TSC2_HUMAN' so all files and pdb file at end would be > TSC2_6ssh.B99990001.pdb
automodel is written under the assumption that files are named for the sequence. If you want to name the output PDB files differently, that's straightforward; just override get_model_filename() as per https://salilab.org/modeller/9.24/manual/node76.html
If you want to name the other output files differently, there isn't currently a mechanism for that, but it would be easy enough to modify the Python code to do so.
Ben Webb, Modeller Caretaker
On 8/7/20 4:25 PM, Eugene Radchenko wrote: > I asked a similar question some time ago and unfortunately > /get_model_filename/ is not enough. > The problem is that the code has /“file = self.sequence + '.xxx'”/ and > /“root_name=self.sequence”/ and /“root_name=sequence”/ sprinkled all > over the place
Indeed, as I said it would require changing the Python code. But since that is very easy I just did so - will be in the next release.
Ben Webb, Modeller Caretaker
That's pretty cool@! Thanks!
-----Original Message----- From: Modeller Caretaker modeller-care@salilab.org Sent: Friday, August 7, 2020 7:58 PM To: Eugene Radchenko genie@qsar.chem.msu.ru; Brian Wiley bwiley4@jhu.edu; modeller_usage@salilab.org Subject: Re: [modeller_usage] Change ROOT_NAME for automodel.make()
External Email - Use Caution
On 8/7/20 4:25 PM, Eugene Radchenko wrote: > I asked a similar question some time ago and unfortunately > /get_model_filename/ is not enough. > The problem is that the code has /“file = self.sequence + '.xxx'”/ and > /“root_name=self.sequence”/ and /“root_name=sequence”/ sprinkled all > over the place
Indeed, as I said it would require changing the Python code. But since that is very easy I just did so - will be in the next release.
Ben Webb, Modeller Caretaker -- modeller-care@salilab.org https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsalilab.or... Modeller mail list: https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsalilab.or...
participants (3)
-
Brian Wiley
-
Eugene Radchenko
-
Modeller Caretaker