#![doc = include_str!("../README.md")]
#[cfg(test)]
mod fragmentation_tests;
mod aminoacid;
pub mod annotation;
pub mod fragment;
pub mod glycan;
mod helper_functions;
mod modification;
mod monosaccharide;
pub mod mzspeclib;
mod peptidoform;
pub mod spectrum;
pub use mzdata;
pub mod prelude {
pub use crate::annotation::{
AnnotatableSpectrum,
model::{FragmentationModel, MatchingParameters},
};
pub use crate::fragment::{Fragment, ToMzPAF};
pub use crate::glycan::GlycanFragmention;
pub use crate::mzspeclib::{MzSpecLibTextParser, MzSpecLibTextWriter};
pub use crate::peptidoform::PeptidoformFragmentation;
pub use crate::spectrum::{AnnotatedPeak, AnnotatedSpectrum};
pub use crate::term;
}
#[cfg(test)]
#[expect(clippy::missing_panics_doc)]
mod test {
use mzcore::prelude::*;
use crate::prelude::*;
#[test]
fn simple_fragments() {
let peptide = Peptidoform::pro_forma("WFWF", &mzcore::ontology::STATIC_ONTOLOGIES)
.unwrap()
.0
.into_linear()
.unwrap();
let fragments = peptide.generate_theoretical_fragments(
mzcore::system::isize::Charge::new::<mzcore::system::e>(1),
FragmentationModel::all(),
);
println!("{}", fragments.len());
println!("{fragments:?}");
}
}