Data Model version 2.0.6
Acknowledgements
Diagram | Class Map | Attribute Map | Method Map | Help | License
Home | Package | Class: { prev | next } | Attribute | Method

Class: LinkEnd


    Describes one end of link to other ChemComp.
    linkAtoms[0] and chemAtoms[0] must be included in the same set of chemCompVars. linkAtoms[1] and chemAtoms[1] must be included in the same set of ChemCompVars as linkAtoms[0] or in a subset of it.

    There are constraints on the linkEnd, linkEnd.linkCode, ChemCompVar and ChemCompVar.linking (see ChemCompVar documentation). To satisfy the constraints the LinkEnd must be created after the ChemCompVars are created and linked to the correct AbstractChemAtoms.
Attributes
Link Attributes
Attribute Methods
Link Attribute Methods
Class Methods
Factory Methods
Other Methods
Appendix

Inheritance:


Details:

Parent: link chemComp to class ChemComp
Main key: linkCode
Mandatory Attributes: linkCode, boundChemAtom, boundLinkAtom
Known Subclasses: None
Children: None
Constructor: newObj = LinkEnd( chemComp,linkCode=value, boundChemAtom=value, boundLinkAtom=value, ... )

Attributes (in package)

Go to Top
Attribute Type Multiplicity Description
linkCode Word 1..1 code ('name') for link. The following naming convention is used: The linkCode is the same as the name of the boundChemAtom. E.g. a cysteine disulfide link will have linkCode 'SG'. The first exception is the case where there is more than one link starting at the same atom - here the linkCodes are the name of the first linkAtom followed by '_1', '_2'. E.g. an atom CX with three links starting from it will have linkEnds with linkCodes CX_1, CX_2, CX_3. If two different atom subtypes both have a link, the linkCodes are of the same form - there are no fixed rules for how to apportion the various suffixes. Another exception is the 'prev' and 'next' that form the backbone of linear polymers.  

Inherited Attributes (not in package): applicationDataclassNamefieldNamesinConstructorisDeletedmetaclasspackageNamepackageShortNamequalifiedName

Link Attributes (in package)

Go to Top
Attribute Type Multiplicity Description
boundChemAtom ChemAtom 1..1 One of the AbstractChemAtoms making up the Link. The direct bond is betweeen boundChemAtom (within this ChemComp) and boundLinkAtom (outside this ChemComp). The optional remoteChemAtom (within this ChemComp) and remoteLinkAtom (outside this ChemComp) arebound to the their respective boundAtoms. If defined they serve to define angles and torsions that involve the out-of-ChemComp bond.  
boundLinkAtom LinkAtom 1..1 One of the AbstractChemAtoms making up the Link. The direct bond is betweeen boundChemAtom (within this ChemComp) and boundLinkAtom (outside this ChemComp). The optional remoteChemAtom (within this ChemComp) and remoteLinkAtom (outside this ChemComp) arebound to the their respective boundAtoms. If defined they serve to define angles and torsions that involve the out-of-ChemComp bond.  
chemComp ChemComp 1..1 (Parent link). parent link  
chemCompVars ChemCompVar 0..* Derived. ChemCompVars that hold LinkEnd  
parent ChemComp 1..1 link to parent object - synonym for chemComp  
remoteChemAtom ChemAtom 0..1 One of the AbstractChemAtoms making up the Link. The direct bond is betweeen boundChemAtom (within this ChemComp) and boundLinkAtom (outside this ChemComp). The optional remoteChemAtom (within this ChemComp) and remoteLinkAtom (outside this ChemComp) arebound to the their respective boundAtoms. If defined they serve to define angles and torsions that involve the out-of-ChemComp bond.  
remoteLinkAtom LinkAtom 0..1 One of the AbstractChemAtoms making up the Link. The direct bond is betweeen boundChemAtom (within this ChemComp) and boundLinkAtom (outside this ChemComp). The optional remoteChemAtom (within this ChemComp) and remoteLinkAtom (outside this ChemComp) arebound to the their respective boundAtoms. If defined they serve to define angles and torsions that involve the out-of-ChemComp bond.  

Inherited Attributes (not in package): accessactiveAccessroottopObject

Attribute Methods (in package)

Go to Top
Attribute Method Return Parameters Comment
linkCode
getLinkCode Word -
setLinkCode - Word

Link Attribute Methods (in package)

Go to Top
Attribute Method Return Parameters Comment
boundChemAtom
getBoundChemAtom ChemAtom -
setBoundChemAtom - ChemAtom
boundLinkAtom
getBoundLinkAtom LinkAtom -
setBoundLinkAtom - LinkAtom
chemComp
getChemComp ChemComp -
chemCompVars
getChemCompVars ChemCompVar Set - non-std.
sortedChemCompVars ChemCompVar List -
findFirstChemCompVar ChemCompVar keyword=value pairs
findAllChemCompVars ChemCompVar Set keyword=value pairs
parent
getParent ChemComp -
remoteChemAtom
getRemoteChemAtom ChemAtom -
setRemoteChemAtom - ChemAtom
remoteLinkAtom
getRemoteLinkAtom LinkAtom -
setRemoteLinkAtom - LinkAtom

Class Methods (in package)

Go to Top
Method Return Parameters Comment
checkValid - Boolean
checkAllValid - Boolean
getByKey LinkEnd memops.api.Implementation.MemopsObject, Any List static
getFullKey Any List Boolean
getLocalKey Any -
get Any String
set - String, Any

Factory Methods (in package)

Go to Top
Method Return Parameters
None

Other Methods (in package)

Go to Top
Method Return Parameters Comment
None

Appendix

Go to Top

guid:

www.ccpn.ac.uk_Fogh_2006-08-16-14:22:52_00030

isImplicit:

False

Tag

Value
repositoryId $Id: LinkEnd.xml,v 1.58 2011-01-13 14:40:33 rhfogh Exp $

Tag

Value
repositoryTag $Name: not supported by cvs2svn $

Special constructor code:

None

Special destructor 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.linkEndccp.api.molecule.Molecule.MolResLinkEnd.linkEnd
  Data Model Version 2.0.6
Go to Top  
  Autogenerated by  PyApiDocGen  revision 1.3   on  Wed Aug 7 15:06:23 2013    from data model package  ccp.api.molecule.ChemComp.LinkEnd   revision 1.58  
  Work done by the CCPN team.
www.ccpn.ac.uk