guid:
|
www.ccpn.ac.uk_Fogh_2006-08-16-14:25:09_00010
|
isImplicit:
|
False
|
Tag
|
Value
|
repositoryId
|
$Id: ChemCompVarCharge.xml,v 1.50 2011-01-13 14:40:34 rhfogh Exp $
|
Tag
|
Value
|
repositoryTag
|
$Name: not supported by cvs2svn $
|
Special constructor code:
|
None
|
Special destructor code:
|
None
|
Constraint name:
|
any_attributes_imply_atoms_shared_with_all_specific_vars
|
Constraint code:
|
linking = self.linking
descriptor = self.descriptor
isValid = True
if linking == 'any' and descriptor == 'any':
nVars = len(self.chemCompCharge.chemCompVarCharges)
for atom in self.chemAtomCharges:
if len(atom.chemCompVarCharges) != nVars:
isValid = False
break
elif linking == 'any':
otherVars = list(self.chemCompCharge.findAllChemCompVarCharges(descriptor=descriptor))
otherVars.remove(self)
for atom in self.chemAtomCharges:
ll = atom.chemCompVarCharges
for var in otherVars:
if var not in ll:
isValid = False
break
elif descriptor == 'any':
otherVars = list(self.chemCompCharge.findAllChemCompVarCharges(linking=linking))
otherVars.remove(self)
for atom in self.chemAtomCharges:
ll = atom.chemCompVarCharges
for var in otherVars:
if var not in ll:
isValid = False
break
|
Known inward one-way links:
|
None
|