"wrappers/python/vscode:/vscode.git/clone" did not exist on "05bb471c5382717bce2a5f12b79178009332fc7f"
Commit 64b4ccc3 authored by Jason Swails's avatar Jason Swails
Browse files

Better error catch for using chamber prmtops

Prints out a more helpful error message than a weird regex-based missing
"groups" attribute on NoneType.
parent 7b67c27b
......@@ -127,6 +127,10 @@ class PrmtopLoader(object):
tag, self._prmtopVersion = line.rstrip().split(None, 1)
elif line.startswith('%FLAG'):
tag, flag = line.rstrip().split(None, 1)
if flag == 'CTITLE':
raise TypeError('CHAMBER-style topology files are not supported here. '
'Consider using the CHARMM files directly with CharmmPsfFile '
'or ParmEd (where CHAMBER topologies are supported)')
self._flags.append(flag)
self._raw_data[flag] = []
elif line.startswith('%FORMAT'):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment