[package]
name = "spintronics"
version.workspace = true
edition = "2021"
rust-version = "1.70.0"
authors = ["COOLJAPAN OÜ (Team KitaSan)"]
description = "Pure Rust library for simulating spin dynamics, spin current generation, and conversion phenomena in magnetic and topological materials"
license = "Apache-2.0"
readme = "README.md"
homepage = "https://github.com/cool-japan/spintronics"
keywords = ["spintronics", "magnetism", "physics", "simulation", "materials"]
categories = ["science", "simulation", "wasm"]
repository = "https://github.com/cool-japan/spintronics"
documentation = "https://docs.rs/spintronics"
exclude = [
"test_*",
"performance_*",
"*.csv",
"*.vtu",
"*.vtk",
"*.json",
"wasm-demo/pkg/",
"pkg/",
"pkg-bundler/",
"pkg-web/",
"pkg-node/",
".cargo/",
"TODO.md",
]
[lib]
crate-type = ["cdylib", "rlib"]
[dependencies]
scirs2-core = { workspace = true, optional = true }
scirs2-spatial = { workspace = true, optional = true }
rayon = { workspace = true, optional = true }
serde = { workspace = true, optional = true }
serde_json = { workspace = true, optional = true }
pyo3 = { workspace = true, optional = true }
numpy = { workspace = true, optional = true }
hdf5 = { workspace = true, optional = true }
base64 = { workspace = true, optional = true }
wasm-bindgen = { workspace = true, optional = true }
wasm-bindgen-futures = { workspace = true, optional = true }
js-sys = { workspace = true, optional = true }
console_error_panic_hook = { workspace = true, optional = true }
getrandom = { workspace = true, optional = true }
[dev-dependencies]
wasm-bindgen-test = { workspace = true }
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
proptest = { workspace = true }
criterion = { workspace = true }
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
criterion = { version = "0.8", default-features = false, features = ["cargo_bench_support", "plotters", "html_reports"] }
[features]
default = ["fem", "scirs2", "serde"]
fem = ["scirs2-spatial"]
scirs2 = ["scirs2-core"]
serde = ["dep:serde", "dep:serde_json"]
python = ["pyo3", "numpy"]
hdf5 = ["dep:hdf5"]
parallel = ["rayon"]
wasm = ["wasm-bindgen", "wasm-bindgen-futures", "js-sys", "console_error_panic_hook", "getrandom"]
vti = ["dep:base64"]
xdmf = ["hdf5"]
netcdf = []
zarr = []
autodiff = []
cuda = []
[[example]]
name = "yig_pt_pumping"
path = "examples/yig_pt_pumping.rs"
[[example]]
name = "magnon_propagation"
path = "examples/magnon_propagation.rs"
[[example]]
name = "spin_spiral_tbmno3"
path = "examples/spin_spiral_tbmno3.rs"
[[example]]
name = "bife_o3_multiferroic"
path = "examples/bife_o3_multiferroic.rs"
[[example]]
name = "kane_mele_qsh"
path = "examples/kane_mele_qsh.rs"
[[example]]
name = "nonlinear_magnon_suhl"
path = "examples/nonlinear_magnon_suhl.rs"
[[example]]
name = "damon_eshbach_nonreciprocity"
path = "examples/damon_eshbach_nonreciprocity.rs"
[[example]]
name = "backward_volume_magnons"
path = "examples/backward_volume_magnons.rs"
[[example]]
name = "hoti_corner_states"
path = "examples/hoti_corner_states.rs"
[[example]]
name = "axion_magnon_photon"
path = "examples/axion_magnon_photon.rs"
[[example]]
name = "data_export_formats"
path = "examples/data_export_formats.rs"
[[example]]
name = "fem_micromagnetics"
path = "examples/fem_micromagnetics.rs"
required-features = ["fem"]
[[example]]
name = "autodiff_parameter_fitting"
path = "examples/autodiff_parameter_fitting.rs"
required-features = ["autodiff"]
[[example]]
name = "neural_exchange_training"
path = "examples/neural_exchange_training.rs"
required-features = ["autodiff"]
[[example]]
name = "nanodisk_modes"
path = "examples/nanodisk_modes.rs"
[[example]]
name = "implicit_midpoint_stiff_demo"
path = "examples/implicit_midpoint_stiff_demo.rs"
[[example]]
name = "pinn_llg_solver"
path = "examples/pinn_llg_solver.rs"
required-features = ["autodiff"]
[[example]]
name = "magnonic_crystal_bandgap"
path = "examples/magnonic_crystal_bandgap.rs"
[[example]]
name = "experimental_validation_demo"
path = "examples/experimental_validation_demo.rs"
[[example]]
name = "heun_adaptive_thermal_llg"
path = "examples/heun_adaptive_thermal_llg.rs"
required-features = ["scirs2"]
[[example]]
name = "pimc_heisenberg_chain"
path = "examples/pimc_heisenberg_chain.rs"
required-features = ["scirs2"]
[[example]]
name = "advanced_spintronics"
path = "examples/advanced_spintronics.rs"
required-features = ["scirs2"]
[[example]]
name = "equivariant_nn_demo"
path = "examples/equivariant_nn_demo.rs"
required-features = ["autodiff"]
[[example]]
name = "active_learning_demo"
path = "examples/active_learning_demo.rs"
required-features = ["autodiff"]
[[example]]
name = "validation_landmark_suite"
path = "examples/validation_landmark_suite.rs"
[[example]]
name = "graph_nn_lattice"
path = "examples/graph_nn_lattice.rs"
required-features = ["autodiff"]
[[example]]
name = "bayesian_opt_materials"
path = "examples/bayesian_opt_materials.rs"
required-features = ["autodiff"]
[[example]]
name = "validation_full_suite"
path = "examples/validation_full_suite.rs"
[[example]]
name = "gpu_device_demo"
path = "examples/gpu_device_demo.rs"
[[example]]
name = "smr_angular_scan"
path = "examples/smr_angular_scan.rs"
[[example]]
name = "stno_auto_oscillation"
path = "examples/stno_auto_oscillation.rs"
[[example]]
name = "ac_spin_pumping_battery"
path = "examples/ac_spin_pumping_battery.rs"
[[example]]
name = "rl_sot_switching"
path = "examples/rl_sot_switching.rs"
[[example]]
name = "diffusion_skyrmion_gen"
path = "examples/diffusion_skyrmion_gen.rs"
required-features = ["autodiff"]
[[example]]
name = "variational_magnon_nn"
path = "examples/variational_magnon_nn.rs"
required-features = ["autodiff"]
[[example]]
name = "graded_interface"
path = "examples/graded_interface.rs"
[[example]]
name = "streaming_simulation"
path = "examples/streaming_simulation.rs"
[[example]]
name = "d_orbital_local_moments"
path = "examples/d_orbital_local_moments.rs"
[[example]]
name = "frustrated_transport"
path = "examples/frustrated_transport.rs"
[[example]]
name = "rvb_triangular_spin_liquid"
path = "examples/rvb_triangular_spin_liquid.rs"
[[example]]
name = "altermagnet_spin_valve"
path = "examples/altermagnet_spin_valve.rs"
[[example]]
name = "altermagnet_band_structure"
path = "examples/altermagnet_band_structure.rs"
[[bench]]
name = "llg_benchmark"
harness = false
[[bench]]
name = "spinchain_benchmark"
harness = false
[[bench]]
name = "vector3_benchmark"
harness = false
[[bench]]
name = "material_benchmark"
harness = false
[[bench]]
name = "skyrmion_benchmark"
harness = false
[workspace]
members = ["demo", "py"]
[workspace.package]
version = "0.3.2"
edition = "2021"
authors = ["COOLJAPAN OÜ (Team KitaSan)"]
license = "Apache-2.0"
[workspace.dependencies]
scirs2-core = { version = "0.6.0", default-features = false, features = ["std", "array", "random", "parallel"] }
scirs2-spatial = { version = "0.6.0", default-features = false }
rayon = { version = "1.12" }
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0" }
pyo3 = { version = "0.29", features = ["extension-module"] }
numpy = { version = "0.29" }
hdf5 = { version = "0.8" }
base64 = { version = "0.22" }
wasm-bindgen = { version = "0.2" }
wasm-bindgen-futures = { version = "0.4" }
js-sys = { version = "0.3" }
console_error_panic_hook = { version = "0.1" }
getrandom = { version = "0.4", features = ["wasm_js"] }
wasm-bindgen-test = "0.3"
criterion = { version = "0.8", features = ["html_reports"] }
proptest = "1.11"