Error running D100_Docking.py

Member Site Forums PyRosetta PyRosetta – Scripts Error running D100_Docking.py

Viewing 1 reply thread
  • Author
    Posts
    • #3800
      Anonymous

        Hello,

        So I am trying to run the D100_Docking.py on PyRosetta4 that I have installed on Windows 10 Bash shell. I am just trying to use the script as is before attempting my own PDB files. Below is what I did, along with the errors:

         

        Any help is greatly appreciated!

         

        (base) jrodriguez@DESKTOP:/mnt/c/Windows/system32$ cd /mnt/c/Users/jrodriguez/Documents/PyRosetta4

        (base) jrodriguez@DESKTOP:/mnt/c/Users/jrodriguez/Documents/PyRosetta4$ ls -la

        total 796

        drwxrwxrwx 1 jrodriguez jrodriguez    512 Jun 25 11:37 .

        drwxrwxrwx 1 jrodriguez jrodriguez    512 Jun 23 09:18 ..

        drwxrwxrwx 1 jrodriguez jrodriguez    512 Jun 25 11:36 .ipynb_checkpoints

        drwxrwxrwx 1 jrodriguez jrodriguez    512 Jun  2 11:36 .test.output

        -rwxrwxrwx 1 jrodriguez jrodriguez 158112 Jun 25 10:31 3RT3.clean.pdb

        -rwxrwxrwx 1 jrodriguez jrodriguez 357939 Jun 25 10:18 3RT3.pdb

        -rwxrwxrwx 1 jrodriguez jrodriguez   3303 Jun 25 10:33 Clean_Pose.ipynb

        -rwxrwxrwx 1 jrodriguez jrodriguez  27412 Jun 25 11:36 Docking.ipynb

        -rwxrwxrwx 1 jrodriguez jrodriguez  22463 Jun 25 11:36 Docking.py

        -rwxrwxrwx 1 jrodriguez jrodriguez  49331 May 18 23:52 PyMOL-Rosetta-relay-client.python2.py

        -rwxrwxrwx 1 jrodriguez jrodriguez  48465 May 18 23:52 PyMOL-Rosetta-relay-client.python3.py

        -rwxrwxrwx 1 jrodriguez jrodriguez  44567 May 18 23:52 PyMOL-RosettaServer.py

        -rwxrwxrwx 1 jrodriguez jrodriguez  44651 May 18 23:52 PyMOL-RosettaServer.python3.py

        drwxrwxrwx 1 jrodriguez jrodriguez    512 May 18 23:52 apps

        drwxrwxrwx 1 jrodriguez jrodriguez    512 Jun 20 08:03 demo

        drwxrwxrwx 1 jrodriguez jrodriguez    512 Jun 25 10:45 inputs

        -rwxrwxrwx 1 jrodriguez jrodriguez  18013 Jun 25 11:30 protein_docking.ipynb

        -rwxrwxrwx 1 jrodriguez jrodriguez   9173 Jun 25 10:20 protein_docking.py

        lrwxrwxrwx 1 jrodriguez jrodriguez     17 May 18 23:54 pyrosetta -> ./setup/pyrosetta

        -rwxrwxrwx 1 jrodriguez jrodriguez      0 Jun 25 10:32 python

        lrwxrwxrwx 1 jrodriguez jrodriguez     15 May 18 23:54 rosetta -> ./setup/rosetta

        -rwxrwxrwx 1 jrodriguez jrodriguez   7272 May 18 23:52 self-test.py

        drwxrwxrwx 1 jrodriguez jrodriguez    512 Jun  2 11:16 setup

        drwxrwxrwx 1 jrodriguez jrodriguez    512 May 18 23:52 test

        -rwxrwxrwx 1 jrodriguez jrodriguez    844 May 18 23:54 version.json

        (base) jrodriguez@DESKTOP:/mnt/c/Users/jrodriguez/Documents/PyRosetta4$ python3 ./Docking.py –pdb_filename /mnt/c/Users/jrodriguez/Documents/PyRosetta4/3RT3.clean.pdb –partners B_C –jobs=1000 –job_output 3RT3_docking_output 

        ./Docking.py:96: UserWarning: Import of ‘rosetta’ as a top-level module is deprecated and may be removed in 2018, import via ‘pyrosetta.rosetta’.

          from rosetta import *

        PyRosetta-4 2021 [Rosetta PyRosetta4.Release.python38.linux 2021.20+release.47c4f8c41a32caced161a9246b20be0a5c576b75 2021-05-18T09:24:24] retrieved from: http://www.pyrosetta.org

        (C) Copyright Rosetta Commons Member Institutions. Created in JHU by Sergey Lyskov and PyRosetta Team.

        core.init: Checking for fconfig files in pwd and ./rosetta/flags

        core.init: Rosetta version: PyRosetta4.Release.python38.linux r283 2021.20+release.47c4f8c 47c4f8c41a32caced161a9246b20be0a5c576b75 http://www.pyrosetta.org 2021-05-18T09:24:24

        core.init: command: PyRosetta -ex1 -ex2aro -constant_seed -database /mnt/c/Users/jrodriguez/Documents/PyRosetta4/pyrosetta/database

        basic.random.init_random_generator: Constant seed mode, seed=1111111 seed_offset=0 real_seed=1111111

        basic.random.init_random_generator: RandomGenerator:init: Normal mode, seed=1111111 RG_type=mt19937

        core.chemical.GlobalResidueTypeSet: Finished initializing fa_standard residue type set.  Created 984 residue types

        core.chemical.GlobalResidueTypeSet: Total time to initialize 1.48438 seconds.

        core.import_pose.import_pose: File ‘/mnt/c/Users/jrodriguez/Documents/PyRosetta4/3RT3.clean.pdb’ automatically determined to be of type PDB

        core.conformation.Conformation: [ WARNING ] missing heavyatom:  OXT on residue ARG:CtermProteinFull 153

        core.conformation.Conformation: [ WARNING ] missing heavyatom:  OXT on residue PRO:CtermProteinFull 247

        Traceback (most recent call last):

          File “./Docking.py”, line 366, in <module>

            sample_docking(pdb_filename, partners, translation, rotation,

          File “./Docking.py”, line 152, in sample_docking

            protocols.docking.setup_foldtree(pose, partners, Vector1([dock_jump]))

        AttributeError: module ‘pyrosetta.protocols’ has no attribute ‘docking’

      • #15952
        Anonymous

          The script needs a few changes to work due to the imports changing.

          Parenthetically, this actually is a good example why Python PEP 8 says that wildcard imports should be avoided.

          Your first line says “Import of ‘rosetta’ as a top-level module is deprecated and may be removed in 2018” and today is 2021.

          As a result changing


          from rosetta import *
          from pyrosetta import *
          from rosetta.protocols.rigid import *

          to


          from pyrosetta.rosetta import *
          from pyrosetta import *
          from pyrosetta.rosetta.protocols.rigid import *

          will likely fix it. However, as mentioned wildcard imports are evil and can unexpectedly override stuff, so it may not work after all…

           

      Viewing 1 reply thread
      • You must be logged in to reply to this topic.