Using the SwissDock Webserver


In the following, we will use the complex between dabrafenib and BRAF (PDB ID 5hie) as an example.

To run a docking, you need to prepare a ligand, a target, and a box center. When both are prepared, you can set your parameters and check your session. If your session can be submitted you can start the docking.

1. Checking that the server is up and running

curl "https://swissdock.ch:8443/"
Hello World! If the webserver is up and running, you will receive a "Hello World!" message. If not, please contact the SwissDock team.

2. Uploading and preparing your ligand

Upload a Mol2 file

You can upload your ligand in a Mol2 format with the following command, your ligand will automatically be prepared through SwissParam for a docking with Attracting Cavities 2.0.
curl -F "myLig=@ligand.mol2" "https://swissdock.ch:8443/preplig"
Session number: 5650183

Your ligand has been uploaded.

Preparing ligand for Attracting Cavities...
Your ligand has been prepared.

To check your session status, please run the following command:
curl "https://swissdock.ch:8443/checkstatus?sessionNumber=5650183"
where ligand.mol2 is the Mol2 file of your ligand. This file can have any name(P06.mol2 for 5hie).

If no problem was found, you will receive a randomly chosen session number. This session number will allow you to set parameters, check your session status, and later retrieve the results in case of a successful run.
You can also change your ligand (in SMILES or Mol2 file) by specifying your session number, this will overwrite your previous ligand.
curl -F "myLig=@correctedligand.mol2" "https://swissdock.ch:8443/preplig?sessionNumber=5650183"
Using session number: 5650183

Your ligand has been changed.

Preparing ligand for Attracting Cavities...
Your ligand has been prepared.

To check your session status, please run the following command:
curl "https://swissdock.ch:8443/checkstatus?sessionNumber=5650183"

Upload a SMILES

If you want to upload a SMILES, use the following command:
curl -g "https://swissdock.ch:8443/preplig?mySMILES=CC(C)(C)c1nc(c(s1)c2ccnc(n2)N)c3cccc(c3F)NS(=O)(=O)c4c(cccc4F)F"
Session number: 2316546

Your ligand has been uploaded.

Preparing ligand for Attracting Cavities...

Here are some protonation states you might consider:
SMILES | pH
CC(C)(C)C1=[NH+]C(C2=CC=CC(NS(=O)(=O)C3=C(F)C=CC=C3F)=C2F)=C(C2=CC=NC(N)=N2)S1 | 3.0-3.6
CC(C)(C)C1=NC(C2=CC=CC(NS(=O)(=O)C3=C(F)C=CC=C3F)=C2F)=C(C2=CC=NC(N)=[NH+]2)S1 | 3.0-4.4
CC(C)(C)C1=NC(C2=CC=CC(NS(=O)(=O)C3=C(F)C=CC=C3F)=C2F)=C(C2=CC=[NH+]C(N)=N2)S1 | 3.0-5.0
CC(C)(C)C1=NC(C2=CC=CC([N-]S(=O)(=O)C3=C(F)C=CC=C3F)=C2F)=C(C2=CC=NC(N)=N2)S1 | 5.0-10.0
CC(C)(C)C1=[NH+]C(C2=CC=CC(NS(=O)(=O)C3=C(F)C=CC=C3F)=C2F)=C(C2=CC=[NH+]C(N)=N2)S1 | 3.0-3.4

Your ligand has been prepared.

To check your session status, please run the following command:
curl "https://swissdock.ch:8443/checkstatus?sessionNumber=2316546"
Your SMILES will be prepared through SwissParam for a docking with Attracting Cavities. If no problem was found, you will receive a randomly chosen session number and propositions of alternative protonation states. You can directly specify the pH at which the SMILES should be protonated, otherwise the protonation state present in your SMILES will be used.

And if you want to modify your SMILES or specify the pH, you can use your session number:
curl -g "https://swissdock.ch:8443/preplig?mySMILES=CC(C)(C)c1nc(c(s1)c2ccnc(n2)N)c3cccc(c3F)NS(=O)(=O)c4c(cccc4F)F&pH=4&sessionNumber=2316546"
Using session number: 2316546

Your ligand has been changed.

Preparing ligand for Attracting Cavities...
Your ligand has been prepared.

To check your session status, please run the following command:
curl "https://swissdock.ch:8443/checkstatus?sessionNumber=2316546"

Upload your ligand parameters and topology files

