A transparent, “lossy” C-struct containing only the core atomic data.
This can be extracted from an RKRConFrame handle for direct data access.
The caller is responsible for freeing the atoms array using free_c_frame.
Deprecated: prefer rkr_frame_add_atom_full with NULL velocity
and force pointers. Adds an atom (no velocity, no forces) to the
builder using a single uniform fixed flag.
Returns RKR_STATUS_SUCCESS on success, or an error code.
Deprecated: prefer rkr_frame_add_atom_full. Adds an atom (no
velocity, no forces) using per-axis fixed flags.
Returns RKR_STATUS_SUCCESS on success, or an error code.
Deprecated: prefer rkr_frame_add_atom_full. Adds an atom with
a force vector and a single uniform fixed flag.
Returns RKR_STATUS_SUCCESS on success, or an error code.
Deprecated: prefer rkr_frame_add_atom_full. Adds an atom with
a force vector and per-axis fixed flags.
Returns RKR_STATUS_SUCCESS on success, or an error code.
Deprecated: prefer rkr_frame_add_atom_full. Adds an atom with
a velocity vector and a single uniform fixed flag.
Returns RKR_STATUS_SUCCESS on success, or an error code.
Deprecated: prefer rkr_frame_add_atom_full. Adds an atom with
both velocity and force vectors and a single uniform fixed flag.
Returns RKR_STATUS_SUCCESS on success, or an error code.
Deprecated: prefer rkr_frame_add_atom_full. Adds an atom with
both velocity and force vectors and per-axis fixed flags.
Returns RKR_STATUS_SUCCESS on success, or an error code.
Deprecated: prefer rkr_frame_add_atom_full. Adds an atom with
a velocity vector and per-axis fixed flags.
Returns RKR_STATUS_SUCCESS on success, or an error code.
Returns the position of an atom inside the frame’s atom_data array
matching the given atom_id. Returns UINT64_MAX if no atom with
that id exists or frame_handle is NULL.
Consumes the builder and returns a finalized RKRConFrame handle.
The builder handle is invalidated after this call.
The caller OWNS the returned frame and MUST call free_rkr_frame.
Returns NULL on error.
Returns the JSON metadata line from a parsed frame as a heap-allocated
null-terminated C string. The caller MUST free with rkr_free_string.
Returns NULL on error.
Returns the potential type string from metadata as a heap-allocated
null-terminated C string. The caller MUST free with rkr_free_string.
Returns NULL if absent or on error.
Frees a C string that was allocated by Rust (e.g., from
rkr_frame_metadata_json, rkr_frame_potential_type, or
rkr_frame_get_header_line_cpp). Safe to call with NULL (no-op).
Reads all frames from a .con file using mmap.
Returns an array of frame handles and sets num_frames to the count.
The caller OWNS both the array and each frame handle.
Free frames with free_rkr_frame and the array with free_rkr_frame_array.
Returns NULL on error.
Reads the first frame from a .con file.
Uses read_to_string for small files (< 64 KiB) and mmap for larger ones.
Stops after the first frame rather than parsing the entire file.
The caller OWNS the returned handle and MUST call free_rkr_frame.
Returns NULL on error.
Returns the atomic number for a chemical symbol, or 0 if the symbol
is unknown or symbol is NULL. Lookup covers H..U (Z = 1..=92) and
is case-sensitive: “Fe” works, “fe” does not.
Returns a pointer to a static, NUL-terminated chemical symbol for an
atomic number, or “X” for unknown values. Coverage is H..U
(Z = 1..=92). The returned pointer is valid for the lifetime of the
process; do NOT free it.