@prefix bibo: <http://purl.org/ontology/bibo/> .
@prefix biotools: <https://bio.tools/ontology/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix linkml: <https://w3id.org/linkml/> .
@prefix oboInOwl: <http://www.geneontology.org/formats/oboInOwl#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix qudt: <http://qudt.org/vocab/unit/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema1: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix tvbo: <https://w3id.org/tvbo/> .
@prefix wd: <http://www.wikidata.org/entity/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

linkml:Any a sh:NodeShape ;
    rdfs:comment "A scalar value: float, integer, string, or boolean. Used for slots that accept literals of any primitive type, such as argument values which may be numbers, strings, references, or booleans." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:targetClass linkml:Any .

tvbo:LossFunction a sh:NodeShape ;
    rdfs:comment "A loss function for optimization with optional aggregation. Extends Function with aggregation specification for per-element losses." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path skos:definition ],
        [ sh:class tvbo:Function ;
            sh:description "Simple input reference: name of previous function's output in pipeline. For multi-argument functions, use arguments with value references instead." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 9 ;
            sh:path tvbo:input ],
        [ sh:class <https://w3id.org/tvbo/software/SoftwareRequirement> ;
            sh:nodeKind sh:IRI ;
            sh:order 8 ;
            sh:path tvbo:requirements ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 13 ;
            sh:path tvbo:source_code ],
        [ sh:class tvbo:Callable ;
            sh:description "Software implementation reference (if software-based)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 14 ;
            sh:path tvbo:callable ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path dcterms:description ],
        [ sh:class tvbo:Aggregation ;
            sh:description "How to aggregate the loss across dimensions. Example: aggregate.over=node, aggregate.type=mean computes loss per node, then averages." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 0 ;
            sh:path tvbo:aggregate ],
        [ sh:description "Optional stable IRI (or compact URI) for this entity in an external ontology or knowledge base. Used to load metadata from an external source; not required when the entity is fully self-contained (equations, parameters, etc. defined in the file itself)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 4 ;
            sh:path dcterms:identifier ],
        [ sh:class tvbo:Range ;
            sh:description "Time range for generated TimeSeries (for kernel generators). Equation is evaluated at each time point." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 16 ;
            sh:path tvbo:time_range ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path schema1:name ],
        [ sh:description "Which dimension to apply the transformation on" ;
            sh:in ( "time" "state" "node" "region" "mode" "sample" "batch" "frequency" ) ;
            sh:maxCount 1 ;
            sh:order 15 ;
            sh:path tvbo:apply_on_dimension ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path skos:notation ],
        [ sh:class tvbo:Argument ;
            sh:description "Variables consumed by the function (referenced in the equation). Each argument has a name and optional metadata (description, default value, unit)." ;
            sh:nodeKind sh:IRI ;
            sh:order 11 ;
            sh:path tvbo:arguments ],
        [ sh:datatype xsd:string ;
            sh:description "Name for this function's output (referenced by subsequent functions)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 10 ;
            sh:path tvbo:output ],
        [ sh:class tvbo:Equation ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 5 ;
            sh:path tvbo:Equation ],
        [ sh:class tvbo:Equation ;
            sh:description "Output transformation equation (if equation-based)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 12 ;
            sh:path tvbo:output_equation ] ;
    sh:targetClass tvbo:LossFunction .

tvbo:SimulationStudy a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path prov:wasDerivedFrom ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path dcterms:title ],
        [ sh:class tvbo:Dynamics ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 2 ;
            sh:path tvbo:model ],
        [ sh:class tvbo:Simulation ;
            sh:nodeKind sh:IRI ;
            sh:order 9 ;
            sh:path tvbo:simulation_experiments ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path bibo:doi ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path tvbo:key ],
        [ sh:class tvbo:Sample ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 8 ;
            sh:path tvbo:sample ],
        [ sh:datatype xsd:integer ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path dcterms:issued ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path dcterms:description ] ;
    sh:targetClass tvbo:SimulationStudy .

tvbo:TemporalApplicableEquation a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:boolean ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path tvbo:time_dependent ],
        [ sh:class <https://w3id.org/tvbo/software/SoftwareRequirement> ;
            sh:description "Primary engine (must appear in environment.requirements; migration target replacing deprecated 'software')." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 8 ;
            sh:path tvbo:engine ],
        [ sh:datatype xsd:string ;
            sh:description "Python code for the equation." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 9 ;
            sh:path tvbo:pycode ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path rdfs:label ],
        [ sh:class tvbo:Parameter ;
            sh:nodeKind sh:IRI ;
            sh:order 0 ;
            sh:path tvbo:parameters ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path skos:definition ],
        [ sh:class tvbo:ConditionalBlock ;
            sh:description "Conditional logic for piecewise equations." ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 7 ;
            sh:path tvbo:conditionals ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path tvbo:righthandside ],
        [ sh:datatype xsd:boolean ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 10 ;
            sh:path tvbo:latex ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path tvbo:lefthandside ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path dcterms:description ] ;
    sh:targetClass tvbo:TemporalApplicableEquation .

