TheVirtualBrain:

TheDocumentationwebsite.

Table Of Contents

Previous topic

base Package

Next topic

parser Package

This Page

model Package

@author: Gautham Ganapathy @organization: LEMS (http://neuroml.org/lems/, https://github.com/organizations/LEMS) @contact: gautham@lisphacker.org

component

dynamics

fundamental

Dimension and Unit definitions in terms of the fundamental SI units.

@author: Gautham Ganapathy @organization: LEMS (http://neuroml.org/lems/, https://github.com/organizations/LEMS) @contact: gautham@lisphacker.org

class tvb.dsl_cuda.lems.model.fundamental.Dimension(name, description='', **params)[source]

Bases: lems.base.base.LEMSBase

Stores a dimension in terms of the seven fundamental SI units.

description = None

Description of this dimension. @type: str

i = None

Power for the electic current dimension. @type: int

j = None

Power for the luminous intensity dimension. @type: int

k = None

Power for the temperature dimension. @type: int

l = None

Power for the length dimension. @type: int

m = None

Power for the mass dimension. @type: int

n = None

Power for the quantity dimension. @type: int

name = None

Name of the dimension. @type: str

t = None

Power for the time dimension. @type: int

toxml()[source]

Exports this object into a LEMS XML object

class tvb.dsl_cuda.lems.model.fundamental.Include(filename)[source]

Bases: lems.base.base.LEMSBase

Include another LEMS file.

file = None

Name of the file. @type: str

toxml()[source]

Exports this object into a LEMS XML object

class tvb.dsl_cuda.lems.model.fundamental.Unit(name, symbol, dimension, power=0, scale=1.0, offset=0.0, description='')[source]

Bases: lems.base.base.LEMSBase

Stores a unit definition.

description = None

Description of this unit. @type: str

dimension = None

Dimension for the unit. @type: str

name = None

Name of the unit. @type: str

offset = None

Offset for non-zero units. @type: float

power = None

Scaling by power of 10. @type: int

scale = None

Scaling. @type: float

symbol = None

Symbol for the unit. @type: str

toxml()[source]

Exports this object into a LEMS XML object

model

simulation

Simulation specification classes.

@author: Gautham Ganapathy @organization: LEMS (http://neuroml.org/lems/, https://github.com/organizations/LEMS) @contact: gautham@lisphacker.org

class tvb.dsl_cuda.lems.model.simulation.DataDisplay(title, data_region)[source]

Bases: tvb.dsl_cuda.lems.model.simulation.DataOutput

Stores specification for a data display.

data_region = None

Display position @type: string

time_scale = None

Time scale @type: Number

title = None

Title for the display. @type: string

toxml()[source]

Exports this object into a LEMS XML object

class tvb.dsl_cuda.lems.model.simulation.DataOutput[source]

Bases: lems.base.base.LEMSBase

Generic data output specification class.

class tvb.dsl_cuda.lems.model.simulation.DataWriter(path, file_name)[source]

Bases: tvb.dsl_cuda.lems.model.simulation.DataOutput

Stores specification for a data writer.

file_name = None

Text parameter to be used for the file name @type: string

path = None

Path to the quantity to be saved to file. @type: string

toxml()[source]

Exports this object into a LEMS XML object

class tvb.dsl_cuda.lems.model.simulation.EventRecord(quantity, eventPort)[source]

Bases: lems.base.base.LEMSBase

Stores the parameters of an <EventRecord> statement.

eventPort = None

eventPort to be used for the event record @type: str

id = None

Id of the quantity @type: str

quantity = None

Path to the quantity to be recorded. @type: str

toxml()[source]

Exports this object into a LEMS XML object

class tvb.dsl_cuda.lems.model.simulation.EventWriter(path, file_name, format)[source]

Bases: tvb.dsl_cuda.lems.model.simulation.DataOutput

Stores specification for an event writer.

file_name = None

Text parameter to be used for the file name @type: string

format = None

Text parameter to be used for the format @type: string

path = None

Path to the quantity to be saved to file. @type: string

toxml()[source]

Exports this object into a LEMS XML object

class tvb.dsl_cuda.lems.model.simulation.Record(quantity, scale=None, color=None, id=None)[source]

Bases: lems.base.base.LEMSBase

Stores the parameters of a <Record> statement.

color = None

Text parameter to be used to specify the color for display. @type: str

id = None

Text parameter to be used to specify an id for the record @type: str

quantity = None

Path to the quantity to be recorded. @type: str

scale = None

Text parameter to be used for scaling the quantity before display. @type: str

toxml()[source]

Exports this object into a LEMS XML object

class tvb.dsl_cuda.lems.model.simulation.Run(component, variable, increment, total)[source]

Bases: lems.base.base.LEMSBase

Stores the description of an object to be run according to an independent variable (usually time).

component = None

Name of the target component to be run according to the specification given for an independent state variable. @type: str

increment = None

Increment of the state variable on each step. @type: str

total = None

Final value of the state variable. @type: str

toxml()[source]

Exports this object into a LEMS XML object

variable = None

The name of an independent state variable according to which the target component will be run. @type: str

class tvb.dsl_cuda.lems.model.simulation.Simulation[source]

Bases: lems.base.base.LEMSBase

Stores the simulation-related attributes of a component-type.

add(child)[source]

Adds a typed child object to the simulation spec.

@param child: Child object to be added.

add_data_display(data_display)[source]

Adds a data display to this simulation section.

@param data_display: Data display to be added. @type data_display: lems.model.simulation.DataDisplay

add_data_writer(data_writer)[source]

Adds a data writer to this simulation section.

@param data_writer: Data writer to be added. @type data_writer: lems.model.simulation.DataWriter

add_event_record(event_record)[source]

Adds an eventrecord object to the list of event_record objects in this dynamics regime.

@param event_record: EventRecord object to be added. @type event_record: lems.model.simulation.EventRecord

add_event_writer(event_writer)[source]

Adds an event writer to this simulation section.

@param event_writer: event writer to be added. @type event_writer: lems.model.simulation.EventWriter

add_record(record)[source]

Adds a record object to the list of record objects in this dynamics regime.

@param record: Record object to be added. @type record: lems.model.simulation.Record

add_run(run)[source]

Adds a runnable target component definition to the list of runnable components stored in this context.

@param run: Run specification @type run: lems.model.simulation.Run

data_displays = None

Map of data displays mapping titles to regions. @type: Map(string -> string)

data_writers = None

Map of recorded variables to data writers. @type: Map(string -> lems.model.simulation.DataWriter

event_records = None

Map of recorded events in this dynamics regime. @type: Map(string -> lems.model.simulation.EventRecord

event_writers = None

Map of recorded variables to event writers. @type: Map(string -> lems.model.simulation.EventWriter

records = None

Map of recorded variables in this dynamics regime. @type: Map(string -> lems.model.simulation.Record

runs = None

Map of runs in this dynamics regime. @type: Map(string -> lems.model.simulation.Run)

toxml()[source]

Exports this object into a LEMS XML object

structure

Structural properties of component types.

@author: Gautham Ganapathy @organization: LEMS (http://neuroml.org/lems/, https://github.com/organizations/LEMS) @contact: gautham@lisphacker.org

class tvb.dsl_cuda.lems.model.structure.Assign(property, value)[source]

Bases: lems.base.base.LEMSBase

Stores a child assign specification.

property_ = None

Name of the property reference to be used for instantiation. @type: str

toxml()[source]

Exports this object into a LEMS XML object

value = None

Value of the property. @type: str

class tvb.dsl_cuda.lems.model.structure.ChildInstance(component, referenced_component=None)[source]

Bases: lems.base.base.LEMSBase

Stores a child instantiation specification.

component = None

Name of the component reference to be used for instantiation. @type: str

referenced_component = None

Target component being referenced after resolution. @type: lems.model.component.FatComponent

toxml()[source]

Exports this object into a LEMS XML object

class tvb.dsl_cuda.lems.model.structure.EventConnection(from_, to, source_port, target_port, receiver, receiver_container)[source]

Bases: lems.base.base.LEMSBase

Stores an event connection specification.

from_ = None

Name of the source component for event. @type: str

receiver = None

Name of the proxy receiver component attached to the target component that actually receiving the event. @type: str

receiver_container = None

Name of the child component grouping to add the receiver to. @type: str

source_port = None

Source port name. @type: str

target_port = None

Target port name. @type: str

to = None

Name of the target component for the event. @type: str

toxml()[source]

Exports this object into a LEMS XML object

class tvb.dsl_cuda.lems.model.structure.ForEach(instances, as_)[source]

Bases: lems.base.base.LEMSBase

ForEach specification.

add_event_connection(ec)[source]

Adds an event conenction to the structure.

@param ec: Event connection. @type ec: lems.model.structure.EventConnection

add_for_each(fe)[source]

Adds a for-each specification.

@param fe: For-each specification. @type fe: lems.model.structure.ForEach

event_connections = None

List of event connections. @type: list(lems.model.structure.EventConnection)

for_eachs = None

List of for each specs. @type: list(lems.model.structure.ForEach)

toxml()[source]

Exports this object into a LEMS XML object

class tvb.dsl_cuda.lems.model.structure.MultiInstantiate(component=None, number=None, component_type=None)[source]

Bases: lems.base.base.LEMSBase

Stores a child multi-instantiation specification.

add(child)[source]

Adds a typed child object to the structure object.

@param child: Child object to be added.

add_assign(assign)[source]

Adds an Assign to the structure.

@param assign: Assign structure. @type assign: lems.model.structure.Assign

assignments = None

List of assignments included in MultiInstantiate. @type: list(Assign)

component = None

Name of the component reference to be used for instantiation. @type: str

component_type = None

Name of the component type reference to be used for instantiation. @type: str

number = None

Name of the paramter specifying the number of times the component reference is to be instantiated. @type: str

toxml()[source]

Exports this object into a LEMS XML object

class tvb.dsl_cuda.lems.model.structure.Structure[source]

Bases: lems.base.base.LEMSBase

Stores structural properties of a component type.

add(child)[source]

Adds a typed child object to the structure object.

@param child: Child object to be added.

add_child_instance(ci)[source]

Adds a child instantiation specification.

@param ci: Child instantiation specification. @type ci: lems.model.structure.ChildInstance

add_event_connection(ec)[source]

Adds an event conenction to the structure.

@param ec: Event connection. @type ec: lems.model.structure.EventConnection

add_for_each(fe)[source]

Adds a for-each specification.

@param fe: For-each specification. @type fe: lems.model.structure.ForEach

add_multi_instantiate(mi)[source]

Adds a child multi-instantiation specification.

@param mi: Child multi-instantiation specification. @type mi: lems.model.structure.MultiInstantiate

add_tunnel(tunnel)[source]

Adds a tunnel specification to the structure.

@param tunnel: tunnel specification. @type tunnel: lems.model.structure.Tunnel

add_with(with_)[source]

Adds a with-as specification to the structure.

@param with_: With-as specification. @type with_: lems.model.structure.With

child_instances = None

List of child instantations. @type: list(lems.model.structure.ChildInstance)

event_connections = None

List of event connections. @type: list(lems.model.structure.EventConnection)

for_eachs = None

List of for each specs. @type: list(lems.model.structure.ForEach)

has_content()[source]
multi_instantiates = None

List of child multi-instantiations. @type: list(lems.model.structure.MultiInstantiate)

toxml()[source]

Exports this object into a LEMS XML object

tunnels = None

Map of tunnel statements. @type: Map(str -> lems.model.structure.Tunnel)

withs = None

Map of With statements. @type: Map(str -> lems.model.structure.With)

class tvb.dsl_cuda.lems.model.structure.Tunnel(name, end_a, end_b, component_a, component_b)[source]

Bases: lems.base.base.LEMSBase

Stores a Tunnel.

component_a = None

Component to create at A. @type: str

component_b = None

Component to create at B. @type: str

end_a = None

‘A’ end of Tunnel. @type: str

end_b = None

‘B’ end of Tunnel. @type: str

name = None

name of Tunnel. @type: str

toxml()[source]

Exports this object into a LEMS XML object

class tvb.dsl_cuda.lems.model.structure.With(instance, as_, list=None, index=None)[source]

Bases: lems.base.base.LEMSBase

Stores a with-as statement.

as_ = None

Alternative name. @type: str

index = None

index in list to be referenced. @type: str

instance = None

Instance to be referenced. @type: str

list = None

list of components, e.g. population @type: str

toxml()[source]

Exports this object into a LEMS XML object