@prefix CommandLineBinding: <https://w3id.org/cwl/cwl#CommandLineBinding/> .
@prefix EnvVarRequirement: <https://w3id.org/cwl/cwl#EnvVarRequirement/> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
@prefix DockerRequirement: <https://w3id.org/cwl/cwl#DockerRequirement/> .
@prefix Workflow: <https://w3id.org/cwl/cwl#Workflow/> .
@prefix sld:   <https://w3id.org/cwl/salad#> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix CommandOutputBinding: <https://w3id.org/cwl/cwl#CommandOutputBinding/> .
@prefix SoftwarePackage: <https://w3id.org/cwl/cwl#SoftwarePackage/> .
@prefix ns1:   <http://commonwl.org/cwltool#> .
@prefix SoftwareRequirement: <https://w3id.org/cwl/cwl#SoftwareRequirement/> .
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix EnvironmentDef: <https://w3id.org/cwl/cwl#EnvironmentDef/> .
@prefix cwl:   <https://w3id.org/cwl/cwl#> .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/hub_url>
        rdfs:comment  "Hub gateway base URL (e.g. http://127.0.0.1:8000). Required when backend=hub." ;
        sld:type      xsd:string , sld:null .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict>
        a                        cwl:Workflow ;
        rdfs:comment             "Catalog entry `structure_predict` (Model surface, biolm-protocols catalog.json).\nPredicts 3D structure for a set of sequences with a single BioLM structure\nmodel. No protocol orchestration needed - this is a direct\n`biolm model run` call.\n" ;
        rdfs:label               "Core 1: Structure prediction (ESMFold / Boltz-2)" ;
        ns1:original_cwlVersion  "v1.2" ;
        Workflow:steps           <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/fold> ;
        cwl:cwlVersion           cwl:v1.2 ;
        cwl:inputs               <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/hub_url> , <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/model_name> , <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/biolm_token> , <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/demo> , <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/backend> , <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/sequences_file> ;
        cwl:outputs              <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/structures> ;
        cwl:requirements         [ a  cwl:StepInputExpressionRequirement ] ;
        cwl:requirements         [ a  cwl:InlineJavascriptRequirement ] .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/fold/biolm_token>
        cwl:source  <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/biolm_token> .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/structures>
        rdfs:comment      "JSON array of {pdb, mean_plddt, ...} records, one per input sequence." ;
        cwl:outputSource  <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/fold/result> ;
        sld:type          cwl:File .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/fold/input_file>
        cwl:source  <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/sequences_file> .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/action>
        rdfs:comment      "One of encode, predict, generate, lookup." ;
        cwl:inputBinding  [ CommandLineBinding:position
                          2 ] ;
        sld:type          xsd:string .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/fold>
        cwl:in   <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/fold/input_file> , <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/fold/batch_size> , <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/fold/action> , <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/fold/biolm_token> , <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/fold/hub_url> , <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/fold/backend> , <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/fold/model_name> , <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/fold/progress> ;
        cwl:out  <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/fold/result> ;
        cwl:run  <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl> .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/sequences_file>
        rdfs:comment  "FASTA (or CSV/JSON) file of sequences to fold. See examples/structure_predict.job.yml." ;
        sld:type      cwl:File .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/progress>
        cwl:inputBinding  [ CommandLineBinding:prefix
                          "--progress" ] ;
        sld:default       false ;
        sld:type          xsd:boolean .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/batch_size>
        rdfs:comment      "Override batch size for processing (default: auto-detect from schema)." ;
        cwl:inputBinding  [ CommandLineBinding:prefix
                          "--batch-size" ] ;
        sld:type          xsd:int , sld:null .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/model_name>
        rdfs:comment      "Model slug, e.g. esmfold, esm2-150m, esm1v-all, antifold, protein-mpnn." ;
        cwl:inputBinding  [ CommandLineBinding:position
                          1 ] ;
        sld:type          xsd:string .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/demo>
        rdfs:comment  "Cheap smoke-test mode: caps batch_size to 1 for a fast, low-cost run." ;
        sld:default   false ;
        sld:type      xsd:boolean .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/input_file>
        rdfs:comment      "FASTA, CSV, JSON, or PDB file of items to run through the model." ;
        cwl:inputBinding  [ CommandLineBinding:position  3 ;
                            CommandLineBinding:prefix    "--input"
                          ] ;
        sld:type          cwl:File .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/fold/progress>
        cwl:valueFrom  "$(false)" .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/model_name>
        rdfs:comment  "Structure model slug: esmfold (primary) or boltz-2 (optional, per catalog.json)." ;
        sld:default   "esmfold" ;
        sld:type      xsd:string .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/result>
        rdfs:comment       "JSON array of model response records, one per input item." ;
        cwl:outputBinding  [ CommandOutputBinding:glob
                          "result.json" ] ;
        sld:type           cwl:File .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/output_format>
        rdfs:comment      "Output format: json, fasta, csv, or pdb." ;
        cwl:inputBinding  [ CommandLineBinding:prefix
                          "--format" ] ;
        sld:default       "json" ;
        sld:type          xsd:string .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/biolm_token>
        rdfs:comment  "BIOLM_TOKEN; omit to use the ambient environment or ~/.biolm/credentials." ;
        sld:type      xsd:string , sld:null .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/backend>
        rdfs:comment  "'platform' (biolm.ai) or 'hub' (route via hub_url / BIOLM_BASE_API_URL)." ;
        sld:default   "platform" ;
        sld:type      xsd:string .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/type_override>
        rdfs:comment      "Input type override (sequence, pdb, context, etc.)." ;
        cwl:inputBinding  [ CommandLineBinding:prefix
                          "--type" ] ;
        sld:type          xsd:string , sld:null .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/fold/action>
        cwl:valueFrom  "predict" .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/fold/backend>
        cwl:source  <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/backend> .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/hub_url>
        rdfs:comment  "Hub gateway base URL, required when backend=hub." ;
        sld:type      xsd:string , sld:null .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/biolm_token>
        rdfs:comment  "BIOLM_TOKEN value. Omit to use BIOLM_TOKEN already in the environment or ~/.biolm/credentials." ;
        sld:type      xsd:string , sld:null .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/params>
        rdfs:comment      "Extra model parameters as a JSON string, e.g. '{\"num_seq_per_target\": 4}'." ;
        cwl:inputBinding  [ CommandLineBinding:prefix
                          "--params" ] ;
        sld:type          xsd:string , sld:null .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/input_format>
        rdfs:comment      "Override input format auto-detection (json, fasta, csv, pdb)." ;
        cwl:inputBinding  [ CommandLineBinding:prefix
                          "--input-format" ] ;
        sld:type          xsd:string , sld:null .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/backend>
        rdfs:comment  "'platform' (default biolm.ai API) or 'hub' (route model inference via hub_url)." ;
        sld:default   "platform" ;
        sld:type      xsd:string .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/fold/hub_url>
        cwl:source  <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/hub_url> .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run>
        a                        cwl:CommandLineTool ;
        rdfs:comment             "Thin wrapper around `biolm model run <model> <action>` from biolm-sdk\n(https://pypi.org/project/biolm-sdk/). Runs a single BioLM model action\n(encode / predict / generate / lookup) over sequences, structures, or\nother records from a file.\n\nBackend switch: when `backend` is `hub`, exports `BIOLM_BASE_API_URL` from\n`hub_url` so model inference (and only model inference) is routed through a\nbiolm-hub gateway (`bh serve`); the default `platform` backend leaves the\nhosted biolm.ai API in place. See the repo README for details.\n" ;
        rdfs:label               "BioLM model run (CLI)" ;
        ns1:original_cwlVersion  "v1.2" ;
        cwl:arguments            ( [ CommandLineBinding:prefix  "--output" ;
                                     cwl:valueFrom              "result.json"
                                   ]
                                 ) ;
        cwl:baseCommand          ( "biolm" "model" "run" ) ;
        cwl:cwlVersion           cwl:v1.2 ;
        cwl:hints                [ a                             cwl:SoftwareRequirement ;
                                   SoftwareRequirement:packages  [ SoftwarePackage:package  "biolm-sdk" ;
                                                                   SoftwarePackage:specs    <https://pypi.org/project/biolm-sdk/>
                                                                 ]
                                 ] ;
        cwl:hints                [ a                             cwl:DockerRequirement ;
                                   DockerRequirement:dockerPull  "biolm-cwl:latest"
                                 ] ;
        cwl:inputs               <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/action> , <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/hub_url> , <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/params> , <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/input_format> , <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/type_override> , <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/batch_size> , <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/progress> , <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/model_name> , <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/input_file> , <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/backend> , <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/output_format> , <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/biolm_token> ;
        cwl:outputs              <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/tools/biolm-model-run.cwl#biolm-model-run/result> ;
        cwl:requirements         [ a  cwl:InlineJavascriptRequirement ] ;
        cwl:requirements         [ a                         cwl:EnvVarRequirement ;
                                   EnvVarRequirement:envDef  [ EnvironmentDef:envName   "BIOLM_TOKEN" ;
                                                               EnvironmentDef:envValue  "$(inputs.biolm_token ? inputs.biolm_token : \"\")"
                                                             ] ;
                                   EnvVarRequirement:envDef  [ EnvironmentDef:envName   "BIOLM_BASE_API_URL" ;
                                                               EnvironmentDef:envValue  "$(inputs.backend == \"hub\" && inputs.hub_url ? inputs.hub_url : \"\")"
                                                             ]
                                 ] .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/fold/batch_size>
        cwl:source     <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/demo> ;
        cwl:valueFrom  "$(self ? 1 : null)" .

<https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/fold/model_name>
        cwl:source  <https://w3id.org/cwl/view/git/b6c4d63a66f99e7193205dbeb32bc44f3c354f5a/workflows/structure_predict.cwl#structure_predict/model_name> .