<https://w3id.org/tvbo/dbs/DBSDataset> a sh:NodeShape ;
    rdfs:comment "Collection of data related to a specific DBS study." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "DOI or citation for this dataset." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 8 ;
            sh:path dcterms:references ],
        [ sh:datatype xsd:string ;
            sh:description "Path to BIDS dataset root directory. When set, subject networks and empirical data paths are resolved relative to this root." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path <https://w3id.org/tvbo/study/bids_root> ],
        [ sh:datatype xsd:string ;
            sh:description "Human-readable dataset name." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path rdfs:label ],
        [ sh:class <http://uri.interlex.org/tgbugs/uris/readable/atlas/Transformation> ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 1 ;
            sh:path <https://w3id.org/tvbo/dbs/coordinate_space> ],
        [ sh:class <https://w3id.org/tvbo/dbs/DBSSubject> ;
            sh:description "Subjects in a dataset." ;
            sh:nodeKind sh:IRI ;
            sh:order 3 ;
            sh:path <https://w3id.org/tvbo/study/subjects> ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path dcterms:description ],
        [ sh:class <https://w3id.org/tvbo/dbs/ClinicalScore> ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 0 ;
            sh:path <https://w3id.org/tvbo/dbs/clinical_scores> ],
        [ sh:datatype xsd:string ;
            sh:description "Unique identifier for the dataset." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path dcterms:identifier ],
        [ sh:datatype xsd:string ;
            sh:description "Global condition labels applied across all subjects (e.g., ['rest', 'task-nback', 'task-motor'])." ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path <https://w3id.org/tvbo/study/conditions> ] ;
    sh:targetClass <https://w3id.org/tvbo/dbs/DBSDataset> .

<http://uri.interlex.org/tgbugs/uris/readable/atlas/Atlas> a sh:NodeShape ;
    rdfs:comment "A schema for representing a version of a brain atlas." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path dcterms:creator ],
        [ sh:datatype xsd:string ;
            sh:description "Enter the version identifier of this brain atlas or coordinate space version." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path dcterms:hasVersion ],
        [ sh:class <http://uri.interlex.org/tgbugs/uris/readable/parcellationTerminology> ;
            sh:description "Add the parcellation terminology version used for this brain atlas version." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 6 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/terminology> ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path schema1:name ],
        [ sh:datatype xsd:string ;
            sh:description "Linked type for the version of a brain atlas or coordinate space." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path dcterms:isVersionOf ],
        [ sh:class <http://uri.interlex.org/tgbugs/uris/readable/atlas/Transformation> ;
            sh:description "Common coordinate space (e.g. FSLMNI152, MNI152NLin2009cAsym). Reference by name; the CommonCoordinateSpace must be defined in tvbo/database/coordinate_spaces/ (or future equivalent location)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 0 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/coordinateSpace> ],
        [ sh:datatype xsd:string ;
            sh:description "Slot for the abbreviation of a resource." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path skos:notation ] ;
    sh:targetClass <http://uri.interlex.org/tgbugs/uris/readable/atlas/Atlas> .

<http://uri.interlex.org/tgbugs/uris/readable/parcellationTerminology> a sh:NodeShape ;
    rdfs:comment "A schema for representing a parcellation terminology, which consists of parcellation entities." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "Enter the version identifier of this brain atlas or coordinate space version." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path dcterms:hasVersion ],
        [ sh:class <http://uri.interlex.org/tgbugs/uris/readable/atlas/Region> ;
            sh:nodeKind sh:IRI ;
            sh:order 4 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/entities> ],
        [ sh:datatype xsd:string ;
            sh:description "Enter the internationalized resource identifier (IRI) to the related ontological terms." ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/atlas/hasIlxId> ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:string ;
            sh:description "Add the location of the data file containing the parcellation terminology." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/dataLocation> ] ;
    sh:targetClass <http://uri.interlex.org/tgbugs/uris/readable/parcellationTerminology> .

prov:Entity a sh:NodeShape ;
    rdfs:comment "W3C PROV-O aligned provenance. Reusable on any entity (Network, TimeSeries, Dynamics, etc.)." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path tvbo:license ],
        [ sh:datatype xsd:string ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:references ],
        [ sh:datatype xsd:string ;
            sh:description "Software/agent identifier (prov:wasGeneratedBy)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path tvbo:generated_by ],
        [ sh:datatype xsd:string ;
            sh:description "ISO 8601 (prov:generatedAtTime)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path tvbo:date_created ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path prov:wasDerivedFrom ] ;
    sh:targetClass prov:Entity .

tvbo:AlgorithmInclude a sh:NodeShape ;
    rdfs:comment "Reference to an included algorithm with optional argument overrides. Allows combining algorithms with different hyperparameter values." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:class tvbo:Algorithm ;
            sh:description "Reference to the algorithm to include" ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 0 ;
            sh:path tvbo:algorithm ],
        [ sh:class tvbo:Parameter ;
            sh:description "Override hyperparameter values for the included algorithm. Maps parameter names to new values." ;
            sh:nodeKind sh:IRI ;
            sh:order 1 ;
            sh:path tvbo:arguments ] ;
    sh:targetClass tvbo:AlgorithmInclude .

tvbo:BidsEntities a sh:NodeShape ;
    rdfs:comment "BIDS filename entities (BEP017-aligned) for provenance and data discovery. Reusable on Network, BrainAtlas, Tractogram, or any dataset with BIDS-conformant naming." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "BIDS scale- entity (BEP017, e.g., 1000)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path tvbo:scale ],
        [ sh:datatype xsd:string ;
            sh:description "BIDS tpl- entity (e.g., FSLMNI152, MNI152NLin2009cAsym)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path tvbo:template ],
        [ sh:datatype xsd:string ;
            sh:description "BIDS acq- entity (e.g., EEGstandard1005, MEGBrainstorm)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path tvbo:acquisition ],
        [ sh:datatype xsd:string ;
            sh:description "BIDS seg- entity (e.g., ordered, ranked, 17Networks)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path tvbo:segmentation ],
        [ sh:datatype xsd:string ;
            sh:description "BIDS atlas- entity (e.g., Schaefer2018, HCPMMP1)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path tvbo:atlas ],
        [ sh:datatype xsd:string ;
            sh:description "BIDS rec- entity (e.g., dTOR)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path tvbo:reconstruction ],
        [ sh:datatype xsd:string ;
            sh:description "BIDS hemi- entity (L or R) for hemisphere-specific surface/volume data" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path tvbo:hemi ],
        [ sh:datatype xsd:string ;
            sh:description "BIDS cohort- entity (e.g., HCPYA, PPMI85)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path tvbo:cohort ] ;
    sh:targetClass tvbo:BidsEntities .

tvbo:BranchSwitch a sh:NodeShape ;
    rdfs:comment "Specification for switching from a detected bifurcation point to a new branch (periodic orbits from Hopf, fold continuation, etc.). Each BranchSwitch says: \"from which special point on the parent branch, continue what kind of object, with what settings.\" Override parent solver settings via the inline continuation field — only explicitly set attributes take effect; everything else is inherited from the parent Continuation." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:class tvbo:Continuation ;
            sh:description "Override solver settings for this branch. Uses the same Continuation type — only explicitly set attributes override the parent's values." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 5 ;
            sh:path tvbo:continuation ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:string ;
            sh:description "Which bifurcation point to start from. Syntax: - 'hopf:-1' = last Hopf (default) - 'hopf:all' = all Hopf points - 'hopf:1' = first Hopf - 'fold:2' = second fold - integer = specific special point index" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path tvbo:source_point ],
        [ sh:class tvbo:Option ;
            sh:description "Toolkit-specific string options for this branch (linear solver, etc.)." ;
            sh:nodeKind sh:IRI ;
            sh:order 8 ;
            sh:path tvbo:options ],
        [ sh:datatype xsd:float ;
            sh:description "Initial parameter offset from the bifurcation point." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path tvbo:delta_p ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ],
        [ sh:class tvbo:Discretization ;
            sh:description "Discretization method for the branch solution. Required for periodic orbit branches (Hopf → PO). Not needed for codim-2 branches (fold/Hopf continuation)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 6 ;
            sh:path tvbo:discretization ],
        [ sh:datatype xsd:boolean ;
            sh:description "Continue branch in both directions." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path tvbo:bothside ],
        [ sh:class tvbo:Parameter ;
            sh:nodeKind sh:IRI ;
            sh:order 2 ;
            sh:path tvbo:parameters ] ;
    sh:targetClass tvbo:BranchSwitch .

tvbo:Case a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:class tvbo:Equation ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 1 ;
            sh:path tvbo:equation ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path tvbo:condition ] ;
    sh:targetClass tvbo:Case .

tvbo:CouplingInput a sh:NodeShape ;
    rdfs:comment "Specification of a coupling input channel for multi-coupling dynamics" ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:integer ;
            sh:defaultValue 1 ;
            sh:description "Dimensionality of the coupling input (number of coupled values)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path tvbo:dimension ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:string ;
            sh:description "Named keys for multi-dimensional coupling. When dimension > 1, provides symbolic names for each index (e.g., keys: [lre, ffi] for dimension: 2). Used in equations as variable names." ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path tvbo:keys ],
        [ sh:datatype xsd:string ;
            sh:description "Name of the coupling function that feeds this input. When omitted, resolved automatically: (1) same name as a coupling function → direct match, (2) single coupling input and single coupling function → auto-mapped, (3) multiple of each → positional order." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path tvbo:source ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ] ;
    sh:targetClass tvbo:CouplingInput .

tvbo:DerivedObservation a sh:NodeShape ;
    rdfs:comment "Observation derived from one or more other observations. Examples: - fc (from bold) - single source transformation - fc_corr (from fc and fc_target) - multi-source comparison Unlike regular Observations, these don't generate monitor classes but are computed from existing observation values." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path rdfs:label ],
        [ sh:class tvbo:FunctionCall ;
            sh:description "Ordered sequence of Functions. Each step has a unique `name` (used to key step outputs) and transforms input -> output. List form preserves execution order." ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 20 ;
            sh:path tvbo:pipeline ],
        [ sh:description "Type of imaging modality (BOLD, EEG, MEG, etc.)" ;
            sh:in ( "BOLD" "EEG" "MEG" "SEEG" "IEEG" ) ;
            sh:maxCount 1 ;
            sh:order 13 ;
            sh:path tvbo:imaging_modality ],
        [ sh:defaultValue "ms" ;
            sh:description "Time unit for the integration / simulation. Determines the physical time meaning of one model time-step." ;
            sh:in ( qudt:SEC qudt:MilliSEC qudt:MicroSEC qudt:PER-SEC qudt:PER-MilliSEC qudt:HZ qudt:KiloHZ qudt:V qudt:MilliV qudt:PER-MilliV qudt:MilliV-PER-MilliSEC qudt:MilliV-PER-SEC qudt:A qudt:NanoA qudt:PicoA "uA_per_cm2" qudt:PicoFARAD qudt:NanoFARAD "uF_per_cm2" qudt:NanoS qudt:MicroS qudt:PicoS "S_per_cm2" "mS_per_cm2" "S_per_m2" "nS_per_mV" qudt:PER-NanoC qudt:PER-PicoC qudt:MOL-PER-M3 "mol_per_cm3" qudt:MilliMOL-PER-M3 "mol_per_m_per_A_per_s" qudt:MicroM3 qudt:M qudt:MilliM qudt:CentiM qudt:M-PER-SEC qudt:MilliM-PER-MilliSEC "Hz_per_nA" qudt:S-PER-M qudt:H-PER-M qudt:OHM "Mohm" "kohm_cm" qudt:DEG_C "rad_per_ms" qudt:UNITLESS qudt:PERCENT "arbitrary_unit" qudt:KiloGM "kg_per_s" qudt:M-PER-SEC2 qudt:N-PER-M qudt:RAD qudt:RAD-PER-SEC qudt:SEC2 "per_unit" ) ;
            sh:maxCount 1 ;
            sh:order 8 ;
            sh:path tvbo:time_scale ],
        [ sh:class tvbo:Parameter ;
            sh:nodeKind sh:IRI ;
            sh:order 6 ;
            sh:path tvbo:parameters ],
        [ sh:datatype xsd:float ;
            sh:description "Sampling period for monitors (ms). For BOLD: TR in ms." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 10 ;
            sh:path tvbo:period ],
        [ sh:datatype xsd:integer ;
            sh:description "Number of samples to skip at the start (transient removal). For FC: typically 10-20 TRs." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 16 ;
            sh:path tvbo:skip_t ],
        [ sh:class tvbo:StateVariable ;
            sh:description "State variable to observe (e.g., S_e for excitatory activity). For observations derived from other observations, use DerivedObservation." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 9 ;
            sh:path tvbo:source ],
        [ sh:class tvbo:DataSource ;
            sh:description "Load data from external source (file, database, API). When specified, this observation represents empirical/external data rather than simulated data. Enables unified treatment of all data." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 15 ;
            sh:path tvbo:data_source ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path skos:notation ],
        [ sh:class tvbo:Equation ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 5 ;
            sh:path tvbo:Equation ],
        [ sh:datatype xsd:float ;
            sh:description "Intermediate downsampling period (ms). For BOLD: typically matches dt." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 11 ;
            sh:path tvbo:downsample_period ],
        [ sh:class tvbo:Observation ;
            sh:description "One or more observations to derive from. For transformations (e.g., fc from bold), use single source. For comparisons (e.g., fc_corr from fc and fc_target), use multiple sources. Order may matter for asymmetric operations." ;
            sh:minCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 0 ;
            sh:path tvbo:source_observations ],
        [ sh:description "How to aggregate over time" ;
            sh:in ( "mean" "last" "first" "window" "none" ) ;
            sh:maxCount 1 ;
            sh:order 18 ;
            sh:path tvbo:aggregation ],
        [ sh:datatype xsd:integer ;
            sh:description "Number of samples from the end to use. Takes the last N samples before aggregation. E.g., tail_samples: 500 means use data[-500:]." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 17 ;
            sh:path tvbo:tail_samples ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path schema1:name ],
        [ sh:class tvbo:ClassReference ;
            sh:description "Direct class reference (alternative to pipeline). Use for external library classes like tvboptim.Bold, custom monitors, or any callable class. The class is instantiated with constructor_args and called with call_args. Example: {name: Bold, module: tvboptim.observations.tvb_monitors.bold, constructor_args: [{name: period, value: 1000.0}]}" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 21 ;
            sh:path tvbo:class_reference ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:integer ;
            sh:description "Variable of interest index (which state variable to monitor). Default: 0." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 12 ;
            sh:path tvbo:voi ],
        [ sh:datatype xsd:integer ;
            sh:description "Number of samples for windowed aggregation" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 19 ;
            sh:path tvbo:window_size ],
        [ sh:datatype xsd:string ;
            sh:description "Reference to transient simulation result for history initialization (e.g., 'result_init')." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 14 ;
            sh:path tvbo:warmup_source ],
        [ sh:class <https://w3id.org/tvbo/software/SoftwareEnvironment> ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 7 ;
            sh:path tvbo:environment ] ;
    sh:targetClass tvbo:DerivedObservation .

tvbo:DifferentialOperator a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path skos:definition ],
        [ sh:class tvbo:Equation ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 2 ;
            sh:path tvbo:Equation ],
        [ sh:in ( "gradient" "divergence" "laplacian" "curl" ) ;
            sh:maxCount 1 ;
            sh:order 3 ;
            sh:path tvbo:operator_type ],
        [ sh:class tvbo:Equation ;
            sh:description "Symbolic form (e.g., '-div(D * grad(u))')." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 6 ;
            sh:path tvbo:expression ],
        [ sh:class tvbo:Parameter ;
            sh:description "Optional anisotropic tensor (e.g., diffusion)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 5 ;
            sh:path tvbo:tensor_coefficient ],
        [ sh:class tvbo:Parameter ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 4 ;
            sh:path tvbo:coefficient ] ;
    sh:targetClass tvbo:DifferentialOperator .

tvbo:Discretization a sh:NodeShape ;
    rdfs:comment "Discretization method for boundary value problems in continuation (periodic orbits, connecting orbits, quasi-periodic tori). Specifies the method; method-specific numerics go in parameters." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:defaultValue "collocation" ;
            sh:description "Discretization method." ;
            sh:in ( "collocation" "trapezoid" "shooting" "poincare" ) ;
            sh:maxCount 1 ;
            sh:order 1 ;
            sh:path tvbo:method ],
        [ sh:datatype xsd:integer ;
            sh:defaultValue 4 ;
            sh:description "Polynomial degree per mesh interval for collocation. The m in PeriodicOrbitOCollProblem(N, m)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path tvbo:degree ],
        [ sh:class tvbo:Solver ;
            sh:description "Linear solver for the Newton bordered system. E.g. COPBLS (collocation), MatrixBLS (shooting/poincaré)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 3 ;
            sh:path tvbo:linear_solver ],
        [ sh:class tvbo:Solver ;
            sh:description "ODE solver for flow-based methods (shooting, poincaré). Specifies algorithm (e.g. Vern9, Rodas5) and tolerances. Not needed for collocation or trapezoid." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 2 ;
            sh:path tvbo:ode_solver ],
        [ sh:datatype xsd:integer ;
            sh:defaultValue 50 ;
            sh:description "Number of mesh intervals (time slices) for collocation or trapezoid methods. Collocation: N in PeriodicOrbitOCollProblem(N, m). Trapezoid: M in PeriodicOrbitTrapProblem(M=...)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path tvbo:mesh_intervals ],
        [ sh:class tvbo:Option ;
            sh:description "Toolkit-specific string options (jacobian type, etc.)." ;
            sh:nodeKind sh:IRI ;
            sh:order 7 ;
            sh:path tvbo:options ],
        [ sh:datatype xsd:integer ;
            sh:defaultValue 3 ;
            sh:description "Number of shooting sections for shooting or Poincaré methods." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path tvbo:n_sections ],
        [ sh:class tvbo:Parameter ;
            sh:nodeKind sh:IRI ;
            sh:order 0 ;
            sh:path tvbo:parameters ] ;
    sh:targetClass tvbo:Discretization .

tvbo:Edge a sh:NodeShape ;
    rdfs:comment "An edge in a network. Two modes: explicit (source+target set, scalar parameters in YAML) or template (no source/target, N×N matrix measure in HDF5). Both coexist in the same edges list." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:class tvbo:Event ;
            sh:description "Events attached to this edge (e.g., threshold-based line tripping)." ;
            sh:nodeKind sh:IRI ;
            sh:order 20 ;
            sh:path tvbo:events ],
        [ sh:datatype xsd:string ;
            sh:description "Input variable on target node to connect to (e.g., 'c_in'). If not specified, uses first coupling input from target dynamics." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 14 ;
            sh:path tvbo:target_var ],
        [ sh:class tvbo:Coupling ;
            sh:description "Coupling function for this edge. Can be a reference (by name) to coupling or inline definition. If not provided, uses experiment's default coupling." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 15 ;
            sh:path tvbo:coupling ],
        [ sh:datatype xsd:boolean ;
            sh:description "Self-connections are meaningful" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 11 ;
            sh:path tvbo:valid_diagonal ],
        [ sh:datatype xsd:boolean ;
            sh:defaultValue true ;
            sh:description "Matrix entries carry weights (not just 0/1)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 10 ;
            sh:path tvbo:weighted ],
        [ sh:datatype xsd:string ;
            sh:description "Unit for matrix values (template edges only)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 8 ;
            sh:path tvbo:unit ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:string ;
            sh:description "Path or name of the Network whose nodes define the columns of a non-square (projection) matrix. For example, a gain matrix with shape (n_sensors, n_regions) references the brain parcellation network here.  Row labels come from the parent Network's own nodes." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 17 ;
            sh:path tvbo:target_network ],
        [ sh:datatype xsd:float ;
            sh:description "Connection weight (explicit edges)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path tvbo:weight ],
        [ sh:description "Storage format in HDF5 (template edges only)" ;
            sh:in ( "dense" "csr" "coo" ) ;
            sh:maxCount 1 ;
            sh:order 9 ;
            sh:path tvbo:format ],
        [ sh:datatype xsd:float ;
            sh:description "Edge length / tract distance (explicit edges, mm)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path tvbo:distance ],
        [ sh:datatype xsd:string ;
            sh:description "Ordered labels for the matrix columns (dim-1) when the matrix is non-square.  Row labels (dim-0) are the parent Network's node labels.  Stored as HDF5 dimension scales in the companion file." ;
            sh:nodeKind sh:Literal ;
            sh:order 18 ;
            sh:path tvbo:dimension_labels ],
        [ sh:datatype xsd:boolean ;
            sh:defaultValue true ;
            sh:description "All values >= 0" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 12 ;
            sh:path tvbo:non_negative ],
        [ sh:class tvbo:Dynamics ;
            sh:description "Dynamics model for this edge. When specified, the edge has its own state variables and ODE (EdgeModel with f in ND.jl). Uses the same Dynamics class as nodes — state_variables define edge states, derived_variables define observables, output defines what is visible for plotting/analysis. The coupling_function on Coupling still defines how vertex outputs map to edge outputs for aggregation at vertices." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 19 ;
            sh:path tvbo:dynamics ],
        [ sh:datatype xsd:integer ;
            sh:description "Source node ID (set for explicit edges, absent for template edges)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path tvbo:source ],
        [ sh:class tvbo:Parameter ;
            sh:nodeKind sh:IRI ;
            sh:order 2 ;
            sh:path tvbo:parameters ],
        [ sh:datatype xsd:string ;
            sh:description "Output variable from source node to use (e.g., 'x_out'). If not specified, uses first output variable from source dynamics." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 13 ;
            sh:path tvbo:source_var ],
        [ sh:datatype xsd:integer ;
            sh:description "Target node ID (set for explicit edges, absent for template edges)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path tvbo:target ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:boolean ;
            sh:description "Whether the edge is directed. If false, represents a symmetric/bidirectional connection." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 16 ;
            sh:path tvbo:directed ],
        [ sh:datatype xsd:float ;
            sh:description "Conduction delay (explicit edges, ms)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path tvbo:delay ] ;
    sh:targetClass tvbo:Edge .

tvbo:Exploration a sh:NodeShape ;
    rdfs:comment "Parameter space exploration (grid search, sweep)." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:class tvbo:FunctionCall ;
            sh:description "Observable to compute at each point. Use function: obs_name for simple observation, or function: func_name + arguments for FunctionCall." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 7 ;
            sh:path tvbo:observable ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:string ;
            sh:defaultValue "product"^^xsd:string ;
            sh:description "Combination mode: 'product' (full grid), 'zip' (paired)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path tvbo:mode ],
        [ sh:datatype xsd:integer ;
            sh:defaultValue 1 ;
            sh:description "Parallel evaluations" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 8 ;
            sh:path tvbo:n_parallel ],
        [ sh:class tvbo:ExecutionConfig ;
            sh:description "Per-exploration execution configuration (overrides experiment-level defaults). Useful for setting random_seed, n_workers for parallel grid search." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 3 ;
            sh:path tvbo:execution ],
        [ sh:class tvbo:ExplorationAxis ;
            sh:description "Ordered list of exploration axes spanning the search space. Each axis references an existing Parameter (by dotted name, e.g. \"ReducedWongWang.w\" or \"FastLinearCoupling.G\") and supplies the Range to sweep. No new Parameter is created here." ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 4 ;
            sh:path tvbo:space ],
        [ sh:datatype xsd:integer ;
            sh:defaultValue 1 ;
            sh:description "Number of independent trials per grid point. Each trial uses a different noise seed. Used for averaging stochastic simulations (e.g., VEP = average of 20 trials)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 9 ;
            sh:path tvbo:n_trials ],
        [ sh:class tvbo:Parameter ;
            sh:description "Hyper-parameters of the exploration itself (e.g. tolerances, sampler settings, grid-refinement controls). Distinct from `space`, which defines what is being swept." ;
            sh:nodeKind sh:IRI ;
            sh:order 5 ;
            sh:path tvbo:parameters ],
        [ sh:datatype xsd:string ;
            sh:description "Averaging mode across trials. 'trials' = average over n_trials independent runs (evoked potential paradigm). None = return all trials." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 10 ;
            sh:path tvbo:average ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path dcterms:description ] ;
    sh:targetClass tvbo:Exploration .

tvbo:ExplorationAxis a sh:NodeShape ;
    rdfs:comment "One axis of a parameter exploration grid. Points to an existing Parameter (by dotted reference, e.g. \"ReducedWongWang.w\" or \"FastLinearCoupling.G\") and supplies the sweep specification (domain, explored_values, or per-element overrides). No new Parameter is created." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:float ;
            sh:description "Explicit list of values to sweep (overrides domain)." ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path tvbo:explored_values ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:class tvbo:Parameter ;
            sh:description "Dotted reference to the Parameter being swept. Format: \"<scope>.<param_name>\" where <scope> is either a Dynamics class name (e.g. \"ReducedWongWang\") or a coupling key (e.g. \"FastLinearCoupling\"). Resolved against the enclosing experiment at runtime." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 2 ;
            sh:path tvbo:parameter ],
        [ sh:datatype xsd:string ;
            sh:description "Optional axis unit (defaults to the referenced Parameter's unit)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path tvbo:unit ],
        [ sh:class tvbo:Range ;
            sh:description "Per-element sweep overrides for heterogeneous parameters (e.g. shape \"(n_nodes,)\"). When set, element_domains[i] replaces the shared domain for element i." ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 5 ;
            sh:path tvbo:element_domains ],
        [ sh:class tvbo:Range ;
            sh:description "Sweep range for this axis (lo, hi, n, step, log_scale)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 3 ;
            sh:path tvbo:domain ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path rdfs:label ] ;
    sh:targetClass tvbo:ExplorationAxis .

tvbo:FieldStateVariable a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:class tvbo:Distribution ;
            sh:description "Distribution for sampling initial conditions per node. If present, initial_value is used as fallback/mean." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 21 ;
            sh:path tvbo:distribution ],
        [ sh:datatype xsd:boolean ;
            sh:defaultValue true ;
            sh:description "Whether to include this element in simulation output files. Applicable to state variables (default true), derived variables (default false), and network nodes (default true). Set false to suppress recording." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 10 ;
            sh:path tvbo:record ],
        [ sh:class tvbo:Equation ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 8 ;
            sh:path tvbo:Equation ],
        [ sh:class tvbo:Noise ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 16 ;
            sh:path tvbo:noise ],
        [ sh:class tvbo:Range ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 18 ;
            sh:path tvbo:boundaries ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path skos:definition ],
        [ sh:description "External ontology IRIs (typically GO, ChEBI, UBERON, CL, MeSH) that this entity is a surrogate / abstraction / model of. Replaces the legacy OWL pattern `tvbo:surrogate_of` by carrying the link inline with the YAML data instance. Multiple IRIs allowed: a single parameter may abstract several biological processes (e.g. a synaptic conductance grounding both GO:0060079 (excitatory PSP) and GO:0007268 (chemical synaptic transmission))." ;
            sh:nodeKind sh:IRI ;
            sh:order 11 ;
            sh:path oboInOwl:hasDbXref ],
        [ sh:class tvbo:TimeSeries ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 22 ;
            sh:path tvbo:history ],
        [ sh:datatype xsd:float ;
            sh:description "Initial value for the first time derivative, used when equation_order > 1. For a second-order ODE d²x/dt² = f, this sets dx/dt(0). Required by ModelingToolkit.jl to fully specify higher-order initial value problems." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 20 ;
            sh:path tvbo:derivative_initial_value ],
        [ sh:class tvbo:Mesh ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 2 ;
            sh:path tvbo:mesh ],
        [ sh:datatype xsd:float ;
            sh:defaultValue "0.1"^^xsd:float ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 19 ;
            sh:path tvbo:initial_value ],
        [ sh:datatype xsd:boolean ;
            sh:description "Whether this state variable is transmitted to connected nodes through the coupling function. In TVB terms, this determines the cvar indices (state variables extracted from history and fed into the coupling function). The coupling function may override this via its incoming_states attribute." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 13 ;
            sh:path tvbo:coupling_variable ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:class tvbo:BoundaryCondition ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 3 ;
            sh:path tvbo:boundary_conditions ],
        [ sh:class tvbo:Range ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 7 ;
            sh:path tvbo:domain ],
        [ sh:datatype xsd:boolean ;
            sh:defaultValue true ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 12 ;
            sh:path tvbo:variable_of_interest ],
        [ sh:datatype xsd:string ;
            sh:defaultValue "differential"^^xsd:string ;
            sh:description "Type of equation: 'differential' (default) means dx/dt = rhs, 'algebraic' means 0 = rhs or x ~ rhs (DAE constraint). Algebraic equations are used by ModelingToolkit.jl backend." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 14 ;
            sh:path tvbo:equation_type ],
        [ sh:description "Physical unit of measurement. Values are drawn from the QUDT ontology (http://qudt.org/vocab/unit/) with UO cross-references where available." ;
            sh:in ( qudt:SEC qudt:MilliSEC qudt:MicroSEC qudt:PER-SEC qudt:PER-MilliSEC qudt:HZ qudt:KiloHZ qudt:V qudt:MilliV qudt:PER-MilliV qudt:MilliV-PER-MilliSEC qudt:MilliV-PER-SEC qudt:A qudt:NanoA qudt:PicoA "uA_per_cm2" qudt:PicoFARAD qudt:NanoFARAD "uF_per_cm2" qudt:NanoS qudt:MicroS qudt:PicoS "S_per_cm2" "mS_per_cm2" "S_per_m2" "nS_per_mV" qudt:PER-NanoC qudt:PER-PicoC qudt:MOL-PER-M3 "mol_per_cm3" qudt:MilliMOL-PER-M3 "mol_per_m_per_A_per_s" qudt:MicroM3 qudt:M qudt:MilliM qudt:CentiM qudt:M-PER-SEC qudt:MilliM-PER-MilliSEC "Hz_per_nA" qudt:S-PER-M qudt:H-PER-M qudt:OHM "Mohm" "kohm_cm" qudt:DEG_C "rad_per_ms" qudt:UNITLESS qudt:PERCENT "arbitrary_unit" qudt:KiloGM "kg_per_s" qudt:M-PER-SEC2 qudt:N-PER-M qudt:RAD qudt:RAD-PER-SEC qudt:SEC2 "per_unit" ) ;
            sh:maxCount 1 ;
            sh:order 9 ;
            sh:path qudt:unit ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path schema1:name ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path tvbo:symbol ],
        [ sh:datatype xsd:boolean ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 17 ;
            sh:path tvbo:stimulation_variable ],
        [ sh:datatype xsd:integer ;
            sh:defaultValue 1 ;
            sh:description "Order of the time derivative on the LHS. Default 1 means dx/dt = rhs (first-order ODE). Order 2 means d²x/dt² = rhs (second-order ODE), etc. Higher-order ODEs are automatically lowered to coupled first-order systems by backends like ModelingToolkit.jl via mtkcompile." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 15 ;
            sh:path tvbo:equation_order ] ;
    sh:targetClass tvbo:FieldStateVariable .

tvbo:File a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path tvbo:type ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path tvbo:extension ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path tvbo:path ] ;
    sh:targetClass tvbo:File .

tvbo:GraphGenerator a sh:NodeShape ;
    rdfs:comment """Backend-agnostic graph generator specification.  Captures the mathematical family (type) and its parameters so that each backend can emit the correct constructor call (Graphs.jl, NetworkX, etc.). The number of nodes is always taken from Network.number_of_nodes.
""" ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:class tvbo:Parameter ;
            sh:description """Generator parameters (e.g. k, p, dims).  Names are matched by the backend mapping to construct the call.
""" ;
            sh:nodeKind sh:IRI ;
            sh:order 5 ;
            sh:path tvbo:parameters ],
        [ sh:datatype xsd:boolean ;
            sh:description "Whether to generate a directed graph." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path tvbo:directed ],
        [ sh:datatype xsd:integer ;
            sh:description "Random seed for reproducible graph generation." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path tvbo:seed ],
        [ sh:datatype xsd:string ;
            sh:description """Graph family name.  Use a StandardGraphType value for automatic backend mapping, or any custom string for documentation purposes.
""" ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path tvbo:type ] ;
    sh:targetClass tvbo:GraphGenerator .

tvbo:InitialState a sh:NodeShape ;
    rdfs:comment "How to obtain the starting equilibrium or periodic orbit for continuation. Most robust: time-integrate to steady state." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "Name of a previously computed branch (for from_branch method)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path tvbo:source_branch ],
        [ sh:datatype xsd:float ;
            sh:defaultValue "2000.0"^^xsd:float ;
            sh:description "Integration duration for time_integration method." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path tvbo:duration ],
        [ sh:defaultValue "time_integration" ;
            sh:description "Strategy for finding the initial state." ;
            sh:in ( "time_integration" "newton" "given" "from_branch" ) ;
            sh:maxCount 1 ;
            sh:order 0 ;
            sh:path tvbo:method ],
        [ sh:datatype xsd:float ;
            sh:defaultValue "1e-10"^^xsd:float ;
            sh:description "Absolute tolerance for ODE integration." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path tvbo:abs_tol ],
        [ sh:datatype xsd:float ;
            sh:defaultValue "1e-10"^^xsd:float ;
            sh:description "Relative tolerance for ODE integration." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path tvbo:rel_tol ],
        [ sh:class tvbo:Solver ;
            sh:description "ODE solver for time_integration method. Specify method (e.g., Tsit5, Heun, RK4) and tolerances." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 4 ;
            sh:path tvbo:solver ],
        [ sh:datatype xsd:string ;
            sh:description "Which point on the source branch: 'endpoint', 'hopf:1', 'fold:2', a step number, etc." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path tvbo:source_point ] ;
    sh:targetClass tvbo:InitialState .

tvbo:NDArray a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:integer ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path tvbo:shape ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path tvbo:unit ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path tvbo:dtype ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path tvbo:dataLocation ] ;
    sh:targetClass tvbo:NDArray .

tvbo:Node a sh:NodeShape ;
    rdfs:comment "A node in a network with its own dynamics and properties" ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:class tvbo:StateValue ;
            sh:description "Per-node initial state variable values, keyed by state variable name." ;
            sh:nodeKind sh:IRI ;
            sh:order 8 ;
            sh:path tvbo:state ],
        [ sh:datatype xsd:boolean ;
            sh:defaultValue true ;
            sh:description "Whether to include this element in simulation output files. Applicable to state variables (default true), derived variables (default false), and network nodes (default true). Set false to suppress recording." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path tvbo:record ],
        [ sh:datatype xsd:string ;
            sh:description "Brain region or anatomical label" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path tvbo:region ],
        [ sh:datatype xsd:integer ;
            sh:description "Unique node identifier" ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path dcterms:identifier ],
        [ sh:class tvbo:Dynamics ;
            sh:description "Dynamics model governing this node's behavior. Can be a reference (by name) or inline definition. If not provided, uses experiment's dynamics." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 5 ;
            sh:path tvbo:dynamics ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:class tvbo:Event ;
            sh:description "Events attached to this node (e.g., threshold-based state changes)." ;
            sh:nodeKind sh:IRI ;
            sh:order 9 ;
            sh:path tvbo:events ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path rdfs:label ],
        [ sh:class tvbo:Parameter ;
            sh:nodeKind sh:IRI ;
            sh:order 2 ;
            sh:path tvbo:parameters ],
        [ sh:class <http://uri.interlex.org/tgbugs/uris/readable/Coordinate> ;
            sh:description "Spatial coordinates (x, y, z) of the node" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 6 ;
            sh:path tvbo:position ] ;
    sh:targetClass tvbo:Node .

tvbo:Optimization a sh:NodeShape ;
    rdfs:comment "Configuration for parameter optimization. Inherits single-stage fields from OptimizationStage. For multi-stage workflows, use 'stages' (ignores inherited single-stage fields). Loss equation references observations directly by name." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:class tvbo:FreeParameter ;
            sh:description "Parameters to optimize in this stage. Each entry is a FreeParameter that references an existing Parameter by dotted scope (e.g. \"ReducedWongWang.w\" or \"FastLinearCoupling.G\") and supplies optimization-specific metadata (heterogeneous, shape, bounds). No new Parameter is created here." ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 8 ;
            sh:path tvbo:free_parameters ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path rdfs:label ],
        [ sh:class tvbo:Parameter ;
            sh:description "Stage-specific hyperparameters (e.g., b2=0.9999 for adam)" ;
            sh:nodeKind sh:IRI ;
            sh:order 12 ;
            sh:path tvbo:hyperparameters ],
        [ sh:class tvbo:ExecutionConfig ;
            sh:description "Per-optimization execution configuration (overrides experiment-level defaults). Useful for setting random_seed, precision, or hardware for optimization phase." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 0 ;
            sh:path tvbo:execution ],
        [ sh:class tvbo:FunctionCall ;
            sh:description "Loss function call. Uses FunctionCall to either: 1. Reference existing function: function: rmse 2. Inline callable: callable: {module: ..., name: ...} Arguments specify inputs (simulated_fc, empirical_fc, etc.)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 2 ;
            sh:path tvbo:loss ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path dcterms:description ],
        [ sh:class tvbo:OptimizationStage ;
            sh:description "Previous stage to initialize from. Final values from that stage become initial values for this stage." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 14 ;
            sh:path tvbo:warmup_from ],
        [ sh:class tvbo:OptimizationStage ;
            sh:description "Ordered list of optimization stages. Stages run sequentially. Stage n+1 starts from optimized values of stage n. When defined, inherited single-stage fields are ignored." ;
            sh:nodeKind sh:IRI ;
            sh:order 3 ;
            sh:path tvbo:stages ],
        [ sh:class tvbo:Algorithm ;
            sh:description "Algorithm to use as starting point for optimization. If specified, optimization starts from algorithm's result state. If not specified, optimization starts from initial simulation state." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 4 ;
            sh:path tvbo:depends_on ],
        [ sh:class tvbo:Parameter ;
            sh:description "Parameters from previous stages to freeze (keep at optimized value but not update)" ;
            sh:nodeKind sh:IRI ;
            sh:order 13 ;
            sh:path tvbo:freeze_parameters ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path schema1:name ],
        [ sh:datatype xsd:integer ;
            sh:defaultValue 100 ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 11 ;
            sh:path tvbo:max_iterations ],
        [ sh:class tvbo:Integrator ;
            sh:description "Integration settings for optimization simulations (overrides experiment defaults). If specified, creates a fresh model_fn and state with prepare() before optimization. Can specify different duration, step_size, method than the experiment. If not specified, uses experiment-level integration settings." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 1 ;
            sh:path tvbo:integration ],
        [ sh:datatype xsd:float ;
            sh:defaultValue "0.001"^^xsd:float ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 10 ;
            sh:path tvbo:learning_rate ],
        [ sh:datatype xsd:string ;
            sh:defaultValue "adam"^^xsd:string ;
            sh:description "Optimizer for this stage: 'adam', 'adamw', 'sgd', etc." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 9 ;
            sh:path tvbo:algorithm ] ;
    sh:targetClass tvbo:Optimization .

tvbo:PDE a sh:NodeShape ;
    rdfs:comment "Partial differential equation problem definition." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:class tvbo:Equation ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 8 ;
            sh:path tvbo:sources ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:class tvbo:PDESolver ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 10 ;
            sh:path tvbo:solver ],
        [ sh:class tvbo:BoundaryCondition ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 9 ;
            sh:path tvbo:boundary_conditions ],
        [ sh:class tvbo:FieldStateVariable ;
            sh:nodeKind sh:IRI ;
            sh:order 5 ;
            sh:path tvbo:state_variables ],
        [ sh:class tvbo:Mesh ;
            sh:description "Shared mesh for all field state variables in this PDE." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 4 ;
            sh:path tvbo:mesh ],
        [ sh:class tvbo:Function ;
            sh:nodeKind sh:IRI ;
            sh:order 13 ;
            sh:path tvbo:functions ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path rdfs:label ],
        [ sh:class tvbo:DifferentialOperator ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 7 ;
            sh:path tvbo:operators ],
        [ sh:class tvbo:SpatialDomain ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 3 ;
            sh:path tvbo:domain ],
        [ sh:class tvbo:Parameter ;
            sh:nodeKind sh:IRI ;
            sh:order 2 ;
            sh:path tvbo:parameters ],
        [ sh:class tvbo:DerivedVariable ;
            sh:nodeKind sh:IRI ;
            sh:order 12 ;
            sh:path tvbo:derived_variables ],
        [ sh:class tvbo:DerivedParameter ;
            sh:nodeKind sh:IRI ;
            sh:order 11 ;
            sh:path tvbo:derived_parameters ],
        [ sh:class tvbo:SpatialField ;
            sh:description "Primary field being solved for (deprecated; use state_variables)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 6 ;
            sh:path tvbo:field ] ;
    sh:targetClass tvbo:PDE .

tvbo:PDESolver a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "Abs/rel tolerances." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path tvbo:tolerances ],
        [ sh:datatype xsd:string ;
            sh:description "e.g., implicit Euler, Crank-Nicolson." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path tvbo:time_integrator ],
        [ sh:datatype xsd:float ;
            sh:description "Time step (s)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path tvbo:dt ],
        [ sh:in ( "FDM" "FEM" "FVM" "Spectral" ) ;
            sh:maxCount 1 ;
            sh:order 4 ;
            sh:path tvbo:discretization ],
        [ sh:class <https://w3id.org/tvbo/software/SoftwareRequirement> ;
            sh:nodeKind sh:IRI ;
            sh:order 2 ;
            sh:path tvbo:requirements ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 8 ;
            sh:path tvbo:preconditioner ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path rdfs:label ],
        [ sh:class <https://w3id.org/tvbo/software/SoftwareEnvironment> ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 3 ;
            sh:path tvbo:environment ] ;
    sh:targetClass tvbo:PDESolver .

tvbo:Parcellation a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:class <http://uri.interlex.org/tgbugs/uris/readable/atlas/Atlas> ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 2 ;
            sh:path tvbo:atlas ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path tvbo:data_source ] ;
    sh:targetClass tvbo:Parcellation .

tvbo:RandomStream a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:string ;
            sh:description "Add the location of the data file containing the parcellation terminology." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/dataLocation> ] ;
    sh:targetClass tvbo:RandomStream .

