|
| 1 | + |
| 2 | + |
| 3 | +<hr> |
| 4 | + |
| 5 | +# LightDock 4G6M example |
| 6 | + |
| 7 | +This is a complete example of the LightDock protocol whwn residue restraints are specified using the [4G6M](https://www.rcsb.org/structure/4g6m) complex as an example. |
| 8 | + |
| 9 | +All the files used in this example can be found in the path [examples/4G6M](../examples/4G6M). |
| 10 | + |
| 11 | +**IMPORTANT: We recommend you to create a new folder and to copy the starting files `4G6M_rec.pdb`, `4G6M_lig.pdb` and `restraints.list` to that folder in case you would like to run this example.** |
| 12 | + |
| 13 | +## 1. Setup |
| 14 | + |
| 15 | +First, run the setup: |
| 16 | + |
| 17 | +``` |
| 18 | +lightdock_setup 4G6M_rec.pdb 4G6M_lig.pdb 400 200 -anm --noxt -rst restraints.list |
| 19 | +``` |
| 20 | + |
| 21 | +The output should be something like this: |
| 22 | + |
| 23 | +``` |
| 24 | +@> ProDy is configured: verbosity='info' |
| 25 | +[lightdock_setup] INFO: Reading structure from 4G6M_rec.pdb PDB file... |
| 26 | +[lightdock_setup] INFO: 1782 atoms, 230 residues read. |
| 27 | +[lightdock_setup] INFO: Reading structure from 4G6M_lig.pdb PDB file... |
| 28 | +[lightdock_setup] INFO: 1194 atoms, 149 residues read. |
| 29 | +[lightdock_setup] INFO: Calculating reference points for receptor 4G6M_rec.pdb... |
| 30 | +[lightdock_setup] INFO: Done. |
| 31 | +[lightdock_setup] INFO: Calculating reference points for ligand 4G6M_lig.pdb... |
| 32 | +[lightdock_setup] INFO: Done. |
| 33 | +[lightdock_setup] INFO: Saving processed structure to PDB file... |
| 34 | +[lightdock_setup] INFO: Done. |
| 35 | +[lightdock_setup] INFO: Saving processed structure to PDB file... |
| 36 | +[lightdock_setup] INFO: Done. |
| 37 | +[lightdock_setup] INFO: 10 normal modes calculated |
| 38 | +[lightdock_setup] INFO: 10 normal modes calculated |
| 39 | +[lightdock_setup] INFO: Reading restraints from restraints.list |
| 40 | +[lightdock_setup] INFO: Number of receptor restraints is: 20 (active), 0 (passive) |
| 41 | +[lightdock_setup] INFO: Number of ligand restraints is: 21 (active), 0 (passive) |
| 42 | +[lightdock_setup] INFO: Calculating starting positions... |
| 43 | +[lightdock_setup] INFO: Generated 84 positions files |
| 44 | +[lightdock_setup] INFO: Done. |
| 45 | +[lightdock_setup] INFO: Number of swarms is 84 after applying restraints |
| 46 | +[lightdock_setup] INFO: Preparing environment |
| 47 | +[lightdock_setup] INFO: Done. |
| 48 | +[lightdock_setup] INFO: LightDock setup OK |
| 49 | +``` |
| 50 | + |
| 51 | +## 2. Simulation |
| 52 | + |
| 53 | +We can run our simulation in a local machine or in a HPC cluster. For the first option, simply run the following command: |
| 54 | + |
| 55 | +``` |
| 56 | +lightdock setup.json 100 -s fastdfire -c 8 |
| 57 | +``` |
| 58 | + |
| 59 | +Where the flag `-c 8` indicates LightDock to use 8 available cores. For this example we will run `100` steps of the protocol and the C implementation of the DFIRE function `-s fastdfire`. |
| 60 | + |
| 61 | + |
| 62 | +To run a LightDock job on a HPC cluster, a Portable Batch System (PBS) file can be generated. This PBS file defines the commands and cluster resources used for the job. A PBS file is a plain-text file that can be easily edited with any UNIX editor. For example, create a `submit_job.sh` file containing: |
| 63 | + |
| 64 | +``` |
| 65 | +#PBS -N LightDock-4G6M |
| 66 | +#PBS -q medium |
| 67 | +#PBS -l nodes=1:ppn=16 |
| 68 | +#PBS -S /bin/bash |
| 69 | +#PBS -d ./ |
| 70 | +#PBS -e ./lightdock.err |
| 71 | +#PBS -o ./lightdock.out |
| 72 | +
|
| 73 | +lightdock setup.json 100 -s fastdfire -c 16 |
| 74 | +``` |
| 75 | + |
| 76 | +This script tells the PBS queue manager to use 16 cores of a single node in a queue with name `medium`, with job name `LigthDock-4G6M` and with standard output to `lightdock.out` and error output redirected to `lightdock.err`. |
| 77 | + |
| 78 | +To run this script you can do it so: |
| 79 | + |
| 80 | +``` |
| 81 | +qsub < submit_job.sh |
| 82 | +``` |
| 83 | + |
| 84 | +## 3. Analysis |
| 85 | + |
| 86 | +Once the simulation has finished (it takes around 1-2 min per 10 steps per swarm), you should: |
| 87 | + |
| 88 | +1. Generate structures per swarm (200 glowworms per swarm in this example) |
| 89 | +2. Cluster predictions per swarm |
| 90 | +3. Generate the ranking files |
| 91 | +4. Filter by a percentage of satisfied restraints (>40% in this example) |
| 92 | + |
| 93 | +Here there is a PBS script to do so: |
| 94 | + |
| 95 | +``` |
| 96 | +#PBS -N 4G6M-anal |
| 97 | +#PBS -q medium |
| 98 | +#PBS -l nodes=1:ppn=8 |
| 99 | +#PBS -S /bin/bash |
| 100 | +#PBS -d ./ |
| 101 | +#PBS -e ./analysis.err |
| 102 | +#PBS -o ./analysis.out |
| 103 | +
|
| 104 | +### Calculate the number of swarms ### |
| 105 | +
|
| 106 | +s=`ls -d ./swarm_* | wc -l` |
| 107 | +swarms=$((s-1)) |
| 108 | +
|
| 109 | +
|
| 110 | +### Create files for Ant-Thony ### |
| 111 | +
|
| 112 | +for i in $(seq 0 $swarms) |
| 113 | + do |
| 114 | + echo "cd swarm_${i}; lgd_generate_conformations.py ../4G6M_rec.pdb ../4G6M_lig.pdb gso_100.out 200 > /dev/null 2> /dev/null;" >> generate_lightdock.list; |
| 115 | + done |
| 116 | +
|
| 117 | +for i in $(seq 0 $swarms) |
| 118 | + do |
| 119 | + echo "cd swarm_${i}; lgd_cluster_bsas.py gso_100.out > /dev/null 2> /dev/null;" >> cluster_lightdock.list; |
| 120 | + done |
| 121 | +
|
| 122 | +
|
| 123 | +### Generate LightDock models ### |
| 124 | +
|
| 125 | +ant_thony.py -c 8 generate_lightdock.list; |
| 126 | +
|
| 127 | +
|
| 128 | +### Clustering BSAS (rmsd) within swarm ### |
| 129 | +
|
| 130 | +ant_thony.py -c 8 cluster_lightdock.list; |
| 131 | +
|
| 132 | +
|
| 133 | +### Generate ranking files for filtering ### |
| 134 | +
|
| 135 | +lgd_rank.py $s 100; |
| 136 | +
|
| 137 | +
|
| 138 | +### Filtering models by >40% of satisfied restraints ### |
| 139 | +
|
| 140 | +lgd_filter_restraints.py --cutoff 5.0 --fnat 0.4 rank_by_scoring.list restraints.list A B > /dev/null 2> /dev/null; |
| 141 | +
|
| 142 | +``` |
| 143 | + |
| 144 | +When the analysis is finished, a new folder called `filtered` has been created, which contains any predicted structure which satisfies our 40% filter and a file with the ranking of these structures by LightDock DFIRE (fastdfire) energy (more positive better) `rank_filtered.list`. |
| 145 | + |
| 146 | +We provide for this example a compressed filtered folder [filtered.tgz](../examples/4G6M/filtered.tgz) which contains (when decompressed) a ranking `lgd_filtered_rank.list` file. For all the filtered structures, interface RMSD (i-RMSD), ligand RMSD (l-RMSD) and fraction of native contacts (fnc) according to CAPRI criteria has been calculated: |
| 147 | + |
| 148 | +``` |
| 149 | +$ head lgd_filtered_rank.list |
| 150 | +# structure i-RMSD l-RMSD fnc Score |
| 151 | +swarm_83_154.pdb 2.091 2.012 0.603448 56.869 |
| 152 | +swarm_50_151.pdb 3.082 4.001 0.327586 50.536 |
| 153 | +swarm_7_192.pdb 1.553 1.461 0.586207 48.936 |
| 154 | +swarm_36_168.pdb 1.132 1.385 0.827586 48.870 |
| 155 | +swarm_48_19.pdb 3.687 4.205 0.258621 48.739 |
| 156 | +swarm_11_136.pdb 2.231 2.390 0.448276 48.662 |
| 157 | +swarm_52_171.pdb 3.933 4.052 0.155172 47.808 |
| 158 | +swarm_49_183.pdb 3.589 3.775 0.258621 47.659 |
| 159 | +swarm_48_49.pdb 1.562 2.100 0.793103 47.234 |
| 160 | +swarm_65_93.pdb 1.282 1.130 0.844828 45.372 |
| 161 | +``` |
| 162 | + |
| 163 | +As you may observe, for this example our protocol seems to perform extremely well when restraints close to the true interface are specified. |
0 commit comments