Matscipy

1.2.0 · active · verified Thu Apr 16

Matscipy is a collection of generic Python tools for materials science, building upon popular scientific computing libraries like NumPy, SciPy, and especially ASE (Atomic Simulation Environment). It provides modules for elasticity, surface generation, structure manipulation, and I/O operations for materials data. The current version is 1.2.0, and the project maintains an active development pace with multiple releases per year.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to create a simple crystal surface using `matscipy.surface.fcc111`. The generated `slab` object is an `ase.Atoms` object, which is the standard data structure used throughout Matscipy and ASE for representing atomic systems.

from matscipy.surface import fcc111
from matscipy.structure import view # Optional for visualization

# Create an Aluminum (111) slab using matscipy's surface module
slab = fcc111('Al', size=(2,2,3), vacuum=10.0, a=4.05)

print(f"Created an Al(111) slab with {len(slab)} atoms.")
print(f"Cell dimensions: {slab.get_cell()}")

# The 'slab' object is an ase.Atoms object, compatible with ASE and other matscipy functions.
# To view the structure interactively (requires optional 'nglview' or 'ase gui' installation):
# view(slab)

view raw JSON →