Restartable DOCK37: Difference between revisions

From DISI
Jump to navigation Jump to search
m (asdf)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
==== Required Input ====
==== Required Input ====


1. INDOCK
1. INDOCK (dock parameters)


2. split database index file
2. dockfiles (receptor stuff)
 
2. split database index file (db2 list)


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.
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:
split_database_index should contain a list of paths to db2.gz files. I've been generating this file using a command like this:
All example code is written in bash.


  <nowiki>
  <nowiki>
Line 15: Line 15:


Where DB2_SOURCE_DIR is just some directory containing a bunch of db2 files.
Where DB2_SOURCE_DIR is just some directory containing a bunch of db2 files.
All example code is written in bash.


==== Running & Restartability ====
==== Running & Restartability ====
Line 77: Line 79:
btingle@desktop:~> zcat test.mol2.gz.* > test.mol2.gz
btingle@desktop:~> zcat test.mol2.gz.* > test.mol2.gz
</nowiki>
</nowiki>
You don't need to worry about interrupting dock at the wrong time- dock will recognize the signal, finish up it's current work unit and exit.


==== Additional Notes ====
==== 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 in INDOCK.
As of right now this restartability function is only implemented for the default docking mode, i.e without any ensemble_docking_mode option in INDOCK.
[[DOCK 3.7]]
[[Category:Developer]]

Latest revision as of 20:49, 2 May 2024

Required Input

1. INDOCK (dock parameters)

2. dockfiles (receptor stuff)

2. split database index file (db2 list)

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.

All example code is written in bash.

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

You don't need to worry about interrupting dock at the wrong time- dock will recognize the signal, finish up it's current work unit and exit.

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 in INDOCK.

DOCK 3.7