save_structure#
- biotite.structure.io.save_structure(file_path: str | PathLike[str], array: AtomArray[Any] | AtomArrayStack[Any, Any], **kwargs: Any) None[source]#
Save an
AtomArrayor class`AtomArrayStack` to a structure file without the need to manually instantiate aFileobject.Internally this function uses a
Fileobject, based on the file extension.- Parameters:
- file_pathstr
The path to structure file.
- arrayAtomArray or AtomArrayStack
The structure to be saved.
- **kwargs
Additional parameters will be passed to the respective set_structure method.
- Raises:
- ValueError
If the file format (i.e. the file extension) is unknown.