Skip to main content

A CLI and Python library to interact with Azulene Studio

Project description

Azulene Studio Quick Start Guide:

This guide walks you through a complete working example of using Azulene Studio to submit and monitor an Absolute Binding Free Energy job using a protein and ligand file.

You will learn how to:

a. Install azulene-studio from PyPI
b. Log in
c. Place your protein + ligand files in the correct location
d. Submit an absolute_binding job (including automatic file upload)
e. Check job status and retrieve results


Create and activate a virtual environment (optional)

For conda

conda create -n azulene-env python=3.11 -y
conda activate azulene-env

For Python

# Create a virtual environment
python -m venv azulene-env

# Activate the environment on Windows
azulene-env\Scripts\activate

# Activate the environment on macOS / Linux
source azulene-env/bin/activate

a. Install azulene-studio from PyPI

pip install azulene-studio

Confirm installation:

python -m azulene.main --help

CLI commands: azulene / azu

Installing the package adds two equivalent console commands — azulene and its short alias azu — so every example below can be run as azulene <command> or azu <command> (e.g. azulene login / azu login), or as python -m azulene.main <command>.

Deprecation: the old opal command (and import opal) still work but are deprecated aliases from the pre–Azulene Studio naming, and will be removed in a future release. Prefer azulene / azu (and import azulene).


b. Log in

Run:

python -m azulene.main login

The CLI will securely prompt you:

Your email: example@gmail.com
Your password: **********

After this, Azulene Studio stores your auth tokens locally so you don’t need to log in again.


c. Example protein and ligand files

Azulene Studio ships with bundled example files you can use right away:

from azulene.examples import T4_LYSOZYME_BENZENE_PDB, BENZENE_BOUND_SDF, TOLUENE_SDF

The CLI will automatically detect these as local files, upload them to Azulene Studio, and replace the paths with storage URLs.


d. Submit an absolute_binding job

The job type is:

absolute_binding

The required parameters are:

{
  "pdb_file": "",
  "ligand_file": "",
  "ligand_smiles": ""
}

Example 1: Using the bundled sample files

from azulene import jobs
from azulene.examples import T4_LYSOZYME_BENZENE_PDB, BENZENE_BOUND_SDF

result = jobs.submit(
    job_type="absolute_binding",
    input_data={
        "pdb_file": str(T4_LYSOZYME_BENZENE_PDB),
        "ligand_file": str(BENZENE_BOUND_SDF),
        "ligand_smiles": "c1ccccc1"
    }
)

print(result)

You should see something like:

📤 Uploading local files...
✅ Job submitted successfully
{
  "job_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "submitted",
  "message": "Job submitted successfully"
}

Example 2: Absolute Binding Free Energy (Ligand Already in PDB)

This example runs an absolute_binding job using:

  • A protein PDB file
  • A ligand inside the PDB file
  • A SMILES string for the ligand
  • Shortened equilibration & production lengths
  • Only 1 protocol repeat
from azulene import auth, jobs
from azulene.examples import FKB_MODEL_PDB

# 1. Log in (Only if you haven't logged in)
auth.login(email="your@email.com", password="yourpassword")

# 2. Submit the job
input_data = {
    "pdb_file": str(FKB_MODEL_PDB),
    "ligand_smiles": "CS(=O)C",
    "protocol_repeats": 1,
    "ligand_in_pdb_file": True,
    "complex_prod_length": 0.1,
    "solvent_prod_length": 0.1,
    "complex_equil_length": 0.02,
    "solvent_equil_length": 0.02
}

result = jobs.submit(
    job_type="absolute_binding",
    input_data=input_data
)

print(result)

e. Submit an Absolute Aqueous Solvation Free Energy job

The job type is:

aqueous_solvation

The required parameters are:

{
  "smiles": ""
}

Example: Using a simple SMILES (CCO)

from azulene import jobs

result = jobs.submit(
    job_type="aqueous_solvation",
    input_data={
        "smiles": "CCO"
    }
)

print(result)

You should see something like:

✅ Job submitted successfully
{
  "job_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "submitted",
  "message": "Job submitted successfully"
}

f. Other useful commands

1. List your jobs

Last 5 jobs (default):

python -m azulene.main jobs get-jobs

All jobs:

python -m azulene.main jobs get-jobs --all

Filter by job type and status:

python -m azulene.main jobs get-jobs \
  --job-type absolute_binding \
  --status completed

Filter by date:

