OrientedHyperbolicPoint

Struct OrientedHyperbolicPoint 

Source
pub struct OrientedHyperbolicPoint<const N: usize, R> {
    pub position: Hyperbolic<N>,
    pub orientation: R,
}
Expand description

The position and orientation of an extended body in hyperbolic space.

Use OrientedHyperbolicPoint as a Body or Site property type.

§Example

use hoomd_manifold::{Hyperbolic, Minkowski};
use hoomd_microstate::property::OrientedHyperbolicPoint;
use hoomd_vector::Angle;

let point = OrientedHyperbolicPoint {
    position: Hyperbolic::from_minkowski_coordinates(Minkowski::from([
        0.0, 0.0, 1.0,
    ])),
    orientation: Angle::from(2.39),
};

Fields§

§position: Hyperbolic<N>

The location of the extended body in the system frame.

§orientation: R

Orientation of the body in the global frame.

Implementations§

Source§

impl OrientedHyperbolicPoint<3, Angle>

Source

pub fn intersection_point(theta: f64, boost: f64) -> (f64, f64)

Compute the intersection of the geodesic arc passing through a point and the x axis, given the polar coordinates of the point. Returns a tuple containing the x coordinates of the intersection and the signed arc-angle of the path.

Source

pub fn parallel_transport_angle( start: &Hyperbolic<3>, destination: &Hyperbolic<3>, ) -> f64

Compute the signed angle change when an oriented hyperbolic point is translated to another point.

Source

pub fn deck_transform( boost: f64, rotation: f64, position: &Hyperbolic<3>, ) -> f64

Compute the change in orientation associated with a transformation from a given position. Isometries of hyperbolic space can be expressed as a boost conjugated by a rotation, i.e., $R(\theta) T(\eta) R(-\theta)$. Such a transformation can be expressed in the Poincaré disk representation as the Mobius transformation

g(z) = \begin{bmatrix} \cosh(\eta/2) & e^{i\theta} \sinh(\eta/2) \\ e^{-i\theta}\sinh(\eta/2) & \cosh(\eta/2) \end{bmatrix}

This transformation induces a rotation of angle $\Delta\phi$ in the tangent bundle, where

