v_sim.Data

g GObject.GInterface GObject.GInterface v_sim.Boxed v_sim.Boxed GObject.GInterface->v_sim.Boxed v_sim.Maskable v_sim.Maskable GObject.GInterface->v_sim.Maskable v_sim.Pointset v_sim.Pointset GObject.GInterface->v_sim.Pointset GObject.Object GObject.Object v_sim.NodeArray v_sim.NodeArray GObject.Object->v_sim.NodeArray v_sim.Data v_sim.Data v_sim.Boxed->v_sim.Data v_sim.Maskable->v_sim.NodeArray v_sim.NodeArray->v_sim.Data v_sim.Pointset->v_sim.Data

Subclasses:

v_sim.DataLoadable

Methods

Inherited:

v_sim.NodeArray (55), GObject.Object (37), v_sim.Maskable (3), v_sim.Boxed (2), v_sim.Pointset (9)

Structs:

GObject.ObjectClass (5)

class

new ()

addNodeFromElement (ele, xyz, reduced)

addNodeFromElementName (name, xyz, reduced)

addNodeFromIndex (position, xyz, reduced)

addNodeProperties (values)

applyTransformationsFromCLI ()

freePopulation ()

getAllNodeExtens (box)

getAllNodeProperties ()

getDescription ()

getNodeBoxFromCoord (xcart, nodeBox)

getNodeBoxFromNumber (nodeId, nodeBox)

getNodeCoordinates (node, user)

getNodeLabelAt (node)

getNodeLabels ()

getNodeProperties (label)

getVibration (nModes)

loader_yaml_setNodeProp (node, yamlStr)

removeNodeProperties (label)

reorder (dataRef)

setDescription (commentary)

setNewBasis (matA, O)

setNewBasisFromNodes (nO, nA, nB, nC)

setTightBox ()

Virtual Methods

Inherited:

GObject.Object (7), v_sim.Maskable (1), v_sim.Boxed (1), v_sim.Pointset (5)

Properties

Inherited:

v_sim.NodeArray (3), v_sim.Boxed (2), v_sim.Pointset (4)

Name

Type

Flags

Short Description

description

str

r/w

a description of the data

totalEnergy

float

r/w/c

Total energy of the system (eV)

Signals

Inherited:

v_sim.NodeArray (5), GObject.Object (1), v_sim.Maskable (1), v_sim.Boxed (1)

Name

Short Description

node-properties-added

Gets emitted when values node properties is added to dataObj.

node-properties-removed

Gets emitted when values node properties is removed from dataObj.

Fields

Inherited:

v_sim.NodeArray (5), GObject.Object (1), v_sim.Maskable (1), v_sim.Boxed (1)

Name

Type

Access

Description

parent

v_sim.NodeArray

r

Class Details

class v_sim.Data(**kwargs)
Bases:

v_sim.NodeArray, v_sim.Boxed, v_sim.Pointset

Abstract:

No

Structure:

v_sim.DataClass

Opaque structure for v_sim.Data objects.

classmethod new()
Returns:

a newly created v_sim.Data object (its ref count is set to 1).

Return type:

v_sim.Data

This creates an empty v_sim.Data object.

addNodeFromElement(ele, xyz, reduced)
Parameters:
Returns:

a pointer to the newly created node.

Return type:

v_sim.Node

This method adds a new v_sim.Node to the specified v_sim.Data. If several node should be added in a row, consider using v_sim.NodeArray.startAdding() and v_sim.NodeArray.completeAdding().

addNodeFromElementName(name, xyz, reduced)
Parameters:
  • name (str) – the name of the element ;

  • xyz ([float]) – its coordinates ;

  • reduced (bool) – coordinates are in reduced coordinates ;

Returns:

a pointer to the newly created node.

Return type:

v_sim.Node

This method adds a new v_sim.Node to the specified v_sim.Data. If several node should be added in a row, consider using v_sim.NodeArray.startAdding() and v_sim.NodeArray.completeAdding().

New in version 3.6.

addNodeFromIndex(position, xyz, reduced)
Parameters:
  • position (int) – a integer corresponding to the position of a v_sim.Element in the array **nodes in the structure;

  • xyz ([float]) – its coordinates ;

  • reduced (bool) – coordinates are in reduced coordinates ;

Returns:

a pointer to the newly created node.

Return type:

v_sim.Node

This method adds a new v_sim.Node to the specified v_sim.Data. Position must be chosen between 0 and (ntype - 1) and corresponds to the position of the array in v_sim.NodeArray of a v_sim.Element. If several node should be added in a row, consider using v_sim.NodeArray.startAdding() and v_sim.NodeArray.completeAdding().

addNodeProperties(values)
Parameters:

values (v_sim.NodeValues) – a v_sim.NodeValues object.

Returns:

True if values is added as a valid node property of self.

Return type:

bool

Add values as a known v_sim.NodeValues property of self.

New in version 3.8.

applyTransformationsFromCLI()
Raises:

GLib.Error

Returns:

True on success.

Return type:

bool

Apply the extension and translation expressed in the command-line arguments to self.

New in version 3.8.

freePopulation()

