I am running an up-to-date installation of Buster on my Linux platform and have run into a strange problem with a bash script.

I have a number of ligand protein docking applications which involve ligand sets docking on a protein and am using Autodock with the the Racoon file editor (https://autodock.scripps.edu/).

I have written a bash script which runs each set of ligand dockings:

#!/bin/sh
for d in $(cat ligand.list)
do
    cd "${d}_apo-3k9b"
    echo "${d}apo-3k9b"
    echo "${d}apo-3k9b.dpf"
/home/comp/Apps/Autodock/autodock4 -p "${d}apo-3k9b.dpf" -l "${d}apo-3k9b.dlg"
   cd ..
done

The script has run successfully for several sets of ligands, but now there is a problem:

comp@AbNormal:~/Apps/Models/1-PhosphorusLigands/Acetylcholinesterases/3K9B/Results$ ./Run.ligand.list.sh ./Run.ligand.list.sh: line 3: cd: $'Acetylcholine\r_apo-3k9b': No such file or directory
apo-3k9boline
apo-3k9b.dpfe

apo-3k9b.dpfpps/Autodock/autodock4: can't find or open parameter file Acetylcholine

/home/comp/Apps/Autodock/autodock4: Unsuccessful Completion.

The problem is in the first 'cd' command in the do loop which is looking for 'Acetylcholine_apo-3k9b', but is finding 'Acetylcholine\r_apo-3k9b', and consequently, does not change in to the directory 'Acetylcholine_apo-3k9b'!

The only difference from the script that ran the previous successful dockings, the '\r', is that I edited the script for the current use by changing the name of the protein, in this case 'apo-3k9b'. I used Jedit to edit the script and have no idea as to the source of the '\r' as Jedit is using the Unix(\n) line separator.

Google has been of no help is solving the problem.

Any suggestions will be much appreciated.

Thanks in advance.

--
Stephen P. Molnar, Ph.D.            Life is a fuzzy set
http://www.Molecular-Modeling.net   Multivariate and stochastic
614.312.7528 (c)
Skype:  smolnar1

Reply via email to