v_sim.Pair

g GObject.Object GObject.Object v_sim.Pair v_sim.Pair GObject.Object->v_sim.Pair

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (ele1, ele2)

class

pool_foreach (whatToDo, *user_data)

class

pool_readLinkFromLabel (label)

addLink (minMax)

contains (link)

foreach (whatToDo, *user_data)

getBondDistance (dataObj)

getElements ()

getLinks ()

getNthLink (pos)

removeLink (data)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

first-element

v_sim.Element

r/w/co

first element

links

GLib.Array

r

array of links

second-element

v_sim.Element

r/w/co

second element

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class v_sim.Pair(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

v_sim.PairClass

An opaque structure to define links (i.e. several v_sim.PairLink) between elements.

classmethod new(ele1, ele2)
Parameters:
Returns:

a newly created object.

Return type:

v_sim.Pair

Creates a v_sim.Pair between ele1 and ele2.

New in version 3.8.

classmethod pool_foreach(whatToDo, *user_data)
Parameters:

The way v_sim.Pair are stored in V_Sim is private and could changed between version. This method is used to apply some method each pairs.

classmethod pool_readLinkFromLabel(label)
Parameters:

label (str) – a string.

Returns:

True on success.

data:

a v_sim.PairLink location.

errorMessage:

a string location.

Return type:

(bool, data: v_sim.PairLink, errorMessage: str)

Reads label and parses it to detect the definition of a v_sim.PairLink. This pair link is added to the v_sim.Pair from the pool.

New in version 3.8.

Parameters:

minMax ([float]) – the two min and max distances.

Returns:

the v_sim.PairLink object associated to the given two elements and distances. If none exists it is created. The returned value should not be freed.

Return type:

v_sim.PairLink

A link between two elements is characterized by its boundary distances.

contains(link)
Parameters:

link (v_sim.PairLink) – a v_sim.PairLink object.

Returns:

True if link is a member of self.

Return type:

bool

Tests if link is contained in self.

New in version 3.8.

foreach(whatToDo, *user_data)
Parameters:

Apply whatToDo on every v_sim.PairLink of self.

New in version 3.8.

getBondDistance(dataObj)
Parameters:

dataObj (v_sim.Data) – a v_sim.Data object.

Returns:

True if a significant bond length can be found.

from_:

a location for a float.

to:

a location for a float.

Return type:

(bool, from_: float, to: float)

Compute the bond distribution for the given self and look for the first peak and returns its span. When given, from and to contains the lengths between which the bond for self is the most probable.

New in version 3.8.

getElements()
Returns:

ele1:

a location to store a v_sim.Element object pointer.

ele2:

a location to store a v_sim.Element object pointer.

Return type:

(ele1: v_sim.Element, ele2: v_sim.Element)

Retrieve the v_sim.Element constituting the pair.

New in version 3.7.

Returns:

a list of v_sim.PairLink. The list content is owned by V_Sim but the list should be freed with g_list_free() after use.

Return type:

[v_sim.PairLink]

There can be one or several links between elements, retrieve them with this routine.

Parameters:

pos (int) – the position in the list of links.

Returns:

the v_sim.PairLink object associated to the given two elements and distances. If none exists None is returned.

Return type:

v_sim.PairLink

A link can also be retrieved by its position.

Parameters:

data (v_sim.PairLink) – a link object.

Returns:

True if the link exists and has been successfully removed.

Return type:

bool

Delete the given link.

Property Details

v_sim.Pair.props.first_element
Name:

first-element

Type:

v_sim.Element

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

first element

Name:

links

Type:

GLib.Array

Default Value:

None

Flags:

READABLE

array of links

v_sim.Pair.props.second_element
Name:

second-element

Type:

v_sim.Element

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

second element