ADL: solving ValueError: invalid literal for float() Re: Reading .dlg file bombs out

M. Shahid mohammad.shahid at gmail.com
Mon Oct 5 03:15:31 PDT 2009


Hi,

I also encounterd the same problem and did a quick tracking into the problem
and found a workaround as below:

This error (ValueError: invalid literal for float() ) comes when we use
prepare_dpf42.py
and AutoDock 4.2 Release 4.2.2.1 produces the following line in the result
dlg file
DOCKED: USER    (4) Unbound System's Energy  [=(2)] = ......

while the earlier version of AD produces the line
DOCKED: USER    (4) Unbound System's Energy    = .....

In the DlgParser.py script in
(~/MGLTools-1.5.4/MGLToolsPckgs/AutoDockTools/DlgParser.py)

add these lines:

           elif find(l, "(4) Unbound System's Energy  [=(2)]")>-1:
                #USER    (4) Unbound System's Energy         =   -0.85
kcal/mol
                d['unbound_energy'] = float((ll)[7])

before these lines:

            elif find(l, "(4) Unbound System's Energy")>-1:
                #USER    (4) Unbound System's Energy         =   -0.85
kcal/mol
                d['unbound_energy'] = float((ll)[6])


Please make indentations of the above lines similar to the later lines
(python requirements of correct indentations).

After the above changes now the dlg file can be opened without that
ValueError in MGLTools
or the dlg results can be summarized by the script summarize_results4.py
script.

Please refere to the Autodock parameters details for further information at
http://autodock.scripps.edu/resources/parameters

Best regards,

--
Shahid.


On Tue, Sep 29, 2009 at 3:09 AM, Dean Cuebas
<deancuebas at missouristate.edu>wrote:

> Dear colleagues,
>
> Things were working fine, dockings, analysis, etc... now for some reason
> analysis is impossible.
>
> I¹ve done some dockings that seem to work correctly, and finish the docking
> with no error.
>
> But when I go to analyze the docking with my .dlg file I get:
>
> ERROR *********************************************
> Traceback (most recent call last):
>  File "/Library/MGLTools/1.5.4/MGLToolsPckgs/ViewerFramework/VF.py", line
> 735, in tryto
>    result = apply( command, args, kw )
>  File
>
> "/Library/MGLTools/1.5.4/MGLToolsPckgs/AutoDockTools/autoanalyzeCommands.py"
> , line 2848, in doit
>    d.readDlg(dlgFile)
>  File "/Library/MGLTools/1.5.4/MGLToolsPckgs/AutoDockTools/Docking.py",
> line 74, in readDlg
>    dlo = DockingLogObject(self, dlgFile)
>  File "/Library/MGLTools/1.5.4/MGLToolsPckgs/AutoDockTools/Docking.py",
> line 337, in __init__
>    parser.parse(filename)
>  File "/Library/MGLTools/1.5.4/MGLToolsPckgs/AutoDockTools/DlgParser.py",
> line 106, in parse
>    self.match(allLines)
>  File "/Library/MGLTools/1.5.4/MGLToolsPckgs/AutoDockTools/DlgParser.py",
> line 219, in match
>    apply(d['func'], (lines,), {})
>  File "/Library/MGLTools/1.5.4/MGLToolsPckgs/AutoDockTools/DlgParser.py",
> line 696, in getModelLines
>    self.makeModels(modelList)
>  File "/Library/MGLTools/1.5.4/MGLToolsPckgs/AutoDockTools/DlgParser.py",
> line 792, in makeModels
>    clist.append(self.makeModel(curMod))
>  File "/Library/MGLTools/1.5.4/MGLToolsPckgs/AutoDockTools/DlgParser.py",
> line 886, in makeModel
>    d['unbound_energy'] = float((ll)[6])
> ValueError: invalid literal for float(): =
>
> Any suggestions would be appreciated.  I reinstalled MGL, etc...., nothing
> that I do seems to help.
> Thanks so much in advance!!!
>
> Dr. C
> Dr. Dean Cuebas, Associate Prof of Chemistry
> deancuebas at missouristate.edu, Ph 417-836-8567 FAX 417-836-5507
> Dept. of Chemistry, Missouri State University
> Springfield, Missouri 65897
>
>
> "It was pretty good. Even the music was nice."
>
> Yogi Berra, after attending an opera
>
>
>
> > From: "autodock-request at scripps.edu" <autodock-request at scripps.edu>
> > Reply-To: "autodock at scripps.edu" <autodock at scripps.edu>
> > Date: Mon, 28 Sep 2009 14:00:01 -0500
> > To: "autodock at scripps.edu" <autodock at scripps.edu>
> > Subject: autodock Digest, Vol 61, Issue 25
> >
> > Send autodock mailing list submissions to
> > autodock at scripps.edu
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> > http://mgldev.scripps.edu/mailman/listinfo/autodock
> > or, via email, send a message with subject or body 'help' to
> > autodock-request at scripps.edu
> >
> > You can reach the person managing the list at
> > autodock-owner at scripps.edu
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of autodock digest..."
>
>
>
> ________________________________________________
> --- ADL: AutoDock List  --- http://autodock.scripps.edu/mailing_list ---
>


More information about the autodock mailing list