7个版本

0.1.1 2022年12月8日
0.1.0 2022年3月23日
0.0.41 2022年2月19日
0.0.39 2020年3月10日
0.0.38 2020年2月14日

#757算法

Download history · Rust 包仓库 27/week @ 2024-03-11 · Rust 包仓库 43/week @ 2024-03-18 · Rust 包仓库 47/week @ 2024-03-25 · Rust 包仓库 85/week @ 2024-04-01 · Rust 包仓库 22/week @ 2024-04-08 · Rust 包仓库 27/week @ 2024-04-15 · Rust 包仓库 32/week @ 2024-04-22 · Rust 包仓库 33/week @ 2024-04-29 · Rust 包仓库 38/week @ 2024-05-06 · Rust 包仓库 31/week @ 2024-05-13 · Rust 包仓库 38/week @ 2024-05-20 · Rust 包仓库 25/week @ 2024-05-27 · Rust 包仓库 28/week @ 2024-06-03 · Rust 包仓库 33/week @ 2024-06-10 · Rust 包仓库 25/week @ 2024-06-17 · Rust 包仓库 45/week @ 2024-06-24 · Rust 包仓库

132 每月下载量
16 个crate中使用 (2 直接)

GPL-3.0 许可证

48KB
837

示例

use gchemol::geom::Superpose;
use gchemol::Molecule;
use gchemol::prelude::*;

// load test molecules
let mol1 = Molecule::from_file("tests/files/alignment/reference.mol2").unwrap();
let mol2 = Molecule::from_file("tests/files/alignment/candidate.mol2").unwrap();

// take the first 5 atoms for superposition
let reference: Vec<_> = mol1.positions().take(5).collect();
let candidate: Vec<_> = mol2.positions().take(5).collect();

// align the candidate onto the reference
let sp = Superpose::new(&candidate).onto(&reference, None);

// apply superposition to all atoms
let superimposed_structure = sp.apply(&candidate);

// apply translation only
let translated_structure = sp.apply_translation(&candidate);

依赖

~11–22MB
~325K SLoC