Docking instance has no attribute 'ligMol'

Python Prescription - Virtual Screening Tool

[PyRx is no longer developed at MGL]

Moderator: sargis

Forum rules
[PyRx is no longer developed at MGL]

Docking instance has no attribute 'ligMol'

Postby seema » Tue Feb 04, 2014 6:09 am

Hi,

I am using PyRx 0.8 and Autodock 4.2 and Autogrid 4.2 as local. After running autogrid, autodock run gives the following errors:

Error message: Docking instance has no attribute 'ligMol'

The .dlg file says this: C:\Program Files (x86)\The Scripps Research Institute\AutoDock\4.2.5.1\autodock4.exe: FATAL ERROR: C:\Program Files (x86)\The Scripps Research Institute\AutoDock\4.2.5.1\autodock4.exe: I'm sorry; I can't find or open "..\..\..\Ligands\1OSFmodifiedpdb.pdbqt#".

Please help me immediately.

Thanks for all your help.
Seema
User avatar
seema
Micromolar User
Micromolar User
 
Posts: 27
Joined: Mon Feb 27, 2012 9:36 am

Re: Docking instance has no attribute 'ligMol'

Postby seema » Tue Feb 04, 2014 6:50 am

This is Autodock and Autogrid version 4.2.5.1 that I am using and getting errors.
User avatar
seema
Micromolar User
Micromolar User
 
Posts: 27
Joined: Mon Feb 27, 2012 9:36 am

Re: Docking instance has no attribute 'ligMol'

Postby avematthew » Wed Oct 08, 2014 7:41 pm

I'm also having this problem.

The problem appears to be that the # for the comment has no space or tab written between the filename and it. Autodock is reading the filename as "filename#" instead of "filename" and cannot open the resulting non-existant file.
User avatar
avematthew
Millimolar User
Millimolar User
 
Posts: 2
Joined: Wed Oct 08, 2014 7:21 pm

Re: Docking instance has no attribute 'ligMol'

Postby seema » Thu Feb 05, 2015 6:58 am

This problem persists. Please let me know how to solve: C:\Program Files (x86)\The Scripps Research Institute\AutoDock\4.2.5.1\autodock4.exe: I'm sorry; I can't find or open "..\domain.maps.fld#"

Autodock is automatically adding a # after the file type. It may need to be removed. How?

Thanks in advance.
User avatar
seema
Micromolar User
Micromolar User
 
Posts: 27
Joined: Mon Feb 27, 2012 9:36 am

Re: Docking instance has no attribute 'ligMol'

Postby sargis » Fri Feb 06, 2015 1:42 am

I have recently fixed an issue that was causing problems when dealing with ligands with long file names - https://sourceforge.net/p/pyrx/code/154

You can edit C:\Program Files\PyRx\Lib\site-packages\PyRx\vsModel.py and add the following code before line #478 to fix this.
Code: Select all
    txt = txt.replace(basename, basename+" ")


See also viewtopic.php?f=25&t=2732&p=6931#p6928 for how to add space between map files and # sign.

Thank you for using PyRx!
User avatar
sargis
Picomolar User
Picomolar User
 
Posts: 583
Joined: Fri Oct 17, 2008 10:39 pm

Re: Docking instance has no attribute 'ligMol'

Postby seema » Thu Feb 19, 2015 9:57 am

Thanks. I modified the file, as follows:

dpf_filename = self.receptor_stem + '_' + ligandParameters['name'] + '.dpf'
dpf_filename = os.path.join(dockingFolder, dpf_filename)
self.dpo.set_receptor(self.receptor_filename)
self.dpo.write42(dpf_filename, docking_algorithm_parameter_list)
txt = open(dpf_filename).read()
txt = txt.replace(self.receptor_stem+".", os.pardir+os.sep+self.receptor_stem+".")
txt = txt.replace(basename, basename+" ")
open(dpf_filename,'w').write(txt)
self.dockingFolder = dockingFolder
self.dpf_filename = os.path.basename(dpf_filename)

Now error comes up in opening PyRx, the errors are copy-pasted below. Sargis, please help immediately.

Traceback (most recent call last):
File "C:\Program Files (x86)\PyRx\runPyRx.py", line 71, in <module>
startPyRx()
File "C:\Program Files (x86)\PyRx\runPyRx.py", line 39, in startPyRx
frame = MainFrame(None, -1, size=(width, height-200))
File "C:\Program Files (x86)\PyRx\lib\site-packages\PyRx\wxMainFrame.py", line 129, in __init__
import preferences
File "C:\Program Files (x86)\PyRx\lib\site-packages\PyRx\preferences.py", line 21, in <module>
from vsModel import autodockPreferencesPage, ligandPreparationPage, autodockRemotePreferencesPage
File "C:\Program Files (x86)\PyRx\lib\site-packages\PyRx\vsModel.py", line 466
txt = txt.replace(basename, basename+" ")
^
IndentationError: unexpected indent

Problem starting PyRx. Please visit PyRx forum for a possible solution: http://mgl.scripps.edu/forum
User avatar
seema
Micromolar User
Micromolar User
 
