ADL: Problem with prepare_receptor4: spaces in receptor file path and name

Paolo Gatti n3o.eden at gmail.com
Fri Feb 3 00:20:07 PST 2012


Hi all.
I have a problem launching prepare_receptor4.py if the input molecules
names and/or paths contain spaces.
If there are no spaces

$ prepare_receptor4.py -r test.pdb

runs fine but if I try to run

$ prepare_receptor4.py -r test file.pdb
or
$ prepare_receptor4.py -r "test file.pdb"
or
$ prepare_receptor4.py -r 'test file.pdb'
or
$ prepare_receptor4.py -r test\ file.pdb

the command always states:

setting PYTHONHOME environment
Traceback (most recent call last):
  File
"/Library/MGLTools/1.5.6rc2/MGLToolsPckgs/AutoDockTools/Utilities24/prepare_receptor4.py",
line 142, in <module>
    mols = Read(receptor_filename)
  File "/Library/MGLTools/1.5.6rc2/MGLToolsPckgs/MolKit/__init__.py", line
21, in Read
    raise AssertionError , "%s does't exist" %filename
AssertionError: test does't exist

The problem seems to be at line 65:

opt_list, args = getopt.getopt(sys.argv[1:], 'r:vo:A:Cp:U:eM:d:')

this command recognizes "-r test" as option inside opt_list and "file.pdb"
as argument inside args, instead of recognizing "-r test file.pdb" as an
unique option and no arguments.

May someone help me?
Thanks,
Paolo Gatti


More information about the autodock mailing list