Data Model version 2.1.2

Method: getIsLinearPolymer


    getter for derived link isLinearPolymer

guid: www.ccpn.ac.uk_Fogh_2006-08-16-18:23:22_00013
OpType: get
OpSubType: None
isQuery: True
isAbstract: False
Scope: instance_level
Code: 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
  Data Model Version 2.1.2
Go to Top  
  Autogenerated by  PyApiDocGen  revision 1.3   on  Thu Oct 2 16:09:11 2014    from data model package  ccp.api.molecule.ChemComp.ChemComp   revision ?  
  Work done by the CCPN team.
www.ccpn.ac.uk