File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ use pyo3::prelude::*;
4
4
// 45ba73aa ends here
5
5
6
6
// [[file:../spdkit-python.note::4cfd5c0b][4cfd5c0b]]
7
- use super :: { PyMolecule , PyMoleculeIter } ;
7
+ use super :: { PyMolecule , PyMoleculeIter , PyLattice } ;
8
8
9
9
#[ pyfunction]
10
10
/// Read a list of `Molecule` from `path`. Returns an iterator over
@@ -29,6 +29,13 @@ pub fn guess_format_from_path(path: &str) -> Option<String> {
29
29
Some ( fmt)
30
30
}
31
31
32
+ /// Guess chemical file format from `path`
33
+ #[ pyfunction]
34
+ pub fn read_lattice_extxyz ( line : & str ) -> Option < PyLattice > {
35
+ let inner = gchemol:: io:: read_lattice_extxyz ( line) ?;
36
+ Some ( PyLattice { inner } )
37
+ }
38
+
32
39
#[ pyfunction]
33
40
#[ pyo3( signature = ( pattern, /, root="." , recursive=true ) ) ]
34
41
#[ pyo3( text_signature = "(pattern, root='.', recursive=True)" ) ]
You can’t perform that action at this time.
0 commit comments