tvbo:RegionMapping a sh:NodeShape ;
    rdfs:comment "Maps vertices to parent regions for hierarchical/aggregated coupling" ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:integer ;
            sh:description "Total number of vertices" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path tvbo:n_vertices ],
        [ sh:datatype xsd:integer ;
            sh:description "Total number of regions" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path tvbo:n_regions ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:string ;
            sh:description "Add the location of the data file containing the parcellation terminology." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/dataLocation> ],
        [ sh:datatype xsd:integer ;
            sh:description "Array mapping each vertex index to its parent region index. Can use dataLocation instead for large arrays." ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path tvbo:vertex_to_region ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path rdfs:label ] ;
    sh:targetClass tvbo:RegionMapping .

tvbo:Sample a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path tvbo:groups ],
        [ sh:datatype xsd:integer ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path tvbo:size ] ;
    sh:targetClass tvbo:Sample .

tvbo:SpatialDomain a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "Optional named region/ROI in the atlas/parcellation." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path tvbo:region ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:string ;
            sh:description "Optional file for geometry/ROI mask (e.g., NIfTI, GIfTI)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path tvbo:geometry ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:class <http://uri.interlex.org/tgbugs/uris/readable/atlas/Transformation> ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 2 ;
            sh:path tvbo:coordinate_space ] ;
    sh:targetClass tvbo:SpatialDomain .

tvbo:SpatialField a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:class tvbo:Mesh ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 4 ;
            sh:path tvbo:mesh ],
        [ sh:datatype xsd:string ;
            sh:description "Scalar, vector, or tensor." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path tvbo:quantity_kind ],
        [ sh:datatype xsd:float ;
            sh:defaultValue "0.1"^^xsd:float ;
            sh:description "Constant initial value for the field." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path tvbo:initial_value ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path tvbo:unit ],
        [ sh:datatype xsd:boolean ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path tvbo:time_dependent ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:class tvbo:NDArray ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 5 ;
            sh:path tvbo:values ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path rdfs:label ],
        [ sh:class tvbo:Equation ;
            sh:description "Analytic initial condition for the field." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 8 ;
            sh:path tvbo:initial_expression ] ;
    sh:targetClass tvbo:SpatialField .

tvbo:StateValue a sh:NodeShape ;
    rdfs:comment "A named state variable value for per-node initialization." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:description "Numeric, string, or boolean value. ScalarValue accepts any literal primitive type, allowing parameters to carry control flags (e.g., booleans) or symbolic placeholders alongside numeric defaults." ;
            sh:maxCount 1 ;
            sh:order 1 ;
            sh:path schema1:value ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ] ;
    sh:targetClass tvbo:StateValue .

tvbo:Tractogram a sh:NodeShape ;
    rdfs:comment "Reference to tractography/diffusion MRI data used to derive structural connectivity" ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "Processing pipeline used to generate the tractography" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path tvbo:processing_pipeline ],
        [ sh:datatype xsd:string ;
            sh:description "Publication or DOI reference for this tractography dataset" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path dcterms:references ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:integer ;
            sh:description "Number of subjects in the tractography dataset" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path tvbo:number_of_subjects ],
        [ sh:datatype xsd:string ;
            sh:description "Acquisition protocol or scanner information" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path tvbo:acquisition ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:string ;
            sh:description "Path or URI to the tractography data file" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path tvbo:data_source ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ] ;
    sh:targetClass tvbo:Tractogram .

tvbo:TuningObjective a sh:NodeShape ;
    rdfs:comment "Defines what the tuning algorithm optimizes for. Can be an activity target (FIC) or a connectivity target (EIB)." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:class tvbo:StateVariable ;
            sh:description "State variable for activity targets (e.g., S_e)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 3 ;
            sh:path tvbo:target_variable ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:string ;
            sh:description "Type of objective: 'activity_target', 'fc_matching', 'custom'" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path tvbo:type ],
        [ sh:class tvbo:Observation ;
            sh:description "Reference to empirical data observation for matching objectives" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 5 ;
            sh:path tvbo:target_data ],
        [ sh:datatype xsd:float ;
            sh:description "Target value for activity objectives" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path tvbo:target_value ],
        [ sh:class tvbo:Equation ;
            sh:description "Metric equation for matching (e.g., correlation, rmse)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 6 ;
            sh:path tvbo:metric ] ;
    sh:targetClass tvbo:TuningObjective .

tvbo:UpdateRule a sh:NodeShape ;
    rdfs:comment "Defines how a parameter is updated based on observables. Represents iterative learning rules like FIC or EIB updates. Functions from experiment.functions are available in the equation." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ],
        [ sh:datatype xsd:boolean ;
            sh:description "Whether to apply learning rate warmup to this update rule. When true, the learning rate (eta) is scaled by (i+1)/n_iterations." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path tvbo:warmup ],
        [ sh:class tvbo:Parameter ;
            sh:description "The parameter to update (e.g., J_i, wLRE)" ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 2 ;
            sh:path tvbo:target_parameter ],
        [ sh:class tvbo:Equation ;
            sh:description "Update equation (e.g., 'J_i + eta * delta'). Can use functions defined in experiment.functions section." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 3 ;
            sh:path tvbo:equation ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:class tvbo:Observation ;
            sh:description "Observables required by this update rule" ;
            sh:nodeKind sh:IRI ;
            sh:order 6 ;
            sh:path tvbo:requires ],
        [ sh:class tvbo:Range ;
            sh:description "Constraints on parameter values after update" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 4 ;
            sh:path tvbo:bounds ] ;
    sh:targetClass tvbo:UpdateRule .

