Code:
|
chemComp = self.topObject.chemComp
name = self.name
subType = self.subType
result = chemComp.findAllChemAtoms(name=name, subType=subType)
if not result:
chemAtomSet = chemComp.findFirstChemAtomSet(name=name, subType=subType)
if chemAtomSet is None:
raise ApiError(" no ChemAtom or ChemAtomSet found for: %s, %s, %s, %s"
% (chemComp.molType, chemComp.ccpCode, name, subType))
else:
chemAtomSets = [chemAtomSet]
chemAtoms = []
for cas in chemAtomSets:
chemAtomSets.extend(cas.chemAtomSets)
chemAtoms.extend(cas.chemAtoms)
#
result = frozenset(chemAtoms)
|