python -m azulene.main jobs get-jobs \
  --start-date 2025-12-01T00:00:00Z \
  --end-date   2025-12-05T00:00:00Z

2. Check a specific job

python -m azulene.main jobs get --job-id YOUR_JOB_ID

This returns:

  • job status
  • input data
  • results (if completed)
  • timestamps
  • any error messages

3. Poll running jobs

python -m azulene.main jobs check-running-jobs

Use this to check on running jobs.


4. Cancel a job

python -m azulene.main jobs cancel --job-id YOUR_JOB_ID

Only works if the job is still running.


Azulene Studio

This guide shows how to:

  1. Log in
  2. Submit a job
  3. Inspect and filter jobs
  4. Get / cancel a specific job
  5. Poll running jobs
  6. Check service health & job types
  7. Submit a batch of jobs

How to download Azulene Studio

pip install azulene-studio

0. Imports (Python)

from azulene import auth, jobs

1. Log in

from azulene import auth

res = auth.login(email="test@example.com", password="pass123")
print(res)  # {"ok": True, "message": "Logged in successfully!"}

You stay logged in via locally stored tokens until you explicitly log out.


2. Check who you are

from azulene import auth

res = auth.whoami()
print(res)
# {
#   "ok": True,
#   "user": { ... full user object ... },
#   "slim": {
#       "email": "...",
#       "role": "...",
#       "approved": True,
#       ...
#   }
# }

3. Submit a single job

Example job type: generate_conformers with a SMILES and number of conformers.

from azulene import jobs

res = jobs.submit(
    job_type="generate_conformers",
    input_data={"smiles": "CCO", "num_conformers": 5},  # dict
)
print(res)
# {"ok": True, "data": {"job_id": "...", "status": "submitted", ...}}

(You can also pass a JSON string instead of a dict if you want.)


4. List and filter jobs

By default, the server returns the last 5 jobs for the current user. You can ask for all jobs, limit, or filter by job_type, status, or date range.

from azulene import jobs

# Last 5 jobs (default)
print(jobs.get_jobs())

# All jobs
print(jobs.get_jobs(all_jobs=True))

# Last 10 jobs
print(jobs.get_jobs(limit=10))

# Filter by job_type and status
print(
    jobs.get_jobs(
        job_type="generate_conformers",
        status="completed",
    )
)

# Filter by created_at date range (ISO timestamps)
print(
    jobs.get_jobs(
        start_date="2025-12-01T00:00:00Z",
        end_date="2025-12-05T00:00:00Z",
    )
)

Each call returns something like:

{"ok": True, "data": [ { "id": "...", "job_type": "...", ... }, ... ]}

5. Get a specific job

Once you have a job_id, you can fetch that job’s details.

from azulene import jobs

res = jobs.get(job_id="YOUR_JOB_ID")
print(res)
# {"ok": True, "data": { "id": "...", "status": "...", "input_data": {...}, "results": {...}, ... }}

6. Cancel a job

If a job is still running, you can cancel it.

from azulene import jobs

res = jobs.cancel(job_id="YOUR_JOB_ID")
print(res)
# {"ok": True, "data": {...}}

7. Poll running jobs

This endpoint checks any currently running jobs and update their statuses.

from azulene import jobs

res = jobs.check_running_jobs()
print(res)
# {"ok": True, "data": {...}}  # depends on your backend payload

8. Health check

Check that the Azulene Studio backend is reachable.

from azulene import jobs

res = jobs.check_health()
print(res)
# {"ok": True, "data": {...}}  on success

9. Discover available job types

List job types supported by the current backend.

from azulene import jobs

res = jobs.get_job_types()
print(res)
# {"ok": True, "data": ["generate_conformers", "absolute_solvation_energy_aqueous", ...]}

10. Submit a batch of jobs (same job_type, many inputs)

You can submit multiple jobs at once for a single job_type. Each entry in the list becomes a separate job under the hood.

from azulene import jobs

small_input_list = [
    {"smiles": "CCO",   "num_conformers": 5},
    {"smiles": "CCCO",  "num_conformers": 3},
    {"smiles": "CCcndO","num_conformers": 2},
]

res = jobs.submit_batch_jobs(
    job_type="generate_conformers",
    input_data=small_input_list,
)
print(res)
# {
#   "ok": True,
#   "results": [
#       {
#         "index": 0,
#         "input": {...},
#         "response": {
#             "ok": True,
#             "data": {
#                 "job_id": "...",
#                 "status": "submitted",
#                 "message": "Job submitted successfully",
#                 ...
#             }
#         }
#       },
#       ...
#   ]
# }

