This is a complete Python refactor of the emDNA C++ software with GPU acceleration support. The package provides energy minimization for DNA and DNA-protein complexes using modern GPU computing.
emdna-gpu/
├── README.md
├── LICENSE
├── setup.py
├── requirements.txt
├── pyproject.toml
├── environment.yml
├── .gitignore
├── docs/
│ ├── index.md
│ ├── installation.md
│ ├── quickstart.md
│ ├── api_reference.md
│ └── examples.md
├── emdna-gpu/
│ ├── __init__.py
│ ├── core.py # Main DNA structure classes
│ ├── minimizer.py # Energy minimization engine
│ ├── constraints.py # Constraint management
│ ├── analysis.py # Sequence analysis tools
│ ├── gpu_utils.py # GPU device management
│ ├── io.py # File I/O operations
│ ├── visualization.py # 3D visualization tools
│ └── parameters/
│ ├── __init__.py
│ ├── dna_params.py # DNA parameter sets
│ └── protein_params.py # Protein binding parameters
├── tests/
│ ├── test_core.py
│ ├── test_minimizer.py
├── examples/
│ ├── benchmark_gpu.py
- Full GPU support using PyTorch and CuPy
- Automatic device detection (CUDA, MPS, CPU)
- GPU memory management
- Parallel computation of energy terms
- Object-oriented design with dataclasses
- Type hints for better IDE support
- Modular structure with separate concerns
- Comprehensive error handling and logging
- Multiple optimization algorithms (Adam, SGD, L-BFGS)
- Sequence-dependent parameters
- Protein binding sites with energy contributions
- Circular DNA support
- Constraint management system
- Vectorized operations using PyTorch tensors
- Batch processing for large structures
- Memory-efficient data structures
- Automatic differentiation for gradients
- HDF5 format for efficient storage
- PDB export for compatibility
- Integration with molecular visualization tools
- Built-in plotting capabilities
- Comprehensive test suite
- Example scripts and notebooks
- API documentation
- Performance benchmarks
-
Prerequisites:
- Python 3.8+
- CUDA 11.0+ (for GPU support)
- Git
-
Clone and Install:
git clone https://github.com/yourusername/emdna-gpu.git cd emdna-gpu pip install -e .
-
Verify Installation:
import emdna_gpu print(emdna_gpu.__version__)