> ok, a bit more on this topic. i did use formatconverter to import my aromatic
> assignments and it created He1 and He2 assignments for an He* assignment with
> an He* annotation on the relevant peak but the He1 and He2 resonances don't
> exist. if i clean a peak and reassign it it has to be with Hea and Heb (not He1
> and He2 as i said previously). this then creates the appropriate resonance
> objects. am i missing something or is this just a syntactic oversight?
Ok, I think I am beginning to understand what the problem is here. It
seems that FormatConverter made He* for He1,He2 and then Analysis made
Hea,Heb for He*. The He* resonance probably still exists in Analysis - its
just that the AtomBrowser is not expecting it and thus has no handle to
it.
Analysis has now been fixed to cope with predetermined aromatic atomSet
equivalency. At the bottom of this email is the new version of
makeResidueAtomSets from python/analysis/ccpnmr/MoleculeBasic.py which
will interpret FormatConverter atom sets correctly. You can cut and paste
this into MoleculeBasic if you want the fix before the next Analysis
release.
Also in the next Analysis release are general mechanisms for setting
aromatic ring flipping equivalency. There is the option to set aromatics
to flipping or non-flipping at chain creation time and an option in
AtomBrowser to set individual aromatics, post creation, to either status
(whilst warning you that assignments could be affected).
Yours,
Tim
-------------------------------------------------------------------------------
def makeResidueAtomSets(residue, aromaticsEquivalent=0):
"""Descrn: Make all atomSets and atomSetMappings for a given residue
Aromatic Phe, Tyr (Hd1,Hd2), (He1,He2) can be made into
single equivalent atom sets due to rotation.
Inputs: Nmr.Residue, Boolean
Output:
"""
residue.guiAtomSets = {}
chemComp = residue.molResidue.chemCompLoc.chemComp
equivalent = {}
elementSymbolDict = {}
nonequivalent = {}
multiSet = {}
chemAtomSetDict = {}
inMultiSet = {}
molType = residue.molResidue.molType
for atom in residue.atoms:
chemAtom = atom.chemAtom
chemAtomSetDict[atom] = chemAtom
elementSymbol = chemAtom.elementSymbol
if chemAtom.chemAtomSet is None:
name = chemAtom.name
makeAtomSet(residue,name,(atom,),elementSymbol,'simple')
else:
chemAtomSet = chemAtom.chemAtomSet
name = chemAtomSet.name
elementSymbolDict[name] = elementSymbol
chemAtomSetDict[name] = chemAtomSet
if chemAtomSet.isEquivalent:
if equivalent.get(name) is None:
equivalent[name] = []
equivalent[name].append(atom)
elif (chemAtomSet.isEquivalent is None) and atom.atomSets and (len(atom.atomSets.atoms) > 1):# aromatic rotation prev set
if equivalent.get(name) is None:
equivalent[name] = []
equivalent[name].append(atom)
elif (chemAtomSet.isEquivalent is None) and (not atom.stomSets) and aromaticsEquivalent:# aromatic rotation to be set
if equivalent.get(name) is None:
equivalent[name] = []
equivalent[name].append(atom)
else:
if nonequivalent.get(name) is None:
nonequivalent[name] = []
nonequivalent[name].append(atom)
if chemAtomSet.chemAtomSet is not None:
multiName = chemAtomSet.chemAtomSet.name
chemAtomSetDict[multiName] = chemAtomSet.chemAtomSet
elementSymbolDict[multiName] = elementSymbol
if multiSet.get(multiName) is None:
multiSet[multiName] = {}
multiSet[multiName][name] = 1
inMultiSet[name] = 1
for groupName in equivalent.keys():
atoms = equivalent[groupName]
elementSymbol = elementSymbolDict[groupName]
chemAtomSet = chemAtomSetDict[groupName]
if len(atoms)==2:
# not enough atoms for multi sets!
makeAtomSet(residue,groupName,atoms,elementSymbol,'simple')
else:
if inMultiSet.get(groupName):
# e.g. for Val Hg1* and Hga*
groupName2 = makeNonStereoName(groupName)
makeAtomSet(residue,groupName2,atoms,elementSymbol,'nonstereo')
makeAtomSet(residue,groupName,atoms,elementSymbol,'stereo')
else:
makeAtomSet(residue,groupName,atoms,elementSymbol,'simple')
for groupName in nonequivalent.keys():
atoms = nonequivalent[groupName]
elementSymbol = elementSymbolDict[groupName]
chemAtomSet = chemAtomSetDict[groupName]
atomSetNames = []
for atom in atoms:
name = chemAtomSetDict[atom].name
makeAtomSet(residue,name,(atom,),elementSymbol,'stereo')
atomSetNames.append(name)
n = 0
for atom in atoms:
name = chemAtomSetDict[atom].name
name2 = makeNonStereoName(name, n)
n += 1
makeGuiMultiAtomSet(residue, name2, atomSetNames,elementSymbol,'nonstereo',chemAtomSet)
makeGuiMultiAtomSet(residue, groupName,atomSetNames,elementSymbol,'ambiguous',chemAtomSet)
for groupName in multiSet.keys():
atomSetNames = multiSet[groupName].keys()
elementSymbol = elementSymbolDict[groupName]
chemAtomSet = chemAtomSetDict[groupName]
makeGuiMultiAtomSet(residue, groupName,atomSetNames,elementSymbol,'ambiguous',chemAtomSet)
-------------------------------------------------------------------------------
Dr Tim Stevens Email: [log in to unmask]
Department of Biochemistry [log in to unmask]
University of Cambridge Phone: +44 1223 766022 (office)
80 Tennis Court Road +44 7816 338275 (mobile)
Old Addenbrooke's Site +44 1223 364613 (home)
Cambridge CB2 1GA WWWeb: http://www.bio.cam.ac.uk/~tjs23
United Kingdom http://www.pantonia.co.uk
-------------------------------------------------------------------------------
------ +NH3CH(CH(CH3)OH)C(O)NHCH(CH(CH3)CH2CH3)C(O)NHCH(CH2CH2SCH3)CO2- -------
-------------------------------------------------------------------------------
|