← API reference
Molecular simulation

GROMACS API

Prepare a solvated molecular-dynamics system from a PDB structure.

Runs the standard pdb2gmx, editconf, and optional solvate preparation steps.

Request body

Fields

The same names the web form posts. See the field type table for what each kind means over HTTP.

Name Type Required Default Description
pdb string file yes ATOM 1 N ALA A 1 -0.525 1.363 0.000 1.00 0.00 N ATOM 2 … PDB structure Defaults to a minimal alanine example when no file is chosen. file types .pdb,.ent.
force_field string select no amber99sb-ildn Force field One of: amber99sb-ildn, charmm27, oplsaa.
water_model string select no tip3p Water model One of: tip3p, spce, none.
box_type string select no dodecahedron Box type One of: dodecahedron, cubic, octahedron.
box_distance number number no 1.0 Solute-to-box distance (nm) minimum 0.1, maximum 10, step 0.1.
solvate boolean checkbox no true Add solvent
Example

A request that runs

These are the defaults, exactly as the web form would post them.

curl -X POST https://www.athanortools.com/api/gromacs/ \
  -H 'Content-Type: application/json' \
  -d '{
  "pdb": "ATOM      1  N   ALA A   1      -0.525   1.363   0.000  1.00  0.00           N\nATOM      2  CA  ALA A   1       0.000   0.000   0.000  1.00  0.00           C\nATOM      3  C   ALA A   1       1.526   0.000   0.000  1.00  0.00           C\nATOM      4  O   ALA A   1       2.153  -1.057   0.000  1.00  0.00           O\nATOM      5  CB  ALA A   1      -0.507  -0.771  -1.216  1.00  0.00           C\nTER\nEND",
  "force_field": "amber99sb-ildn",
  "water_model": "tip3p",
  "box_type": "dodecahedron",
  "box_distance": 1.0,
  "solvate": true
}'

The reply is 202 with a queued job; poll its status_url until status is succeeded or failed. See the quick start for the whole exchange.

Responses

What comes back

statusMeaning
queued Accepted, waiting for the jobs ahead of it. `position` counts how many those are.
running The tool is executing now.
succeeded Finished; `result` holds the tool's output and `license` the terms it came under.
failed Finished; `error` holds a code and a message.

Errors

codeMeaning
invalid_input The client supplied invalid or incomplete input.
tool_unavailable The requested third-party dependency is not available on this host.
execution_failed A configured third-party process exited unsuccessfully.
internal_error An adapter failed in a way it does not describe. The detail is in the server log, not the response.
not_found No job has that id. Finished jobs are dropped eventually.