Member Site › Forums › PyRosetta › PyRosetta – General › Executing the mc simulation of polyalanine fragment
- This topic has 8 replies, 3 voices, and was last updated 13 years, 10 months ago by Anonymous.
-
AuthorPosts
-
-
January 18, 2011 at 3:18 am #742Anonymous
Hi,
I am trying to run the monte carlo simulation of a polyalanine fragment given in the tutorial .. After typing the whole script in notepad and saving with .py extension and after ruuning on xterm window I am getting the following error …
In [41]: ipython mc.py
File ““, line 1
ipython mc.py
^
SyntaxError: invalid syntaxCan anybody let me know how do I have to run such scripts or how to execute that tutorial
—-
BHARAT
-
January 18, 2011 at 5:55 pm #4836Anonymous
You can execute the script from within ipython with the run command:
ln [41]: run mc.py
alternatively, you can run the script from the command line (i.e. before entering ipython) with:
ipython mc.py
-
January 19, 2011 at 2:44 am #4838Anonymous
I tried first with run mc.py command . its showing the following error :-
In [1]: run mc.py
File “mc.py”, line 9
def perturb_bb = function(pose):
^
SyntaxError: invalid syntaxWARNING: Failure executing file:
Then I tried running the script from command line and I got the following error :-bash-3.2$ ipython mc.py
File “mc.py”, line 9
def perturb_bb = function(pose):
^
SyntaxError: invalid syntax
-
-
January 19, 2011 at 2:04 pm #4839Anonymous
python syntax for a method is:
def function_name( function_input_variables):
the “def perturb_bb = function(pose):” will cause a syntax error (as noted above), use the “return” keyword if you want to return the value of a variable “perturb_bb”
the syntax you entered is similar to a lambda function but both methods you used to execute the script are correct-
January 20, 2011 at 12:59 am #4843Anonymous
I have copied the code given in the Pyrosetta manual for Monte carlo simulation .. It means that there is some error in the program written there in the manual
-
-
February 3, 2011 at 4:48 am #4926Anonymous
I am trying to execute the monte carlo simulation tutorial given in pyrosetta manual .. but after execution its giving the following error..
Non-ASCII character ‘x93’ in file mc.py on line 2, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details (mc.py, line 2) …… pls help -
February 3, 2011 at 3:07 pm #4929Anonymous
Poking around the internet says x93 is a unicode encoding for an accented O. Try replacing it with an O.
Where did mc.py come from? Is it a file or was it cut-and-pasted out of a tutorial PDF? (I know very little about pyrosetta so excuse my ignorance)
-
February 4, 2011 at 1:24 am #4943Anonymous
Actually I copied it from the pyrosetta pdf tutorial and pasted on note pad and saved it as a python script… After executing it with command run mc.py .. I got the error…. Also I want to know the full detail of pyrosetta package which I think is involved in ROsetta also… Since I don’t understand much about this packer and mover stuff .. can u refer me through some good paper to have good grip on pyrosetta … I tried searching in rosetta manual but there they have not explained that much .. Since I find working with pyrosetta and rosetta interesting I would like to have a grip on it ..
-
-
February 4, 2011 at 3:22 pm #4953Anonymous
I think this error is caused by the cut and paste operation out of the PDF. It’s a bizzarre encoding error; there’s no reason for the script to have non-ASCII characters, so it’s probably an issue with the PDF having strange characters that look like normal characters to the eye.
Try pasting it with a different tool set – do you have something like “paste as plain text”? By “notepad” I assume you’re on Windows, try passaging it through Word or something instead of directly into notepad. Or point out to me which PDF (there are at least a dozen…) it was and I’ll see if I can attach a functional version for you here.
-
-
AuthorPosts
- You must be logged in to reply to this topic.