Commit d00d4bcf authored by cmaffeo2's avatar cmaffeo2
Browse files

Added lazy lookup of attributes from parents for ParticleType objects

parent 1d5f21b8
......@@ -341,7 +341,12 @@ class ParticleType():
def __init__(self, name, charge=0, parent=None, **kargs):
""" Parent type is used to fall back on for nonbonded interactions if this type is not specifically referenced """
self.name = name
if parent is not None:
for k,v in parent.__dict__.items():
if k not in ParticleType.excludedAttributes:
self.__dict__[k] = v
self.name = name
self.charge = charge
self.parent = parent
......
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