Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Mismatched conformer degrees of freedom pass silently through TST, then surface as a bare "Singular matrix" in the MSC solve

Abierto
#3,003 0 comentarios 0 reacciones 0 asignados Ver en GitHub

@alongd ya está trabajando en esto.

Desde el 25/8/2026.

  • #3004 de @alongd — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
65/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
numpy, python
Área
backend

Línea de trabajo

Comienza con Reaction.calculate_tst_rate_coefficient en rmgpy/reaction.py:1441 y la llamada a np.linalg.solve en rmgpy/pdep/msc.pyx. Sigue la advertencia existente de b NaN y determina si deben notificarse las clases de modo que no coinciden o el contexto de una matriz singular. Se considera terminado cuando la discrepancia asimétrica o el fallo de resolución informa de detalles de diagnóstico accionables en lugar de fallar silenciosamente o únicamente con "Singular matrix".

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

Descripción

Ran into both of these while splicing QM transition states into an otherwise RMG-estimated pressure-dependent network, and they compound in a way that made the diagnosis much harder than it needed to be.

If the transition state conformer carries translation and rotation but the wells are vibration-only (or the other way round), Reaction.calculate_tst_rate_coefficient (rmgpy/reaction.py:1441) just multiplies the partition functions together — nothing anywhere in it looks at what modes either side actually has. In my case Q‡/Q_reactant was off by ~1e14 and k_TST(3200 K) came out at 1.8e26 s^-1 for a unimolecular step.

That rescales k(E), and the modified strong collision solve then dies at np.linalg.solve(a_mat, b) in rmgpy/pdep/msc.pyx with nothing but numpy.linalg.LinAlgError: Singular matrix — no grain, no J, no temperature, no pressure. I ended up bisecting by hand down to grain 346 / J=0 / 3200 K / 0.1 bar.

The bit that struck me is that the intent is already there a few lines up: b gets checked with np.isnan and logs a warning naming the grain and the isomer. a_mat has no equivalent check, and it's the argument that actually fails.

A warning in calculate_tst_rate_coefficient when the reactant and TS conformers carry different mode classes, or just the grain/J/T/P coordinates on the singular-matrix failure, would have turned a two-hour hunt into an immediate error message. Either one alone would have done it.

One thing worth flagging for anyone fixing this: the loud failure only happens when the mismatch is asymmetric. I checked afterwards, and if you put translation and rotation on the wells and the TS alike, the partition functions cancel again — the solve succeeds and the rate coefficient comes back unchanged, on a network that's still wrong. So the singular matrix isn't a general tripwire for this, which is an argument for the warning rather than relying on the crash.

Happy to open a PR for both.

Lenguaje dominante
Python
Estrellas
539
Forks
264
Merge medio
7 d 19 h
PR fusionados (30 d)
2

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 ReactionMechanismGenerator/RMG-Py

Todos los issues de ReactionMechanismGenerator/RMG-Py

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.