Dear Sir,
I am trying to mutate a residue THR61. Using the script provided on the website, I am getting following error:
rayarjun$ python /usr/bin/mutate.py 1AV1.pdb 61 THR A > 1AV1.log File "/usr/bin/mutate.py", line 36 def refine(atmsel): ^ IndentationError: unindent does not match any outer indentation level
Could you kindly help identifying the cause of it? Regards
Arjun
On 5/7/13 2:19 AM, Arjun Ray wrote: > I am trying to mutate a residue THR61. Using the script provided on the website, I am getting following error: > > rayarjun$ python /usr/bin/mutate.py 1AV1.pdb 61 THR A > 1AV1.log > File "/usr/bin/mutate.py", line 36 > def refine(atmsel): > ^ > IndentationError: unindent does not match any outer indentation level
This is a Python syntax error. Python is very sensitive to indentation. The original script at http://salilab.org/modeller/wiki/Mutate%20model is correctly formatted. Are you sure you copied it exactly from the website without changing the indentation?
Ben Webb, Modeller Caretaker
Dear Ben,
I double checked and added again. Getting the same error.
#molecular dynamics def refine(atmsel): # at T=1000, max_atom_shift for 4fs is cca 0.15 A. md = molecular_dynamics(cap_atom_shift=0.39, md_time_step=4.0, md_return='FINAL') init_vel = True for (its, equil, temps) in ((200, 20, (150.0, 250.0, 400.0, 700.0, 1000.0)), (200, 600,
(1000.0, 800.0, 600.0, 500.0, 400.0, 300.0))): for temp in temps: md.optimize(atmsel, init_velocities=init_vel, temperature=temp,
Regards
Arjun
On Tue, May 7, 2013 at 9:04 PM, Modeller Caretaker < modeller-care@salilab.org> wrote:
> On 5/7/13 2:19 AM, Arjun Ray wrote: > >> I am trying to mutate a residue THR61. Using the script provided on the >> website, I am getting following error: >> >> rayarjun$ python /usr/bin/mutate.py 1AV1.pdb 61 THR A > 1AV1.log >> File "/usr/bin/mutate.py", line 36 >> def refine(atmsel): >> ^ >> IndentationError: unindent does not match any outer indentation level >> > > This is a Python syntax error. Python is very sensitive to indentation. > The original script at http://salilab.org/modeller/**wiki/Mutate%20modelhttp://salilab.org/modeller/wiki/Mutate%20modelis correctly formatted. Are you sure you copied it exactly from the website > without changing the indentation? > > Ben Webb, Modeller Caretaker > -- > modeller-care@salilab.org http://www.salilab.org/**modeller/http://www.salilab.org/modeller/ > Modeller mail list: http://salilab.org/mailman/**listinfo/modeller_usagehttp://salilab.org/mailman/listinfo/modeller_usage >
On 5/8/13 2:17 AM, Arjun Ray wrote: > I double checked and added again. Getting the same error.
As I said, Python is sensitive to indentation - and the indentation in your script is all over the place. Compare with the original script in the wiki at http://salilab.org/modeller/wiki/Mutate%20model
> #molecular dynamics > def refine(atmsel):
For example, both of these two lines should be left-aligned (no space at the start).
> md = molecular_dynamics(cap_atom_shift=0.39, md_time_step=4.0, > md_return='FINAL') > init_vel = True
Another example: "md =" and "init_vel =" should line up.
Ben Webb, Modeller Caretaker
participants (2)
-
Arjun Ray
-
Modeller Caretaker