rust_sasa/structures/
atomic.rs1use nalgebra::Point3;
2use serde::Serialize;
3
4#[repr(C)]
5pub(crate) struct NeighborData {
6 pub(crate) threshold_squared: f32,
7 pub(crate) idx: u32,
8}
9
10#[derive(Clone)]
12#[repr(C)]
13pub struct Atom {
14 pub position: Point3<f32>,
16 pub radius: f32,
18 pub id: usize,
20 pub parent_id: Option<isize>,
22 pub is_hydrogen: bool,
24}
25
26#[derive(clap::ValueEnum, Clone, Default, Debug)]
28pub enum SASALevel {
29 Atom,
30 #[default]
31 Residue,
32 Chain,
33 Protein,
34}
35
36#[derive(Debug, PartialEq, Serialize)]
37pub struct ChainResult {
38 pub name: String,
40 pub value: f32,
42}
43
44#[derive(Debug, PartialEq, Serialize)]
45pub struct ResidueResult {
46 pub serial_number: isize,
48 pub value: f32,
50 pub name: String,
52 pub is_polar: bool,
54 pub chain_id: String,
56}
57
58#[derive(Debug, PartialEq, Serialize)]
59pub struct ProteinResult {
60 pub global_total: f32,
62 pub polar_total: f32,
64 pub non_polar_total: f32,
66}
67
68#[derive(Debug, PartialEq, Serialize)]
69pub enum SASAResult {
70 Atom(Vec<f32>),
71 Residue(Vec<ResidueResult>),
72 Chain(Vec<ChainResult>),
73 Protein(ProteinResult),
74}