Skip to content

Commit

Permalink
Merge pull request #18 from lightdock/issue_17
Browse files Browse the repository at this point in the history
Issue 17
  • Loading branch information
brianjimenez authored Apr 19, 2024
2 parents 224205e + ab1ec0e commit 31d58e5
Show file tree
Hide file tree
Showing 221 changed files with 40,926 additions and 29,396 deletions.
115 changes: 85 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,72 +24,127 @@ Several examples can be found in the `example` folder.
|:---------------------------|
| You may set an environment variable `LIGHTDOCK_DATA` to point to the data folder included in this repository to avoid copying it: `export LIGHTDOCK_DATA=/path/to/lightdock-rust/data` |

Recorded times on MacBook Pro M3 Pro.

### 1k4c (Membrane docking)

```
```bash
cd example/1k4c
cp -R ../../data .
time ../../target/release/lightdock-rust setup.json initial_positions_0.dat 100 dfire
```

...
Output:

real 3m53.851s
user 3m52.550s
sys 0m0.717s
```
Reading starting positions from "initial_positions_0.dat"
Swarm ID 0
Writing to swarm dir "swarm_0"
Reading receptor input structure: lightdock_receptor_membrane.pdb
Reading ligand input structure: lightdock_ligand.pdb
Loading DFIRE scoring function
Creating GSO with 200 glowworms
Starting optimization (100 steps)
real 1m52,132s
user 1m51,808s
sys 0m0,150s
```

### 1ppe (protein docking)

```
```bash
cd example/1ppe
cp -R ../../data .
time ../../target/release/lightdock-rust setup.json initial_positions_0.dat 100 dfire
```

...
Output:

real 0m9.968s
user 0m9.640s
sys 0m0.271s
```
Reading starting positions from "initial_positions_0.dat"
Swarm ID 0
Writing to swarm dir "swarm_0"
Reading receptor input structure: lightdock_1ppe_e.pdb
Reading ligand input structure: lightdock_1ppe_i.pdb
Loading DFIRE scoring function
Creating GSO with 200 glowworms
Starting optimization (100 steps)
real 0m4,252s
user 0m4,142s
sys 0m0,092s
```

### 2uuy (protein docking)

```
```bash
cd example/2uuy
cp -R ../../data .
time ../../target/release/lightdock-rust setup.json initial_positions_0.dat 100 dfire
```

...
Output:

real 0m18.042s
user 0m17.123s
sys 0m0.621s
```
Reading starting positions from "initial_positions_0.dat"
Swarm ID 0
Output directory does not exist for swarm 0, creating it...
Writing to swarm dir "swarm_0"
Reading receptor input structure: lightdock_2UUY_rec.pdb
Reading ligand input structure: lightdock_2UUY_lig.pdb
Loading DFIRE scoring function
Creating GSO with 200 glowworms
Starting optimization (100 steps)
real 0m8,108s
user 0m7,834s
sys 0m0,261s
```

### 1czy (protein-peptide docking)

```
```bash
cd example/1czy
cp -R ../../data .
time ../../target/release/lightdock-rust setup.json initial_positions_0.dat 100 dfire
time ../../target/release/lightdock-rust setup.json init/initial_positions_0.dat 100 dfire
```

...
Output:

real 0m20.868s
user 0m19.692s
sys 0m1.070s
```
Reading starting positions from "init/initial_positions_0.dat"
Swarm ID 0
Writing to swarm dir "swarm_0"
Reading receptor input structure: lightdock_1czy_protein.pdb
Reading ligand input structure: lightdock_1czy_peptide.pdb
Loading DFIRE scoring function
Creating GSO with 200 glowworms
Starting optimization (100 steps)
real 0m1,580s
user 0m1,312s
sys 0m0,248s
```

### 1azp (protein-nucleic docking)

