This line uses an instance of MonomerPattern as an index into a dict. Since MonomerPatterns are not immutable, this could potentially be problematic.