Commit 6b4d27e9 authored by Sunhwan Jo's avatar Sunhwan Jo
Browse files

use NotImplementedError for raising exception

parent 2b2c98c0
...@@ -342,9 +342,9 @@ class CharmmPsfFile(object): ...@@ -342,9 +342,9 @@ class CharmmPsfFile(object):
# We have a CHARMM PSF file; now do NUMLP/NUMLPH sections # We have a CHARMM PSF file; now do NUMLP/NUMLPH sections
numlp, numlph = psfsections['NUMLP NUMLPH'][0] numlp, numlph = psfsections['NUMLP NUMLPH'][0]
if numlp != 0 or numlph != 0: if numlp != 0 or numlph != 0:
raise NotImplemented('Cannot currently handle PSFs with lone ' raise NotImplementedError('Cannot currently handle PSFs with lone '
'pairs defined in the NUMLP/NUMLPH ' 'pairs defined in the NUMLP/NUMLPH '
'section.') 'section.')
# Now do the CMAPs # Now do the CMAPs
ncrterm = conv(psfsections['NCRTERM'][0], int, 'Number of cross-terms') ncrterm = conv(psfsections['NCRTERM'][0], int, 'Number of cross-terms')
holder = psfsections['NCRTERM'][1] holder = psfsections['NCRTERM'][1]
......
...@@ -890,7 +890,7 @@ class GromacsTopFile(object): ...@@ -890,7 +890,7 @@ class GromacsTopFile(object):
if has_nbfix_terms: if has_nbfix_terms:
if self._defaults[1] != '2': if self._defaults[1] != '2':
raise NotImplemented('NBFIX terms with LB combination rule is not yet supported') raise NotImplementedError('NBFIX terms with LB combination rule is not yet supported')
nb.addParticle(q, 1.0, 0.0) nb.addParticle(q, 1.0, 0.0)
atom_charges.append(q) atom_charges.append(q)
else: else:
...@@ -1054,7 +1054,7 @@ class GromacsTopFile(object): ...@@ -1054,7 +1054,7 @@ class GromacsTopFile(object):
if has_nbfix_terms: if has_nbfix_terms:
if self._defaults[1] != '2': if self._defaults[1] != '2':
raise NotImplemented('NBFIX terms with LB combination rule is not yet supported') raise NotImplementedError('NBFIX terms with LB combination rule is not yet supported')
atom_nbfix_types = set([]) atom_nbfix_types = set([])
for pair in self._nonbondTypes: for pair in self._nonbondTypes:
......
...@@ -531,7 +531,7 @@ class ResidueList(list): ...@@ -531,7 +531,7 @@ class ResidueList(list):
return atom return atom
def append(self, thing): def append(self, thing):
raise NotImplemented('Use "add_atom" to build a residue list') raise NotImplementedError('Use "add_atom" to build a residue list')
extend = append extend = append
......
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