Skip to main content

AtomProps

Struct AtomProps 

Source
pub struct AtomProps {
    pub ibmol: u32,
    pub ibtype: u32,
    pub fscale: F,
    pub radius: F,
    pub radius_ini: F,
    pub flags: u32,
    /* private fields */
}
Expand description

Compact AoS view of every atom’s hot pair-kernel inputs.

The pair kernel in objective::fparc / gparc / fgparc reads the molecule identity, radii, fscale, and a flag byte every time it looks at another atom. Scattering those across seven separate Vec<_>s turns each visit into seven independent cache-line fetches. Packing them into one 40-byte struct (8-byte aligned) collapses that to at most two cache-line fetches, with a matching load for xcart[jcart] kept separate because positions change every evaluation.

Layout (40 bytes, natural 8-byte alignment — two atoms fit 80 bytes, i.e. ~1.25 cache lines so most pair visits hit a single line):

  • ibmol, ibtype — 2 × u32 (8 bytes) — same-molecule skip.
  • fscale, radius, radius_ini — 3 × F (24 bytes) — distance kernel.
  • flags — u32 (4 bytes) — ATOM_FLAG_FIXED, ATOM_FLAG_SHORT.
  • private padding — u32 (4 bytes) to keep the struct multiple of 8.

Cold-path fields (short_radius, short_radius_scale) stay in separate Vec<F>s on PackContext so the common “no short radius” workload does not pay to load them.

Fields§

§ibmol: u32§ibtype: u32§fscale: F§radius: F§radius_ini: F§flags: u32

Trait Implementations§

Source§

impl Clone for AtomProps

Source§

fn clone(&self) -> AtomProps

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for AtomProps

Source§

impl Debug for AtomProps

Source§

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

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

impl Default for AtomProps

Source§

fn default() -> AtomProps

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

Auto Trait Implementations§

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

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

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V