If you already have a folder containing a parameter file (.par), a coordinate file (.pdb) and a residue topology file (.rtf) for the use of Attracting Cavities, you can compress your folder ("tar -zcf ligand.tar.gz -C path-to-your-folder ."), and use your files on SwissDock:
curl -F "myLig=@ligand.tar.gz" "https://swissdock.ch:8443/preplig"
Session number: 29380772

Your ligand has been uploaded.

To check your session status, please run the following command:
curl "https://swissdock.ch:8443/checkstatus?sessionNumber=29380772"
where ligand.tar.gz is your compressed folder and can have any name, but must be a tar.gz file.

If no problem was found, you will receive a randomly chosen session number. This session number will allow you to set parameters, check your session status, and later retrieve the results in case of a successful run.
You can also change your ligand in any format by specifying your session number.

3. Uploading and preparing your target

You can prepare either the target or the ligand first. However, when preparing the second item, you must provide the session number you obtained when preparing the first one. Otherwise you will start another session.

Upload a coordinate file

If you want to use a coordinate file (.cif, .ent, .pdb), you can setup your target within a given session with the following command:
curl -F "myTarget=@target.pdb" "https://swissdock.ch:8443/preptarget?sessionNumber=21956998"
Using session number: 21956998

Your target has been uploaded.

Preparing target for Attracting Cavities...
Your target has been prepared.

To check your session status, please run the following command:
curl "https://swissdock.ch:8443/checkstatus?sessionNumber=21956998"
where target.pdb is the coordinate file of your target and can have any name (5hie.pdb for 5hie). If water molecules are present in the target file and you want to keep them, add the tag water to the command (only when using AC):

curl -F "myTarget=@target.pdb" "https://swissdock.ch:8443/preptarget?sessionNumber=21956998&water"
...

Upload a prepared target

