Skip to main content
Docs

Search guides and API endpoints, for example “Idempotency-Key” or “submit job”.

    Tools · Custom Modeling

    MPNN Models

    Fast structure-property inference that highlights key molecule substructures
    On this page

    Prices, workflows, and method papersOpen in the app

    Run it from the API

    Submit with Submit a job and the job_type below. Price it first with Estimate job reservation cost: submitting reserves that amount from your wallet, and the charge settles at the actual runtime.

    MPNN Model Training train-mpnn

    Job type
    train-mpnn
    Hardware
    cpu (default)t4l4a10
    Typical runtime
    1 h on CPU

    Payload

    Payload fields
    FieldTypeDescription
    model_namerequiredstring

    Limits: min length 1

    input_data[]requiredstring[]

    Limits: min items 1

    input_formatrequiredstring

    Limits: min length 1

    targets[]requirednumber[]

    Limits: min items 1

    unitstring
    model_descriptionstring
    tags[]string[]
    model_paramsobject

    Example

    from cognichem_client import CogniChem
    
    client = CogniChem.from_env()  # reads COGNICHEM_API_KEY
    payload = {
        "model_name": "mr38-tiny",
        "input_data": ["CCO", "CCC", "CCN", "c1ccccc1", "CC", "… 3 more"],
        "input_format": "smiles",
        "targets": [1, 2, 1.5, 0.5, 1.1, "… 3 more"],
        "model_params": {
            "validation_size": 0.25,
            "mp_hidden_dim": 32,
            "mp_depth": 1,
            "n_ffn_layers": 1,
            "ffn_hidden_dim": 32,
            "learning_rate": 0.001,
            "n_epochs": 6,
            "batch_size": 2,
        },
    }
    
    estimate = client.jobs.estimate(job_type="train-mpnn", payload=payload, resource="cpu")
    print(f"Reserves ${estimate.cost:.2f}")
    
    job = client.jobs.submit(
        job_name="my-train-mpnn-run",
        job_type="train-mpnn",
        payload=payload,
        resource="cpu",
    )
    status = client.jobs.wait(job.process_id)
    if status.status == "completed":
        client.jobs.result(job.process_id, save_path=".")

    Sample data from the job catalog; long values are shortened here. Each job_name must be unique among your jobs.

    Workflow inputs

    • Molecules (list)SMILES

    Workflow outputs

    • ArchiveZIP