11. Log out

When you’re done, you can clear the local tokens.

from azulene import auth

res = auth.logout()
print(res)  # {"ok": True}

TL;DR minimal workflows

from azulene import auth, jobs

# 1) Log in
auth.login(email="test@example.com", password="pass123")

# 2) Submit a job
submit_res = jobs.submit(
    job_type="generate_conformers",
    input_data={"smiles": "CCO", "num_conformers": 5},
)
print(submit_res)

# 3) List recent jobs
print(jobs.get_jobs())

# 4) Fetch that job by ID
job_id = submit_res["data"]["job_id"]
print(jobs.get(job_id=job_id))

Help Commands

python -m azulene.main --help

python -m azulene.main jobs --help

python -m azulene.main jobs submit --help

Azulene Studio Job Types:

This document lists all currently available Azulene Studio job types, their purpose, required inputs, and example payloads.

You can fetch this list via:

python -m azulene.main jobs get-job-types

or in Python:

from azulene import jobs
jobs.get_job_types()

Overview

ID Name Description
generate_conformers Generate Conformers Generate molecular conformers from SMILES notation
aqueous_solvation Absolute Aqueous Solvation Free Energy Solvation free energy in water
relative_fe Relative Free Energy Relative free energy between two molecules in water
relative_fe_uaa Relative Free Energy for (Unnatural) Amino Acids Relative FE between two (un)natural amino acid structures
nonaqueous_solvation Absolute Nonaqueous Solvation Free Energy Solvation FE of a solute between two solvents
reaction_free_energy Aqueous Reaction Free Energy Reaction free energy in aqueous solution
deprotonation_fe Deprotonation Free Energy Deprotonation free energy in aqueous solution
absolute_binding Absolute Binding Free Energy Binding FE of a ligand to a protein in water
relative_binding Relative Binding Free Energy Relative binding FE between two ligands
relative_binding_uaa Relative Binding FE for (Unnatural) Amino Acids Relative binding FE for (un)natural amino acid ligands
lipid_permeation Lipid Permeation Free Energy FE of permeation through a lipid bilayer
pocket_docking Pocket Finding and Ligand Docking Pocket finding + docking of a ligand to a protein
upload_file Upload File Uploads a file and returns its storage path
boltz_prediction Boltz-2 Affinity and Structure Prediction Protein–ligand affinity + structure prediction using Boltz-2

1. Generate Conformers (generate_conformers)

Description: Generate molecular conformers from SMILES notation.

Input Schema

Field Type Required Default Description
smiles string yes SMILES of the molecule
num_conformers number yes 5 Number of conformers to generate

Example Input

{
  "smiles": "CCO",
  "num_conformers": 5
}

2. Absolute Aqueous Solvation Free Energy (aqueous_solvation)

Description: Absolute solvation free energy of a molecule in water via alchemical transformations.

Key Input Fields

Field Type Required Default Description
smiles string yes Solute SMILES
assign_protonation_states boolean no false Assign protonation states at given pH
ph number no 7 pH for protonation
solvent_equil_length number no 0.08 Solvent equilibration length (ns / replica)
solvent_prod_length number no 0.4 Solvent production length (ns / replica)
vacuum_equil_length number no 0.08 Vacuum equilibration length (ns / replica)
vacuum_prod_length number no 0.4 Vacuum production length (ns / replica)
platform string no CUDA OpenMM platform (CUDA, OpenCL, CPU, Reference)
protocol_repeats integer no 3 # of repeats for uncertainty
keep_dirs boolean no True Keep working directories

Example Input

{
  "smiles": "CCO"
}

3. Relative Free Energy (relative_fe)

Description: Relative FE between two molecules in water.

Key Input Fields

Field Type Required Default Description
smiles_a string yes SMILES of molecule A
smiles_b string yes SMILES of molecule B
assign_protonation_states boolean no false Assign protonation states at pH
ph number no 7 pH value
equil_length number no 0.08 Equilibration length (ns / replica)
prod_length number no 0.4 Production length (ns / replica)
platform string no CUDA OpenMM platform
protocol_repeats integer no 3 # of repeats
keep_dirs boolean no True Keep working dirs

Example Input

{
  "smiles_a": "CCO",
  "smiles_b": "CCC"
}

4. Relative Free Energy for (Unnatural) Amino Acids (relative_fe_uaa)

Description: Relative FE between two (un)natural amino acid sequences.

Key Input Fields

