xyz_parse/
lib.rs

1//! A parser for the [XYZ file format](https://en.wikipedia.org/wiki/XYZ_file_format)
2//!
3//! The formatting of the .xyz file format is as follows:
4//!
5//! ```
6//! <number of atoms>
7//! comment line
8//! <element> <X> <Y> <Z>
9//! ...
10//! ```
11//!
12//! Currently the parser does not support extended XYZ format, but may do so in the future
13
14mod atom;
15mod molecule;
16mod xyz;
17
18#[cfg(feature = "pyo3")]
19mod python;
20
21pub use rust_decimal;
22
23pub use atom::*;
24pub use molecule::*;
25pub use xyz::*;
26
27/// Parse an [`Xyz`] string
28pub fn parse_xyz(s: &str) -> Result<Xyz, XyzParseError> {
29    Xyz::parse(s)
30}