<https://w3id.org/tvbo/dbs/ClinicalImprovement> a sh:NodeShape ;
    rdfs:comment "Relative improvement on a defined clinical score." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "Who performed the rating (e.g., rater initials, clinician ID, or system)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path <https://w3id.org/tvbo/dbs/evaluator> ],
        [ sh:class <https://w3id.org/tvbo/dbs/ClinicalScore> ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 0 ;
            sh:path <https://w3id.org/tvbo/dbs/score> ],
        [ sh:datatype xsd:float ;
            sh:description "Preoperative baseline value of the score" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path <https://w3id.org/tvbo/dbs/baseline_value> ],
        [ sh:datatype xsd:string ;
            sh:description "Timepoint of assessment (e.g., \"1 month post-op\", \"6 months post-op\")" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path <https://w3id.org/tvbo/dbs/timepoint> ],
        [ sh:datatype xsd:float ;
            sh:description "Timepoint of assessment in days or months after implantation" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path <https://w3id.org/tvbo/dbs/time_post_surgery> ],
        [ sh:datatype xsd:float ;
            sh:description "Percent change compared to preoperative baseline (positive = improvement)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path <https://w3id.org/tvbo/dbs/percent_change> ],
        [ sh:datatype xsd:float ;
            sh:description "Absolute value of the score at the time of assessment" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path <https://w3id.org/tvbo/dbs/absolute_value> ] ;
    sh:targetClass <https://w3id.org/tvbo/dbs/ClinicalImprovement> .

<https://w3id.org/tvbo/dbs/ClinicalScale> a sh:NodeShape ;
    rdfs:comment "A clinical assessment inventory or structured scale composed of multiple scores or items." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "Short abbreviation (e.g., UPDRS)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path skos:notation ],
        [ sh:datatype xsd:string ;
            sh:description "Full name of the scale (e.g., Unified Parkinson’s Disease Rating Scale)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path schema1:name ],
        [ sh:datatype xsd:string ;
            sh:description "DOI, PMID or persistent identifier" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path dcterms:references ],
        [ sh:datatype xsd:string ;
            sh:description "Overall clinical domain (e.g., motor, cognition)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path <https://w3id.org/tvbo/dbs/domain> ],
        [ sh:datatype xsd:string ;
            sh:description "Version of the instrument (e.g., 3.0)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path schema1:softwareVersion ] ;
    sh:targetClass <https://w3id.org/tvbo/dbs/ClinicalScale> .

<https://w3id.org/tvbo/dbs/Contact> a sh:NodeShape ;
    rdfs:comment "Individual contact on a DBS electrode." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "Optional human-readable label (e.g., \"1a\")" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:integer ;
            sh:description "Identifier (e.g., 0, 1, 2)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path dcterms:identifier ],
        [ sh:class <http://uri.interlex.org/tgbugs/uris/readable/Coordinate> ;
            sh:description "3D coordinate of the contact center in the defined coordinate space" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 1 ;
            sh:path <https://w3id.org/tvbo/dbs/coordinate> ] ;
    sh:targetClass <https://w3id.org/tvbo/dbs/Contact> .

<https://w3id.org/tvbo/dbs/DBSProtocol> a sh:NodeShape ;
    rdfs:comment "A protocol describing DBS therapy, potentially bilateral or multi-lead." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path <https://w3id.org/tvbo/dbs/notes> ],
        [ sh:class <https://w3id.org/tvbo/dbs/Electrode> ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 1 ;
            sh:path <https://w3id.org/tvbo/dbs/electrodes> ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path <https://w3id.org/tvbo/dbs/timing_info> ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ],
        [ sh:class <https://w3id.org/tvbo/dbs/ClinicalImprovement> ;
            sh:description "Observed improvement relative to baseline based on a defined score." ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 5 ;
            sh:path <https://w3id.org/tvbo/dbs/clinical_improvement> ],
        [ sh:class <https://w3id.org/tvbo/dbs/StimulationSetting> ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 2 ;
            sh:path <https://w3id.org/tvbo/dbs/settings> ] ;
    sh:targetClass <https://w3id.org/tvbo/dbs/DBSProtocol> .

<https://w3id.org/tvbo/dbs/DBSSubject> a sh:NodeShape ;
    rdfs:comment "Human or animal subject receiving DBS." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "Human-readable label for the subject." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:string ;
            sh:description "Group assignment (e.g., 'control', 'patient', 'healthy'). Maps to participants.tsv 'group' column in BIDS." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path <https://w3id.org/tvbo/study/group> ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path <https://w3id.org/tvbo/dbs/handedness> ],
        [ sh:datatype xsd:float ;
            sh:description "Age at time of study (years)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path <https://w3id.org/tvbo/study/age> ],
        [ sh:class <http://uri.interlex.org/tgbugs/uris/readable/atlas/Transformation> ;
            sh:description "Coordinate space used for this subject's data" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 3 ;
            sh:path <https://w3id.org/tvbo/dbs/coordinate_space> ],
        [ sh:description "Biological sex." ;
            sh:in ( "male" "female" "other" ) ;
            sh:maxCount 1 ;
            sh:order 8 ;
            sh:path <https://w3id.org/tvbo/study/sex> ],
        [ sh:datatype xsd:string ;
            sh:description "BIDS-compatible subject identifier (without 'sub-' prefix). Examples: '01', 'ctrl03', 'patient17'." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path dcterms:identifier ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path <https://w3id.org/tvbo/dbs/diagnosis> ],
        [ sh:datatype xsd:string ;
            sh:description "Path to subject-specific connectome (when not session-dependent). Relative to dataset root or BIDS derivatives. For session-specific networks, use Session.network instead." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 10 ;
            sh:path <https://w3id.org/tvbo/study/network> ],
        [ sh:class <https://w3id.org/tvbo/dbs/DBSProtocol> ;
            sh:description "All DBS protocols assigned to this subject." ;
            sh:nodeKind sh:IRI ;
            sh:order 2 ;
            sh:path <https://w3id.org/tvbo/dbs/protocols> ],
        [ sh:datatype xsd:string ;
            sh:description "Additional subject metadata as key-value pairs or path to a sidecar JSON file." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 11 ;
            sh:path <https://w3id.org/tvbo/study/metadata> ],
        [ sh:class <https://w3id.org/tvbo/study/Session> ;
            sh:description "Data collection sessions for this subject. Each session can have its own network, empirical data, and conditions." ;
            sh:nodeKind sh:IRI ;
            sh:order 9 ;
            sh:path <https://w3id.org/tvbo/study/sessions> ] ;
    sh:targetClass <https://w3id.org/tvbo/dbs/DBSSubject> .

<https://w3id.org/tvbo/dbs/EField> a sh:NodeShape ;
    rdfs:comment "Simulated electric field from DBS modeling." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:float ;
            sh:description "Threshold value applied to the E-field simulation" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path <https://w3id.org/tvbo/dbs/threshold_applied> ],
        [ sh:datatype xsd:string ;
            sh:description "Reference to raw or thresholded volume" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path <https://w3id.org/tvbo/dbs/volume_data> ],
        [ sh:class <http://uri.interlex.org/tgbugs/uris/readable/atlas/Transformation> ;
            sh:description "Reference to a common coordinate space (e.g. MNI152)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 1 ;
            sh:path <https://w3id.org/tvbo/dbs/coordinate_space> ] ;
    sh:targetClass <https://w3id.org/tvbo/dbs/EField> .

<https://w3id.org/tvbo/dbs/StimulationSetting> a sh:NodeShape ;
    rdfs:comment "DBS parameters for a specific session." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path <https://w3id.org/tvbo/dbs/mode> ],
        [ sh:class tvbo:Parameter ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 3 ;
            sh:path <https://w3id.org/tvbo/dbs/pulse_width> ],
        [ sh:datatype xsd:integer ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path <https://w3id.org/tvbo/dbs/active_contacts> ],
        [ sh:class tvbo:Parameter ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 1 ;
            sh:path <https://w3id.org/tvbo/dbs/amplitude> ],
        [ sh:class <https://w3id.org/tvbo/dbs/EField> ;
            sh:description "Metadata about the E-field result for this setting" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 6 ;
            sh:path <https://w3id.org/tvbo/dbs/efield> ],
        [ sh:class <https://w3id.org/tvbo/dbs/Electrode> ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 0 ;
            sh:path <https://w3id.org/tvbo/dbs/electrode_reference> ],
        [ sh:class tvbo:Parameter ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 2 ;
            sh:path <https://w3id.org/tvbo/dbs/frequency> ] ;
    sh:targetClass <https://w3id.org/tvbo/dbs/StimulationSetting> .

<https://w3id.org/tvbo/study/Dataset> a sh:NodeShape ;
    rdfs:comment "A collection of subjects for a multi-subject study. Provides the subject/session structure needed for workflow rendering. Optionally backed by a BIDS directory layout." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type tvbo:coordinate_space <https://w3id.org/tvbo/dbs/clinical_scores> ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "DOI or citation for this dataset." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path dcterms:references ],
        [ sh:datatype xsd:string ;
            sh:description "Path to BIDS dataset root directory. When set, subject networks and empirical data paths are resolved relative to this root." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path <https://w3id.org/tvbo/study/bids_root> ],
        [ sh:datatype xsd:string ;
            sh:description "Unique identifier for the dataset." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path dcterms:identifier ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:string ;
            sh:description "Global condition labels applied across all subjects (e.g., ['rest', 'task-nback', 'task-motor'])." ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path <https://w3id.org/tvbo/study/conditions> ],
        [ sh:datatype xsd:string ;
            sh:description "Human-readable dataset name." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path rdfs:label ],
        [ sh:class <https://w3id.org/tvbo/study/Subject> ;
            sh:description "Subjects in a dataset." ;
            sh:nodeKind sh:IRI ;
            sh:order 1 ;
            sh:path <https://w3id.org/tvbo/study/subjects> ] ;
    sh:targetClass <https://w3id.org/tvbo/study/Dataset> .

<https://w3id.org/tvbo/study/Subject> a sh:NodeShape ;
    rdfs:comment "A participant in a study. Each subject typically has their own brain network (connectome) and empirical recordings. Corresponds to a BIDS 'sub-' entity." ;
    sh:closed true ;
    sh:ignoredProperties ( <https://w3id.org/tvbo/dbs/handedness> rdf:type <https://w3id.org/tvbo/dbs/diagnosis> tvbo:coordinate_space <https://w3id.org/tvbo/dbs/protocols> ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "Path to subject-specific connectome (when not session-dependent). Relative to dataset root or BIDS derivatives. For session-specific networks, use Session.network instead." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path <https://w3id.org/tvbo/study/network> ],
        [ sh:datatype xsd:string ;
            sh:description "Group assignment (e.g., 'control', 'patient', 'healthy'). Maps to participants.tsv 'group' column in BIDS." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path <https://w3id.org/tvbo/study/group> ],
        [ sh:datatype xsd:string ;
            sh:description "Human-readable label for the subject." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path rdfs:label ],
        [ sh:description "Biological sex." ;
            sh:in ( "male" "female" "other" ) ;
            sh:maxCount 1 ;
            sh:order 4 ;
            sh:path <https://w3id.org/tvbo/study/sex> ],
        [ sh:datatype xsd:float ;
            sh:description "Age at time of study (years)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path <https://w3id.org/tvbo/study/age> ],
        [ sh:datatype xsd:string ;
            sh:description "Additional subject metadata as key-value pairs or path to a sidecar JSON file." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path <https://w3id.org/tvbo/study/metadata> ],
        [ sh:datatype xsd:string ;
            sh:description "BIDS-compatible subject identifier (without 'sub-' prefix). Examples: '01', 'ctrl03', 'patient17'." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path dcterms:identifier ],
        [ sh:class <https://w3id.org/tvbo/study/Session> ;
            sh:description "Data collection sessions for this subject. Each session can have its own network, empirical data, and conditions." ;
            sh:nodeKind sh:IRI ;
            sh:order 5 ;
            sh:path <https://w3id.org/tvbo/study/sessions> ] ;
    sh:targetClass <https://w3id.org/tvbo/study/Subject> .

schema1:SoftwareApplication a sh:NodeShape ;
    rdfs:comment "A software tool for computational neuroscience simulation, analysis, or model specification. Extends SoftwarePackage with neuroscience-specific controlled vocabularies for scale, paradigm, role, and interoperability. Aligned with CodeMeta v3 and DOAP.",
        "Identity and metadata for a software package, aligned with schema.org/SoftwareApplication and CodeMeta v3." ;
    sh:closed true ;
    sh:ignoredProperties ( schema1:isAccessibleForFree schema1:dateModified schema1:citation <https://w3id.org/tvbo/software/tool_role> tvbo:date_created <https://w3id.org/tvbo/software/issue_tracker> schema1:keywords <https://w3id.org/tvbo/software/development_status> <https://w3id.org/tvbo/software/model_paradigm> rdf:type tvbo:scale schema1:runtimePlatform schema1:operatingSystem dcterms:creator dcterms:references <https://w3id.org/tvbo/software/version> <https://w3id.org/tvbo/software/interoperates_with> schema1:maintainer schema1:programmingLanguage schema1:funder schema1:applicationCategory schema1:sameAs ),
        ( rdf:type ) ;
    sh:property [ sh:class schema1:SoftwareApplication ;
            sh:description "Tools this tool can exchange data with or delegate to." ;
            sh:nodeKind sh:IRI ;
            sh:order 7 ;
            sh:path <https://w3id.org/tvbo/software/interoperates_with> ],
        [ sh:datatype xsd:string ;
            sh:description "Supported operating systems (e.g., Linux, macOS, Windows)." ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path schema1:operatingSystem ],
        [ sh:description "Primary function(s) in a simulation workflow." ;
            sh:in ( wd:Q1569346 wd:Q271680 "backend_runtime" wd:Q816286 wd:Q2661442 "workflow_framework" biotools:operation_2945 biotools:operation_0337 wd:Q7397 wd:Q858926 ) ;
            sh:order 3 ;
            sh:path <https://w3id.org/tvbo/software/tool_role> ],
        [ sh:datatype xsd:string ;
            sh:description "SPDX license identifier (e.g., MIT, GPL-3.0-only)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path dcterms:license ],
        [ sh:datatype xsd:string ;
            sh:description "High-level category (e.g., simulation, analysis, specification)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:applicationCategory ],
        [ sh:datatype xsd:string ;
            sh:description "SPDX license identifier (e.g., MIT, GPL-3.0-only)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 24 ;
            sh:path dcterms:license ],
        [ sh:datatype xsd:string ;
            sh:description "Current maintainer(s) or responsible organization(s)." ;
            sh:nodeKind sh:Literal ;
            sh:order 13 ;
            sh:path schema1:maintainer ],
        [ sh:datatype xsd:string ;
            sh:description "Additional citation strings or DOIs." ;
            sh:nodeKind sh:Literal ;
            sh:order 16 ;
            sh:path schema1:citation ],
        [ sh:datatype xsd:string ;
            sh:description "Tags for topic-based discovery and clustering." ;
            sh:nodeKind sh:Literal ;
            sh:order 17 ;
            sh:path schema1:keywords ],
        [ sh:description "Package ecosystem(s) through which the software is distributed." ;
            sh:in ( wd:Q2984888 wd:Q105593788 wd:Q901584 "julia_registry" wd:Q7067518 "bioconda" "github" wd:Q6795527 ) ;
            sh:order 6 ;
            sh:path <https://w3id.org/tvbo/software/ecosystem> ],
        [ sh:description "URIs that unambiguously identify this tool (Wikidata, bio.tools, RRID, SciCrunch)." ;
            sh:nodeKind sh:IRI ;
            sh:order 18 ;
            sh:path schema1:sameAs ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 22 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:string ;
            sh:description "Original author(s) or creating organization(s)." ;
            sh:nodeKind sh:Literal ;
            sh:order 12 ;
            sh:path dcterms:creator ],
        [ sh:datatype xsd:date ;
            sh:description "Date of the most recent release or significant update." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 10 ;
            sh:path schema1:dateModified ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ],
        [ sh:datatype xsd:boolean ;
            sh:defaultValue true ;
            sh:description "Whether the tool is free/open-source." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 20 ;
            sh:path schema1:isAccessibleForFree ],
        [ sh:datatype xsd:string ;
            sh:description "Digital Object Identifier for the software or its reference publication." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 26 ;
            sh:path bibo:doi ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 21 ;
            sh:path schema1:name ],
        [ sh:datatype xsd:string ;
            sh:description "Current or latest stable version string." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 8 ;
            sh:path schema1:softwareVersion ],
        [ sh:description "Implementation languages." ;
            sh:in ( wd:Q28865 wd:Q15777 wd:Q2407 wd:Q251 wd:Q4010477 wd:Q182017 wd:Q206904 wd:Q83303 wd:Q34010 wd:Q575650 wd:Q2005 wd:Q2115 wd:Q5765633 wd:Q2370 ) ;
            sh:order 4 ;
            sh:path schema1:programmingLanguage ],
        [ sh:description "Computational paradigms supported." ;
            sh:in ( wd:Q7003015 wd:Q1368960 wd:Q7579783 wd:Q72484 wd:Q5155691 wd:Q3685405 wd:Q634884 wd:Q851270 wd:Q747830 "generic" wd:Q1948412 "dynamic_mean_field" wd:Q317623 "model_description" wd:Q858926 ) ;
            sh:order 2 ;
            sh:path <https://w3id.org/tvbo/software/model_paradigm> ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:description "Source code repository URL." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 25 ;
            sh:path schema1:codeRepository ],
        [ sh:description "Spatial/organizational scales the tool operates at." ;
            sh:in ( wd:Q898786 wd:Q43054 wd:Q484761 wd:Q7003015 wd:Q1073340 ) ;
            sh:order 1 ;
            sh:path <https://w3id.org/tvbo/software/scale> ],
        [ sh:datatype xsd:string ;
            sh:description "DOI of the primary reference publication for this tool." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 15 ;
            sh:path dcterms:references ],
        [ sh:description "Development status (repostatus.org aligned)." ;
            sh:in ( "active" "inactive" "concept" "wip" "suspended" "unsupported" "moved" ) ;
            sh:maxCount 1 ;
            sh:order 11 ;
            sh:path <https://w3id.org/tvbo/software/development_status> ],
        [ sh:datatype xsd:date ;
            sh:description "Date the software was first released (YYYY-MM-DD)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 9 ;
            sh:path schema1:dateCreated ],
        [ sh:description "Source code repository URL." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 4 ;
            sh:path schema1:codeRepository ],
        [ sh:description "Package ecosystem(s) through which the software is distributed." ;
            sh:in ( wd:Q2984888 wd:Q105593788 wd:Q901584 "julia_registry" wd:Q7067518 "bioconda" "github" wd:Q6795527 ) ;
            sh:order 27 ;
            sh:path <https://w3id.org/tvbo/software/ecosystem> ],
        [ sh:datatype xsd:string ;
            sh:description "Funding bodies or grants (e.g., 'EU H2020 945539', 'NIH R01...')." ;
            sh:nodeKind sh:Literal ;
            sh:order 14 ;
            sh:path schema1:funder ],
        [ sh:datatype xsd:string ;
            sh:description "Digital Object Identifier for the software or its reference publication." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path bibo:doi ],
        [ sh:description "URL of the bug tracker or issue board." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 19 ;
            sh:path <https://w3id.org/tvbo/software/issue_tracker> ],
        [ sh:description "Project homepage URL." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 2 ;
            sh:path schema1:url ],
        [ sh:description "Project homepage URL." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 23 ;
            sh:path schema1:url ],
        [ sh:datatype xsd:string ;
            sh:description "Execution backends or platforms (e.g., MPI, OpenMP, CUDA, JAX)." ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path schema1:runtimePlatform ] ;
    sh:targetClass schema1:SoftwareApplication .

tvbo:BoundaryCondition a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:in ( "Dirichlet" "Neumann" "Robin" "Periodic" ) ;
            sh:maxCount 1 ;
            sh:order 2 ;
            sh:path tvbo:bc_type ],
        [ sh:datatype xsd:string ;
            sh:description "Mesh/atlas subset where BC applies." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path tvbo:on_region ],
        [ sh:datatype xsd:boolean ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path tvbo:time_dependent ],
        [ sh:class tvbo:Equation ;
            sh:description "Constant, parameter, or equation." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 4 ;
            sh:path tvbo:value ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path rdfs:label ] ;
    sh:targetClass tvbo:BoundaryCondition .

tvbo:BrainRegionSeries a sh:NodeShape ;
    rdfs:comment "A series whose values represent latitude" ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path tvbo:values ] ;
    sh:targetClass tvbo:BrainRegionSeries .

tvbo:ConditionalBlock a sh:NodeShape ;
    rdfs:comment "A single condition and its corresponding equation segment." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "The condition for this block (e.g., t > onset)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path tvbo:condition ],
        [ sh:datatype xsd:string ;
            sh:description "The equation to apply when the condition is met." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path tvbo:expression ] ;
    sh:targetClass tvbo:ConditionalBlock .

tvbo:Continuation a sh:NodeShape ;
    rdfs:comment "Complete specification of a numerical continuation / bifurcation analysis. All universal solver settings live directly here. Toolkit-specific string options go in the options slot. When used inside a BranchSwitch, only explicitly set attributes override the parent's values." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:class tvbo:InitialState ;
            sh:description "How to obtain the initial equilibrium. Default: time integration to steady state." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 18 ;
            sh:path tvbo:initial_state ],
        [ sh:datatype xsd:integer ;
            sh:description "Number of eigenvalues to compute. Must be >= number of state variables for reliable Hopf detection." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 11 ;
            sh:path tvbo:nev ],
        [ sh:datatype xsd:float ;
            sh:description "Absolute tolerance for Newton corrector convergence." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 9 ;
            sh:path tvbo:newton_tol ],
        [ sh:datatype xsd:float ;
            sh:description "Maximum adaptive step size." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path tvbo:ds_max ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:integer ;
            sh:description "Bifurcation detection level. 0 = off, 1 = eigenvalues only, 2 = detect, 3 = locate precisely." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 13 ;
            sh:path tvbo:detect_bifurcation ],
        [ sh:class tvbo:Option ;
            sh:description "Toolkit-specific string options (tangent method, solver name, etc.)." ;
            sh:nodeKind sh:IRI ;
            sh:order 23 ;
            sh:path tvbo:options ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path rdfs:label ],
        [ sh:class tvbo:Parameter ;
            sh:description "Parameters to vary. First parameter is primary (codim-1); second enables codim-2 continuation. Each Parameter has name + domain (Range with lo/hi bounds)." ;
            sh:nodeKind sh:IRI ;
            sh:order 4 ;
            sh:path tvbo:free_parameters ],
        [ sh:datatype xsd:integer ;
            sh:description "Maximum Newton corrector iterations per step." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 10 ;
            sh:path tvbo:newton_max_iterations ],
        [ sh:datatype xsd:float ;
            sh:description "Minimum adaptive step size." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path tvbo:ds_min ],
        [ sh:datatype xsd:integer ;
            sh:description "Maximum continuation steps." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 8 ;
            sh:path tvbo:max_steps ],
        [ sh:class tvbo:Dynamics ;
            sh:description "Reference to the dynamical system model (by name). Resolved from the experiment's dynamics dict at runtime." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 3 ;
            sh:path tvbo:dynamics ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ],
        [ sh:defaultValue "PALC" ;
            sh:description "Predictor-corrector algorithm." ;
            sh:in ( "PALC" "MoorePenrose" "Natural" ) ;
            sh:maxCount 1 ;
            sh:order 17 ;
            sh:path tvbo:algorithm ],
        [ sh:datatype xsd:integer ;
            sh:description "Maximum bisection steps for bifurcation point localization." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 16 ;
            sh:path tvbo:max_bisection_steps ],
        [ sh:class tvbo:BranchSwitch ;
            sh:description "Child branches to continue from detected bifurcation points (PO from Hopf, fold continuation, etc.)." ;
            sh:nodeKind sh:IRI ;
            sh:order 19 ;
            sh:path tvbo:branches ],
        [ sh:datatype xsd:boolean ;
            sh:description "Enable fold (limit point) detection." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 14 ;
            sh:path tvbo:detect_fold ],
        [ sh:datatype xsd:boolean ;
            sh:description "Continue in both directions from the starting point." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 20 ;
            sh:path tvbo:bothside ],
        [ sh:datatype xsd:float ;
            sh:description "Tolerance on real part of eigenvalue for stability boundary." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 12 ;
            sh:path tvbo:tol_stability ],
        [ sh:datatype xsd:integer ;
            sh:description "Number of eigenvalue sign inversions to flag a bifurcation. Must be even. Higher = fewer false positives." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 15 ;
            sh:path tvbo:n_inversion ],
        [ sh:class tvbo:ExecutionConfig ;
            sh:description "Per-analysis execution configuration." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 21 ;
            sh:path tvbo:execution ],
        [ sh:datatype xsd:float ;
            sh:description "Initial arc-length step size." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path tvbo:ds ],
        [ sh:class <https://w3id.org/tvbo/software/SoftwareRequirement> ;
            sh:description "Backend engine (BifurcationKit, AUTO-07p, MatCont, etc.)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 22 ;
            sh:path tvbo:software ] ;
    sh:targetClass tvbo:Continuation .

tvbo:DataSource a sh:NodeShape ;
    rdfs:comment "Specification for loading external/empirical data." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:string ;
            sh:description "File path or URI to the data" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path tvbo:path ],
        [ sh:class tvbo:Callable ;
            sh:description "Callable that loads the data (e.g., load_functional_connectivity)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 4 ;
            sh:path tvbo:loader ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ],
        [ sh:datatype xsd:string ;
            sh:description "Data format: 'npy', 'mat', 'csv', 'nifti', etc." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path tvbo:format ],
        [ sh:class tvbo:Function ;
            sh:description "Optional preprocessing to apply after loading" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 7 ;
            sh:path tvbo:preprocessing ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:string ;
            sh:description "Key/variable name within the file (for .mat, .npz, etc.)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path tvbo:key ] ;
    sh:targetClass tvbo:DataSource .

tvbo:DerivedParameter a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:float ;
            sh:nodeKind sh:Literal ;
            sh:order 18 ;
            sh:path tvbo:explored_values ],
        [ sh:description "External ontology IRIs (typically GO, ChEBI, UBERON, CL, MeSH) that this entity is a surrogate / abstraction / model of. Replaces the legacy OWL pattern `tvbo:surrogate_of` by carrying the link inline with the YAML data instance. Multiple IRIs allowed: a single parameter may abstract several biological processes (e.g. a synaptic conductance grounding both GO:0060079 (excitatory PSP) and GO:0007268 (chemical synaptic transmission))." ;
            sh:nodeKind sh:IRI ;
            sh:order 12 ;
            sh:path oboInOwl:hasDbXref ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 13 ;
            sh:path rdfs:comment ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 8 ;
            sh:path schema1:defaultValue ],
        [ sh:class tvbo:Range ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 9 ;
            sh:path tvbo:domain ],
        [ sh:datatype xsd:boolean ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 14 ;
            sh:path tvbo:heterogeneous ],
        [ sh:description "Physical unit of measurement. Values are drawn from the QUDT ontology (http://qudt.org/vocab/unit/) with UO cross-references where available." ;
            sh:in ( qudt:SEC qudt:MilliSEC qudt:MicroSEC qudt:PER-SEC qudt:PER-MilliSEC qudt:HZ qudt:KiloHZ qudt:V qudt:MilliV qudt:PER-MilliV qudt:MilliV-PER-MilliSEC qudt:MilliV-PER-SEC qudt:A qudt:NanoA qudt:PicoA "uA_per_cm2" qudt:PicoFARAD qudt:NanoFARAD "uF_per_cm2" qudt:NanoS qudt:MicroS qudt:PicoS "S_per_cm2" "mS_per_cm2" "S_per_m2" "nS_per_mV" qudt:PER-NanoC qudt:PER-PicoC qudt:MOL-PER-M3 "mol_per_cm3" qudt:MilliMOL-PER-M3 "mol_per_m_per_A_per_s" qudt:MicroM3 qudt:M qudt:MilliM qudt:CentiM qudt:M-PER-SEC qudt:MilliM-PER-MilliSEC "Hz_per_nA" qudt:S-PER-M qudt:H-PER-M qudt:OHM "Mohm" "kohm_cm" qudt:DEG_C "rad_per_ms" qudt:UNITLESS qudt:PERCENT "arbitrary_unit" qudt:KiloGM "kg_per_s" qudt:M-PER-SEC2 qudt:N-PER-M qudt:RAD qudt:RAD-PER-SEC qudt:SEC2 "per_unit" ) ;
            sh:maxCount 1 ;
            sh:order 4 ;
            sh:path qudt:unit ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path tvbo:symbol ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path skos:definition ],
        [ sh:datatype xsd:float ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 10 ;
            sh:path tvbo:reported_optimum ],
        [ sh:class tvbo:Equation ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 3 ;
            sh:path tvbo:Equation ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ],
        [ sh:description "Numeric, string, or boolean value. ScalarValue accepts any literal primitive type, allowing parameters to carry control flags (e.g., booleans) or symbolic placeholders alongside numeric defaults." ;
            sh:maxCount 1 ;
            sh:order 7 ;
            sh:path schema1:value ],
        [ sh:class tvbo:Range ;
            sh:description "Per-element domain overrides for heterogeneous parameters. When specified, element_domains[i] overrides domain for element i during exploration auto-expansion. Length must match parameter shape (e.g., n_nodes for shape \"(n_nodes,)\"). If not set, all elements share the same domain." ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 19 ;
            sh:path tvbo:element_domains ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:string ;
            sh:description "Dataset path for array-valued parameters. When set, the parameter value is stored in the binary companion file (HDF5 or Zarr) at this path. The value slot is omitted." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 11 ;
            sh:path tvbo:dataset_path ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 17 ;
            sh:path tvbo:shape ],
        [ sh:datatype xsd:boolean ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 16 ;
            sh:path tvbo:free ],
        [ sh:class tvbo:Distribution ;
            sh:description "Distribution for heterogeneous per-node parameter sampling. Implies heterogeneous=true." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 15 ;
            sh:path tvbo:distribution ] ;
    sh:targetClass tvbo:DerivedParameter .

tvbo:FreeParameter a sh:NodeShape ;
    rdfs:comment "One degree of freedom in an OptimizationStage. References an existing Parameter by dotted scope (e.g. \"ReducedWongWang.w\" or \"FastLinearCoupling.G\") and supplies optimization-specific metadata (heterogeneous, shape, bounds, initial value). No new Parameter is created here." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "Optimization shape as a Python-tuple-style string (e.g. \"(n_nodes,)\" or \"(n_nodes, n_nodes)\"). Required when heterogeneous is true." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path tvbo:shape ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:boolean ;
            sh:description "If true, the parameter is optimized per-element (broadcast to `shape`). If false, a single scalar is optimized and broadcast at runtime." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path tvbo:heterogeneous ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:class tvbo:Range ;
            sh:description "Optional bounds (lo, hi) for constrained optimization." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 6 ;
            sh:path tvbo:domain ],
        [ sh:class tvbo:Parameter ;
            sh:description "Dotted reference to the Parameter to optimize. Format: \"<scope>.<param_name>\" where <scope> is either a Dynamics class name or a coupling key." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 2 ;
            sh:path tvbo:parameter ],
        [ sh:description "Optional initial value for the optimizer (overrides the referenced Parameter's value)." ;
            sh:maxCount 1 ;
            sh:order 5 ;
            sh:path tvbo:initial_value ] ;
    sh:targetClass tvbo:FreeParameter .

tvbo:Integrator a sh:NodeShape ;
    rdfs:comment "Fixed-step or adaptive ODE integrator with TVB-specific extensions (noise, transient time, etc.). Inherits abs_tol, rel_tol from Solver. Overrides method default to 'euler'." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:float ;
            sh:defaultValue "1e-10"^^xsd:float ;
            sh:description "Relative tolerance for adaptive solvers." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 17 ;
            sh:path tvbo:rel_tol ],
        [ sh:class tvbo:Noise ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 8 ;
            sh:path tvbo:noise ],
        [ sh:class tvbo:Parameter ;
            sh:nodeKind sh:IRI ;
            sh:order 2 ;
            sh:path tvbo:parameters ],
        [ sh:datatype xsd:string ;
            sh:defaultValue "euler"^^xsd:string ;
            sh:description "Integration method (euler, heun, rk4, etc.)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path tvbo:method ],
        [ sh:datatype xsd:float ;
            sh:defaultValue "1000.0"^^xsd:float ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path tvbo:duration ],
        [ sh:datatype xsd:float ;
            sh:defaultValue "1e-10"^^xsd:float ;
            sh:description "Absolute tolerance for adaptive solvers." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 16 ;
            sh:path tvbo:abs_tol ],
        [ sh:datatype xsd:integer ;
            sh:defaultValue 1 ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 12 ;
            sh:path tvbo:number_of_stages ],
        [ sh:class tvbo:DerivedVariable ;
            sh:nodeKind sh:IRI ;
            sh:order 13 ;
            sh:path tvbo:intermediate_expressions ],
        [ sh:datatype xsd:float ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 10 ;
            sh:path tvbo:transient_time ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:float ;
            sh:nodeKind sh:Literal ;
            sh:order 9 ;
            sh:path tvbo:state_wise_sigma ],
        [ sh:datatype xsd:boolean ;
            sh:defaultValue true ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 15 ;
            sh:path tvbo:delayed ],
        [ sh:class tvbo:DerivedVariable ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 14 ;
            sh:path tvbo:update_expression ],
        [ sh:datatype xsd:float ;
            sh:defaultValue "0.01220703125"^^xsd:float ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path tvbo:step_size ],
        [ sh:datatype xsd:integer ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path tvbo:steps ],
        [ sh:description "Physical unit of measurement. Values are drawn from the QUDT ontology (http://qudt.org/vocab/unit/) with UO cross-references where available." ;
            sh:in ( qudt:SEC qudt:MilliSEC qudt:MicroSEC qudt:PER-SEC qudt:PER-MilliSEC qudt:HZ qudt:KiloHZ qudt:V qudt:MilliV qudt:PER-MilliV qudt:MilliV-PER-MilliSEC qudt:MilliV-PER-SEC qudt:A qudt:NanoA qudt:PicoA "uA_per_cm2" qudt:PicoFARAD qudt:NanoFARAD "uF_per_cm2" qudt:NanoS qudt:MicroS qudt:PicoS "S_per_cm2" "mS_per_cm2" "S_per_m2" "nS_per_mV" qudt:PER-NanoC qudt:PER-PicoC qudt:MOL-PER-M3 "mol_per_cm3" qudt:MilliMOL-PER-M3 "mol_per_m_per_A_per_s" qudt:MicroM3 qudt:M qudt:MilliM qudt:CentiM qudt:M-PER-SEC qudt:MilliM-PER-MilliSEC "Hz_per_nA" qudt:S-PER-M qudt:H-PER-M qudt:OHM "Mohm" "kohm_cm" qudt:DEG_C "rad_per_ms" qudt:UNITLESS qudt:PERCENT "arbitrary_unit" qudt:KiloGM "kg_per_s" qudt:M-PER-SEC2 qudt:N-PER-M qudt:RAD qudt:RAD-PER-SEC qudt:SEC2 "per_unit" ) ;
            sh:maxCount 1 ;
            sh:order 1 ;
            sh:path qudt:unit ],
        [ sh:defaultValue "ms" ;
            sh:description "Time unit for the integration / simulation. Determines the physical time meaning of one model time-step." ;
            sh:in ( qudt:SEC qudt:MilliSEC qudt:MicroSEC qudt:PER-SEC qudt:PER-MilliSEC qudt:HZ qudt:KiloHZ qudt:V qudt:MilliV qudt:PER-MilliV qudt:MilliV-PER-MilliSEC qudt:MilliV-PER-SEC qudt:A qudt:NanoA qudt:PicoA "uA_per_cm2" qudt:PicoFARAD qudt:NanoFARAD "uF_per_cm2" qudt:NanoS qudt:MicroS qudt:PicoS "S_per_cm2" "mS_per_cm2" "S_per_m2" "nS_per_mV" qudt:PER-NanoC qudt:PER-PicoC qudt:MOL-PER-M3 "mol_per_cm3" qudt:MilliMOL-PER-M3 "mol_per_m_per_A_per_s" qudt:MicroM3 qudt:M qudt:MilliM qudt:CentiM qudt:M-PER-SEC qudt:MilliM-PER-MilliSEC "Hz_per_nA" qudt:S-PER-M qudt:H-PER-M qudt:OHM "Mohm" "kohm_cm" qudt:DEG_C "rad_per_ms" qudt:UNITLESS qudt:PERCENT "arbitrary_unit" qudt:KiloGM "kg_per_s" qudt:M-PER-SEC2 qudt:N-PER-M qudt:RAD qudt:RAD-PER-SEC qudt:SEC2 "per_unit" ) ;
            sh:maxCount 1 ;
            sh:order 0 ;
            sh:path tvbo:time_scale ],
        [ sh:datatype xsd:boolean ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 11 ;
            sh:path tvbo:scipy_ode_base ] ;
    sh:targetClass tvbo:Integrator .

tvbo:Simulation a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:integer ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:identifier ],
        [ sh:class tvbo:Dynamics ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 0 ;
            sh:path tvbo:model ],
        [ sh:class tvbo:ExecutionConfig ;
            sh:description "Computational execution configuration (parallelization, devices)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 21 ;
            sh:path tvbo:execution ],
        [ sh:datatype xsd:string ;
            sh:nodeKind sh:Literal ;
            sh:order 23 ;
            sh:path dcterms:references ],
        [ sh:class tvbo:Equation ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 3 ;
            sh:path tvbo:additional_equations ],
        [ sh:class tvbo:Exploration ;
            sh:description "Parameter exploration/grid search specifications" ;
            sh:nodeKind sh:IRI ;
            sh:order 17 ;
            sh:path tvbo:explorations ],
        [ sh:class tvbo:Dynamics ;
            sh:description "Default dynamics model for all nodes. For heterogeneous networks with multiple dynamics, use network.dynamics instead." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 5 ;
            sh:path tvbo:dynamics ],
        [ sh:class <https://w3id.org/tvbo/software/SoftwareRequirement> ;
            sh:description "(Deprecated) Single software requirement; prefer 'environment' with aggregated requirements." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 22 ;
            sh:path tvbo:software ],
        [ sh:class tvbo:Stimulus ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 13 ;
            sh:path tvbo:stimulation ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path rdfs:label ],
        [ sh:class tvbo:Coupling ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 9 ;
            sh:path tvbo:coupling ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path dcterms:description ],
        [ sh:class tvbo:Optimization ;
            sh:description "Parameter optimization configurations" ;
            sh:nodeKind sh:IRI ;
            sh:order 16 ;
            sh:path tvbo:optimizations ],
        [ sh:class tvbo:Network ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 7 ;
            sh:path tvbo:connectivity ],
        [ sh:class tvbo:DerivedObservation ;
            sh:description "Observations derived from combining other observations. Computed after all regular observations are available. Examples: fc_corr (from fc, fc_target), rmse, etc." ;
            sh:nodeKind sh:IRI ;
            sh:order 11 ;
            sh:path tvbo:derived_observations ],
        [ sh:class tvbo:Observation ;
            sh:nodeKind sh:IRI ;
            sh:order 10 ;
            sh:path tvbo:observations ],
        [ sh:class tvbo:Function ;
            sh:description "Reusable function definitions. Referenced by name in observation pipelines. Enables DRY: define compute_fc once, use in both simulated and empirical paths." ;
            sh:nodeKind sh:IRI ;
            sh:order 12 ;
            sh:path tvbo:functions ],
        [ sh:class <https://w3id.org/tvbo/software/SoftwareEnvironment> ;
            sh:description "Execution environment (collection of requirements)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 20 ;
            sh:path tvbo:environment ],
        [ sh:class tvbo:Continuation ;
            sh:description "Numerical continuation and bifurcation analysis specifications. Each entry defines a continuation experiment (equilibrium branch, codim-2 curve, periodic orbit family, etc.).            # Either reference a full reusable environment (preferred) or, for" ;
            sh:nodeKind sh:IRI ;
            sh:order 19 ;
            sh:path tvbo:continuations ],
        [ sh:class tvbo:Network ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 8 ;
            sh:path tvbo:network ],
        [ sh:class <https://w3id.org/tvbo/study/Dataset> ;
            sh:description "Multi-subject dataset for workflow rendering. When set, render_workflow() uses dataset.subjects/sessions to generate per-subject parallel jobs." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 24 ;
            sh:path tvbo:dataset ],
        [ sh:class tvbo:Integrator ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 6 ;
            sh:path tvbo:integration ],
        [ sh:class tvbo:Event ;
            sh:description "Events that apply at the experiment level. For component-level events, attach them to individual nodes or edges instead." ;
            sh:nodeKind sh:IRI ;
            sh:order 14 ;
            sh:path tvbo:events ],
        [ sh:class tvbo:Algorithm ;
            sh:description "Iterative parameter tuning algorithms (FIC, EIB, etc.)" ;
            sh:nodeKind sh:IRI ;
            sh:order 18 ;
            sh:path tvbo:algorithms ],
        [ sh:class tvbo:PDE ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 15 ;
            sh:path tvbo:field_dynamics ] ;
    sh:targetClass tvbo:Simulation .

tvbo:Stimulus a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:float ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path tvbo:weighting ],
        [ sh:datatype xsd:float ;
            sh:defaultValue "1000.0"^^xsd:float ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path tvbo:duration ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:integer ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path tvbo:regions ],
        [ sh:datatype xsd:string ;
            sh:description "Add the location of the data file containing the parcellation terminology." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/dataLocation> ],
        [ sh:class tvbo:Parameter ;
            sh:nodeKind sh:IRI ;
            sh:order 1 ;
            sh:path tvbo:parameters ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path rdfs:label ],
        [ sh:class tvbo:Equation ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 0 ;
            sh:path tvbo:Equation ] ;
    sh:targetClass tvbo:Stimulus .

tvbo:TimeSeries a sh:NodeShape ;
    rdfs:comment "Time series data from simulations or measurements. Supports BIDS-compatible export for computational modeling (BEP034)." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:class <https://w3id.org/tvbo/software/SoftwareEnvironment> ;
            sh:description "Software environment used to generate this data." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 13 ;
            sh:path tvbo:software_environment ],
        [ sh:datatype xsd:string ;
            sh:description "BIDS session identifier." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 16 ;
            sh:path dcterms:identifier ],
        [ sh:datatype xsd:dateTime ;
            sh:description "Timestamp when this TimeSeries was generated." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 12 ;
            sh:path tvbo:generated_at ],
        [ sh:datatype xsd:string ;
            sh:description "Ordering of dimensions: Time, State Variable, Space, Mode." ;
            sh:nodeKind sh:Literal ;
            sh:order 9 ;
            sh:path tvbo:labels_ordering ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:string ;
            sh:description "BIDS subject identifier." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 15 ;
            sh:path dcterms:identifier ],
        [ sh:datatype xsd:string ;
            sh:description "BIDS ModelEq reference: path to _eq.xml LEMS file." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 19 ;
            sh:path tvbo:model_equation_ref ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:string ;
            sh:description "Physical unit of the time series values." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 8 ;
            sh:path qudt:unit ],
        [ sh:datatype xsd:string ;
            sh:description "Mapping of dimension names to their labels (JSON-encoded dict)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 10 ;
            sh:path tvbo:labels_dimensions ],
        [ sh:class tvbo:Matrix ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 3 ;
            sh:path tvbo:data ],
        [ sh:datatype xsd:float ;
            sh:description "Time between samples (inverse of sampling_rate)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path tvbo:sampling_period ],
        [ sh:datatype xsd:float ;
            sh:description "Sampling rate in Hz." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path tvbo:sampling_rate ],
        [ sh:description "Imaging modality or simulation output type." ;
            sh:in ( "BOLD" "EEG" "MEG" "SEEG" "IEEG" ) ;
            sh:maxCount 1 ;
            sh:order 18 ;
            sh:path tvbo:modality ],
        [ sh:datatype xsd:integer ;
            sh:description "BIDS run number." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 17 ;
            sh:path dcterms:identifier ],
        [ sh:datatype xsd:string ;
            sh:description "Add the location of the data file containing the parcellation terminology." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/dataLocation> ],
        [ sh:datatype xsd:string ;
            sh:description "BIDS task name for the simulation (e.g., 'rest', 'simulation')." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 14 ;
            sh:path tvbo:task_name ],
        [ sh:class tvbo:Simulation ;
            sh:description "Reference to the SimulationExperiment that generated this TimeSeries." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 11 ;
            sh:path tvbo:source_experiment ],
        [ sh:datatype xsd:string ;
            sh:description "BIDS ModelParam reference: path to _param.xml LEMS file." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 20 ;
            sh:path tvbo:model_param_ref ],
        [ sh:class tvbo:Matrix ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 4 ;
            sh:path tvbo:time ],
        [ sh:datatype xsd:string ;
            sh:defaultValue "ms"^^xsd:string ;
            sh:description "Unit of the sampling period (e.g., 'ms', 's')." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path tvbo:sampling_period_unit ],
        [ sh:datatype xsd:string ;
            sh:description "Reference to connectivity data (_conndata-network_connectivity.tsv)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 21 ;
            sh:path tvbo:connectivity_ref ] ;
    sh:targetClass tvbo:TimeSeries .

<https://w3id.org/tvbo/dbs/Electrode> a sh:NodeShape ;
    rdfs:comment "Implanted DBS electrode and contact geometry." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "Unique identifier for this electrode" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path dcterms:identifier ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path <https://w3id.org/tvbo/dbs/model> ],
        [ sh:class <http://uri.interlex.org/tgbugs/uris/readable/Coordinate> ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 6 ;
            sh:path <https://w3id.org/tvbo/dbs/tail> ],
        [ sh:class <http://uri.interlex.org/tgbugs/uris/readable/Coordinate> ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 5 ;
            sh:path <https://w3id.org/tvbo/dbs/head> ],
        [ sh:class <http://uri.interlex.org/tgbugs/uris/readable/atlas/Transformation> ;
            sh:description "Coordinate space used for implantation planning" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 9 ;
            sh:path <https://w3id.org/tvbo/dbs/coordinate_space> ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 10 ;
            sh:path <https://w3id.org/tvbo/dbs/recon_path> ],
        [ sh:class <https://w3id.org/tvbo/dbs/Contact> ;
            sh:description "List of physical contacts along the electrode" ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 4 ;
            sh:path <https://w3id.org/tvbo/dbs/contacts> ],
        [ sh:class <http://uri.interlex.org/tgbugs/uris/readable/atlas/Region> ;
            sh:description "Anatomical target structure from a brain atlas" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 8 ;
            sh:path <https://w3id.org/tvbo/dbs/target_structure> ],
        [ sh:datatype xsd:string ;
            sh:defaultValue "left"^^xsd:string ;
            sh:description "Hemisphere of electrode (left/right)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path <https://w3id.org/tvbo/dbs/hemisphere> ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path <https://w3id.org/tvbo/dbs/manufacturer> ],
        [ sh:class <http://uri.interlex.org/tgbugs/uris/readable/Coordinate> ;
            sh:description "The planned trajectory for electrode implantation" ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 7 ;
            sh:path <https://w3id.org/tvbo/dbs/trajectory> ] ;
    sh:targetClass <https://w3id.org/tvbo/dbs/Electrode> .

<https://w3id.org/tvbo/study/Session> a sh:NodeShape ;
    rdfs:comment "A data collection session for a subject. Corresponds to a BIDS 'ses-' entity. Sessions capture longitudinal timepoints (baseline, follow-up), different experimental conditions, or repeated measures." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "Experimental condition label (e.g., 'rest', 'task-nback'). Maps to BIDS 'task-' entity." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path <https://w3id.org/tvbo/study/condition> ],
        [ sh:datatype xsd:string ;
            sh:description "BIDS session identifier (without 'ses-' prefix). Examples: 'baseline', '6month', 'pre', 'post'." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path dcterms:identifier ],
        [ sh:datatype xsd:string ;
            sh:description "Human-readable session label." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:string ;
            sh:description "Path to session-specific connectome. Overrides Subject.network when set. Relative to dataset root or BIDS derivatives." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path <https://w3id.org/tvbo/study/network> ],
        [ sh:datatype xsd:string ;
            sh:description "Paths to empirical recordings for this session (e.g., BOLD time series, MEG/EEG). Relative to dataset root." ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path <https://w3id.org/tvbo/study/empirical_data> ] ;
    sh:targetClass <https://w3id.org/tvbo/study/Session> .

<http://uri.interlex.org/tgbugs/uris/readable/atlas/Region> a sh:NodeShape ;
    rdfs:comment "A schema for representing a parcellation entity, which is an anatomical location or study target." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:integer ;
            sh:description "Add the original label of this entity as defined in the parcellation terminology." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 8 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/originalLookupLabel> ],
        [ sh:datatype xsd:string ;
            sh:description "Add the related anatomical entity as defined by the UBERON ontology." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/relatedUBERONTerm> ],
        [ sh:class <http://uri.interlex.org/tgbugs/uris/readable/atlas/Region> ;
            sh:description "Add all anatomical parent structures for this entity as defined within the corresponding brain atlas." ;
            sh:nodeKind sh:IRI ;
            sh:order 3 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/atlas/hasParent> ],
        [ sh:datatype xsd:string ;
            sh:description "Add the color code used for visual representation of this entity." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 11 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/color> ],
        [ sh:datatype xsd:string ;
            sh:description "Enter any alternate names, including abbreviations, for this entity." ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/atlas/hasName> ],
        [ sh:description "Add the hemisphere of this entity." ;
            sh:in ( "left" "right" "both" ) ;
            sh:maxCount 1 ;
            sh:order 9 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/hemisphere> ],
        [ sh:datatype xsd:string ;
            sh:description "Enter the internationalized resource identifier (IRI) to the related ontological terms." ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/atlas/hasIlxId> ],
        [ sh:datatype xsd:integer ;
            sh:description "Enter the label used for looking up this entity in the parcellation terminology." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/atlas/lookupLabel> ],
        [ sh:datatype xsd:string ;
            sh:description "Enter the version identifier of this brain atlas or coordinate space version." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path dcterms:hasVersion ],
        [ sh:class <http://uri.interlex.org/tgbugs/uris/readable/Coordinate> ;
            sh:description "Add the center coordinate of this entity." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 10 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/center> ],
        [ sh:datatype xsd:string ;
            sh:description "Slot for the abbreviation of a resource." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path skos:notation ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path schema1:name ] ;
    sh:targetClass <http://uri.interlex.org/tgbugs/uris/readable/atlas/Region> .

tvbo:Aggregation a sh:NodeShape ;
    rdfs:comment "Specifies how to aggregate values across a dimension. Used for loss functions to define per-element loss with reduction." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:defaultValue "mean" ;
            sh:description "Aggregation operation (mean, sum, max, min, none)" ;
            sh:in ( "mean" "sum" "max" "min" "none" ) ;
            sh:maxCount 1 ;
            sh:order 1 ;
            sh:path tvbo:type ],
        [ sh:description "Dimension to aggregate over (e.g., node, time, state)" ;
            sh:in ( "time" "state" "node" "region" "mode" "sample" "batch" "frequency" ) ;
            sh:maxCount 1 ;
            sh:order 0 ;
            sh:path tvbo:over ] ;
    sh:targetClass tvbo:Aggregation .

tvbo:ClassReference a sh:NodeShape ;
    rdfs:comment "Reference to a class that can be instantiated and called. Used for external library classes (e.g., tvboptim.Bold, custom monitors). The class is instantiated with constructor_args, then called with call_args. Generalizable pattern: works for tvboptim, TVB, or any Python class." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:class tvbo:Argument ;
            sh:description "Arguments passed to __init__ when instantiating the class. Example: period=1000.0, downsample_period=4.0 for Bold monitor." ;
            sh:nodeKind sh:IRI ;
            sh:order 0 ;
            sh:path tvbo:constructor_args ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path schema1:name ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path dcterms:description ],
        [ sh:class tvbo:Argument ;
            sh:description "Arguments passed when calling the instance (__call__). Usually the input data from simulation result. Example: result (simulation output array)." ;
            sh:nodeKind sh:IRI ;
            sh:order 1 ;
            sh:path tvbo:call_args ],
        [ sh:datatype xsd:string ;
            sh:description "Reference to transient simulation result for history initialization. Some monitors (e.g., Bold) require history from warmup simulation. Value should reference a simulation result name (e.g., 'result_init')." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path tvbo:warmup_source ],
        [ sh:class <https://w3id.org/tvbo/software/SoftwareRequirement> ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 6 ;
            sh:path tvbo:software ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path tvbo:module ] ;
    sh:targetClass tvbo:ClassReference .

tvbo:Matrix a sh:NodeShape ;
    rdfs:comment "Adjacency matrix of a network." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:class tvbo:BrainRegionSeries ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 4 ;
            sh:path tvbo:y ],
        [ sh:datatype xsd:integer ;
            sh:description "Matrix dimensions [N, M]" ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path tvbo:shape ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:class tvbo:BrainRegionSeries ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 3 ;
            sh:path tvbo:x ],
        [ sh:datatype xsd:string ;
            sh:defaultValue "float32"^^xsd:string ;
            sh:description "Data type for matrix values" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 8 ;
            sh:path tvbo:dtype ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path rdfs:label ],
        [ sh:description "Storage format in binary companion (dense, csr, coo)" ;
            sh:in ( "dense" "csr" "coo" ) ;
            sh:maxCount 1 ;
            sh:order 6 ;
            sh:path tvbo:format ],
        [ sh:datatype xsd:string ;
            sh:description "Add the location of the data file containing the parcellation terminology." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/dataLocation> ],
        [ sh:datatype xsd:float ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path tvbo:values ] ;
    sh:targetClass tvbo:Matrix .

tvbo:Mesh a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "Add the location of the data file containing the parcellation terminology." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/dataLocation> ],
        [ sh:in ( "triangle" "quad" "tetrahedron" "hexahedron" ) ;
            sh:maxCount 1 ;
            sh:order 3 ;
            sh:path tvbo:element_type ],
        [ sh:datatype xsd:string ;
            sh:description "Path to external mesh file (GIFTI, VTK, MSH, FreeSurfer, etc.)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path tvbo:mesh_file ],
        [ sh:datatype xsd:string ;
            sh:description "Explicit format override (gifti, freesurfer, meshio, vtk, gmsh). Auto-detected from extension if null." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 8 ;
            sh:path tvbo:mesh_format ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:class <http://uri.interlex.org/tgbugs/uris/readable/Coordinate> ;
            sh:description "Node coordinates (x,y,z) in the given coordinate space." ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 4 ;
            sh:path tvbo:coordinates ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:integer ;
            sh:description "Number of vertices in the mesh." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 9 ;
            sh:path tvbo:number_of_vertices ],
        [ sh:datatype xsd:integer ;
            sh:description "Number of elements (triangles, quads, tetrahedra, etc.)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 10 ;
            sh:path tvbo:number_of_elements ],
        [ sh:class <http://uri.interlex.org/tgbugs/uris/readable/atlas/Transformation> ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 6 ;
            sh:path tvbo:coordinate_space ],
        [ sh:datatype xsd:string ;
            sh:description "Connectivity (indices) or file reference to topology." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path tvbo:elements ] ;
    sh:targetClass tvbo:Mesh .

tvbo:Network a sh:NodeShape ;
    rdfs:comment "Network specification with nodes, edges, and reusable coupling configurations. Supports both explicit node/edge representation and matrix-based connectivity (Connectome compatibility)." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "Path to BEP017-compliant BIDS directory for loading connectivity matrices" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 14 ;
            sh:path tvbo:bids_dir ],
        [ sh:class tvbo:File ;
            sh:nodeKind sh:IRI ;
            sh:order 23 ;
            sh:path tvbo:edge_matrix_files ],
        [ sh:datatype xsd:string ;
            sh:description "BEP017 measure names for observational targets (e.g., BoldCorrelation)" ;
            sh:nodeKind sh:Literal ;
            sh:order 17 ;
            sh:path tvbo:observational_measures ],
        [ sh:class <http://uri.interlex.org/tgbugs/uris/readable/atlas/Transformation> ;
            sh:description "Coordinate space for node positions (e.g., MNI152NLin2009c). Mirrors BrainAtlas.coordinateSpace so network node positions are unambiguous." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 8 ;
            sh:path tvbo:coordinate_space ],
        [ sh:class tvbo:Function ;
            sh:description "Ordered list of transforms applied to edge property matrices. Each Function's name identifies the target edge property (e.g. 'weight', 'length'). Supports equation-based (symbolic) or callable-based (software) transforms. Multiple transforms on the same target are applied sequentially." ;
            sh:nodeKind sh:IRI ;
            sh:order 11 ;
            sh:path tvbo:transforms ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:class tvbo:Parcellation ;
            sh:description "Brain parcellation/atlas reference" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 9 ;
            sh:path tvbo:parcellation ],
        [ sh:datatype xsd:string ;
            sh:description "Short alphanumeric identifier for the BIDS desc- filename entity (e.g., SC, FC, EC, SCFC). Classifies the connectivity modality of the network's edge measures." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 13 ;
            sh:path tvbo:descriptor ],
        [ sh:defaultValue "mm" ;
            sh:description "Unit for distances/lengths in the network" ;
            sh:in ( qudt:SEC qudt:MilliSEC qudt:MicroSEC qudt:PER-SEC qudt:PER-MilliSEC qudt:HZ qudt:KiloHZ qudt:V qudt:MilliV qudt:PER-MilliV qudt:MilliV-PER-MilliSEC qudt:MilliV-PER-SEC qudt:A qudt:NanoA qudt:PicoA "uA_per_cm2" qudt:PicoFARAD qudt:NanoFARAD "uF_per_cm2" qudt:NanoS qudt:MicroS qudt:PicoS "S_per_cm2" "mS_per_cm2" "S_per_m2" "nS_per_mV" qudt:PER-NanoC qudt:PER-PicoC qudt:MOL-PER-M3 "mol_per_cm3" qudt:MilliMOL-PER-M3 "mol_per_m_per_A_per_s" qudt:MicroM3 qudt:M qudt:MilliM qudt:CentiM qudt:M-PER-SEC qudt:MilliM-PER-MilliSEC "Hz_per_nA" qudt:S-PER-M qudt:H-PER-M qudt:OHM "Mohm" "kohm_cm" qudt:DEG_C "rad_per_ms" qudt:UNITLESS qudt:PERCENT "arbitrary_unit" qudt:KiloGM "kg_per_s" qudt:M-PER-SEC2 qudt:N-PER-M qudt:RAD qudt:RAD-PER-SEC qudt:SEC2 "per_unit" ) ;
            sh:maxCount 1 ;
            sh:order 21 ;
            sh:path tvbo:distance_unit ],
        [ sh:datatype xsd:string ;
            sh:description "Path/URI to parent (coarser) Network. When set, this network is a refinement where each node maps to exactly one parent node via node_mapping." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 19 ;
            sh:path tvbo:parent_network ],
        [ sh:datatype xsd:string ;
            sh:description "BEP017 measure names for structural connectivity (e.g., streamlineCount, tractLength)" ;
            sh:nodeKind sh:Literal ;
            sh:order 16 ;
            sh:path tvbo:structural_measures ],
        [ sh:class tvbo:Edge ;
            sh:description "List of directed edges with coupling references (optional, for explicit edge definition)" ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 4 ;
            sh:path tvbo:edges ],
        [ sh:class prov:Entity ;
            sh:description "W3C PROV-O aligned provenance" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 18 ;
            sh:path tvbo:provenance ],
        [ sh:defaultValue "ms" ;
            sh:description "Default time unit for the network" ;
            sh:in ( qudt:SEC qudt:MilliSEC qudt:MicroSEC qudt:PER-SEC qudt:PER-MilliSEC qudt:HZ qudt:KiloHZ qudt:V qudt:MilliV qudt:PER-MilliV qudt:MilliV-PER-MilliSEC qudt:MilliV-PER-SEC qudt:A qudt:NanoA qudt:PicoA "uA_per_cm2" qudt:PicoFARAD qudt:NanoFARAD "uF_per_cm2" qudt:NanoS qudt:MicroS qudt:PicoS "S_per_cm2" "mS_per_cm2" "S_per_m2" "nS_per_mV" qudt:PER-NanoC qudt:PER-PicoC qudt:MOL-PER-M3 "mol_per_cm3" qudt:MilliMOL-PER-M3 "mol_per_m_per_A_per_s" qudt:MicroM3 qudt:M qudt:MilliM qudt:CentiM qudt:M-PER-SEC qudt:MilliM-PER-MilliSEC "Hz_per_nA" qudt:S-PER-M qudt:H-PER-M qudt:OHM "Mohm" "kohm_cm" qudt:DEG_C "rad_per_ms" qudt:UNITLESS qudt:PERCENT "arbitrary_unit" qudt:KiloGM "kg_per_s" qudt:M-PER-SEC2 qudt:N-PER-M qudt:RAD qudt:RAD-PER-SEC qudt:SEC2 "per_unit" ) ;
            sh:maxCount 1 ;
            sh:order 22 ;
            sh:path tvbo:time_unit ],
        [ sh:class tvbo:Parameter ;
            sh:nodeKind sh:IRI ;
            sh:order 2 ;
            sh:path tvbo:parameters ],
        [ sh:class tvbo:Dynamics ;
            sh:description "Dictionary of dynamics models keyed by name. Nodes reference these by name. For heterogeneous networks with per-node dynamics." ;
            sh:nodeKind sh:IRI ;
            sh:order 6 ;
            sh:path tvbo:dynamics ],
        [ sh:class tvbo:Node ;
            sh:description "List of nodes with individual dynamics (optional, for heterogeneous networks)" ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 3 ;
            sh:path tvbo:nodes ],
        [ sh:class tvbo:Coupling ;
            sh:description "Reusable coupling configurations referenced by edges (e.g., 'instant', 'delayed', 'inhibitory')" ;
            sh:nodeKind sh:IRI ;
            sh:order 5 ;
            sh:path tvbo:coupling ],
        [ sh:datatype xsd:integer ;
            sh:defaultValue 1 ;
            sh:description "Number of nodes in the network (derived from nodes if not set)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path tvbo:number_of_nodes ],
        [ sh:datatype xsd:string ;
            sh:description "Path to companion data file. Supported extensions: .h5 (HDF5), .zarr/ (Zarr), .csv (legacy single-matrix). Null if no companion data needed." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 12 ;
            sh:path tvbo:data_file ],
        [ sh:class tvbo:Tractogram ;
            sh:description "Reference to tractography data" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 10 ;
            sh:path tvbo:tractogram ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:string ;
            sh:description "HDF5 dataset path for node-to-parent mapping. Int32 array of shape (N,) where entry i is the parent node ID. Required when parent_network is set." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 20 ;
            sh:path tvbo:node_mapping ],
        [ sh:class tvbo:BidsEntities ;
            sh:description "BIDS filename entities for this dataset" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 15 ;
            sh:path tvbo:bids ],
        [ sh:class tvbo:GraphGenerator ;
            sh:description """Graph generator specification.  When set, overrides explicit edges/nodes for graph construction.  The type field is a free string; StandardGraphType lists well-known types that get automatic code generation across backends.
""" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 24 ;
            sh:path tvbo:graph_generator ] ;
    sh:targetClass tvbo:Network .

tvbo:Noise a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:class tvbo:Equation ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 1 ;
            sh:path tvbo:Equation ],
        [ sh:class tvbo:Parameter ;
            sh:description "Optional scalar or vector intensity parameter for noise." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 8 ;
            sh:path tvbo:intensity ],
        [ sh:datatype xsd:boolean ;
            sh:description "Indicates whether the noise is Gaussian" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path tvbo:gaussian ],
        [ sh:class tvbo:StateVariable ;
            sh:description "State variables this noise applies to; if omitted, applies globally." ;
            sh:nodeKind sh:IRI ;
            sh:order 11 ;
            sh:path tvbo:targets ],
        [ sh:datatype xsd:boolean ;
            sh:defaultValue true ;
            sh:description "Indicates whether the noise is additive" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path tvbo:additive ],
        [ sh:datatype xsd:string ;
            sh:defaultValue "gaussian"^^xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path tvbo:noise_type ],
        [ sh:class tvbo:RandomStream ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 7 ;
            sh:path tvbo:random_state ],
        [ sh:datatype xsd:integer ;
            sh:defaultValue 42 ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path tvbo:seed ],
        [ sh:class tvbo:Parameter ;
            sh:nodeKind sh:IRI ;
            sh:order 0 ;
            sh:path tvbo:parameters ],
        [ sh:class tvbo:Function ;
            sh:description "Optional functional form of the noise (callable specification)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 9 ;
            sh:path tvbo:function ],
        [ sh:datatype xsd:boolean ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path tvbo:correlated ],
        [ sh:datatype xsd:string ;
            sh:description "Inline Python code representation of the noise process." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 10 ;
            sh:path tvbo:pycode ] ;
    sh:targetClass tvbo:Noise .

tvbo:OptimizationStage a sh:NodeShape ;
    rdfs:comment "A single stage in a multi-stage optimization workflow. Stages run sequentially, with each stage potentially using different parameters, shapes, learning rates, and algorithms." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type tvbo:integration tvbo:execution tvbo:stages tvbo:loss tvbo:depends_on ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:defaultValue "adam"^^xsd:string ;
            sh:description "Optimizer for this stage: 'adam', 'adamw', 'sgd', etc." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path tvbo:algorithm ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:float ;
            sh:defaultValue "0.001"^^xsd:float ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path tvbo:learning_rate ],
        [ sh:class tvbo:OptimizationStage ;
            sh:description "Previous stage to initialize from. Final values from that stage become initial values for this stage." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 9 ;
            sh:path tvbo:warmup_from ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ],
        [ sh:class tvbo:Parameter ;
            sh:description "Stage-specific hyperparameters (e.g., b2=0.9999 for adam)" ;
            sh:nodeKind sh:IRI ;
            sh:order 7 ;
            sh:path tvbo:hyperparameters ],
        [ sh:class tvbo:FreeParameter ;
            sh:description "Parameters to optimize in this stage. Each entry is a FreeParameter that references an existing Parameter by dotted scope (e.g. \"ReducedWongWang.w\" or \"FastLinearCoupling.G\") and supplies optimization-specific metadata (heterogeneous, shape, bounds). No new Parameter is created here." ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 3 ;
            sh:path tvbo:free_parameters ],
        [ sh:datatype xsd:integer ;
            sh:defaultValue 100 ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path tvbo:max_iterations ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path rdfs:label ],
        [ sh:class tvbo:Parameter ;
            sh:description "Parameters from previous stages to freeze (keep at optimized value but not update)" ;
            sh:nodeKind sh:IRI ;
            sh:order 8 ;
            sh:path tvbo:freeze_parameters ] ;
    sh:targetClass tvbo:OptimizationStage .

tvbo:Option a sh:NodeShape ;
    rdfs:comment "A toolkit-specific key-value option (string name + string value). Used for backend settings that are not universal numeric parameters (e.g., solver name, tangent method, jacobian type)." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "Option name (key)." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ],
        [ sh:datatype xsd:string ;
            sh:description "Option value." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path tvbo:value ] ;
    sh:targetClass tvbo:Option .

tvbo:Solver a sh:NodeShape ;
    rdfs:comment "Lightweight specification of a numerical ODE solver / integrator. Covers adaptive solvers (Vern9, Rodas5, Tsit5, etc.) used in shooting methods, initial-state integration, and other contexts where only the algorithm and tolerances matter." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type tvbo:transient_time tvbo:state_wise_sigma tvbo:parameters dcterms:description tvbo:delayed tvbo:noise tvbo:time_scale tvbo:steps tvbo:step_size tvbo:scipy_ode_base tvbo:number_of_stages tvbo:intermediate_expressions qudt:unit tvbo:duration tvbo:update_expression ) ;
    sh:property [ sh:datatype xsd:float ;
            sh:defaultValue "1e-10"^^xsd:float ;
            sh:description "Absolute tolerance for adaptive solvers." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path tvbo:abs_tol ],
        [ sh:datatype xsd:float ;
            sh:defaultValue "1e-10"^^xsd:float ;
            sh:description "Relative tolerance for adaptive solvers." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path tvbo:rel_tol ],
        [ sh:datatype xsd:string ;
            sh:defaultValue "Tsit5"^^xsd:string ;
            sh:description "Solver algorithm name (e.g., Vern9, Rodas5, Tsit5, euler, heun, rk4)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path tvbo:method ] ;
    sh:targetClass tvbo:Solver .

<https://w3id.org/tvbo/dbs/ClinicalScore> a sh:NodeShape ;
    rdfs:comment "Metadata about a clinical score or scale." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path skos:notation ],
        [ sh:class <https://w3id.org/tvbo/dbs/ClinicalScore> ;
            sh:description "If this score is a subscore of a broader composite" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 6 ;
            sh:path <https://w3id.org/tvbo/dbs/parent_score> ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:string ;
            sh:description "Domain assessed (e.g. motor, mood, pain)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path <https://w3id.org/tvbo/dbs/domain> ],
        [ sh:class <https://w3id.org/tvbo/dbs/ClinicalScale> ;
            sh:description "The scale this score belongs to, if applicable" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 5 ;
            sh:path <https://w3id.org/tvbo/dbs/scale> ],
        [ sh:datatype xsd:string ;
            sh:description "PubMed ID, DOI, or other reference to the score definition" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path dcterms:references ],
        [ sh:datatype xsd:string ;
            sh:description "Full name of the score (e.g., Unified Parkinson's Disease Rating Scale - Part III)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path schema1:name ] ;
    sh:targetClass <https://w3id.org/tvbo/dbs/ClinicalScore> .

tvbo:Algorithm a sh:NodeShape ;
    rdfs:comment "A complete specification of an iterative parameter tuning algorithm. Combines update rules, objectives, observations, and hyperparameters." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:class tvbo:TuningObjective ;
            sh:description "What the algorithm optimizes for" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 5 ;
            sh:path tvbo:objective ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:string ;
            sh:description "Algorithm type: 'fic', 'eib', 'homeostatic', 'custom'" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path tvbo:type ],
        [ sh:datatype xsd:string ;
            sh:description "Learning rate schedule: 'constant', 'linear', 'exponential'" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 12 ;
            sh:path tvbo:learning_rate_schedule ],
        [ sh:datatype xsd:float ;
            sh:description "Learning rate (eta) for the tuning algorithm" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 9 ;
            sh:path tvbo:learning_rate ],
        [ sh:datatype xsd:integer ;
            sh:description "Number of iterations to run" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 11 ;
            sh:path tvbo:n_iterations ],
        [ sh:datatype xsd:float ;
            sh:description "Duration of each simulation step (e.g., one BOLD TR)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 13 ;
            sh:path tvbo:simulation_period ],
        [ sh:class tvbo:ExecutionConfig ;
            sh:description "Per-algorithm execution configuration (overrides experiment-level defaults). Useful for setting random_seed per algorithm to ensure reproducibility." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 2 ;
            sh:path tvbo:execution ],
        [ sh:datatype xsd:integer ;
            sh:defaultValue 1 ;
            sh:description "Apply update every N iterations" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 14 ;
            sh:path tvbo:apply_every ],
        [ sh:class tvbo:FunctionCall ;
            sh:description "Function calls for tracking progress, computing metrics, etc. Each FunctionCall references a function from the experiment's functions section and specifies arguments for that specific algorithm context." ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 15 ;
            sh:path tvbo:functions ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ],
        [ sh:class tvbo:Parameter ;
            sh:description "Additional algorithm-specific parameters" ;
            sh:nodeKind sh:IRI ;
            sh:order 8 ;
            sh:path tvbo:hyperparameters ],
        [ sh:class tvbo:AlgorithmInclude ;
            sh:description "Include update rules from other algorithms with optional argument overrides. Unlike depends_on (sequential), includes means combined execution. Example: includes: [{algorithm: fic, arguments: [{name: eta, value: 0.1}]}]" ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 4 ;
            sh:path tvbo:includes ],
        [ sh:datatype xsd:boolean ;
            sh:description "Linear warmup of learning rate from 0 to learning_rate over n_iterations. eta_effective = eta * (i+1) / n_iterations" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 10 ;
            sh:path tvbo:learning_rate_warmup ],
        [ sh:class tvbo:Algorithm ;
            sh:description "Other algorithms that must run first (e.g., EIB depends on FIC)" ;
            sh:nodeKind sh:IRI ;
            sh:order 16 ;
            sh:path tvbo:depends_on ],
        [ sh:class tvbo:Observation ;
            sh:description "References to observations defined in the observations section. Includes both simulated observations and external data (via data_source)." ;
            sh:nodeKind sh:IRI ;
            sh:order 6 ;
            sh:path tvbo:observations ],
        [ sh:class tvbo:UpdateRule ;
            sh:description "How parameters are updated each iteration. When using 'includes', update_rules are inherited from included algorithms." ;
            sh:nodeKind sh:IRI ;
            sh:order 7 ;
            sh:path tvbo:update_rules ] ;
    sh:targetClass tvbo:Algorithm .

tvbo:Callable a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type tvbo:call_args tvbo:constructor_args tvbo:warmup_source ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path tvbo:module ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:class <https://w3id.org/tvbo/software/SoftwareRequirement> ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 3 ;
            sh:path tvbo:software ] ;
    sh:targetClass tvbo:Callable .

tvbo:Coupling a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:class tvbo:Network ;
            sh:description "For hierarchical coupling: region-to-region connectivity with weights and delays" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 17 ;
            sh:path tvbo:regional_connectivity ],
        [ sh:class tvbo:DerivedVariable ;
            sh:description "Observable functions computed from edge inputs and parameters after simulation. Maps to obsf/obssym in ND.jl EdgeModel. Example: absolute force magnitude computed from force components." ;
            sh:nodeKind sh:IRI ;
            sh:order 14 ;
            sh:path tvbo:observed ],
        [ sh:datatype xsd:boolean ;
            sh:defaultValue true ;
            sh:description "Whether coupling includes transmission delays" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 11 ;
            sh:path tvbo:delayed ],
        [ sh:datatype xsd:string ;
            sh:description "Output symbol names for the edge model. E.g. ['P'] for a scalar power flow, ['Fx', 'Fy'] for 2D forces. Maps directly to outsym in ND.jl EdgeModel. If not specified, derived from coupling variables of the connected vertex dynamics." ;
            sh:nodeKind sh:Literal ;
            sh:order 13 ;
            sh:path tvbo:outsym ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:boolean ;
            sh:description "Whether the coupling uses sparse representations" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path tvbo:sparse ],
        [ sh:class tvbo:Equation ;
            sh:description "Pre-processing expression applied before coupling" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 7 ;
            sh:path tvbo:pre_expression ],
        [ sh:class tvbo:Parameter ;
            sh:nodeKind sh:IRI ;
            sh:order 3 ;
            sh:path tvbo:parameters ],
        [ sh:description "Optional stable IRI (or compact URI) for this entity in an external ontology or knowledge base. Used to load metadata from an external source; not required when the entity is fully self-contained (equations, parameters, etc. defined in the file itself)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 2 ;
            sh:path dcterms:identifier ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:string ;
            sh:defaultValue "directed"^^xsd:string ;
            sh:description "Edge symmetry type for NetworkDynamics.jl EdgeModel: 'directed' (default), 'antisymmetric', or 'symmetric'. AntiSymmetric edges flip sign for the reverse direction." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 12 ;
            sh:path tvbo:symmetry ],
        [ sh:class tvbo:Equation ;
            sh:description "Mathematical function defining the coupling" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 5 ;
            sh:path tvbo:coupling_function ],
        [ sh:datatype xsd:string ;
            sh:defaultValue "Linear"^^xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ],
        [ sh:description "For hierarchical coupling: aggregation method ('sum', 'mean', 'max') or custom Function" ;
            sh:maxCount 1 ;
            sh:or ( [ sh:datatype xsd:string ;
                        sh:nodeKind sh:Literal ] [ sh:class tvbo:Function ] ) ;
            sh:order 18 ;
            sh:path tvbo:aggregation ],
        [ sh:class tvbo:RegionMapping ;
            sh:description "For hierarchical coupling: vertex-to-region mapping for aggregation" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 16 ;
            sh:path tvbo:region_mapping ],
        [ sh:class tvbo:Coupling ;
            sh:description "For hierarchical coupling: inner coupling applied at regional level" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 15 ;
            sh:path tvbo:inner_coupling ],
        [ sh:class tvbo:Equation ;
            sh:description "Post-processing expression applied after coupling" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 8 ;
            sh:path tvbo:post_expression ],
        [ sh:class tvbo:StateVariable ;
            sh:description "References to state variables from connected (source) nodes. Auto-populated from state_variables with coupling_variable=true when omitted. Used by name in pre_expression." ;
            sh:nodeKind sh:IRI ;
            sh:order 9 ;
            sh:path tvbo:incoming_states ],
        [ sh:class tvbo:StateVariable ;
            sh:description "References to state variables from the local (target) node. Used by name in pre_expression." ;
            sh:nodeKind sh:IRI ;
            sh:order 10 ;
            sh:path tvbo:local_states ],
        [ sh:description "For hierarchical coupling: distribution method ('broadcast', 'weighted') or custom Function" ;
            sh:maxCount 1 ;
            sh:or ( [ sh:datatype xsd:string ;
                        sh:nodeKind sh:Literal ] [ sh:class tvbo:Function ] ) ;
            sh:order 19 ;
            sh:path tvbo:distribution ] ;
    sh:targetClass tvbo:Coupling .

tvbo:Distribution a sh:NodeShape ;
    rdfs:comment "A probability distribution for sampling parameters or initial conditions. Standard distributions (Uniform, Gaussian) are specified by name and domain/parameters. Custom distributions use a Function for the PDF/sampling rule. Default name is Uniform when only domain is given." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:class tvbo:Parameter ;
            sh:nodeKind sh:IRI ;
            sh:order 1 ;
            sh:path tvbo:parameters ],
        [ sh:class tvbo:Function ;
            sh:description "Custom distribution function (PDF or sampling callable). Only needed for non-standard distributions." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 3 ;
            sh:path tvbo:function ],
        [ sh:defaultValue "space" ;
            sh:description "Dimension along which the distribution is sampled. 'space' = per-node (default), 'time' = per-timestep (stochastic input)." ;
            sh:in ( "space" "time" ) ;
            sh:maxCount 1 ;
            sh:order 5 ;
            sh:path tvbo:axis ],
        [ sh:class tvbo:Matrix ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 6 ;
            sh:path tvbo:correlation ],
        [ sh:datatype xsd:integer ;
            sh:description "Random seed for reproducible sampling." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path tvbo:seed ],
        [ sh:class tvbo:Range ;
            sh:description "Support of the distribution (sampling bounds). For Uniform this fully defines the distribution." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 2 ;
            sh:path tvbo:domain ],
        [ sh:datatype xsd:string ;
            sh:defaultValue "Uniform"^^xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ] ;
    sh:targetClass tvbo:Distribution .

tvbo:Event a sh:NodeShape ;
    rdfs:comment "A discrete or continuous event that modifies the system during simulation. Generalizes Stimulus: can represent external inputs (stimulus type), threshold-triggered state changes (continuous/discrete type), or time-scheduled interventions (preset_time type). Attaches to components (nodes/edges) or to the experiment level." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:string ;
            sh:description "Component to attach this event to. Can be a node label, edge label, or 'all_edges'/'all_vertices' for broadcast. If not specified, event is experiment-level." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 13 ;
            sh:path tvbo:target_component ],
        [ sh:datatype xsd:string ;
            sh:description "State variable symbols modifiable in the affect function." ;
            sh:nodeKind sh:Literal ;
            sh:order 9 ;
            sh:path tvbo:affect_states ],
        [ sh:class tvbo:Equation ;
            sh:description "Stimulus equation for stimulus-type events. Legacy compatibility with Stimulus class." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 14 ;
            sh:path tvbo:equation ],
        [ sh:class tvbo:Equation ;
            sh:description "Condition function. For continuous events: triggers when expression crosses zero. For discrete events: triggers when expression evaluates to true. Not used for preset_time or stimulus types." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 5 ;
            sh:path tvbo:condition ],
        [ sh:datatype xsd:float ;
            sh:description "Duration of stimulus-type events." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 17 ;
            sh:path tvbo:duration ],
        [ sh:datatype xsd:string ;
            sh:description "Parameter symbols accessible in the condition function." ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path tvbo:condition_parameters ],
        [ sh:class tvbo:Parameter ;
            sh:nodeKind sh:IRI ;
            sh:order 3 ;
            sh:path tvbo:parameters ],
        [ sh:datatype xsd:integer ;
            sh:description "Target regions for stimulus-type events." ;
            sh:nodeKind sh:Literal ;
            sh:order 15 ;
            sh:path tvbo:regions ],
        [ sh:defaultValue "stimulus" ;
            sh:description "Type of event trigger mechanism." ;
            sh:in ( "continuous" "discrete" "preset_time" "stimulus" ) ;
            sh:maxCount 1 ;
            sh:order 4 ;
            sh:path tvbo:event_type ],
        [ sh:class tvbo:Equation ;
            sh:description "Affect function: what happens when the event triggers. Can modify state variables and/or parameters. For stimulus type, this is the stimulus equation." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 8 ;
            sh:path tvbo:affect ],
        [ sh:datatype xsd:string ;
            sh:description "Parameter symbols modifiable in the affect function." ;
            sh:nodeKind sh:Literal ;
            sh:order 10 ;
            sh:path tvbo:affect_parameters ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ],
        [ sh:datatype xsd:string ;
            sh:description "State variable symbols accessible in the condition function. For edges, can include source/destination vertex outputs." ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path tvbo:condition_states ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path dcterms:description ],
        [ sh:class tvbo:Equation ;
            sh:description "Affect on downcrossing (continuous events only). If not specified, uses the same affect for both crossings." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 11 ;
            sh:path tvbo:affect_negative ],
        [ sh:datatype xsd:float ;
            sh:description "Predetermined trigger times for preset_time events. The solver will step exactly to these times." ;
            sh:nodeKind sh:Literal ;
            sh:order 12 ;
            sh:path tvbo:trigger_times ],
        [ sh:datatype xsd:float ;
            sh:description "Per-region weighting for stimulus-type events." ;
            sh:nodeKind sh:Literal ;
            sh:order 16 ;
            sh:path tvbo:weighting ] ;
    sh:targetClass tvbo:Event .

tvbo:Argument a sh:NodeShape ;
    rdfs:comment "A function argument with explicit value specification. Value can be: literal (number/string), reference to input (input.key), or cross-observation reference (observation_name.output_key)." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path tvbo:unit ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ],
        [ sh:description "Argument value. Can be: - Literal: 1.0, \"string\", boolean, etc. - Input reference: \"input.frequencies\" (from source_observation outputs) - Cross-observation: \"target_frequencies.peak_freqs\" (from another observation)" ;
            sh:maxCount 1 ;
            sh:order 2 ;
            sh:path tvbo:value ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ] ;
    sh:targetClass tvbo:Argument .

tvbo:ExecutionConfig a sh:NodeShape ;
    rdfs:comment "Configuration for computational execution (parallelization, precision, hardware)." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:integer ;
            sh:defaultValue 42 ;
            sh:description "Base random seed for reproducibility" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path tvbo:random_seed ],
        [ sh:datatype xsd:integer ;
            sh:defaultValue 1 ;
            sh:description "Number of parallel workers (maps to pmap devices in JAX, processes in multiprocessing)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path tvbo:n_workers ],
        [ sh:datatype xsd:boolean ;
            sh:description "Whether to find a fixed point (steady state) before time integration. Used as initial condition for ODEProblem. Maps to NLsolve.fixpoint! in ND.jl or similar in other backends." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path tvbo:find_fixpoint ],
        [ sh:datatype xsd:string ;
            sh:defaultValue "float64"^^xsd:string ;
            sh:description "Floating point precision: 'float32' or 'float64'" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path tvbo:precision ],
        [ sh:datatype xsd:string ;
            sh:defaultValue "cpu"^^xsd:string ;
            sh:description "Hardware accelerator: 'cpu', 'gpu', 'tpu'" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path tvbo:accelerator ],
        [ sh:datatype xsd:integer ;
            sh:description "Batch size for vectorized operations (None = auto)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path tvbo:batch_size ],
        [ sh:datatype xsd:integer ;
            sh:defaultValue -1 ;
            sh:description "Number of CPU threads per worker (-1 = auto-detect)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path tvbo:n_threads ] ;
    sh:targetClass tvbo:ExecutionConfig .

tvbo:FunctionCall a sh:NodeShape ;
    rdfs:comment "Invocation of a function in a pipeline. Can reference a defined Function by name, OR inline a callable directly for external library functions, OR inline an equation, OR use class_call for class instantiation. Mirrors Function attributes so pipeline steps can be self-contained. The `name` is an optional step label (used in pipelines for keyed access to step outputs); it is NOT a global identifier (singleton uses like `loss`, `observable` may omit it)." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:class tvbo:ClassReference ;
            sh:description "Class instantiation and call (alternative to callable/function). Use for external library classes that need __init__ then __call__. Example: Bold monitor from tvboptim." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 7 ;
            sh:path tvbo:class_call ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path rdfs:label ],
        [ sh:class tvbo:Range ;
            sh:description "Time range for generated TimeSeries (for kernel generators)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 13 ;
            sh:path tvbo:time_range ],
        [ sh:datatype xsd:string ;
            sh:description "Reference to previous function's output in pipeline (by name)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 8 ;
            sh:path tvbo:input ],
        [ sh:datatype xsd:string ;
            sh:description "Name for this step's output (referenced by subsequent functions)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 9 ;
            sh:path tvbo:output ],
        [ sh:description "Dimension to apply function over (generates vmap in code). E.g., 'node' applies per-node." ;
            sh:in ( "time" "state" "node" "region" "mode" "sample" "batch" "frequency" ) ;
            sh:maxCount 1 ;
            sh:order 10 ;
            sh:path tvbo:apply_on_dimension ],
        [ sh:class tvbo:Function ;
            sh:description "Reference to a defined Function (by name)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 5 ;
            sh:path tvbo:function ],
        [ sh:class tvbo:Callable ;
            sh:description "Direct callable specification (alternative to function reference)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 6 ;
            sh:path tvbo:callable ],
        [ sh:class tvbo:Aggregation ;
            sh:description "How to aggregate the result across dimensions. Example: aggregate.over=node, aggregate.type=mean applies function per node, then averages. Used in loss functions." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 11 ;
            sh:path tvbo:aggregate ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 14 ;
            sh:path tvbo:source_code ],
        [ sh:datatype xsd:string ;
            sh:description "Optional step label; used in pipelines to key step outputs." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path schema1:name ],
        [ sh:class tvbo:Argument ;
            sh:nodeKind sh:IRI ;
            sh:order 12 ;
            sh:path tvbo:arguments ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path skos:notation ],
        [ sh:class tvbo:Equation ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 2 ;
            sh:path tvbo:Equation ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path dcterms:description ] ;
    sh:targetClass tvbo:FunctionCall .

tvbo:Observation a sh:NodeShape ;
    rdfs:comment "Unified class for all observation/measurement specifications. Covers monitors (BOLD, EEG), tuning observables, and derived quantities. Pipeline is a sequence of Functions with input -> output flow." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type tvbo:source_observations ) ;
    sh:property [ sh:defaultValue "ms" ;
            sh:description "Time unit for the integration / simulation. Determines the physical time meaning of one model time-step." ;
            sh:in ( qudt:SEC qudt:MilliSEC qudt:MicroSEC qudt:PER-SEC qudt:PER-MilliSEC qudt:HZ qudt:KiloHZ qudt:V qudt:MilliV qudt:PER-MilliV qudt:MilliV-PER-MilliSEC qudt:MilliV-PER-SEC qudt:A qudt:NanoA qudt:PicoA "uA_per_cm2" qudt:PicoFARAD qudt:NanoFARAD "uF_per_cm2" qudt:NanoS qudt:MicroS qudt:PicoS "S_per_cm2" "mS_per_cm2" "S_per_m2" "nS_per_mV" qudt:PER-NanoC qudt:PER-PicoC qudt:MOL-PER-M3 "mol_per_cm3" qudt:MilliMOL-PER-M3 "mol_per_m_per_A_per_s" qudt:MicroM3 qudt:M qudt:MilliM qudt:CentiM qudt:M-PER-SEC qudt:MilliM-PER-MilliSEC "Hz_per_nA" qudt:S-PER-M qudt:H-PER-M qudt:OHM "Mohm" "kohm_cm" qudt:DEG_C "rad_per_ms" qudt:UNITLESS qudt:PERCENT "arbitrary_unit" qudt:KiloGM "kg_per_s" qudt:M-PER-SEC2 qudt:N-PER-M qudt:RAD qudt:RAD-PER-SEC qudt:SEC2 "per_unit" ) ;
            sh:maxCount 1 ;
            sh:order 7 ;
            sh:path tvbo:time_scale ],
        [ sh:class tvbo:Equation ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 4 ;
            sh:path tvbo:Equation ],
        [ sh:datatype xsd:string ;
            sh:description "Reference to transient simulation result for history initialization (e.g., 'result_init')." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 13 ;
            sh:path tvbo:warmup_source ],
        [ sh:description "How to aggregate over time" ;
            sh:in ( "mean" "last" "first" "window" "none" ) ;
            sh:maxCount 1 ;
            sh:order 17 ;
            sh:path tvbo:aggregation ],
        [ sh:class tvbo:ClassReference ;
            sh:description "Direct class reference (alternative to pipeline). Use for external library classes like tvboptim.Bold, custom monitors, or any callable class. The class is instantiated with constructor_args and called with call_args. Example: {name: Bold, module: tvboptim.observations.tvb_monitors.bold, constructor_args: [{name: period, value: 1000.0}]}" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 20 ;
            sh:path tvbo:class_reference ],
        [ sh:description "Type of imaging modality (BOLD, EEG, MEG, etc.)" ;
            sh:in ( "BOLD" "EEG" "MEG" "SEEG" "IEEG" ) ;
            sh:maxCount 1 ;
            sh:order 12 ;
            sh:path tvbo:imaging_modality ],
        [ sh:datatype xsd:float ;
            sh:description "Intermediate downsampling period (ms). For BOLD: typically matches dt." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 10 ;
            sh:path tvbo:downsample_period ],
        [ sh:datatype xsd:float ;
            sh:description "Sampling period for monitors (ms). For BOLD: TR in ms." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 9 ;
            sh:path tvbo:period ],
        [ sh:datatype xsd:integer ;
            sh:description "Number of samples to skip at the start (transient removal). For FC: typically 10-20 TRs." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 15 ;
            sh:path tvbo:skip_t ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path skos:notation ],
        [ sh:datatype xsd:integer ;
            sh:description "Variable of interest index (which state variable to monitor). Default: 0." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 11 ;
            sh:path tvbo:voi ],
        [ sh:class tvbo:StateVariable ;
            sh:description "State variable to observe (e.g., S_e for excitatory activity). For observations derived from other observations, use DerivedObservation." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 8 ;
            sh:path tvbo:source ],
        [ sh:datatype xsd:integer ;
            sh:description "Number of samples for windowed aggregation" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 18 ;
            sh:path tvbo:window_size ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path rdfs:label ],
        [ sh:class tvbo:FunctionCall ;
            sh:description "Ordered sequence of Functions. Each step has a unique `name` (used to key step outputs) and transforms input -> output. List form preserves execution order." ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 19 ;
            sh:path tvbo:pipeline ],
        [ sh:class tvbo:Parameter ;
            sh:nodeKind sh:IRI ;
            sh:order 5 ;
            sh:path tvbo:parameters ],
        [ sh:class <https://w3id.org/tvbo/software/SoftwareEnvironment> ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 6 ;
            sh:path tvbo:environment ],
        [ sh:class tvbo:DataSource ;
            sh:description "Load data from external source (file, database, API). When specified, this observation represents empirical/external data rather than simulated data. Enables unified treatment of all data." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 14 ;
            sh:path tvbo:data_source ],
        [ sh:datatype xsd:integer ;
            sh:description "Number of samples from the end to use. Takes the last N samples before aggregation. E.g., tail_samples: 500 means use data[-500:]." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 16 ;
            sh:path tvbo:tail_samples ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path dcterms:description ] ;
    sh:targetClass tvbo:Observation .

<https://w3id.org/tvbo/software/SoftwareEnvironment> a sh:NodeShape ;
    rdfs:comment "A reproducible software environment aggregating one or more SoftwareRequirement entries. Used by SimulationExperiment to specify the execution context." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "Container image reference (e.g., ghcr.io/org/img:tag@sha256:...)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path <https://w3id.org/tvbo/software/container_image> ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:string ;
            sh:description "OS / architecture (e.g., linux-64, macos-arm64)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path <https://w3id.org/tvbo/software/platform> ],
        [ sh:datatype xsd:string ;
            sh:description "Environment definition version (not a package version)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path <https://w3id.org/tvbo/software/version> ],
        [ sh:description "Category: conda, venv, docker, etc." ;
            sh:in ( "conda" "venv" "docker" "singularity" ) ;
            sh:maxCount 1 ;
            sh:order 6 ;
            sh:path <https://w3id.org/tvbo/software/environment_type> ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path <https://w3id.org/tvbo/software/dataLocation> ],
        [ sh:class <https://w3id.org/tvbo/software/SoftwareRequirement> ;
            sh:description "Constituent software requirements." ;
            sh:nodeKind sh:IRI ;
            sh:order 9 ;
            sh:path <https://w3id.org/tvbo/software/requirements> ],
        [ sh:datatype xsd:string ;
            sh:description "Deterministic hash of the resolved dependency set." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 8 ;
            sh:path <https://w3id.org/tvbo/software/build_hash> ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path dcterms:description ] ;
    sh:targetClass <https://w3id.org/tvbo/software/SoftwareEnvironment> .

tvbo:DerivedVariable a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:description "Physical unit of measurement. Values are drawn from the QUDT ontology (http://qudt.org/vocab/unit/) with UO cross-references where available." ;
            sh:in ( qudt:SEC qudt:MilliSEC qudt:MicroSEC qudt:PER-SEC qudt:PER-MilliSEC qudt:HZ qudt:KiloHZ qudt:V qudt:MilliV qudt:PER-MilliV qudt:MilliV-PER-MilliSEC qudt:MilliV-PER-SEC qudt:A qudt:NanoA qudt:PicoA "uA_per_cm2" qudt:PicoFARAD qudt:NanoFARAD "uF_per_cm2" qudt:NanoS qudt:MicroS qudt:PicoS "S_per_cm2" "mS_per_cm2" "S_per_m2" "nS_per_mV" qudt:PER-NanoC qudt:PER-PicoC qudt:MOL-PER-M3 "mol_per_cm3" qudt:MilliMOL-PER-M3 "mol_per_m_per_A_per_s" qudt:MicroM3 qudt:M qudt:MilliM qudt:CentiM qudt:M-PER-SEC qudt:MilliM-PER-MilliSEC "Hz_per_nA" qudt:S-PER-M qudt:H-PER-M qudt:OHM "Mohm" "kohm_cm" qudt:DEG_C "rad_per_ms" qudt:UNITLESS qudt:PERCENT "arbitrary_unit" qudt:KiloGM "kg_per_s" qudt:M-PER-SEC2 qudt:N-PER-M qudt:RAD qudt:RAD-PER-SEC qudt:SEC2 "per_unit" ) ;
            sh:maxCount 1 ;
            sh:order 5 ;
            sh:path qudt:unit ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path rdfs:label ],
        [ sh:datatype xsd:boolean ;
            sh:description "Whether to include this element in simulation output files. Applicable to state variables (default true), derived variables (default false), and network nodes (default true). Set false to suppress recording." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path tvbo:record ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path tvbo:symbol ],
        [ sh:class tvbo:Case ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 9 ;
            sh:path tvbo:cases ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ],
        [ sh:datatype xsd:boolean ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 8 ;
            sh:path tvbo:conditional ],
        [ sh:class tvbo:Equation ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 4 ;
            sh:path tvbo:Equation ],
        [ sh:description "External ontology IRIs (typically GO, ChEBI, UBERON, CL, MeSH) that this entity is a surrogate / abstraction / model of. Replaces the legacy OWL pattern `tvbo:surrogate_of` by carrying the link inline with the YAML data instance. Multiple IRIs allowed: a single parameter may abstract several biological processes (e.g. a synaptic conductance grounding both GO:0060079 (excitatory PSP) and GO:0007268 (chemical synaptic transmission))." ;
            sh:nodeKind sh:IRI ;
            sh:order 7 ;
            sh:path oboInOwl:hasDbXref ] ;
    sh:targetClass tvbo:DerivedVariable .

<http://uri.interlex.org/tgbugs/uris/readable/Coordinate> a sh:NodeShape ;
    rdfs:comment "A 3D coordinate with X, Y, Z values." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:class <http://uri.interlex.org/tgbugs/uris/readable/atlas/Transformation> ;
            sh:description "Common coordinate space (e.g. FSLMNI152, MNI152NLin2009cAsym). Reference by name; the CommonCoordinateSpace must be defined in tvbo/database/coordinate_spaces/ (or future equivalent location)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 0 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/coordinateSpace> ],
        [ sh:datatype xsd:float ;
            sh:description "X coordinate" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/x> ],
        [ sh:datatype xsd:float ;
            sh:description "Z coordinate" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/z> ],
        [ sh:datatype xsd:float ;
            sh:description "Y coordinate" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/y> ] ;
    sh:targetClass <http://uri.interlex.org/tgbugs/uris/readable/Coordinate> .

tvbo:StateVariable a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type tvbo:boundary_conditions tvbo:mesh ) ;
    sh:property [ sh:class tvbo:Distribution ;
            sh:description "Distribution for sampling initial conditions per node. If present, initial_value is used as fallback/mean." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 19 ;
            sh:path tvbo:distribution ],
        [ sh:datatype xsd:boolean ;
            sh:defaultValue true ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 10 ;
            sh:path tvbo:variable_of_interest ],
        [ sh:datatype xsd:float ;
            sh:defaultValue "0.1"^^xsd:float ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 17 ;
            sh:path tvbo:initial_value ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path skos:definition ],
        [ sh:datatype xsd:boolean ;
            sh:defaultValue true ;
            sh:description "Whether to include this element in simulation output files. Applicable to state variables (default true), derived variables (default false), and network nodes (default true). Set false to suppress recording." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 8 ;
            sh:path tvbo:record ],
        [ sh:datatype xsd:float ;
            sh:description "Initial value for the first time derivative, used when equation_order > 1. For a second-order ODE d²x/dt² = f, this sets dx/dt(0). Required by ModelingToolkit.jl to fully specify higher-order initial value problems." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 18 ;
            sh:path tvbo:derivative_initial_value ],
        [ sh:datatype xsd:boolean ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 15 ;
            sh:path tvbo:stimulation_variable ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path rdfs:label ],
        [ sh:class tvbo:Noise ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 14 ;
            sh:path tvbo:noise ],
        [ sh:class tvbo:Range ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 4 ;
            sh:path tvbo:domain ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path tvbo:symbol ],
        [ sh:datatype xsd:integer ;
            sh:defaultValue 1 ;
            sh:description "Order of the time derivative on the LHS. Default 1 means dx/dt = rhs (first-order ODE). Order 2 means d²x/dt² = rhs (second-order ODE), etc. Higher-order ODEs are automatically lowered to coupled first-order systems by backends like ModelingToolkit.jl via mtkcompile." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 13 ;
            sh:path tvbo:equation_order ],
        [ sh:class tvbo:Equation ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 6 ;
            sh:path tvbo:Equation ],
        [ sh:description "External ontology IRIs (typically GO, ChEBI, UBERON, CL, MeSH) that this entity is a surrogate / abstraction / model of. Replaces the legacy OWL pattern `tvbo:surrogate_of` by carrying the link inline with the YAML data instance. Multiple IRIs allowed: a single parameter may abstract several biological processes (e.g. a synaptic conductance grounding both GO:0060079 (excitatory PSP) and GO:0007268 (chemical synaptic transmission))." ;
            sh:nodeKind sh:IRI ;
            sh:order 9 ;
            sh:path oboInOwl:hasDbXref ],
        [ sh:datatype xsd:boolean ;
            sh:description "Whether this state variable is transmitted to connected nodes through the coupling function. In TVB terms, this determines the cvar indices (state variables extracted from history and fed into the coupling function). The coupling function may override this via its incoming_states attribute." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 11 ;
            sh:path tvbo:coupling_variable ],
        [ sh:class tvbo:TimeSeries ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 20 ;
            sh:path tvbo:history ],
        [ sh:datatype xsd:string ;
            sh:defaultValue "differential"^^xsd:string ;
            sh:description "Type of equation: 'differential' (default) means dx/dt = rhs, 'algebraic' means 0 = rhs or x ~ rhs (DAE constraint). Algebraic equations are used by ModelingToolkit.jl backend." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 12 ;
            sh:path tvbo:equation_type ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path dcterms:description ],
        [ sh:description "Physical unit of measurement. Values are drawn from the QUDT ontology (http://qudt.org/vocab/unit/) with UO cross-references where available." ;
            sh:in ( qudt:SEC qudt:MilliSEC qudt:MicroSEC qudt:PER-SEC qudt:PER-MilliSEC qudt:HZ qudt:KiloHZ qudt:V qudt:MilliV qudt:PER-MilliV qudt:MilliV-PER-MilliSEC qudt:MilliV-PER-SEC qudt:A qudt:NanoA qudt:PicoA "uA_per_cm2" qudt:PicoFARAD qudt:NanoFARAD "uF_per_cm2" qudt:NanoS qudt:MicroS qudt:PicoS "S_per_cm2" "mS_per_cm2" "S_per_m2" "nS_per_mV" qudt:PER-NanoC qudt:PER-PicoC qudt:MOL-PER-M3 "mol_per_cm3" qudt:MilliMOL-PER-M3 "mol_per_m_per_A_per_s" qudt:MicroM3 qudt:M qudt:MilliM qudt:CentiM qudt:M-PER-SEC qudt:MilliM-PER-MilliSEC "Hz_per_nA" qudt:S-PER-M qudt:H-PER-M qudt:OHM "Mohm" "kohm_cm" qudt:DEG_C "rad_per_ms" qudt:UNITLESS qudt:PERCENT "arbitrary_unit" qudt:KiloGM "kg_per_s" qudt:M-PER-SEC2 qudt:N-PER-M qudt:RAD qudt:RAD-PER-SEC qudt:SEC2 "per_unit" ) ;
            sh:maxCount 1 ;
            sh:order 7 ;
            sh:path qudt:unit ],
        [ sh:class tvbo:Range ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 16 ;
            sh:path tvbo:boundaries ] ;
    sh:targetClass tvbo:StateVariable .

<http://uri.interlex.org/tgbugs/uris/readable/atlas/Transformation> a sh:NodeShape ;
    rdfs:comment "A schema for representing a version of a common coordinate space." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "Add the axes orientation in standard anatomical terms (XYZ)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/anatomicalAxesOrientation> ],
        [ sh:datatype xsd:string ;
            sh:description "Enter any alternate names, including abbreviations, for this entity." ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/atlas/hasName> ],
        [ sh:datatype xsd:string ;
            sh:description "Slot for the abbreviation of a resource." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path skos:notation ],
        [ sh:description "Physical unit of measurement. Values are drawn from the QUDT ontology (http://qudt.org/vocab/unit/) with UO cross-references where available." ;
            sh:in ( qudt:SEC qudt:MilliSEC qudt:MicroSEC qudt:PER-SEC qudt:PER-MilliSEC qudt:HZ qudt:KiloHZ qudt:V qudt:MilliV qudt:PER-MilliV qudt:MilliV-PER-MilliSEC qudt:MilliV-PER-SEC qudt:A qudt:NanoA qudt:PicoA "uA_per_cm2" qudt:PicoFARAD qudt:NanoFARAD "uF_per_cm2" qudt:NanoS qudt:MicroS qudt:PicoS "S_per_cm2" "mS_per_cm2" "S_per_m2" "nS_per_mV" qudt:PER-NanoC qudt:PER-PicoC qudt:MOL-PER-M3 "mol_per_cm3" qudt:MilliMOL-PER-M3 "mol_per_m_per_A_per_s" qudt:MicroM3 qudt:M qudt:MilliM qudt:CentiM qudt:M-PER-SEC qudt:MilliM-PER-MilliSEC "Hz_per_nA" qudt:S-PER-M qudt:H-PER-M qudt:OHM "Mohm" "kohm_cm" qudt:DEG_C "rad_per_ms" qudt:UNITLESS qudt:PERCENT "arbitrary_unit" qudt:KiloGM "kg_per_s" qudt:M-PER-SEC2 qudt:N-PER-M qudt:RAD qudt:RAD-PER-SEC qudt:SEC2 "per_unit" ) ;
            sh:maxCount 1 ;
            sh:order 3 ;
            sh:path qudt:unit ],
        [ sh:datatype xsd:string ;
            sh:description "Add the native unit that is used for this common coordinate space version." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/nativeUnit> ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ],
        [ sh:datatype xsd:string ;
            sh:description "Add all image files used as visual representation of this common coordinate space version." ;
            sh:nodeKind sh:Literal ;
            sh:order 8 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/defaultImage> ],
        [ sh:datatype xsd:string ;
            sh:description "Enter the origin (central point where all axes intersect)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/axesOrigin> ],
        [ sh:datatype xsd:string ;
            sh:description "Linked type for the license of the brain atlas or coordinate space version." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path dcterms:license ] ;
    sh:targetClass <http://uri.interlex.org/tgbugs/uris/readable/atlas/Transformation> .

tvbo:Dynamics a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path rdfs:label ],
        [ sh:class tvbo:DerivedVariable ;
            sh:nodeKind sh:IRI ;
            sh:order 10 ;
            sh:path tvbo:derived_variables ],
        [ sh:class tvbo:DerivedVariable ;
            sh:description "Observable functions computed from states, inputs, and parameters after simulation. Unlike derived_variables (which are intermediate algebraic expressions used within the ODE), observed variables are post-hoc quantities recoverable from the solution. Maps to obsf/obssym in ND.jl EdgeModel/VertexModel. Example: absolute force magnitude computed from force components." ;
            sh:nodeKind sh:IRI ;
            sh:order 25 ;
            sh:path tvbo:observed ],
        [ sh:datatype xsd:string ;
            sh:defaultValue "Generic2dOscillator"^^xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path schema1:name ],
        [ sh:class tvbo:Parameter ;
            sh:nodeKind sh:IRI ;
            sh:order 11 ;
            sh:path tvbo:coupling_terms ],
        [ sh:class tvbo:Dynamics ;
            sh:nodeKind sh:IRI ;
            sh:order 21 ;
            sh:path tvbo:modes ],
        [ sh:class tvbo:Event ;
            sh:description "Discrete state transitions intrinsic to the dynamical system, such as threshold-triggered resets in spiking neuron models. Unlike experiment-level events (stimulation, perturbation), these define the model's own discontinuous behavior." ;
            sh:nodeKind sh:IRI ;
            sh:order 26 ;
            sh:path tvbo:events ],
        [ sh:datatype xsd:boolean ;
            sh:defaultValue true ;
            sh:description "Whether the system is autonomous (equations do not depend explicitly on time t). Non-autonomous systems have explicit time dependence, e.g. f*cos(omega*t)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 24 ;
            sh:path tvbo:autonomous ],
        [ sh:class tvbo:CouplingInput ;
            sh:nodeKind sh:IRI ;
            sh:order 12 ;
            sh:path tvbo:coupling_inputs ],
        [ sh:class tvbo:Parameter ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 18 ;
            sh:path tvbo:local_coupling_term ],
        [ sh:description "Coarse classification of this model (mean_field, neural_mass, phase_oscillator, phenomenological, spiking, generic, field). Used for filtering in Dynamics.list_db(model_type=...)." ;
            sh:in ( "mean_field" "neural_mass" "phase_oscillator" "phenomenological" "spiking" "generic" "field" ) ;
            sh:maxCount 1 ;
            sh:order 22 ;
            sh:path tvbo:model_type ],
        [ sh:description "Optional stable IRI (or compact URI) for this entity in an external ontology or knowledge base. Used to load metadata from an external source; not required when the entity is fully self-contained (equations, parameters, etc. defined in the file itself)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 3 ;
            sh:path dcterms:identifier ],
        [ sh:class tvbo:Parameter ;
            sh:nodeKind sh:IRI ;
            sh:order 4 ;
            sh:path tvbo:parameters ],
        [ sh:class tvbo:DerivedParameter ;
            sh:nodeKind sh:IRI ;
            sh:order 9 ;
            sh:path tvbo:derived_parameters ],
        [ sh:datatype xsd:string ;
            sh:description "Output variable names to include in simulation results. References to state_variables or derived_variables by name." ;
            sh:nodeKind sh:Literal ;
            sh:order 15 ;
            sh:path tvbo:output ],
        [ sh:datatype xsd:integer ;
            sh:defaultValue 1 ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 17 ;
            sh:path tvbo:number_of_modes ],
        [ sh:datatype xsd:string ;
            sh:description "Add the location of the data file containing the parcellation terminology." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 8 ;
            sh:path <http://uri.interlex.org/tgbugs/uris/readable/dataLocation> ],
        [ sh:class tvbo:Function ;
            sh:nodeKind sh:IRI ;
            sh:order 19 ;
            sh:path tvbo:functions ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path dcterms:description ],
        [ sh:class tvbo:Stimulus ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 20 ;
            sh:path tvbo:stimulus ],
        [ sh:datatype xsd:boolean ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 14 ;
            sh:path tvbo:modified ],
        [ sh:class tvbo:StateVariable ;
            sh:nodeKind sh:IRI ;
            sh:order 13 ;
            sh:path tvbo:state_variables ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path dcterms:references ],
        [ sh:defaultValue "continuous" ;
            sh:in ( "continuous" "discrete" ) ;
            sh:maxCount 1 ;
            sh:order 23 ;
            sh:path tvbo:system_type ],
        [ sh:class tvbo:Dynamics ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 16 ;
            sh:path tvbo:derived_from_model ],
        [ sh:datatype xsd:string ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path dcterms:references ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path dcterms:source ] ;
    sh:targetClass tvbo:Dynamics .

<https://w3id.org/tvbo/software/SoftwareRequirement> a sh:NodeShape ;
    rdfs:comment "An individual software requirement binding a package to a version constraint and a role within an environment." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:description "Build or artifact hash for exact reproducibility." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path <https://w3id.org/tvbo/software/hash> ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path <https://w3id.org/tvbo/software/dataLocation> ],
        [ sh:class schema1:SoftwareApplication ;
            sh:description "Reference to the software package identity." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 3 ;
            sh:path <https://w3id.org/tvbo/software/package> ],
        [ sh:datatype xsd:string ;
            sh:description "Canonical source or repository URL." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 8 ;
            sh:path <https://w3id.org/tvbo/software/source_url> ],
        [ sh:datatype xsd:string ;
            sh:description "(Deprecated) Use source_url." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 9 ;
            sh:path <https://w3id.org/tvbo/software/url> ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:string ;
            sh:description "(Deprecated) Use environment.requirements list instead." ;
            sh:nodeKind sh:Literal ;
            sh:order 11 ;
            sh:path <https://w3id.org/tvbo/software/modules> ],
        [ sh:datatype xsd:string ;
            sh:description "(Deprecated) Use version_spec." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 12 ;
            sh:path <https://w3id.org/tvbo/software/version> ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ],
        [ sh:defaultValue "runtime" ;
            sh:in ( "engine" "runtime" "analysis" "dev" "optional" ) ;
            sh:maxCount 1 ;
            sh:order 5 ;
            sh:path <https://w3id.org/tvbo/software/role> ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 10 ;
            sh:path dcterms:license ],
        [ sh:datatype xsd:boolean ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path <https://w3id.org/tvbo/software/optional> ],
        [ sh:datatype xsd:string ;
            sh:description "Version or constraint specifier (e.g., '==2.7.3', '>=1.2,<2')." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path <https://w3id.org/tvbo/software/version_spec> ] ;
    sh:targetClass <https://w3id.org/tvbo/software/SoftwareRequirement> .

tvbo:Function a sh:NodeShape ;
    rdfs:comment "A function with explicit input -> transformation -> output flow. Can be equation-based (symbolic) or software-based (callable). In a pipeline, functions are chained: output of one becomes input of next." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 12 ;
            sh:path tvbo:source_code ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path rdfs:label ],
        [ sh:class tvbo:Argument ;
            sh:description "Variables consumed by the function (referenced in the equation). Each argument has a name and optional metadata (description, default value, unit)." ;
            sh:nodeKind sh:IRI ;
            sh:order 10 ;
            sh:path tvbo:arguments ],
        [ sh:class tvbo:Function ;
            sh:description "Simple input reference: name of previous function's output in pipeline. For multi-argument functions, use arguments with value references instead." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 8 ;
            sh:path tvbo:input ],
        [ sh:class tvbo:Equation ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 4 ;
            sh:path tvbo:Equation ],
        [ sh:description "Optional stable IRI (or compact URI) for this entity in an external ontology or knowledge base. Used to load metadata from an external source; not required when the entity is fully self-contained (equations, parameters, etc. defined in the file itself)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 3 ;
            sh:path dcterms:identifier ],
        [ sh:class tvbo:Aggregation ;
            sh:description "How to aggregate the result across dimensions. E.g., aggregate.over=node computes per-row (per-node) with keepdims. The type field controls whether to reduce (mean/sum) or keep dimensions (none)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 15 ;
            sh:path tvbo:aggregate ],
        [ sh:class tvbo:Range ;
            sh:description "Time range for generated TimeSeries (for kernel generators). Equation is evaluated at each time point." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 16 ;
            sh:path tvbo:time_range ],
        [ sh:class tvbo:Equation ;
            sh:description "Output transformation equation (if equation-based)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 11 ;
            sh:path tvbo:output_equation ],
        [ sh:class <https://w3id.org/tvbo/software/SoftwareRequirement> ;
            sh:nodeKind sh:IRI ;
            sh:order 7 ;
            sh:path tvbo:requirements ],
        [ sh:class tvbo:Callable ;
            sh:description "Software implementation reference (if software-based)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 13 ;
            sh:path tvbo:callable ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path skos:definition ],
        [ sh:datatype xsd:string ;
            sh:description "Name for this function's output (referenced by subsequent functions)" ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 9 ;
            sh:path tvbo:output ],
        [ sh:description "Which dimension to apply the transformation on" ;
            sh:in ( "time" "state" "node" "region" "mode" "sample" "batch" "frequency" ) ;
            sh:maxCount 1 ;
            sh:order 14 ;
            sh:path tvbo:apply_on_dimension ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path skos:notation ] ;
    sh:targetClass tvbo:Function .

tvbo:Range a sh:NodeShape ;
    rdfs:comment "Specifies a range for array generation, parameter bounds, or grid exploration." ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:datatype xsd:boolean ;
            sh:description "Whether to use logarithmic spacing." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path tvbo:log_scale ],
        [ sh:description "Lower bound or starting value. Can be a number or argument name." ;
            sh:maxCount 1 ;
            sh:order 0 ;
            sh:path tvbo:lo ],
        [ sh:description "Upper bound or stopping value. Can be a number or argument name." ;
            sh:maxCount 1 ;
            sh:order 1 ;
            sh:path tvbo:hi ],
        [ sh:description "Step size. Can be: number, argument name, or expression." ;
            sh:maxCount 1 ;
            sh:order 2 ;
            sh:path tvbo:step ],
        [ sh:datatype xsd:float ;
            sh:description "Explicit explored values for this element. When set on an element_domain entry, overrides the parent parameter's explored_values for this specific element." ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path tvbo:explored_values ],
        [ sh:datatype xsd:integer ;
            sh:description "Number of points (alternative to step for grid exploration)." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path tvbo:n ],
        [ sh:datatype xsd:integer ;
            sh:description "Element/node index this range applies to. Used in element_domains to explicitly link a domain to a specific element of a heterogeneous parameter (e.g., element: 0 for node 0). Required when used in element_domains to avoid ambiguous positional indexing." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 6 ;
            sh:path tvbo:element ] ;
    sh:targetClass tvbo:Range .

tvbo:Parameter a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:property [ sh:description "Physical unit of measurement. Values are drawn from the QUDT ontology (http://qudt.org/vocab/unit/) with UO cross-references where available." ;
            sh:in ( qudt:SEC qudt:MilliSEC qudt:MicroSEC qudt:PER-SEC qudt:PER-MilliSEC qudt:HZ qudt:KiloHZ qudt:V qudt:MilliV qudt:PER-MilliV qudt:MilliV-PER-MilliSEC qudt:MilliV-PER-SEC qudt:A qudt:NanoA qudt:PicoA "uA_per_cm2" qudt:PicoFARAD qudt:NanoFARAD "uF_per_cm2" qudt:NanoS qudt:MicroS qudt:PicoS "S_per_cm2" "mS_per_cm2" "S_per_m2" "nS_per_mV" qudt:PER-NanoC qudt:PER-PicoC qudt:MOL-PER-M3 "mol_per_cm3" qudt:MilliMOL-PER-M3 "mol_per_m_per_A_per_s" qudt:MicroM3 qudt:M qudt:MilliM qudt:CentiM qudt:M-PER-SEC qudt:MilliM-PER-MilliSEC "Hz_per_nA" qudt:S-PER-M qudt:H-PER-M qudt:OHM "Mohm" "kohm_cm" qudt:DEG_C "rad_per_ms" qudt:UNITLESS qudt:PERCENT "arbitrary_unit" qudt:KiloGM "kg_per_s" qudt:M-PER-SEC2 qudt:N-PER-M qudt:RAD qudt:RAD-PER-SEC qudt:SEC2 "per_unit" ) ;
            sh:maxCount 1 ;
            sh:order 10 ;
            sh:path qudt:unit ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 2 ;
            sh:path tvbo:symbol ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 8 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:boolean ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 16 ;
            sh:path tvbo:free ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path schema1:defaultValue ],
        [ sh:class tvbo:Range ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 6 ;
            sh:path tvbo:domain ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path rdfs:label ],
        [ sh:class tvbo:Equation ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 9 ;
            sh:path tvbo:Equation ],
        [ sh:class tvbo:Range ;
            sh:description "Per-element domain overrides for heterogeneous parameters. When specified, element_domains[i] overrides domain for element i during exploration auto-expansion. Length must match parameter shape (e.g., n_nodes for shape \"(n_nodes,)\"). If not set, all elements share the same domain." ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 19 ;
            sh:path tvbo:element_domains ],
        [ sh:class tvbo:Distribution ;
            sh:description "Distribution for heterogeneous per-node parameter sampling. Implies heterogeneous=true." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 15 ;
            sh:path tvbo:distribution ],
        [ sh:description "External ontology IRIs (typically GO, ChEBI, UBERON, CL, MeSH) that this entity is a surrogate / abstraction / model of. Replaces the legacy OWL pattern `tvbo:surrogate_of` by carrying the link inline with the YAML data instance. Multiple IRIs allowed: a single parameter may abstract several biological processes (e.g. a synaptic conductance grounding both GO:0060079 (excitatory PSP) and GO:0007268 (chemical synaptic transmission))." ;
            sh:nodeKind sh:IRI ;
            sh:order 12 ;
            sh:path oboInOwl:hasDbXref ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path skos:definition ],
        [ sh:datatype xsd:float ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 7 ;
            sh:path tvbo:reported_optimum ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 13 ;
            sh:path rdfs:comment ],
        [ sh:datatype xsd:float ;
            sh:nodeKind sh:Literal ;
            sh:order 18 ;
            sh:path tvbo:explored_values ],
        [ sh:datatype xsd:boolean ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 14 ;
            sh:path tvbo:heterogeneous ],
        [ sh:datatype xsd:string ;
            sh:description "Globally unique identifier for the entity." ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path schema1:name ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 17 ;
            sh:path tvbo:shape ],
        [ sh:datatype xsd:string ;
            sh:description "Dataset path for array-valued parameters. When set, the parameter value is stored in the binary companion file (HDF5 or Zarr) at this path. The value slot is omitted." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 11 ;
            sh:path tvbo:dataset_path ],
        [ sh:description "Numeric, string, or boolean value. ScalarValue accepts any literal primitive type, allowing parameters to carry control flags (e.g., booleans) or symbolic placeholders alongside numeric defaults." ;
            sh:maxCount 1 ;
            sh:order 4 ;
            sh:path schema1:value ] ;
    sh:targetClass tvbo:Parameter .

tvbo:Equation a sh:NodeShape ;
    sh:closed true ;
    sh:ignoredProperties ( tvbo:time_dependent rdf:type ) ;
    sh:property [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 0 ;
            sh:path rdfs:label ],
        [ sh:class tvbo:ConditionalBlock ;
            sh:description "Conditional logic for piecewise equations." ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:order 6 ;
            sh:path tvbo:conditionals ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 3 ;
            sh:path dcterms:description ],
        [ sh:datatype xsd:boolean ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 9 ;
            sh:path tvbo:latex ],
        [ sh:class tvbo:Parameter ;
            sh:nodeKind sh:IRI ;
            sh:order 2 ;
            sh:path tvbo:parameters ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 1 ;
            sh:path skos:definition ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 4 ;
            sh:path tvbo:lefthandside ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 5 ;
            sh:path tvbo:righthandside ],
        [ sh:class <https://w3id.org/tvbo/software/SoftwareRequirement> ;
            sh:description "Primary engine (must appear in environment.requirements; migration target replacing deprecated 'software')." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:order 7 ;
            sh:path tvbo:engine ],
        [ sh:datatype xsd:string ;
            sh:description "Python code for the equation." ;
            sh:maxCount 1 ;
            sh:nodeKind sh:Literal ;
            sh:order 8 ;
            sh:path tvbo:pycode ] ;
    sh:targetClass tvbo:Equation .