\Delta \phi = \operatorname{Arg} [g'(z)] = -2 \operatorname{Arg}[e^{-i\theta}\sinh(\eta/2)z + \cosh(\eta/2)]
Source

pub fn sample<R: Rng + ?Sized>( disk: &HyperbolicDisk, rng: &mut R, ) -> (Hyperbolic<3>, f64, f64)

Generate a random HyperbolicDisk point with the corresponding boost rapidity and rotation angle. Function returns a tuple with the random Hyperbolic<3> point in the first entry, the associated rapidity and angle in the second and third entries, respectively.

§Panics

Panics when maximum boost is a non-positive number.

Trait Implementations§

Source§

impl<B, X, C> AppendMicrostate<B, OrientedHyperbolicPoint<3, Angle>, X, C> for HoomdGsdFile

Source§

fn append_microstate( &mut self, microstate: &Microstate<B, OrientedHyperbolicPoint<3, Angle>, X, C>, ) -> Result<Frame<'_>, AppendError>

Append the contents of the microstate as a frame in a GSD file. Read more
Source§

impl<const N: usize, R: Clone> Clone for OrientedHyperbolicPoint<N, R>

Source§

fn clone(&self) -> OrientedHyperbolicPoint<N, R>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<const N: usize, R: Debug> Debug for OrientedHyperbolicPoint<N, R>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<const N: usize, R: Default> Default for OrientedHyperbolicPoint<N, R>

Source§

fn default() -> OrientedHyperbolicPoint<N, R>

Returns the “default value” for a type. Read more
Source§

impl GenerateGhosts<OrientedHyperbolicPoint<3, Angle>> for Periodic<EightEight>

Source§

fn generate_ghosts( &self, site_properties: &OrientedHyperbolicPoint<3, Angle>, ) -> ArrayVec<OrientedHyperbolicPoint<3, Angle>, MAX_GHOSTS>

Place periodic images of sites near the edge of the periodic boundary

Source§

fn maximum_interaction_range(&self) -> f64

The largest interaction distance between sites. Read more
Source§

impl GenerateGhosts<OrientedHyperbolicPoint<3, Angle>> for Periodic<TwelveTwelve>

Source§

fn generate_ghosts( &self, site_properties: &OrientedHyperbolicPoint<3, Angle>, ) -> ArrayVec<OrientedHyperbolicPoint<3, Angle>, MAX_GHOSTS>

Place periodic images of sites near the edge of the periodic boundary.

Source§

fn maximum_interaction_range(&self) -> f64

The largest interaction distance between sites. Read more
Source§

impl<const N: usize, R> Orientation for OrientedHyperbolicPoint<N, R>

Source§

type Rotation = R

Type that can express the orientation of a body or site.
Source§

fn orientation(&self) -> &R

The orientation of this body or site.
Source§

fn orientation_mut(&mut self) -> &mut R

The orientation of this body or site (mutable).
Source§

impl<const N: usize, R: PartialEq> PartialEq for OrientedHyperbolicPoint<N, R>

Source§

fn eq(&self, other: &OrientedHyperbolicPoint<N, R>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<const N: usize, R> Position for OrientedHyperbolicPoint<N, R>

Source§

type Position = Hyperbolic<N>

Every position is located in this vector space.
Source§

fn position(&self) -> &Hyperbolic<N>

The position of this body or site [length].
Source§

fn position_mut(&mut self) -> &mut Hyperbolic<N>

The mutable position of this body or site [length].
Source§

impl Transform<OrientedHyperbolicPoint<3, Angle>> for OrientedHyperbolicPoint<3, Angle>

Source§

fn transform( &self, site_properties: &OrientedHyperbolicPoint<3, Angle>, ) -> OrientedHyperbolicPoint<3, Angle>

Transform site properties. Read more
Source§

impl Transform<Point<Hyperbolic<3>>> for OrientedHyperbolicPoint<3, Angle>

Treat Point<Hyperbolic<3>> sites as constituents of oriented rigid bodies.

Source§

fn transform( &self, site_properties: &Point<Hyperbolic<3>>, ) -> Point<Hyperbolic<3>>

Move Point<Hyperbolic<3>> properties from the local body frame to the system frame.

use approxim::assert_relative_eq;
use hoomd_manifold::Hyperbolic;
use hoomd_microstate::{
    Transform,
    property::{OrientedHyperbolicPoint, Point},
};
use hoomd_vector::Angle;
use std::f64::consts::PI;

let body_boost = 1.1;
let body_orientation = PI / 2.0;
let site_boost = 0.1;
let body = OrientedHyperbolicPoint {
    position: Hyperbolic::<3>::from_polar_coordinates(body_boost, 0.0),
    orientation: Angle::from(body_orientation),
};
let site = Point::new(Hyperbolic::<3>::from_polar_coordinates(
    site_boost,
    -PI / 4.0,
));
let transformed_site = body.transform(&site);
assert_relative_eq!(
    *transformed_site.position.point(),
    [
        (body_boost.sinh()) * (site_boost.cosh())
            + ((PI / 4.0).cos())
                * (body_boost.cosh())
                * (site_boost.sinh()),
        ((PI / 4.0).sin()) * site_boost.sinh(),
        (body_boost.cosh()) * (site_boost.cosh())
            + ((PI / 4.0).cos())
                * (body_boost.sinh())
                * (site_boost.sinh()),
    ]
    .into(),
    epsilon = 1e-12
);
Source§

impl Wrap<OrientedHyperbolicPoint<3, Angle>> for Periodic<EightEight>

Source§

fn wrap( &self, properties: OrientedHyperbolicPoint<3, Angle>, ) -> Result<OrientedHyperbolicPoint<3, Angle>, Error>

Wrap the positions and orientations of oriented bodies in two-dimensional hyperbolic space under the {8,8} tiling.

Source§

impl Wrap<OrientedHyperbolicPoint<3, Angle>> for Periodic<TwelveTwelve>

Source§

fn wrap( &self, properties: OrientedHyperbolicPoint<3, Angle>, ) -> Result<OrientedHyperbolicPoint<3, Angle>, Error>

Wrap the positions and orientations of oriented bodies in hyperbolic space under the {12,12} tiling.

Source§

impl<const N: usize, R: Copy> Copy for OrientedHyperbolicPoint<N, R>

Source§

impl<const N: usize, R> StructuralPartialEq for OrientedHyperbolicPoint<N, R>

Auto Trait Implementations§

§

impl<const N: usize, R> Freeze for OrientedHyperbolicPoint<N, R>
where R: Freeze,

§

impl<const N: usize, R> RefUnwindSafe for OrientedHyperbolicPoint<N, R>
where R: RefUnwindSafe,

§

impl<const N: usize, R> Send for OrientedHyperbolicPoint<N, R>
where R: Send,

§

impl<const N: usize, R> Sync for OrientedHyperbolicPoint<N, R>
where R: Sync,

§

impl<const N: usize, R> Unpin for OrientedHyperbolicPoint<N, R>
where R: Unpin,

§

impl<const N: usize, R> UnwindSafe for OrientedHyperbolicPoint<N, R>
where R: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,