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