Spglib
Documentation for Spglib.
See the Index for the complete list of documented functions and types.
The code, which is hosted on GitHub, is tested using various continuous integration services for its validity.
This repository is created and maintained by @singularitti, and contributions are highly welcome.
Package features
- It enables the finding and handling of crystal symmetries.
- The design of the package includes new naming conventions, input types, and return types of functions.
Installation
The package can be installed with the Julia package manager. From the Julia REPL, type ]
to enter the Pkg mode and run:
pkg> add Spglib
Or, equivalently, via Pkg.jl
:
julia> import Pkg; Pkg.add("Spglib")
Resolving package versions... Installed SumTypes ─── v0.5.5 Installed MacroTools ─ v0.5.13 Installed Spglib ───── v0.9.3 Updating `~/work/Spglib.jl/Spglib.jl/docs/Project.toml` [f761d5c5] ~ Spglib v0.9.4 `~/.julia/dev/Spglib` ⇒ v0.9.3 Updating `~/work/Spglib.jl/Spglib.jl/docs/Manifest.toml` [1914dd2f] + MacroTools v0.5.13 [f761d5c5] ~ Spglib v0.9.4 `~/.julia/dev/Spglib` ⇒ v0.9.3 [8e1ec7a9] + SumTypes v0.5.5 Precompiling project... ✓ MacroTools ✓ SumTypes ✓ Spglib 3 dependencies successfully precompiled in 4 seconds. 29 already precompiled. 1 dependency precompiled but a different version is currently loaded. Restart julia to access the new version
Documentation
- STABLE — documentation of the most recently tagged version.
- DEV — documentation of the in-development version.
Project status
The package is developed for and tested against Julia v1.6
and above on Linux, macOS, and Windows.
Questions and contributions
You can post usage questions on our discussion page.
We welcome contributions, feature requests, and suggestions. If you encounter any problems, please open an issue. The Contributing page has a few guidelines that should be followed when opening pull requests and contributing code.
Manual outline
- Installation Guide
- Definitions and conventions
- Spglib dataset
- Magnetic dataset (experimental)
- Examples
- Troubleshooting
- Contributing
- Style Guide
- Design Principles
- Consistency vs adherence
- Community contribution guidelines
- Open source contributions are allowed to start small and grow over time
- Generic code is preferred unless code is known to be specific
- Internal types should match the types used by users when possible
- Trait definition and adherence to generic interface is preferred when possible
- Macros should be limited and only be used for syntactic sugar
- Errors should be caught as early as possible, and error messages should be made contextually clear for newcomers
- Subpackaging and interface packages is preferred over conditional modules via Requires.jl
- Functions should either attempt to be non-allocating and reuse caches, or treat inputs as immutable
- Out-of-place and immutability is preferred when sufficient performant
- Tests should attempt to cover a wide gamut of input types
- When in doubt, a submodule should become a subpackage or separate package
- Globals should be avoided whenever possible
- Type-stable and type-grounded code is preferred wherever possible
- Closures should be avoided whenever possible
- Numerical functionality should use the appropriate generic numerical interfaces
- Functions should capture one underlying principle
- Internal choices should be exposed as options whenever possible
- Prefer code reuse over rewrites whenever possible
- Prefer to not shadow functions
Library outline
Index
CrystallographyCore.Lattice
Spglib.Dataset
Spglib.MagneticDataset
Spglib.MagneticSpacegroupType
Spglib.SpacegroupType
Spglib.SpglibCell
CrystallographyCore.atomtypes
CrystallographyCore.natoms
Spglib.delaunay_reduce
Spglib.eachpoint
Spglib.find_primitive
Spglib.get_dataset
Spglib.get_dataset_with_hall_number
Spglib.get_error_code
Spglib.get_error_message
Spglib.get_hall_number_from_symmetry
Spglib.get_international
Spglib.get_ir_reciprocal_mesh
Spglib.get_magnetic_dataset
Spglib.get_magnetic_spacegroup_type
Spglib.get_magnetic_spacegroup_type_from_symmetry
Spglib.get_magnetic_symmetry_from_database
Spglib.get_multiplicity
Spglib.get_schoenflies
Spglib.get_spacegroup_type
Spglib.get_spacegroup_type_from_symmetry
Spglib.get_stabilized_reciprocal_mesh
Spglib.get_symmetry
Spglib.get_symmetry_from_database
Spglib.get_symmetry_with_collinear_spin
Spglib.get_symmetry_with_site_tensors
Spglib.get_version
Spglib.niggli_reduce
Spglib.refine_cell
Spglib.standardize_cell