Per-system pbc: batching periodic and non-periodic systems together

Abierto
#584 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

@lil-lon ya está trabajando en esto.

Desde el 25/7/2026.

  • #594 de @lil-lon — abierto

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
python, pytorch
Área
backend

Línea de trabajo

Start by reading the discussion in PR #320 and the referenced batch_naive_neighbor_list API, which accepts per-system pbc. Then identify how torch-sim currently represents periodic boundary conditions and where that value reaches neighbor-list calculations. Done means agreeing on a direction and supporting mixed periodic and non-periodic systems in one batch; the issue does not specify an implementation or tests.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement

In the review of #320 there was a short discussion about making pbc a per-system attribute so that systems with different pbc can be mixed in one batch (https://github.com/TorchSim/torch-sim/pull/320#issuecomment-3500245561).
It was deferred to a separate issue at the time, but I don't think that issue was ever opened, so raising it here.

I think this would be a useful addition. One concern in that discussion was that mixed pbc may complicate the neighbor list calculations (https://github.com/TorchSim/torch-sim/pull/320#issuecomment-3508563598), but the current neighbor list API already supports per-system pbc (e.g. batch_naive_neighbor_list in nvalchemi-toolkit-ops takes pbc of shape (num_systems, 3): https://github.com/NVIDIA/nvalchemi-toolkit-ops/blob/2b7c3c3adfb1ca84b886eecbf14bc60ff6ba1dc2/nvalchemiops/torch/neighbors/batch_naive.py#L765-L767), and I think other methods support similar APIs, so it can be handled without making the neighbor list logic so complicated.

What do you think? If we agree on a direction I'd be happy to work on a PR.

Lenguaje dominante
Python
Estrellas
502
Forks
108
Merge medio
1 d 1 h
PR fusionados (30 d)
12

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de TorchSim/torch-sim

Todos los issues de TorchSim/torch-sim

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.