Official Resources
- Source Repository: https://github.com/diffpy/diffpy.structure
- Documentation: https://diffpy.github.io/diffpy.structure/
- PyPI: https://pypi.org/project/diffpy.structure/
- License: Open source (BSD)
Overview
diffpy.structure is a Python package for storing and manipulating crystal structure data. It provides objects for atomic coordinates, displacement parameters, and space group symmetry, supporting import/export of CIF, PDB, XYZ, and other structure formats.
Scientific domain: Crystal structure manipulation, symmetry, format conversion
Target user community: Researchers needing lightweight crystal structure handling and format conversion
Theoretical Methods
- Crystal structure container
- Space group symmetry operations
- CIF/PDB/XYZ format I/O
- Displacement parameter handling
- Fractional/Cartesian conversion
Capabilities (CRITICAL)
- Structure object with atoms and lattice
- CIF, PDB, XYZ, POSCAR I/O
- Space group symmetry
- Displacement parameters (Uij)
- Format conversion
- Structure manipulation
Sources: GitHub repository
Key Strengths
Structure Handling:
- Clean Python API
- Multiple format support
- Symmetry operations
- Displacement parameters
Lightweight:
- Minimal dependencies
- Fast I/O
- Easy to use
- Standalone
Integration:
- Part of diffpy suite
- PDF analysis compatible
- Pair distribution function support
- Neutron/X-ray scattering
Inputs & Outputs
- Input formats: CIF, PDB, XYZ, POSCAR, etc.
- Output data types: Structure objects, format conversions
Interfaces & Ecosystem
- diffpy.pdfgui: PDF analysis
- diffpy.pdffit2: PDF fitting
- NumPy: Computation
- Python: Core language
Performance Characteristics
- Speed: Fast (I/O)
- System size: Any
- Memory: Low
Computational Cost
- Structure I/O: Milliseconds
- No DFT needed: Structure only
Limitations & Known Constraints
- Structure only: No electronic structure
- Not pymatgen: Different API
- Limited analysis: I/O and manipulation
- Small community: Niche usage
Comparison with Other Codes
- vs pymatgen Structure: diffpy.structure is lighter, pymatgen is comprehensive
- vs ASE Atoms: diffpy.structure is crystallography-focused, ASE is simulation-focused
- Unique strength: Lightweight crystal structure handling with comprehensive CIF support and displacement parameters
Application Areas
Crystallography:
- CIF file manipulation
- Structure format conversion
- Symmetry analysis
- Displacement parameter handling
PDF Analysis:
- Structure input for PDF fitting
- Pair distribution function modeling
- Neutron/X-ray scattering calculations
Best Practices
Usage:
- Use for lightweight structure handling
- Convert between formats
- Handle displacement parameters properly
- Combine with diffpy suite for PDF
Community and Support
- Open source (BSD)
- PyPI installable
- DiffPy project maintained
- Documentation available
Verification & Sources
Primary sources:
- GitHub: https://github.com/diffpy/diffpy.structure
Confidence: VERIFIED
Verification status: ✅ VERIFIED
- Source code: ACCESSIBLE (GitHub)
- PyPI: AVAILABLE
- Specialized strength: Lightweight crystal structure handling with comprehensive CIF support and displacement parameters