Restartable DOCK37: Difference between revisions

From DISI
Jump to navigation Jump to search
Line 21: Line 21:
dock=/path/to/dock/dock64
dock=/path/to/dock/dock64
INDOCK=/path/to/indock/INDOCK
INDOCK=/path/to/indock/INDOCK
dockfiles=/path/to/dockfiles


mkdir -p /tmp/workdir
mkdir -p /tmp/docking/working
pushd /tmp/workdir
ln -s $dockfiles /tmp/docking/dockfiles
pushd /tmp/docking/working


find /path/to/db2/files -name '*.db2.gz' > split_database_index
find /path/to/db2/files -name '*.db2.gz' > split_database_index

Revision as of 07:25, 20 November 2020

Required Input

1. INDOCK

2. split database index file

The name of the split database index file is defined in INDOCK. Most INDOCK files name this file split_database_index and expect it to be in the working directory. split_database_index should contain a list of paths to db2.gz files. I've been generating this file using a command like this:

find $DB2_SOURCE_DIR -name '*.db2.gz' > split_database_index

Where DB2_SOURCE_DIR is just some directory containing a bunch of db2 files.

Running & Restartability

Here's what you might do if you were to run dock:

dock=/path/to/dock/dock64
INDOCK=/path/to/indock/INDOCK
dockfiles=/path/to/dockfiles

mkdir -p /tmp/docking/working
ln -s $dockfiles /tmp/docking/dockfiles
pushd /tmp/docking/working

find /path/to/db2/files -name '*.db2.gz' > split_database_index

$dock $INDOCK & 

Now that dock has been launched in the background, we can echo $! to get the pid of the dock process.

...
btingle@desktop:~> $dock $INDOCK &
btingle@desktop:~> echo $!
211593

Now, let's try sending SIGUSR1, or signal 10, to the dock process:

btingle@desktop:~> ls
OUTDOCK  split_database_index  test.mol2.gz
btingle@desktop:~> kill -10 211593
[1]+ Done           /path/to/dock/dock64 /path/to/indock/INDOCK
btingle@desktop:~> ls
OUTDOCK  restart  split_database_index  test.mol2.gz

You'll notice a new file named "restart" popped up after we killed the process. The restart file tells us how many ligands were processed prior to being interrupted by SIGUSR1. Future runs of dock from this directory will recognize this file and make sure not to process any ligands that were processed during previous runs.

You can interrupt and restart dock as many times as you want, just take care to save the OUTDOCK and test.mol2.gz files from each run separately, as they will be overwritten by subsequent runs.

btingle@desktop:~> $dock $INDOCK &
btingle@desktop:~> kill -10 $!
[1]+ Done           /path/to/dock/dock64 /path/to/indock/INDOCK
btingle@desktop:~> mv OUTDOCK OUTDOCK.1
btingle@desktop:~> mv test.mol2.gz test.mol2.gz.1
btingle@desktop:~> $dock $INDOCK &
btingle@desktop:~> kill -10 $!
[1]+ Done           /path/to/dock/dock64 /path/to/indock/INDOCK
btingle@desktop:~> mv OUTDOCK OUTDOCK.2
btingle@desktop:~> mv test.mol2.gz test.mol2.gz.2
btingle@desktop:~> $dock $INDOCK &
...
...
...
btingle@desktop:~> cat OUTDOCK.* > OUTDOCK
btingle@desktop:~> zcat test.mol2.gz.* > test.mol2.gz

Additional Notes

As of right now this restartability function is only implemented for the default docking mode, i.e without any ensemble_docking_mode option enabled.