Skip to content

Commit 31d58e5

Browse files
authored
Merge pull request #18 from lightdock/issue_17
Issue 17
2 parents 224205e + ab1ec0e commit 31d58e5

File tree

221 files changed

+40926
-29396
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

221 files changed

+40926
-29396
lines changed

README.md

+85-30
Original file line numberDiff line numberDiff line change
@@ -24,72 +24,127 @@ Several examples can be found in the `example` folder.
2424
|:---------------------------|
2525
| 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` |
2626

27+
Recorded times on MacBook Pro M3 Pro.
28+
2729
### 1k4c (Membrane docking)
2830

29-
```
31+
```bash
3032
cd example/1k4c
31-
cp -R ../../data .
3233
time ../../target/release/lightdock-rust setup.json initial_positions_0.dat 100 dfire
34+
```
3335

34-
...
36+
Output:
3537

36-
real 3m53.851s
37-
user 3m52.550s
38-
sys 0m0.717s
38+
```
39+
Reading starting positions from "initial_positions_0.dat"
40+
Swarm ID 0
41+
Writing to swarm dir "swarm_0"
42+
Reading receptor input structure: lightdock_receptor_membrane.pdb
43+
Reading ligand input structure: lightdock_ligand.pdb
44+
Loading DFIRE scoring function
45+
Creating GSO with 200 glowworms
46+
Starting optimization (100 steps)
47+
48+
real 1m52,132s
49+
user 1m51,808s
50+
sys 0m0,150s
3951
```
4052

4153
### 1ppe (protein docking)
4254

43-
```
55+
```bash
4456
cd example/1ppe
45-
cp -R ../../data .
4657
time ../../target/release/lightdock-rust setup.json initial_positions_0.dat 100 dfire
58+
```
4759

48-
...
60+
Output:
4961

50-
real 0m9.968s
51-
user 0m9.640s
52-
sys 0m0.271s
62+
```
63+
Reading starting positions from "initial_positions_0.dat"
64+
Swarm ID 0
65+
Writing to swarm dir "swarm_0"
66+
Reading receptor input structure: lightdock_1ppe_e.pdb
67+
Reading ligand input structure: lightdock_1ppe_i.pdb
68+
Loading DFIRE scoring function
69+
Creating GSO with 200 glowworms
70+
Starting optimization (100 steps)
71+
72+
real 0m4,252s
73+
user 0m4,142s
74+
sys 0m0,092s
5375
```
5476

5577
### 2uuy (protein docking)
5678

57-
```
79+
```bash
5880
cd example/2uuy
59-
cp -R ../../data .
6081
time ../../target/release/lightdock-rust setup.json initial_positions_0.dat 100 dfire
82+
```
6183

62-
...
84+
Output:
6385

64-
real 0m18.042s
65-
user 0m17.123s
66-
sys 0m0.621s
86+
```
87+
Reading starting positions from "initial_positions_0.dat"
88+
Swarm ID 0
89+
Output directory does not exist for swarm 0, creating it...
90+
Writing to swarm dir "swarm_0"
91+
Reading receptor input structure: lightdock_2UUY_rec.pdb
92+
Reading ligand input structure: lightdock_2UUY_lig.pdb
93+
Loading DFIRE scoring function
94+
Creating GSO with 200 glowworms
95+
Starting optimization (100 steps)
96+
97+
real 0m8,108s
98+
user 0m7,834s
99+
sys 0m0,261s
67100
```
68101

69102
### 1czy (protein-peptide docking)
70103

71-
```
104+
```bash
72105
cd example/1czy
73-
cp -R ../../data .
74-
time ../../target/release/lightdock-rust setup.json initial_positions_0.dat 100 dfire
106+
time ../../target/release/lightdock-rust setup.json init/initial_positions_0.dat 100 dfire
107+
```
75108

76-
...
109+
Output:
77110

78-
real 0m20.868s
79-
user 0m19.692s
80-
sys 0m1.070s
111+
```
112+
Reading starting positions from "init/initial_positions_0.dat"
113+
Swarm ID 0
114+
Writing to swarm dir "swarm_0"
115+
Reading receptor input structure: lightdock_1czy_protein.pdb
116+
Reading ligand input structure: lightdock_1czy_peptide.pdb
117+
Loading DFIRE scoring function
118+
Creating GSO with 200 glowworms
119+
Starting optimization (100 steps)
120+
121+
real 0m1,580s
122+
user 0m1,312s
123+
sys 0m0,248s
81124
```
82125

83126
### 1azp (protein-nucleic docking)
84127

85-
```
128+
```bash
86129
cd example/1azp
87130
time ../../target/release/lightdock-rust setup.json initial_positions_0.dat 100 dna
131+
```
88132

