Reported by Yu Yamamori.
gen_structure は topology file の表記によって、以下のようなエラーが出る。
$ gen_structure –top topol.top
Molecule types in topology file: CYTOC SOL Which molecules are solutes? (For multiple choice please specify as comma-searated list) CYTOC
Traceback (most recent call last): File "/home/usr5/z41015t/software/ermod-0.3.1-cx/share/ermod/tools/gromacs/gen_structure", line 434, in <module> mono = top.moleculetypes[s] KeyError: 'CYTOC'</module>
原因:
topology file 内で、“[moleculetype]” で定義されている molecule type の名前と “[molecule]” で表記されている名前が一致していないことが原因。この場合は、molelculetype では、小文字で定義され、molecule では大文字で記載されている。 現在のgromacs では大文字と小文字を区別しないので、gromacs 側では問題のない表記だが、gen_structure では、エラーが出る。
エラーが出る topology file の該当箇所。
[ moleculetype ]
;name nrexcl
cytoc 3
[ molecules ]
; Compound nmols
CYTOC 1
対処 (workaround):
[ molecule ] での表記を [ moleculetype ] での表記と一致させればよい。この場合は、 CYTOC -> cytoc とすれば、エラーは出ないで正常に動作する。
Changed title. Probably we should just emit a warning message?
Fixed in 1.0.