CouplingBasic

======================COPYRIGHT/LICENSE START==========================

CouplingBasic.py: Part of the CcpNmr Analysis program

Copyright (C) 2003-2010 Wayne Boucher and Tim Stevens (University of Cambridge)


The CCPN license can be found in ../../../../license/CCPN.license.

======================COPYRIGHT/LICENSE END============================

for further information, please contact :


If you are using this software for academic purposes, we suggest quoting the following references:

===========================REFERENCE START============================= R. Fogh, J. Ionides, E. Ulrich, W. Boucher, W. Vranken, J.P. Linge, M. Habeck, W. Rieping, T.N. Bhat, J. Westbrook, K. Henrick, G. Gilliland, H. Berman, J. Thornton, M. Nilges, J. Markley and E. Laue (2002). The CCPN project: An interim report on a data model for the NMR community (Progress report). Nature Struct. Biol. 9, 416-418.

Wim F. Vranken, Wayne Boucher, Tim J. Stevens, Rasmus H. Fogh, Anne Pajon, Miguel Llinas, Eldon L. Ulrich, John L. Markley, John Ionides and Ernest D. Laue (2005). The CCPN Data Model for NMR Spectroscopy: Development of a Software Pipeline. Proteins 59, 687 - 696.

===========================REFERENCE END===============================

ccpnmr.analysis.core.CouplingBasic.assignPeakDimComponentCoupling(component, jCoupling, tolerance=None)

Assign a jCoupling to a peakDim component for a splitting. Any coupling value will be updated by CouplingBasic notifiers. JCoupling can be None to remove assignment.

Input

ccp.nmr.Nmr.PeakDimComponent, ccp.nmr.Nmr.JCoupling, Float

Output

ccp.nmr.Nmr.PeakDimContribN

ccpnmr.analysis.core.CouplingBasic.assignPeakDimComponentResonance(component, resonance, tolerance=None)

Assign a chemical shift to a peakDim component (e.g. reduced dimensionality)

Input

ccp.nmr.Nmr.PeakDimComponent, ccp.nmr.Nmr.Resonance, Float

Output

ccp.nmr.Nmr.PeakDimContrib

ccpnmr.analysis.core.CouplingBasic.assignPrimaryClusterCoupling(cluster)

Assign the couplings of a peak cluster to any main resonance pair.

Input

ccp.nmr.Nmr.PeakCluster

Output

ccp.nmr.Nmr.JCoupling

ccpnmr.analysis.core.CouplingBasic.averageJCouplingValue(jCoupling)

Recalculate a J-coupling value based upon the peakDimComponents to which it may be assigned via resonances. Sets any peak and peakDim links.

Input

ccp.nmr.Nmr.JCoupling

Output

Float

ccpnmr.analysis.core.CouplingBasic.calculateKarplusCoupling(angle, couplingConstantTriple, angleOffset=0)

Calculate the Karplus coupling, given angle, coupling constant and optional angle offset. Coupling = c0 + c1*cos(angle+angleOffset) + c2*cos(angle+angleOffset)

Input

angle in radians, (c0, c1, c2) tuple, angle offset in radians

Output

coupling

ccpnmr.analysis.core.CouplingBasic.calculateKarplusCouplings(angle, couplingConstants, angleOffsets)

Calculate the Karplus couplings, given angle, coupling constants, angle offset. Coupling = c0 + c1*cos(angle+angleOffset) + c2*cos(angle+angleOffset)

Input

angle in radians, list of (c0, c1, c2) tuples, list of angle offsets in radians

Output

list of couplings

ccpnmr.analysis.core.CouplingBasic.couplingNotifiers(notifyFunc)

Function to setup automatic curation when couplings ans peak clusters change

Input

Function (to issue notification)

Output

None

ccpnmr.analysis.core.CouplingBasic.deleteCluster(cluster)

Remove the input peak cluster and any associated peakDimComponents that record the coupling contributions.

Input

Nmr.PeakCluster

Output

None

ccpnmr.analysis.core.CouplingBasic.findMatchingCouplings(component, tolerance=None)

Get the J couplings that match the splitting of a peakDimComponent, within the set tolerances

Input

ccp.nmr.Nmr.PeakDimComponent

Output

List of 2-Tupe of (Float (delta), ccp.nmr.Nmr.JCoupling)

ccpnmr.analysis.core.CouplingBasic.getClusterCoupling(peakCluster, dim)

Determine the coupling value in Hz for the peaks of an input peak cluster along the dimension corresponding to the input dimension number.

Input

Nmr.PeakCluster, Int (Nmr.DataDim.dim)

Output

Float (coupling value in Hz)

ccpnmr.analysis.core.CouplingBasic.getCoupledExpDims(experiment)

List the dimensions (ExpDims) of an experiment which carry couplings.

Input

Nmr.Experiment

Output

List of Nmr.ExpDims

ccpnmr.analysis.core.CouplingBasic.getCouplingAnnotations(cluster)

Get a text string representing the assignment status of couplings (in all dimensions) represented by a peak cluster

Input

Nmr.PeakCluster, Int

Output

String

ccpnmr.analysis.core.CouplingBasic.getCouplingAtomResonances(nmrProject, residue, atomNames, makeNew=True)

Get resonances that correspond to two named atoms in a given residue context - could include sequential neighbours. A prerequisite for accessign the Jcoupling etc for those atoms.

Input

Nmr.NmrProject, MolSystem.Residue, 2-List of Words (MolSystem.Atom.names), Boolean

Output

Nmr.Resonance, Nmr.Resonance

ccpnmr.analysis.core.CouplingBasic.getCouplingDataDimRef(dataDim)

Find the reference data dimension of the input data dimension that corresponds to a coupling referencing.

Input

Nmr.DataDim

Output

Nmr.DataDimRef

ccpnmr.analysis.core.CouplingBasic.getCouplingDimAnnotation(cluster, dim)

Get a text string representing the assignment status of couplings in a specified dimension represented by a peak cluster

Input

Nmr.PeakCluster, Int

Output

String

ccpnmr.analysis.core.CouplingBasic.getCouplingTolerance(conponent, dataDimRef)

Get the coupling assignment tolerance (usually Hz) for a given data dim.

Input

ccp.nmr.Nmr.FreqDataDim

Output

Float

ccpnmr.analysis.core.CouplingBasic.getExperimentJCouplingList(experiment)

Get the J-Coupling list associated with an experiment, making and linking a new one if none exists.

Input

Nmr.Experiment

Output

Nmr.JCouplingList

ccpnmr.analysis.core.CouplingBasic.getPeakDimComponentSplitting(component)

Get the splitting value (usually in Hz, but possibly in ppm) for a given peakDim component.

Input

ccp.nmr.Nmr.PeakDimComponent

Output

Float

ccpnmr.analysis.core.CouplingBasic.getPeakListsPeakClusters(peakLists, clusterType='multiplet')

Find any peak clusters (ordered by serial) that are represented by the input peak lists.

Input

List of Nmr.PeakLists

Output

List of Nmr.PeakClusters

ccpnmr.analysis.core.CouplingBasic.getPeaksClusters(peaks, clusterType='multiplet')

Find the peak clusters that may be represented by the input peaks. Cluster type can be set to None to get ant/all clusters

Input

List of Nmr.Peaks, Word (PeakCluster.clusterType)

Output

Nmr.PeakCluster

ccpnmr.analysis.core.CouplingBasic.getResidueJCoupling(jCouplingList, residue, atomNames)

Find the first JCoupling in a jCoupling list that corresponds to the named atoms in a given residue. Returns None if there is no match.

Input

Nmr.JCouplingList, MolSystem.Residue, 2-List of Words (MolSystem.Atom.names)

Output

Nmr.JCoupling

ccpnmr.analysis.core.CouplingBasic.getSpectrumMultipletPattern(spectrum)

Retrieve any multiplet pattern previously associated with a spectrum

Input

Nmr.DataSource

Output

String

ccpnmr.analysis.core.CouplingBasic.makeMultipletPeakCluster(peaks, multipletPattern, windowPane)

Make a peak cluster comprising of the selected peaks. The multiplet pattern is a recursive list of sub lists to give an object with the same dimensionality as the peak dims. Each element is either +1, 0 or -1 to specify the sign or absence of a multiplet peak. How to interpret a multiplet pattern is relative to input window pane, e.g. if spectrum is rotated. Automatically makes coupling expDimRefs when required.

Input

List of Nmr.Peaks, List of (Lists of)^numDim-1 Ints(-1,0,+1), Analysis.SpectrumWindowPane

Output

Nmr.PeakCluster

ccpnmr.analysis.core.CouplingBasic.removeCouplingNotifiers()

Remove the notification calls to automatically update annotations couplings andpeak clusters when couplings change.

Input

None

Output

None

ccpnmr.analysis.core.CouplingBasic.setResidueJCoupling(jCouplingList, residue, atomNames, value, error=None)

Sets the value of a JCoupling in a jCoupling list that corresponds to the named atoms. Makes a new JCoupling object if none can be found.

Input

Nmr.JCouplingList, MolSystem.Residue, 2-List of Words (MolSystem.Atom.names)

Output

Nmr.JCoupling

ccpnmr.analysis.core.CouplingBasic.setSpectrumMultipletPattern(spectrum, pattern)

Associate a give multiplet pattern with a spectrum for later recall.

Input

Nmr.DataSource, String

Output

None

ccpnmr.analysis.core.CouplingBasic.setupCouplingNotifiers()

Set up the notification calls to automatically update annotations couplings andpeak clusters when couplings change.

Input

None

Output

None

ccpnmr.analysis.core.CouplingBasic.updateClusterAnnotation(cluster)

Refresh the main peak cluster annotation (normally carries )

Input

Nmr.PeakCluster

Output

String

ccpnmr.analysis.core.CouplingBasic.updateClusterAssignments(cluster, refPeak=None)

Initialise a peak cluster object by enforcing consistent assignments across its component peaks and by setting its annotation approprately.

Input

Nmr.PeakCluster, Nmr.Peak

Output

None

ccpnmr.analysis.core.CouplingBasic.updateComponentMeasurements(component)

Update the shifts /couplings of resonances assigned to the contributions of a particular peak dim component. Needs to be set because for a non-main component the bare peak dim position is not representative of the true shift, being a linear combination of ppm and coupling.

Input

Nmr.PeakDimComponent

Output

None

ccpnmr.analysis.core.CouplingBasic.updateContribNPeakDimAnnotation(contrib)

Updates annotation string for the peak dimension of a given splitting contribution according to its assignment status

Input

Nmr.PeakDimContribN

Output

None

Previous topic

ConstraintBasic

Next topic

DataAnalysisBasic

This Page