fix_motion

libra_py.fix_motion.measure(S0, S1)[source]

Compute the measure of the two systems’ dis-orientation It is zero if the two systems are ideally parallel to each other

Parameters
  • S0 (System) – first system

  • S1 (System) – second system

Returns

measure of two systems’ dis-orientation

Return type

( double )

libra_py.fix_motion.measure2(S0, S1)[source]

Compute the measure of the two systems’ dis-orientation It is zero if the two systems are ideally parallel to each other

Parameters
  • S0 (System) – first system

  • S1 (System) – second system

Returns

measure of two systems’ dis-orientation

Return type

( double )

libra_py.fix_motion.permutation(case)[source]

This function returns one of the 6 permutation matrices that describe possible orderings/directions of the 3 coordinate axes.

Parameters

case (int) – selector of the permutation

Returns

the matrix that encodes the permutation

Return type

MATRIX3x3

libra_py.fix_motion.permutation1(case)[source]

This function returns one of the 6 permutation matrices that describe possible orderings/directions of the 3 coordinate axes.

Parameters

case (int) – selector of the permutation

Returns

the matrix that encodes the permutation

Return type

MATRIX3x3

libra_py.fix_motion.permutation2(case)[source]

This function returns one of the 6 permutation matrices that describe possible orderings/directions of the 3 coordinate axes.

Parameters

case (int) – selector of the permutation

Returns

the matrix that encodes the permutation

Return type

MATRIX3x3

libra_py.fix_motion.process_xyz(filename, PT, itime, ftime, verbose=0)[source]

This function will read xyz file to create the coordinates for a range of configurations and it will remove the translation of COM and rotation of the configuration.

Parameters
  • filename (string) – the name of the xyz file to read

  • PT (dictionary) – periodic table, which sets up the atomic masses [ in Daltons ] for all elements that one meets in the xyz file

  • itime (int) – the initial timeframe to process

  • ftime (int) – the final timefram to process

Returns

None

libra_py.fix_motion.remove_rotation(S0, S1, verbose=0)[source]

Rotates the system `S1` such that it is oriented as similar to the system `S0` as possible

Parameters
  • S0 (System) – first system

  • S1 (System) – second system

  • verbose (int) – the level of debug info printout [ default: 0 - no printout ]

Returns

but the system `S1` is changed

Return type

None

libra_py.fix_motion.remove_translation(S0, S1)[source]

Translates the system `S1` such that it’s center of mass coincides with that of the system `S0`

Parameters
  • S0 (System) – first system

  • S1 (System) – second system

Returns

but the system `S1` is changed

Return type

None