guid:
|
www.ccpn.ac.uk_Fogh_2006-08-16-14:22:52_00030
|
isImplicit:
|
False
|
Tag
|
Value
|
repositoryId
|
$Id: $
|
Tag
|
Value
|
repositoryTag
|
$Name: $
|
Special constructor code:
|
None
|
Special destructor code:
|
None
|
Special postDestructor code:
|
None
|
Constraint name:
|
both_link_atoms_in_same_chemCompVars
|
Constraint code:
|
# NB the boundLinkAtom defines which ChemCompVars have the link; therefore the test is not symmetrical.
x = self.remoteLinkAtom
y = self.boundLinkAtom
if x is None:
isValid = True
else:
isValid = not [z for z in y.chemCompVars if z not in x.chemCompVars]
|
Constraint name:
|
chemAtoms_in_same_chemCompVars_as_linkAtoms
|
Constraint code:
|
ll1 = self.boundLinkAtom.chemCompVars
isValid = True
ll = [self.boundChemAtom]
x = self.remoteChemAtom
if x is not None:
ll.append(x)
for ca in ll:
if [x for x in ll1 if x not in ca.chemCompVars]:
isValid = False
|
Constraint name:
|
linear_polymer_linkcodes_must_fit_chemCompVars
|
Constraint code:
|
linkCode = self.linkCode
isValid = True
if linkCode in ('next','prev'):
chemComp = self.chemComp
if linkCode == 'next':
l1 = chemComp.findAllChemCompVars(linking='start')
elif linkCode == 'prev':
l1 = chemComp.findAllChemCompVars(linking='end')
ll = chemComp.findAllChemCompVars(linking='middle')
ll.update(l1)
if self.chemCompVars != ll:
isValid = False
|
Constraint name:
|
linkCode_conforms_to_boundChemAtom_name
|
Constraint code:
|
value = self.linkCode
if value in ('prev', 'next', None):
isValid = True
else:
atname = self.boundChemAtom.name
if value == atname:
isValid = True
elif value.startswith(atname) and value[-2] == '_' and value[-1] in '123456789':
isValid = True
else:
isValid = False
|
Constraint name:
|
selected_atoms_must_define_torsion
|
Constraint code:
|
x = self.remoteChemAtom
y = self.boundChemAtom
z = self.boundLinkAtom
w = self.remoteLinkAtom
if x is None or w is None:
isValid = True
else:
isValid = (self.chemComp.findFirstChemTorsion(chemAtoms=(x, y, z, w)) or self.chemComp.findFirstChemTorsion(chemAtoms=(w, z, y, x)) ) and True
|
Constraint name:
|
selected_atoms_must_form_outofchemComp_bond
|
Constraint code:
|
ll = (self.boundChemAtom, self.boundLinkAtom)
isValid = (self.chemComp.findFirstChemBond(chemAtoms=ll) or self.chemComp.findFirstChemBond(chemAtoms=(ll[1], ll[0])) ) and True
|
Known inward one-way links:
|
ccp.api.molecule.MolSystem.MolSystemLinkEnd.linkEnd,
ccp.api.molecule.Molecule.MolResLinkEnd.linkEnd
|