Field Type Required Default Description
sequence_a string yes First peptide sequence (standard codes or UAA notation)
sequence_b string yes Second peptide sequence
uaa_map object no Map of placeholders (e.g. {"x": "pF-Phe"})
assign_protonation_states boolean no false Assign protonation states at pH
ph number no 7 pH value
equil_length number no 0.08 Equilibration length (ns / replica)
prod_length number no 0.4 Production length (ns / replica)
platform string no CUDA OpenMM platform
protocol_repeats integer no 3 # of repeats
keep_dirs boolean no True Keep working dirs

Example Input

{
  "sequence_a": "YGH",
  "sequence_b": "<pF-Phe>GH"
}

5. Absolute Nonaqueous Solvation Free Energy (nonaqueous_solvation)

Description: Solvation FE of a solute between two solvents.

Key Input Fields

Field Type Required Default Description
smiles_solute string yes Solute SMILES
smiles_solvent_a string yes Solvent A SMILES ("None" for vacuum)
smiles_solvent_b string yes Solvent B SMILES ("None" for vacuum)
equil_length number no 0.08 Equilibration length (ns / replica)
prod_length number no 0.4 Production length (ns / replica)
platform string no CUDA OpenMM platform

Example Input

{
  "smiles_solute": "CCO",
  "smiles_solvent_a": "None",
  "smiles_solvent_b": "O"
}

6. Aqueous Reaction Free Energy (reaction_free_energy)

Description: Reaction free energy in aqueous solution.

Key Input Fields

Field Type Required Description
smiles_reactant string yes Reactants SMILES (comma-separated)
smiles_product string yes Products SMILES (comma-separated)
stoichiometry_reactant string yes Stoichiometry of reactants (comma-separated)
stoichiometry_product string yes Stoichiometry of products (comma-separated)
solvent_equil_length number no Solvent equilibration length
solvent_prod_length number no Solvent production length
vacuum_equil_length number no Vacuum equilibration length
vacuum_prod_length number no Vacuum production length
platform string no OpenMM platform
protocol_repeats integer no # of repeats
use_xtb boolean no Use xTB for gas-phase
keep_dirs boolean no Keep dirs

Example Input

{
  "smiles_reactant": "C(=O)=O,O",
  "smiles_product": "OC(=O)O",
  "stoichiometry_reactant": "1,1",
  "stoichiometry_product": "1",
  "use_xtb": true
}

7. Deprotonation Free Energy (deprotonation_fe)

Description: Deprotonation free energy in aqueous solution.

Key Input Fields

Field Type Required Description
smiles_prot string yes SMILES of protonated species
smiles_deprot string yes SMILES of deprotonated species
solvent_equil_length number no Solvent equilibration
solvent_prod_length number no Solvent production
vacuum_equil_length number no Vacuum equilibration
vacuum_prod_length number no Vacuum production
platform string no OpenMM platform
protocol_repeats integer no # of repeats
use_xtb boolean no Use xTB
keep_dirs boolean no Keep dirs

Example Input

{
  "smiles_prot": "C(=O)O",
  "smiles_deprot": "C(=O)[O-]",
  "use_xtb": true
}

8. Absolute Binding Free Energy (absolute_binding)

Description: Absolute binding FE of a ligand to a protein in water.

Key Input Fields

Field Type Required Description
pdb_file file yes Protein PDB (may optionally contain ligand)
ligand_file file no Ligand file (SDF, PDB, or CIF format)
ligand_in_pdb_file boolean no Whether ligand is in protein PDB
ligand_smiles string no Ligand SMILES (esp. if ligand is only in PDB)
solvent_equil_length number no Ligand solvent equilibration
solvent_prod_length number no Ligand solvent production
complex_equil_length number no Complex equilibration
complex_prod_length number no Complex production
platform string no OpenMM platform
protocol_repeats integer no # of repeats
keep_dirs boolean no Keep dirs

Example Input

{
  "pdb_file": "azulene/examples/data/4W52_t4_lysozyme_benzene.pdb",
  "ligand_file": "azulene/examples/data/toluene.sdf"
}

9. Relative Binding Free Energy (relative_binding)

Description: Relative binding FE between two ligands to the same protein.

Key Input Fields

