v_sim.Data¶
- Subclasses:
Methods¶
- Inherited:
v_sim.NodeArray (61), GObject.Object (37), v_sim.Maskable (3), v_sim.Boxed (2), v_sim.Pointset (9)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w |
a description of the data |
||
r/w/c |
Total energy of the system (eV) |
Signals¶
Name |
Short Description |
|---|---|
Gets emitted when values node properties is added to dataObj. |
|
Gets emitted when values node properties is removed from dataObj. |
Fields¶
Name |
Type |
Access |
Description |
|---|---|---|---|
parent |
r |
Class Details¶
- class v_sim.Data(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Opaque structure for
v_sim.Dataobjects.- classmethod new()¶
- Returns:
a newly created
v_sim.Dataobject (its ref count is set to 1).- Return type:
This creates an empty
v_sim.Dataobject.
- addNodeFromElement(ele, xyz, reduced)¶
- Parameters:
ele (
v_sim.Element) – thev_sim.Elementkind of the newv_sim.Node;xyz ([
float]) – its coordinates ;reduced (
bool) – coordinates are in reduced coordinates ;
- Returns:
a pointer to the newly created node.
- Return type:
This method adds a new
v_sim.Nodeto the specifiedv_sim.Data. If several node should be added in a row, consider usingv_sim.NodeArray.startAdding() andv_sim.NodeArray.completeAdding().
- addNodeFromElementName(name, xyz, reduced)¶
- Parameters:
- Returns:
a pointer to the newly created node.
- Return type:
This method adds a new
v_sim.Nodeto the specifiedv_sim.Data. If several node should be added in a row, consider usingv_sim.NodeArray.startAdding() andv_sim.NodeArray.completeAdding().New in version 3.6.
- addNodeFromIndex(position, xyz, reduced)¶
- Parameters:
position (
int) – a integer corresponding to the position of av_sim.Elementin 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:
This method adds a new
v_sim.Nodeto the specifiedv_sim.Data. Position must be chosen between 0 and (ntype - 1) and corresponds to the position of the array inv_sim.NodeArrayof av_sim.Element. If several node should be added in a row, consider usingv_sim.NodeArray.startAdding() andv_sim.NodeArray.completeAdding().
- addNodeProperties(values)¶
- Parameters:
values (
v_sim.NodeValues) – av_sim.NodeValuesobject.- Returns:
Trueif values is added as a valid node property of self.- Return type:
Add values as a known
v_sim.NodeValuesproperty of self.New in version 3.8.
- applyTransformationsFromCLI()¶
- Raises:
- Returns:
Trueon success.- Return type:
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:
- Returns:
the longest distance between the surface of box (without extension) and all the nodes.
- Return type:
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.NodeValuesobjects.- Return type:
Retrieve all the
v_sim.NodeValuesobjects 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:
Get the commentary associated to the given self.
- getNodeBoxFromCoord(xcart, nodeBox)¶
- Parameters:
- Returns:
Trueif everything went well,Falseotherwise. The box is stored in the nodeBox array.- Return type:
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:
- Returns:
Trueif everything went well,Falseotherwise. The box is stored in the nodeBox array.- Return type:
This method retrieves the value of the box associated to a node (with respect to the unit cell).
- getNodeLabelAt(node)¶
- Parameters:
node (
v_sim.Node) – av_sim.Nodefrom self.- Returns:
a label.
- Return type:
Retrieves the label associated to node in self.
New in version 3.8.
- getNodeLabels()¶
- Returns:
the
v_sim.NodeValuesStringobject used to store labels.- Return type:
Retrieve the
v_sim.NodeValuesStringobject 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.NodeValuesobject attached to self with label, if any.- Return type:
Look for the
v_sim.NodeValueslabelled by label.New in version 3.8.
- getNodeUserPosition(node)¶
- Parameters:
node (
v_sim.Node) – av_sim.Nodeobject ;- Returns:
an array of 3 floating point values to store the position.
- Return type:
coord: [
float]
This routine is equivalent to
v_sim.NodeArray.getNodePosition() except that it’s not applying internal box translation for non periodic directions.New in version 3.7.
- getVibration(nModes)¶
- Parameters:
nModes (
int) – an integer.- Returns:
a
v_sim.NodeValuesVectorowned by V_Sim.- Return type:
Retrieves the
v_sim.NodeValuesVectorobject used to store the vibration data. If this object is not existing already, it is created with nModes modes.New in version 3.8.
- iter_new(type)¶
- Parameters:
type (
v_sim.NodeArrayIterType) – the type of iterator.- Returns:
a location to store a
v_sim.DataIter.- Return type:
iter:
v_sim.DataIter
Creates an iterator over the elements or the nodes of self, inheriting from a
v_sim.NodeArrayIter, but adding current node coordinates.New in version 3.9.
- iter_new_forElement(element)¶
- Parameters:
element (
v_sim.Element) – av_sim.Elementobject.- Returns:
a location to store a
v_sim.DataIter.- Return type:
iter:
v_sim.DataIter
Creates an iterator over the nodes of self for element, inheriting from a
v_sim.NodeArrayIter, but adding current node coordinates.New in version 3.9.
- loader_yaml_setNodeProp(node, yamlStr)¶
- Parameters:
node (
v_sim.Node) – av_sim.Nodestructure.yamlStr (
str) – a YAML string.
Parse yamlStr and create
v_sim.NodeValuesproperties on node.New in version 3.8.
- removeNodeProperties(label)¶
- Parameters:
label (
str) – a string.- Returns:
Trueif label was indeed attached to self.- Return type:
Look for a
v_sim.NodeValuesobject labelled by label and remove it.New in version 3.8.
- reorder(dataRef)¶
- Parameters:
dataRef (
v_sim.Data) – av_sim.Dataobject, to take the order from.- Returns:
Trueis the reordering is successfull (i.e. all nodes of self correspond to one of dataRef).- Return type:
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.
- rescale(box)¶
-
Rescale all node positions in cartesians so their reduced coordinates are kept in box. Then update the box geometry of self to be the one of box.
New in version 3.9.
- 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:
- Returns:
Trueif the new basis set is valid.- Return type:
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:
- Returns:
Trueif the new basis set is valid.- Return type:
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.Boxif self had not one before, or the modified box of self.- Return type:
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:
- Parameters:
data (
v_sim.Data) – The object which received the signalvalues (
v_sim.NodeValues) – av_sim.NodeValuesobject.
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:
- Parameters:
data (
v_sim.Data) – The object which received the signalvalues (
v_sim.NodeValues) – av_sim.NodeValuesobject.
Gets emitted when values node properties is removed from dataObj.
New in version 3.8.
Property Details¶
- v_sim.Data.props.description¶
-
a description of the data