89-
...
133+
Output:
90134

91-
real 0m30.321s
92-
user 0m29.219s
93-
sys 0m0.651s
135+
```
136+
Reading starting positions from "initial_positions_0.dat"
137+
Swarm ID 0
138+
Output directory does not exist for swarm 0, creating it...
139+
Writing to swarm dir "swarm_0"
140+
Reading receptor input structure: lightdock_protein.pdb
141+
Reading ligand input structure: lightdock_dna.pdb
142+
Loading DNA scoring function
143+
Creating GSO with 200 glowworms
144+
Starting optimization (100 steps)
145+
146+
real 0m14,228s
147+
user 0m13,932s
148+
sys 0m0,281s
94149
```
95150

example/1azp/gso_1.out renamed to example/1azp/swarm_0/gso_1.out

+200-200
Large diffs are not rendered by default.

example/1azp/gso_10.out renamed to example/1azp/swarm_0/gso_10.out

+200-200
Large diffs are not rendered by default.

example/1azp/gso_100.out renamed to example/1azp/swarm_0/gso_100.out

+200-200
Large diffs are not rendered by default.

example/1azp/gso_20.out renamed to example/1azp/swarm_0/gso_20.out

+200-200
Large diffs are not rendered by default.

example/1azp/gso_30.out renamed to example/1azp/swarm_0/gso_30.out

+200-200
Large diffs are not rendered by default.

example/1azp/gso_40.out renamed to example/1azp/swarm_0/gso_40.out

+200-200
Large diffs are not rendered by default.

example/1azp/gso_50.out renamed to example/1azp/swarm_0/gso_50.out

+200-200
Large diffs are not rendered by default.

example/1azp/gso_60.out renamed to example/1azp/swarm_0/gso_60.out

+200-200
Large diffs are not rendered by default.

example/1azp/gso_70.out renamed to example/1azp/swarm_0/gso_70.out

+200-200
Large diffs are not rendered by default.

example/1azp/gso_80.out renamed to example/1azp/swarm_0/gso_80.out

+200-200
Large diffs are not rendered by default.

example/1azp/gso_90.out renamed to example/1azp/swarm_0/gso_90.out

+200-200
Large diffs are not rendered by default.

example/1czy/analysis.sh

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
3+
CORES=4
4+
5+
### Calculate the number of swarms ###
6+
s=`ls -d ./swarm_* | wc -l`
7+
swarms=$((s-1))
8+
9+
### Create files for Ant-Thony ###
10+
for i in $(seq 0 $swarms)
11+
do
12+
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;
13+
done
14+
15+
for i in $(seq 0 $swarms)
16+
do
17+
echo "cd swarm_${i}; lgd_cluster_bsas.py gso_100.out > /dev/null 2> /dev/null;" >> cluster_lightdock.list;
18+
done
19+
20+
### Generate LightDock models ###
21+
ant_thony.py -c ${CORES} generate_lightdock.list;
22+
23+
### Clustering BSAS (rmsd) within swarm ###
24+
ant_thony.py -c ${CORES} cluster_lightdock.list;
25+
26+
### Generate ranking files for filtering ###
27+
lgd_rank.py $s 100;
28+
29+
### Generate top predictions ###
30+
mkdir top;
31+
lgd_top.py 1czy_protein.pdb 1czy_peptide.pdb rank_by_scoring.list 10;
32+
mv top_*.pdb top/
33+
34+
### Clean ###
35+
rm -rf swarm_*/*.pdb solutions.list generate_lightdock.list cluster_lightdock.list rank_by_luciferin.list rank_by_rmsd.list;
36+

example/1czy/execution.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
NUM_CORES=4
55

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

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

17-
# Copy binary
17+
# Copy lightdock-rust binary
1818
cp ../../target/release/lightdock-rust .
1919

2020
# Create a task.list file for ant_thony
21-
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
21+
for i in `seq 0 $swarms`;do echo "./lightdock-rust setup.json init/initial_positions_${i}.dat 100 dfire;" >> task.list; done
2222

2323
# Let ant_thony run
24-
ant_thony.py --cores ${NUM_CORES} task.list
24+
time ant_thony.py --cores ${NUM_CORES} task.list
2525

2626
# Clean task.list
2727
rm -rf task.list

example/1czy/init/cluster_centers.pdb

-10
This file was deleted.

0 commit comments

Comments
 (0)