TorchRef Documentation

A PyTorch-based crystallographic refinement library

TorchRef is a modern crystallographic refinement package built entirely on PyTorch. By leveraging PyTorch’s automatic differentiation and GPU acceleration, TorchRef enables seamless integration with machine learning workflows and provides a flexible, extensible framework for crystallographic structure refinement.

Key Features

  • Native PyTorch Integration: Built on PyTorch’s nn.Module architecture

  • Automatic Differentiation: No manual gradient implementations required

  • Modular Architecture: Easily composable and extensible components

  • GPU Acceleration: CUDA support for fast structure factor calculations

  • State Management: Full state_dict support for checkpointing

API Reference

Development

Indices and tables