Use in syntax for key lookup for Python 3 compatibility
This commit is contained in:
@ -12,7 +12,7 @@ class LAMMPSLJCutPotential(object):
|
|||||||
'NULL': (0.0,1.0, 0.0, 0.0,0.0,0.0)}}
|
'NULL': (0.0,1.0, 0.0, 0.0,0.0,0.0)}}
|
||||||
|
|
||||||
def map_coeff(self,name,type):
|
def map_coeff(self,name,type):
|
||||||
if self.coeff.has_key(name):
|
if name in self.coeff:
|
||||||
self.pmap[type] = name
|
self.pmap[type] = name
|
||||||
else:
|
else:
|
||||||
raise Exception("cannot match atom type %s" % name)
|
raise Exception("cannot match atom type %s" % name)
|
||||||
|
|||||||
Reference in New Issue
Block a user