Posts: 27
Joined: Mon Feb 27, 2012 9:36 am

Re: Docking instance has no attribute 'ligMol'

Postby sargis » Thu Feb 19, 2015 4:20 pm

seema wrote:Thanks. I modified the file, as follows:

dpf_filename = self.receptor_stem + '_' + ligandParameters['name'] + '.dpf'
dpf_filename = os.path.join(dockingFolder, dpf_filename)
self.dpo.set_receptor(self.receptor_filename)
self.dpo.write42(dpf_filename, docking_algorithm_parameter_list)
txt = open(dpf_filename).read()
txt = txt.replace(self.receptor_stem+".", os.pardir+os.sep+self.receptor_stem+".")
txt = txt.replace(basename, basename+" ")
open(dpf_filename,'w').write(txt)
self.dockingFolder = dockingFolder
self.dpf_filename = os.path.basename(dpf_filename)

Now error comes up in opening PyRx, the errors are copy-pasted below. Sargis, please help immediately.

Traceback (most recent call last):
File "C:\Program Files (x86)\PyRx\runPyRx.py", line 71, in <module>
startPyRx()
File "C:\Program Files (x86)\PyRx\runPyRx.py", line 39, in startPyRx
frame = MainFrame(None, -1, size=(width, height-200))
File "C:\Program Files (x86)\PyRx\lib\site-packages\PyRx\wxMainFrame.py", line 129, in __init__
import preferences
File "C:\Program Files (x86)\PyRx\lib\site-packages\PyRx\preferences.py", line 21, in <module>
from vsModel import autodockPreferencesPage, ligandPreparationPage, autodockRemotePreferencesPage
File "C:\Program Files (x86)\PyRx\lib\site-packages\PyRx\vsModel.py", line 466
txt = txt.replace(basename, basename+" ")
^
IndentationError: unexpected indent

Problem starting PyRx. Please visit PyRx forum for a possible solution: http://mgl.scripps.edu/forum


You are welcome. I think you left a space in the line where the new text was added. See http://stackoverflow.com/questions/1016 ... -in-python for more info on “unexpected indent” in python.
User avatar
sargis
Picomolar User
Picomolar User
 
Posts: 583
Joined: Fri Oct 17, 2008 10:39 pm

Re: Docking instance has no attribute 'ligMol'

Postby seema » Fri Feb 20, 2015 5:07 am

Thanks Sargis, I removed the space, it was looking weird in the codes although PyRx started successfully. Still AutoDock gave this error:

C:\Program Files (x86)\The Scripps Research Institute\AutoDock\4.2.5.1\autodock4.exe: I'm sorry; I can't find or open "..\protein.A.map#"
C:\Program Files (x86)\The Scripps Research Institute\AutoDock\4.2.5.1\autodock4.exe: FATAL ERROR: C:\Program Files (x86)\The Scripps Research Institute\AutoDock\4.2.5.1\autodock4.exe: I'm sorry; I can't find or open "..\protein.A.map#"

C:\Program Files (x86)\The Scripps Research Institute\AutoDock\4.2.5.1\autodock4.exe: Unsuccessful Completion.

Please help, it must have to do with that # in filename, how to remove...Thanks for your patience....
User avatar
seema
Micromolar User
Micromolar User
 
Posts: 27
Joined: Mon Feb 27, 2012 9:36 am

Re: Docking instance has no attribute 'ligMol'

Postby seema » Fri Feb 20, 2015 5:28 am

Sargis, I saw the topic [url]viewtopic.php?f=25&t=2732&p=6931#p692[/url]8 that you had told in your earlier comment to view for removing # from .map files. It was for PyRx version 0.9. I am using 0.8, so please tell me where to modify...
User avatar
seema
Micromolar User
Micromolar User
 
Posts: 27
Joined: Mon Feb 27, 2012 9:36 am

Re: Docking instance has no attribute 'ligMol'

Postby seema » Fri Feb 20, 2015 5:49 am

Sargis, I am using Notepad++ to modify the DockingParameters.py file as follows as given in that viewtopic:

self['fld']['value'] = self.receptor_stem + '.maps.fld '

val_str = self.receptor_stem + ".%s.map " % (type)

mol_types = mol_types + " " + t + " "

Notice the space after .fld and after .map

And also corrected this: return "%s %s%s # %s\n" % (p['keyword'],

I save this file to desktop and then copy and paste the file in its original location.

Still the same error creeps in:

Opening Grid Map Dimensions file: ..\protein.maps.fld#

and

C:\Program Files (x86)\The Scripps Research Institute\AutoDock\4.2.5.1\autodock4.exe: FATAL ERROR: C:\Program Files (x86)\The Scripps Research Institute\AutoDock\4.2.5.1\autodock4.exe: I'm sorry; I can't find or open "..\protein.A.map#"
User avatar
seema
Micromolar User
Micromolar User
 
Posts: 27
Joined: Mon Feb 27, 2012 9:36 am

Next

Return to PyRx

Who is online

Users browsing this forum: No registered users and 5 guests

cron