lin = 0
nonlin = 0
for ccv in self.chemCompVars:
linking = ccv.linking
if linking in ('start', 'middle', 'end'):
lin = lin + 1
elif linking != 'none':
nonlin = nonlin + 1
if lin:
if nonlin:
raise ApiError("ChemComp %s,%s has illegal combination of ChemCompVar linkings" % (self.molType, self.ccpCode))
else:
result = True
else:
result = False