AlexandriaChemistry / AlexandriaChemistry/ACT

Generation of atomtypes for OpenMM misbehaving

オープン
#747 コメント 2 件 リアクション 0 件 担当者 1 名 @dspoel が担当を希望しています GitHub で見る
bug
主要言語
C++
スター
18
フォーク
3
平均マージ
42分
マージ済み PR(30日)
12

説明

An OpenMM force field file generated like this
```
alexandria gentop -ff act/alc-water-pol2.xml -charges ../MolProps/mp2-aug-cc-pvtz.xml -db "water methanol" -openmm koko2
```
i.e. specifying both water and methanol, will lead to an issue in OpenMM when trying to make a methanol topology
```
Traceback (most recent call last):
File "/Users/spoel/Alexandria/ACTdata/TestForceField/results/alc-water-pol2/test/../../../run.py", line 14, in
sim2.setup()
File "/Users/spoel/tools/lib/python3.12/site-packages/act/act_openmm.py", line 1760, in setup
self.make_system()
File "/Users/spoel/tools/lib/python3.12/site-packages/act/act_openmm.py", line 730, in make_system
self.modeller.addExtraParticles(self.forcefield)
File "/Users/spoel/miniconda3/lib/python3.11/site-packages/openmm/app/modeller.py", line 1233, in addExtraParticles
system = forcefield.createSystem(newTopology, constraints=AllBonds, residueTemplates=residueTemplates)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/spoel/miniconda3/lib/python3.11/site-packages/openmm/app/forcefield.py", line 1406, in createSystem
force.postprocessSystem(sys, data, args)
File "/Users/spoel/miniconda3/lib/python3.11/site-packages/openmm/app/forcefield.py", line 6129, in postprocessSystem
sys.setParticleMass(parent, sys.getParticleMass(parent)-transferMass)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/spoel/miniconda3/lib/python3.11/site-packages/openmm/openmm.py", line 14079, in getParticleMass
val = _openmm.System_getParticleMass(self, index)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
openmm.OpenMMException: Assertion failure at System.cpp:55. Index out of range
```
Removing the atomtypes for hw resolves the issue.

The attached file is the input force field from ACT.

[aw.zip](https://github.com/user-attachments/files/19067969/aw.zip)

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。