Difference between revisions of "Restartable DOCK37"

From DISI
Jump to: navigation, search
(Required Input)
(Required Input)
Line 2: Line 2:
  
 
1. INDOCK
 
1. INDOCK
 +
 
2. split database index file
 
2. split database index file
  

Revision as of 19:04, 19 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 the script:

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

mkdir -p /tmp/workdir
pushd /tmp/workdir

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