Using the AC Webserver


1. Checking that the server is up and running

> curl -s beta.swissdock.ch:1234/hello
Hello World!
If the Web server is up and running, you will receive a "Hello World!" message. If not, please contact the team.

You can access the help documentation of AC with the following command:
> curl -s beta.swissdock.ch:1234/help

2. Starting attracting cavities

In the following, you will need a tar.gz file containing (without folder) the ac.inp file for CHARMM and the files listed in it.
> tar -czf file.tar.gz -C path-to-your-folder .
See the help documentation of AC for more informations.

You can launch the job by using the following command:
> curl -s -F "myTar=@file.tar.gz" beta.swissdock.ch:1234/startAC
If no problem was found, the calculation is submitted to the queue of the server. Then, the user is provided with a randomly chosen Session Number. This Session Number will allow the user to check what is the status of the calculation, and later retrieve the results in case of a successful calculation.
>curl -s -F "myTar=@file.tar.gz" beta.swissdock.ch:1234/startAC
Session number: 65720367
To check your session status, please run curl "beta.swissdock.ch:1234/checksession?sessionNumber=65720367
Here, 65720367 is the Session Number of the submitted job.

3. Checking the status of a job

You can check the status of the job using the Session Number that you have received upon submission. If the calculation is pending in the queue waiting for its turn, you will be informed about that, and you will be provided with the number of jobs that are waiting before it in the queue. If the job is currently running, you will be informed about that and the running time will be reported. If the docking is over, you will be also informed that the job is finished.
> curl -s beta.swissdock.ch:1234/checksession?sessionNumber=65720367
Calculation is in the queue. Number of jobs before yours: 12

... and later ...

> curl -s beta.swissdock.ch:1234/checksession?sessionNumber=65720367
Calculation is in the queue. Number of jobs before yours: 4

... and later ...

> curl -s beta.swissdock.ch:1234/checksession?sessionNumber=65720367
Calculation currently running. Run time: 0:02

... and later ...

> curl -s beta.swissdock.ch:1234/checksession?sessionNumber=65720367
Calculation is finished

4. Cancelling a job

You can cancel the job that is currently running or pending in the queue. The following command will remove the calculation from the queue of the server:
> curl -s -F "myTar=@file.tar.gz" beta.swissdock.ch:1234/startAC
Session number: 174252494
To check your session status, please run curl "beta.swissdock.ch:1234/checksession?sessionNumber=174252494

... and later ...

> curl -s beta.swissdock.ch:1234/cancelsession?sessionNumber=174252494
Calculation of session 174252494 was cancelled

5. Retrieving the results of a job

After you have confirmed that your submitted job is finished (see above), you can retrieve the results:
> curl -s beta.swissdock.ch:1234/retrievesession?sessionNumber=65720367
Calculation is finished.
To retrieve the results, please run curl "beta.swissdock.ch:1234/retrievesession?sessionNumber=65720367" -o results.tar.gz
Simply run the given command to retrieve your results:
> curl "beta.swissdock.ch:1234/retrievesession?sessionNumber=65720367" -o results.tar.gz
You will download the gzip results file on your machine.