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}
23
24#[derive(clap::ValueEnum, Clone, Default, Debug)]
26pub enum SASALevel {
27 Atom,
28 #[default]
29 Residue,
30 Chain,
31 Protein,
32}
33
34#[derive(Debug, PartialEq, Serialize)]
35pub struct ChainResult {
36 pub name: String,
38 pub value: f32,
40}
41
42#[derive(Debug, PartialEq, Serialize)]
43pub struct ResidueResult {
44 pub serial_number: isize,
46 pub value: f32,
48 pub name: String,
50 pub is_polar: bool,
52 pub chain_id: String,
54}
55
56#[derive(Debug, PartialEq, Serialize)]
57pub struct ProteinResult {
58 pub global_total: f32,
60 pub polar_total: f32,
62 pub non_polar_total: f32,
64}
65
66#[derive(Debug, PartialEq, Serialize)]
67pub enum SASAResult {
68 Atom(Vec<f32>),
69 Residue(Vec<ResidueResult>),
70 Chain(Vec<ChainResult>),
71 Protein(ProteinResult),
72}