This method frees only the allocated memory that deals with the nodes (i.e. everything except the data of the files, the properties and the setColor method.

getAllNodeExtens(box)
Parameters:

box (v_sim.Box or None) – a v_sim.Box object.

Returns:

the longest distance between the surface of box (without extension) and all the nodes.

Return type:

float

Calculate the longest distance between the surface of box (without extension) and all the nodes. If box is None, then the internal box of self is used.

New in version 3.7.

getAllNodeProperties()
Returns:

a newly created list of v_sim.NodeValues objects.

Return type:

[v_sim.NodeValues]

Retrieve all the v_sim.NodeValues objects attached to self formatted as a list.

New in version 3.8.

getDescription()
Returns:

a string description (possibly empty). This string is own by V_Sim and should not be freed.

Return type:

str

Get the commentary associated to the given self.

getNodeBoxFromCoord(xcart, nodeBox)
Parameters:
  • xcart ([float]) – the coordinates of a node.

  • nodeBox ([int]) – the array to store the box of the node.

Returns:

True if everything went well, False otherwise. The box is stored in the nodeBox array.

Return type:

bool

This method retrieves the value of the box associated to the coordinates of the node (with respect to the unit cell).

getNodeBoxFromNumber(nodeId, nodeBox)
Parameters:
  • nodeId (int) – the index of the node considered.

  • nodeBox ([int]) – the array to store the box of the node.

Returns:

True if everything went well, False otherwise. The box is stored in the nodeBox array.

Return type:

bool

This method retrieves the value of the box associated to a node (with respect to the unit cell).

getNodeCoordinates(node, user)
Parameters:
Returns:

x:

the x coordinate.

y:

the y coordinate.

z:

the z coordinate.

Return type:

(x: float, y: float, z: float)

Wrapper for the function visu_data_getNodePosition() in case of call from python. If user is True, it wraps visu_data_getNodeUserPosition() instead.

New in version 3.6.

getNodeLabelAt(node)
Parameters:

node (v_sim.Node) – a v_sim.Node from self.

Returns:

a label.

Return type:

str

Retrieves the label associated to node in self.

New in version 3.8.

getNodeLabels()
Returns:

the v_sim.NodeValuesString object used to store labels.

Return type:

v_sim.NodeValuesString

Retrieve the v_sim.NodeValuesString object that is used to store labels, creating it if necessary.

New in version 3.8.

getNodeProperties(label)
Parameters:

label (str) – a string.

Returns:

the v_sim.NodeValues object attached to self with label, if any.

Return type:

v_sim.NodeValues

Look for the v_sim.NodeValues labelled by label.

New in version 3.8.

getVibration(nModes)
Parameters:

nModes (int) – an integer.

Returns:

a v_sim.NodeValuesVector owned by V_Sim.

Return type:

v_sim.Vibration

Retrieves the v_sim.NodeValuesVector object used to store the vibration data. If this object is not existing already, it is created with nModes modes.

New in version 3.8.

loader_yaml_setNodeProp(node, yamlStr)
Parameters:

Parse yamlStr and create v_sim.NodeValues properties on node.

New in version 3.8.

removeNodeProperties(label)
Parameters:

label (str) – a string.

Returns:

True if label was indeed attached to self.

Return type:

bool

Look for a v_sim.NodeValues object labelled by label and remove it.

New in version 3.8.

reorder(dataRef)
Parameters:

dataRef (v_sim.Data) – a v_sim.Data object, to take the order from.

Returns:

True is the reordering is successfull (i.e. all nodes of self correspond to one of dataRef).

Return type:

bool

This routine modifies the node ordering of self using the order in dataRef. The association is done by nearest neigbours conditions.

New in version 3.6.

setDescription(commentary)
Parameters:

commentary (str) – the message to be stored (null terminated) ;

This method is used to store a description of the given self. This string is copied and commentary can be freed.

setNewBasis(matA, O)
Parameters:
  • matA (float) – a basis set definition.

  • O (float) – the origin cartesian coordinates.

Returns:

True if the new basis set is valid.

Return type:

bool

Change the basis set of self according to the new definition given by matA and O. Nodes outside the new box are killed. See also v_sim.Data.setNewBasisFromNodes() for a convenient function using nodes as basis set definition.

New in version 3.6.

setNewBasisFromNodes(nO, nA, nB, nC)
Parameters:
  • nO (int) – the index of node as origin.

  • nA (int) – the index of node on X axis.

  • nB (int) – the index of node as Y axis.

  • nC (int) – the index of node as Z axis.

Returns:

True if the new basis set is valid.

Return type:

bool

Change the basis set by providing the new basis set from a list of nodes. See also v_sim.Data.setNewBasis(). Nodes outside the new box are killed.

New in version 3.6.

setTightBox()
Returns:

a new v_sim.Box if self had not one before, or the modified box of self.

Return type:

v_sim.Box

Calculate the box geometry to have a tight box in directions that are not periodic. If some directions are still periodic, the box size in these directions should be setup first with v_sim.Box.setGeometry().

Signal Details

v_sim.Data.signals.node_properties_added(data, values)
Signal Name:

node-properties-added

Flags:

RUN_LAST, NO_RECURSE, NO_HOOKS

Parameters:

Gets emitted when values node properties is added to dataObj.

New in version 3.8.

v_sim.Data.signals.node_properties_removed(data, values)
Signal Name:

node-properties-removed

Flags:

RUN_LAST, NO_RECURSE, NO_HOOKS

Parameters:

Gets emitted when values node properties is removed from dataObj.

New in version 3.8.

Property Details

v_sim.Data.props.description
Name:

description

Type:

str

Default Value:

''

Flags:

READABLE, WRITABLE

a description of the data

v_sim.Data.props.totalEnergy
Name:

totalEnergy

Type:

float

Default Value:

3.4028234663852886e+38

Flags:

READABLE, WRITABLE, CONSTRUCT

Total energy of the system (eV)