If you already have a folder containing coordinate files (.crd), and a protein structure file (.psf), you can compress your folder ("tar -zcf target.tar.gz -C path-to-your-folder ."") and upload your files on SwissDock:
curl -F "myTarget=@target.tar.gz" "https://swissdock.ch:8443/preptarget?sessionNumber=29380772"
Using session number: 29380772

Your target has been uploaded.

To check your session status, please run the following command:
curl "https://swissdock.ch:8443/checkstatus?sessionNumber=29380772"
where target.tar.gz is your compressed folder and can have any name, but must be a tar.gz file.

If you have a parameter file (.par) and a residue topology file (.rtf) of heteroatoms, you can put them in the tar.gz file. Parameters will be merged with ligand ones.

4. Preparing and checking your job parameters

Before starting your docking, you need to set some parameters with the following command:
curl "https://swissdock.ch:8443/setparameters?sessionNumber=21956998&exhaust=e&cavity=c&ric=g&boxCenter=x_y_z&boxSize=a_b_c&name=n"
where parameters for the attracting cavities docking code are:
  • exhaust is the sampling exhaustivity used for the ligand positioning defined by the rotational step value in degrees, e is an integer (default is 90)
  • cavity is the cavity prioritization and c is an integer (default is 70)
  • ric is the number of random inital conditions g is an integer (default is 2)
  • boxCenter* is the center of the box and x_y_z are x, y and z float coordinates
  • boxSize is the size of the box and a_b_c are x, y and z float values (default is 20_20_20)
  • name is the possibility to give a name to your docking job n is the name (default is none)
For the example with 5hie, parameters values can be found in the parameters file.
curl "https://swissdock.ch:8443/setparameters?sessionNumber=21956998&exhaust=90&cavity=70&ric=1&boxCenter=-48_-3_72&boxSize=20_20_20"
Using session number: 21956998

Your sampling exhaustivity has been set

Your cavity prioritization has been set

Your number of random initial conditions has been set

Your box size has been set

Your box center has been set

Your parameters:
  Date: Thu 28 Sep 2023 11:20:03
  Ligand: P06.mol2
  Method: AC
  Target: 5hie.pdb
  Sampling exhaustivity: 90
  Cavity prioritization: 70
  Number of random initial conditions: 1
  boxSize: 20 20 20
  boxCenter: -48 -3 72

This job is estimated to take 0:33:32

Your session can be submitted.

To check your session status, please run the following command:
curl "https://swissdock.ch:8443/checkstatus?sessionNumber=21956998"
To launch your docking please run the following command:
curl "https://swissdock.ch:8443/startdock?sessionNumber=21956998"
With this command you will receive a confirmation of your parameters. If you already prepared a ligand and a target, your session is checked. It can then be submitted if your box contains attractive points and if the estimated time of calculation is less than 1 hour.
If your session cannot be submitted due to an empty grid (i.e. no cavity has been found within your search box), please try to change your box center.
If your session cannot be submitted due to a too long calculation, please try to change optional parameters, or reduce the size of your target.

5. Starting a docking job

If your session can be submitted after the checking, you can start a docking using your session number and the following command:
curl "https://swissdock.ch:8443/startdock?sessionNumber=21956998"

Using session number: 21956998

Your session has been submitted.
To check your session status, please run the following command:
curl "https://swissdock.ch:8443/checkstatus?sessionNumber=21956998"
If no problem was found, the calculation is submitted to the queue of the server.

6. Checking the status of a job

You can check the status of the job using the session number at any time. It will give you your parameters and the status of your session. You will be informed if the calculation is pending in the queue waiting for its turn. In this case, you will be provided with the number of jobs that are waiting before yours in the queue. Otherwise, you will be informed that your job is currently running, and the status of the job will be reported. Finally, you can also be informed that the job is finished.
curl "https://swissdock.ch:8443/checkstatus?sessionNumber=21956998"
Calculation is in the queue. Number of jobs before yours: 2 Calculation currently running. Run time: 9:30 Calculation is finished.
To retrieve the results, please run the following command:
curl "https://swissdock.ch:8443/retrievesession?sessionNumber=21956998" -o results.tar.gz

7. Cancelling a job

You can cancel a docking that is currently running or pending in the queue. The following command will remove the calculation from the queue of the server:
curl "https://swissdock.ch:8443/cancelsession?sessionNumber=384569"
Calculation of session 384569 was cancelled.

8. Retrieving the results of a job

After you have been informed that your submitted job is finished, you can retrieve the results:
curl "https://swissdock.ch:8443/checkstatus?sessionNumber=21956998"
Calculation is finished.
To retrieve the results, please run the following command:
curl "https://swissdock.ch:8443/retrievesession?sessionNumber=21956998" -o results.tar.gz
Simply run the given command to retrieve your results:
curl "https://swissdock.ch:8443/retrievesession?sessionNumber=21956998" -o results.tar.gz
The result tar file will be downloaded on your machine.

9. Performing a docking with Autodock Vina

To perform a docking with Autodock Vina, you must specify that you want to use Vina on the first submission in the session with the "Vina" tag. For the ligand:
curl -F "myLig=@ligand.mol2" "https://swissdock.ch:8443/preplig?Vina"
Session number: 41863060

Your ligand has been uploaded.

Preparing ligand for Vina...
Your ligand has been prepared.

To check your session status, please run the following command:
curl "https://swissdock.ch:8443/checkstatus?sessionNumber=41863060"
If you already uploaded a ligand using the tag "Vina" you do not need to specify it when submitting the target:
curl -F "myTarget=@target.pdb" "https://swissdock.ch:8443/preptarget?sessionNumber=41863060"
Using session number: 41863060

Your target has been uploaded.

Vina already chosen. Preparing target for Vina...
Your target has been prepared.

To check your session status, please run the following command:
curl "https://swissdock.ch:8443/checkstatus?sessionNumber=41863060"
Then as for attracting cavities you need to set your parameters:
curl "https://swissdock.ch:8443/setparameters?sessionNumber=41863060&exhaust=e&boxCenter=x_y_z&boxSize=a_b_c"
where parameters for Autodock Vina are:
  • exhaust is the sampling exhaustivity used for the ligand sampling and e is the exhaustiveness value (default is 4)
  • boxCenter* is the center of the box and x_y_z are x, y and z coordinates
  • boxSize is the size of the box and a_b_c are x, y and z values (default is 20_20_20)
For our example 5hie, we will use a sampling exhaustivity of 32, box values can be found in the parameters file.
curl "https://swissdock.ch:8443/setparameters?sessionNumber=41863060&exhaust=32&boxCenter=-48_-3_72&boxSize=20_20_20"
Using session number: 41863060

Your sampling exhaustivity has been set

Your box size has been set

Your box center has been set

Your parameters:
  Date: Thu 28 Sep 2023 16:07:10
  Ligand: P06.mol2
  Method: Vina
  Target: 5hie.pdb
  Sampling exhaustivity: 32
  boxSize: 20 20 20
  boxCenter: -48 -3 72

This job is estimated to take 0:09:50

Your session can be submitted.

To check your session status, please run the following command:
curl "https://swissdock.ch:8443/checkstatus?sessionNumber=41863060"
To launch your docking please run the following command:
curl "https://swissdock.ch:8443/startdock?sessionNumber=41863060"
With this command you will receive a confirmation of your parameters. If you already prepared a ligand and a target, your session is checked. It can then be submitted if the estimated time of calculation is less than 10 minutes.
If your session cannot be submitted due to a too long calculation, please try to change optional parameters, or reduce the size of your target. As for Attracting Cavities, if your session can be submitted you can then start your docking and check your session with the same commands.

10. Performing a covalent docking

With SwissDock, you can now do covalent dockings using Attracting Cavities 2.0. In the following, we will use the complex between the component PXL and a pyridoxamine kinase (PDB ID 1td2) as an example.

For a covalent docking, you must prepare the ligand before the target:
curl -F "myLig=@ligand.mol2" "https://swissdock.ch:8443/preplig?ligsite=l&protres=p&reaction=r&topology=t"
where parameters for the covalent preparation of the ligand are:
  • ligsite is the ligand site (atom name) doing the covalent link, l is the atom name (i.e., C4A)
  • reaction is the reaction, r is the reaction namespace (list is below)
  • protres is the protein residue doing the covalent link, p is the three-letter code of the residue it can be CYS, SER, LYS, ASP, GLU, THR, TYR
  • topology is the topology of your ligand, t can be post-cap or pre reactive.
Available reactions are:
  • aziridine_open: ring-opening mechanism on aziridine
  • blac_open: ring-opening mechanism on β-lactam
  • carbonyl_add: addition on carbonyl
  • disulf_form: formation of a disulfide
  • epoxide_open: ring-opening mechanism on epoxide
  • glac_open: ring-opening mechanism on ɣ-lactam
  • imine_form: formation of imine
  • michael_add: addition on Michael-like acceptor
  • nitrile_add: addition on nitrile
  • nucl_subst: nucleophilic substitution
With our example, the command will be:
curl -F "myLig=@PXL.mol2" "https://swissdock.ch:8443/preplig?ligsite=C4A&protres=CYS&reaction=carbonyl_add&topology=pre"
Session number: 84911916

Your ligand has been uploaded.

Preparing ligand for Attracting Cavities...
  covalent.

Your ligand has been prepared.

To check your session status and query, please run the following command:
curl "https://swissdock.ch:8443/checkstatus?sessionNumber=84911916"
Once the ligand is prepared, you can upload and prepare a target:
curl -F "myTarget=@target.pdb" "https://swissdock.ch:8443/preptarget?atomnb=n&sessionNumber=n"
where atomnb is the atom number of the protein atom forming the covalent bond to the ligand. Do not forget to add the session number where the covalent ligand has been uploaded and prepared. You can also use the tag "water" to keep water molecules. For example 1td2, the command will be:
curl -F "myTarget=@1td2.pdb" "https://swissdock.ch:8443/preptarget?atomnb=928&sessionNumber=84911916"
Using session number: 84911916

Your target has been uploaded.

Preparing target for Attracting Cavities...
  covalent setup.

Your target has been prepared.

To check your session status and query, please run the following command:
curl "https://swissdock.ch:8443/checkstatus?sessionNumber=84911916"
Once the target is uploaded and successfully prepared, you can set the parameters for the docking as for a noncovalent docking and then start the docking using the commands explained above.
curl "https://swissdock.ch:8443/setparameters?sessionNumber=84911916&boxCenter=15_-3_31"
Using session number: 84911916

Your box center has been set

Your parameters:
  Date: Tue 16 Jan 2024 15:21:37
  Ligand: PXL.mol2
  Method: AC cov
  Ligand site: C4A
  Protein residue: CYS
  Reaction: carbonyl_add
  Topology: pre
  Target: 1td2.pdb
  Residue number: 122
  boxCenter: 15.0 -3.0 31.0

This job is estimated to take 0:15:15

Your session can be submitted.

To check your session status and query, please run the following command:
curl "https://swissdock.ch:8443/checkstatus?sessionNumber=84911916"
To launch your docking please run the following command:
curl "https://swissdock.ch:8443/startdock?sessionNumber=84911916"
* mandatory options