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

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

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

$ -r test.pdb

runs fine but if I try to run

$ -r test file.pdb
$ -r "test file.pdb"
$ -r 'test file.pdb'
$ -r test\ file.pdb

the command always states:

setting PYTHONHOME environment
Traceback (most recent call last):
line 142, in <module>
    mols = Read(receptor_filename)
  File "/Library/MGLTools/1.5.6rc2/MGLToolsPckgs/MolKit/", 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?
Paolo Gatti

More information about the autodock mailing list