Skip to content

Commit b03b972

Browse files
committed
Reorganized
1 parent 08da4ce commit b03b972

File tree

3 files changed

+277
-529
lines changed

3 files changed

+277
-529
lines changed

src/lib.rs

+1-12
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use rstar::{PointDistance, RTree, RTreeObject, AABB};
1010
use std::sync::Arc;
1111
use snafu::{OptionExt};
1212
use snafu::prelude::*;
13-
use crate::utils::{simd_sum};
13+
use crate::utils::{serialize_chain_id, simd_sum};
1414

1515
/// This struct represents an individual Atom
1616
#[derive(Clone)]
@@ -65,17 +65,6 @@ pub enum SASACalcError {
6565
AtomMapToLevelElementFailed,
6666
}
6767

68-
fn serialize_chain_id(s: &str) -> isize {
69-
let mut result = 0;
70-
for c in s.chars() {
71-
if c.is_ascii_alphabetic() {
72-
let position = c.to_ascii_uppercase() as isize - 64;
73-
result = result * 10 + position;
74-
}
75-
}
76-
result
77-
}
78-
7968

8069
impl RTreeObject for Atom {
8170
type Envelope = AABB<[f32; 3]>;

0 commit comments

Comments
 (0)