v_sim.Vibration

g GObject.GInterface GObject.GInterface v_sim.Animatable v_sim.Animatable GObject.GInterface->v_sim.Animatable GObject.Object GObject.Object v_sim.NodeValues v_sim.NodeValues GObject.Object->v_sim.NodeValues v_sim.Vibration v_sim.Vibration v_sim.Animatable->v_sim.Vibration v_sim.NodeValuesFarray v_sim.NodeValuesFarray v_sim.NodeValues->v_sim.NodeValuesFarray v_sim.NodeValuesVector v_sim.NodeValuesVector v_sim.NodeValuesFarray->v_sim.NodeValuesVector v_sim.NodeValuesVector->v_sim.Vibration

Subclasses:

None

Methods

Inherited:

v_sim.NodeValuesVector (9), v_sim.NodeValuesFarray (15), v_sim.NodeValues (16), GObject.Object (37), v_sim.Animatable (6)

Structs:

GObject.ObjectClass (5)

class

new (data, label, n)

animate ()

getCharacteristic (iph, q, en, omega)

getNPhonons ()

resetPosition ()

setAmplitude (ampl)

setCharacteristic (iph, q, en, omega)

setCurrentMode (iph)

setDisplacements (iph, vibes, complex)

setTime (at)

setUserFrequency (freq)

setZeroTime ()

Virtual Methods

Inherited:

v_sim.NodeValuesVector (1), v_sim.NodeValuesFarray (1), v_sim.NodeValues (4), GObject.Object (7)

Properties

Inherited:

v_sim.NodeValuesFarray (5), v_sim.NodeValues (6)

Name

Type

Flags

Short Description

amplitude

float

r/w

oscilation amplitude

frequency

float

r/w

oscilation frequency

n-modes

int

r/w/co

number of modes

reduced-time

float

r/w

time during an animation

Signals

Inherited:

v_sim.NodeValues (1), GObject.Object (1), v_sim.Animatable (1)

Fields

Inherited:

v_sim.NodeValues (1), GObject.Object (1), v_sim.Animatable (1)

Name

Type

Access

Description

parent

v_sim.NodeValuesVector

r

priv

v_sim.VibrationPrivate

r

Class Details

class v_sim.Vibration(**kwargs)
Bases:

v_sim.NodeValuesVector, v_sim.Animatable

Abstract:

No

Structure:

v_sim.VibrationClass

Common name to refer to a #_VisuVibration.

classmethod new(data, label, n)
Parameters:
Returns:

a newly created v_sim.Vibration object.

Return type:

v_sim.Vibration

Creates a v_sim.Vibration object to store n vibration modes for data.

New in version 3.8.

animate()

Starts animating phonons.

New in version 3.8.

getCharacteristic(iph, q, en, omega)
Parameters:
  • iph (int) – a phonon id.

  • q (float) – a location for the reciprocal vector.

  • en (float) – a locattion for the phonon energy.

  • omega (float) – a location for the phonon frequency.

Returns:

True on success.

Return type:

bool

This routine is used to get the characteristics of a given phonon, see v_sim.Vibration.setCharacteristic() to set them.

New in version 3.5.

getNPhonons()
Returns:

a number of phonons.

Return type:

int

Retrieves the number of phonons in self.

New in version 3.5.

resetPosition()

Reset the node position of the given v_sim.Data.

New in version 3.5.

setAmplitude(ampl)
Parameters:

ampl (float) – an amplitude.

Returns:

True if amplitude is actually changed.

Return type:

bool

Change the amplitude at which phonon are displayed on screen when using visu_vibration_play().

New in version 3.5.

setCharacteristic(iph, q, en, omega)
Parameters:
  • iph (int) – a phonon id.

  • q (float) – a reciprocal vector.

  • en (float) – the phonon energy.

  • omega (float) – the phonon frequency.

Returns:

True on success.

Return type:

bool

This routine is used to define the characteristics of a given phonon.

New in version 3.5.

setCurrentMode(iph)
Parameters:

iph (int) – a phonon id.

Raises:

GLib.Error

Returns:

True if its the first time v_sim.Nodes are displaced.

Return type:

bool

Set all node displacements to zero and setup the displacement vector (u+iv) for each v_sim.Node. After this call, visu_vibration_play() will move the nodes according to their vibration.

New in version 3.5.

setDisplacements(iph, vibes, complex)
Parameters:
  • iph (int) – a phonon id.

  • vibes ([float]) – a set of displacement vectors.

  • complex (bool) – a flag.

Returns:

True on success.

Return type:

bool

visu_vibration_init() must have been call before. This routine is used to define a set of displacement vectors, corresponding to one phonon. The displacement vectors can be complex, in that case vibes contains 6 values for each v_sim.Node.

New in version 3.5.

setTime(at)
Parameters:

at (float) – a given reduced time in [0;1].

Returns:

True if value has been actually changed.

Return type:

bool

Defines the current time offset used to displace nodes according to phonon distortions.

New in version 3.8.

setUserFrequency(freq)
Parameters:

freq (float) – a frequency.

Return type:

bool

Change the frequency at which phonons are played with visu_vibration_play().

New in version 3.5.

setZeroTime()

Reset the position of phonons to use position at time equals zero (so applying just the q vector displacement).

New in version 3.5.

Property Details

v_sim.Vibration.props.amplitude
Name:

amplitude

Type:

float

Default Value:

1.0

Flags:

READABLE, WRITABLE

oscilation amplitude

v_sim.Vibration.props.frequency
Name:

frequency

Type:

float

Default Value:

5.0

Flags:

READABLE, WRITABLE

oscilation frequency

v_sim.Vibration.props.n_modes
Name:

n-modes

Type:

int

Default Value:

1

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

number of modes

v_sim.Vibration.props.reduced_time
Name:

reduced-time

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

time during an animation