Field Type Required Description
pdb_file file yes Protein PDB
ligand_file_a file no First ligand file (SDF, PDB, or CIF format)
ligand_file_b file no Second ligand file (SDF, PDB, or CIF format)
ligand_in_pdb_file_a boolean no First ligand in protein PDB
ligand_in_pdb_file_b boolean no Second ligand in protein PDB
smiles_a string no SMILES of ligand A
smiles_b string no SMILES of ligand B
assign_protonation_states boolean no Assign protonation states
ph number no pH value
equil_length number no Equilibration length
prod_length number no Production length
platform string no OpenMM platform
protocol_repeats integer no # of repeats
keep_dirs boolean no Keep dirs

Example Input

{
  "pdb_file": "protein.pdb",
  "ligand_file_a": "ligandA.sdf",
  "ligand_file_b": "ligandB.sdf"
}

10. Relative Binding FE for (Unnatural) Amino Acids (relative_binding_uaa)

Description: Relative binding FE between two (un)natural amino acid ligands.

Key Input Fields

Field Type Required Description
sequence_a string yes First peptide sequence
sequence_b string yes Second peptide sequence
pdb_file file yes PDB file (e.g. from previous job)
uaa_map object no Map placeholders to UAA names/SMILES
assign_protonation_states boolean no Assign protonation states
ph number no pH value
equil_length number no Equilibration
prod_length number no Production
platform string no OpenMM platform
protocol_repeats integer no # of repeats
keep_dirs boolean no Keep dirs

Example Input

{
  "sequence_a": "YGH",
  "sequence_b": "xGH",
  "pdb_file": "protein.pdb",
  "uaa_map": "{\"x\": \"pF-Phe\"}"
}

11. Lipid Permeation Free Energy (lipid_permeation)

Description: Free energy of a molecule permeating through a lipid bilayer.

Key Input Fields

Field Type Required Description
smiles string yes Solute SMILES
lipid_type string yes Lipid type (DPPC, DMPC, DOPC, DLPE, DLPC, POPE, POPC)
equil_length number no Equilibration length
prod_length number no Production length
platform string no OpenMM platform
keep_dirs boolean no Keep dirs

Example Input

{
  "smiles": "O",
  "lipid_type": "POPC"
}

12. Pocket Finding and Ligand Docking (pocket_docking)

Description: Find the binding pocket and dock a ligand to a protein.

Key Input Fields

Field Type Required Description
pdb_file file yes Protein PDB
ligand_smiles string yes Ligand SMILES
ph float no pH value (default: 7)

Example Input

{
  "pdb_file": "protein.pdb",
  "ligand_smiles": "CC1=CC=CC=C1"
}

13. Upload File (upload_file)

Description: Uploads a file and returns its storage path.

Input Schema

Field Type Required Description
file_path file yes Local file path to upload

Example Input

{
  "file_path": "examples/input.txt"
}

14. Boltz-2 Affinity and Structure Prediction (boltz_prediction)

Description: Boltz-2 based affinity and structure prediction.

Input Schema

Field Type Required Description
protein_sequence string yes Protein sequence (one-letter amino acid code)
ligand_smiles string yes Ligand SMILES

Example Input

{
  "protein_sequence": "MNIFEMLRIDEGLRLKIYKDTEGYYTIGIGHLLTKSPSLNAAK",
  "ligand_smiles": "CC1=CC=CC=C1"
}

For live job type info directly on Azulene Studio, always refer to:

python -m azulene.main jobs get-job-types

or see the API_Reference.md for usage patterns and CLI/Python examples.

All Rights Reserved

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

azulene_studio-0.5.0.tar.gz (102.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

azulene_studio-0.5.0-py3-none-any.whl (89.8 kB view details)

Uploaded Python 3

File details

Details for the file azulene_studio-0.5.0.tar.gz.

File metadata

  • Download URL: azulene_studio-0.5.0.tar.gz
  • Upload date:
  • Size: 102.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.21

File hashes

Hashes for azulene_studio-0.5.0.tar.gz
Algorithm Hash digest
SHA256 c3fa5a556ad29388a41c383e708c08c3d903692e492790c2e347f1ac81e4f19d
MD5 0a43309e2cd054c719b24272ca0a01e4
BLAKE2b-256 e7a82105c8ca2a0e1991f630c3a965c30570afe5a9152adb611df4c3d19fe360

See more details on using hashes here.

File details

Details for the file azulene_studio-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: azulene_studio-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 89.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.21

File hashes

Hashes for azulene_studio-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c29fe625fa3069019be3cba165f4cf6a64fda8d723fa856ea97669abd56d0dad
MD5 2de3c8fe0a97e794985b7ad6f40d539b
BLAKE2b-256 c231be2a880ddb75ca2701784d13593827751727adaa7fa1206e871681901dea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page