```
```bash
cd example/1azp
time ../../target/release/lightdock-rust setup.json initial_positions_0.dat 100 dna
```

...
Output:

real 0m30.321s
user 0m29.219s
sys 0m0.651s
```
Reading starting positions from "initial_positions_0.dat"
Swarm ID 0
Output directory does not exist for swarm 0, creating it...
Writing to swarm dir "swarm_0"
Reading receptor input structure: lightdock_protein.pdb
Reading ligand input structure: lightdock_dna.pdb
Loading DNA scoring function
Creating GSO with 200 glowworms
Starting optimization (100 steps)
real 0m14,228s
user 0m13,932s
sys 0m0,281s
```

400 changes: 200 additions & 200 deletions example/1azp/gso_1.out → example/1azp/swarm_0/gso_1.out

Large diffs are not rendered by default.

400 changes: 200 additions & 200 deletions example/1azp/gso_10.out → example/1azp/swarm_0/gso_10.out

Large diffs are not rendered by default.

400 changes: 200 additions & 200 deletions example/1azp/gso_100.out → example/1azp/swarm_0/gso_100.out

Large diffs are not rendered by default.

400 changes: 200 additions & 200 deletions example/1azp/gso_20.out → example/1azp/swarm_0/gso_20.out

Large diffs are not rendered by default.

400 changes: 200 additions & 200 deletions example/1azp/gso_30.out → example/1azp/swarm_0/gso_30.out

Large diffs are not rendered by default.

400 changes: 200 additions & 200 deletions example/1azp/gso_40.out → example/1azp/swarm_0/gso_40.out

Large diffs are not rendered by default.

400 changes: 200 additions & 200 deletions example/1azp/gso_50.out → example/1azp/swarm_0/gso_50.out

Large diffs are not rendered by default.

400 changes: 200 additions & 200 deletions example/1azp/gso_60.out → example/1azp/swarm_0/gso_60.out

Large diffs are not rendered by default.

400 changes: 200 additions & 200 deletions example/1azp/gso_70.out → example/1azp/swarm_0/gso_70.out

Large diffs are not rendered by default.

400 changes: 200 additions & 200 deletions example/1azp/gso_80.out → example/1azp/swarm_0/gso_80.out

Large diffs are not rendered by default.

400 changes: 200 additions & 200 deletions example/1azp/gso_90.out → example/1azp/swarm_0/gso_90.out

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions example/1czy/analysis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

CORES=4

### Calculate the number of swarms ###
s=`ls -d ./swarm_* | wc -l`
swarms=$((s-1))

### Create files for Ant-Thony ###
for i in $(seq 0 $swarms)
do
echo "cd swarm_${i}; lgd_generate_conformations.py ../1czy_protein.pdb ../1czy_peptide.pdb gso_100.out 200 > /dev/null 2> /dev/null;" >> generate_lightdock.list;
done

for i in $(seq 0 $swarms)
do
echo "cd swarm_${i}; lgd_cluster_bsas.py gso_100.out > /dev/null 2> /dev/null;" >> cluster_lightdock.list;
done

### Generate LightDock models ###
ant_thony.py -c ${CORES} generate_lightdock.list;

### Clustering BSAS (rmsd) within swarm ###
ant_thony.py -c ${CORES} cluster_lightdock.list;

### Generate ranking files for filtering ###
lgd_rank.py $s 100;

### Generate top predictions ###
mkdir top;
lgd_top.py 1czy_protein.pdb 1czy_peptide.pdb rank_by_scoring.list 10;
mv top_*.pdb top/

### Clean ###
rm -rf swarm_*/*.pdb solutions.list generate_lightdock.list cluster_lightdock.list rank_by_luciferin.list rank_by_rmsd.list;

8 changes: 4 additions & 4 deletions example/1czy/execution.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
NUM_CORES=4

# LightDock setup
lightdock3_setup.py 1czy_protein.pdb 1czy_peptide.pdb 400 200 --noxt --noh -anm -rst restraints.list
lightdock3_setup.py 1czy_protein.pdb 1czy_peptide.pdb --noxt --noh -anm -rst restraints.list -spr 10

# Convert ANM data
lgd_flatten.py lightdock_rec.nm.npy rec_nm.npy
Expand All @@ -14,14 +14,14 @@ lgd_flatten.py lightdock_lig.nm.npy lig_nm.npy
s=`ls -d swarm_* | wc -l`
swarms=$((s-1))

# Copy binary
# Copy lightdock-rust binary
cp ../../target/release/lightdock-rust .

# Create a task.list file for ant_thony
for i in `seq 0 $swarms`;do echo "cd swarm_${i}; cp ../lightdock_1czy_protein.pdb .; cp ../lightdock_1czy_peptide.pdb .;cp ../rec_nm.npy .;cp ../lig_nm.npy .;cp -R ../../../data .;../lightdock-rust ../setup.json ../init/initial_positions_${i}.dat 10 dfire; rm -rf lightdock_*.pdb *.npy data;" >> task.list; done
for i in `seq 0 $swarms`;do echo "./lightdock-rust setup.json init/initial_positions_${i}.dat 100 dfire;" >> task.list; done

# Let ant_thony run
ant_thony.py --cores ${NUM_CORES} task.list
time ant_thony.py --cores ${NUM_CORES} task.list

# Clean task.list
rm -rf task.list
10 changes: 0 additions & 10 deletions example/1czy/init/cluster_centers.pdb

This file was deleted.

Loading

0 comments on commit 31d58e5

Please sign in to comment.