Executing the mc simulation of polyalanine fragment

Member Site Forums PyRosetta PyRosetta – General Executing the mc simulation of polyalanine fragment

Viewing 5 reply threads
  • Author
    Posts
    • #742
      Anonymous

        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 syntax

        Can anybody let me know how do I have to run such scripts or how to execute that tutorial

        —-
        BHARAT

      • #4836
        Anonymous

          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

          • #4838
            Anonymous

              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 syntax

              WARNING: 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

          • #4839
            Anonymous

              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

              • #4843
                Anonymous

                  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

              • #4926
                Anonymous

                  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

                • #4929
                  Anonymous

                    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)

                    • #4943
                      Anonymous

                        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 ..

                    • #4953
                      Anonymous

                        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.

                    Viewing 5 reply threads
                    • You must be logged in to reply to this topic.