MoleculeBasic

ccpnmr.analysis.core.MoleculeBasic.areAtomsBound(atom1, atom2)

Dertemine whether two atoms are bonded together .. describe:: Input

MolSystem.Atom, MolSystem.Atom

Output

Boolean

ccpnmr.analysis.core.MoleculeBasic.areAtomsTocsyLinked(atom1, atom2)

Determine if two atoms have a connectivity that may be observable in a TOCSY experiment

Input

MolSystem.Atom, MolSystem.atom

Output

Boolean

ccpnmr.analysis.core.MoleculeBasic.areResonancesBound(resonance1, resonance2)

Determine whether two resonances are assigned to directly bonded atoms

Input

Nmr.Resonance, Nmr.Resonance

Output

Boolean

ccpnmr.analysis.core.MoleculeBasic.copyMolecule(molecule, newName=None)

Make a new molecule based upon the sequence of an existing ome .. describe:: Input

Molecule.Molecule

Output

Molecule.Molecule

ccpnmr.analysis.core.MoleculeBasic.duplicateResidueAssignments(residueA, residueB, experimentChains=None)

Assign residueB to an equivalent set of resonances as residueA Optional dictionary, keyed by experiment to specifiy which chain (should be parent of residueA or residueB or None - for both) an experiment’s peak assignments should go with.

Input

MolSystem.Residue, MolSystem.Residue, Dict of Nmr.Experiment:MolSystem.Chain (or None)

Output

None

ccpnmr.analysis.core.MoleculeBasic.dynamicAlign(seq1, seq2, matrix, inspen=2, extpen=1)

Aligns two sequence strings (of one letter codes) - results are gapped with ‘-‘ .. describe:: Input

String, String, Dict of Dicts (homology score matrix), Int, Int, Int, Int

Output

String, String (aligned & gapped sequence strings)

ccpnmr.analysis.core.MoleculeBasic.findBoundResonances(resonance)
Find any resonances which are assigned to atoms covalently bound
to the assigned atoms of the input resonance
Input

Nmr.Resonance

Output

List of Nmr.Resonances

ccpnmr.analysis.core.MoleculeBasic.findMatchingChain(molSystem, ccpCodes, excludeChains=None, molTypes=None, doWarning=True)
      • Deprecated in light of findMathcingChains() * * *

        Find the mol system chain that best matches the input ccpCodes (like three letter codes). Useful for trying to match structures to existing molecular data. Optional argument to specify which chains cannot be matched.

Input
MolSystem.MolSystem, List of Strings (MolSystem.MolResidue.ccpCodes),
List of MolSystem.Chains
Output
Tuple of (MolSystem.Chain, Int (index of first matching ccpCode),
Int (first matching MolSystem.Residue.seqId))
ccpnmr.analysis.core.MoleculeBasic.findMatchingChains(molSystem, ccpCodes, excludeChains=None, molTypes=None, doWarning=True)
Find the mol system chains that best match the input ccpCodes
(like three letter codes). Useful for trying to match structures to existing molecular data. Optional argument to specify which chains cannot be matched.
Input
MolSystem.MolSystem, List of Strings (MolSystem.MolResidue.ccpCodes),
List of MolSystem.Chains
Output
Tuple of (MolSystem.Chain, Int (index of first matching ccpCode),
Int (first matching MolSystem.Residue.seqId))
ccpnmr.analysis.core.MoleculeBasic.getAtomsTorsion(atoms)
Get the chemical torsion object equivalent
to an ordered input list of four atoms
Input

4-List of MolSystem.Atoms

Output

ChemComp.ChemTorsion

ccpnmr.analysis.core.MoleculeBasic.getBoundAtoms(atom)

Get a list of atoms bound to a given atom.. .. describe:: Input

MolSystem.Atom

Output

List of MolSystem.Atoms

ccpnmr.analysis.core.MoleculeBasic.getChainResidueMapping(chainA, chainB)
Find the corresponding pairs of residues in two sequence similar chains.
Matches independent chain fragments, which can be of different molTypes
Input

MolSystem.Chain, MolSystem.Chain

Output

List of List of [MolSystem.Residue or None]

ccpnmr.analysis.core.MoleculeBasic.getChemAtomNmrRef(project, atomName, ccpCode, molType='protein', sourceName='BMRB')

Retrieve an NMR chemical shift reference atom record

Input

Implementation.Project, Word (ChemAtom.name), Word (ChemComp.ccpCode), Word, (chemComp.molType), Word

Output

Float

ccpnmr.analysis.core.MoleculeBasic.getChemCompOverview(molType, project=None)
Get a dictionary containing details of all available chemical compounds
for a given moleucle type. Project can be input to search for loaded, but non standard chem comps.
Input

Word (Molecule.MolResidue.MolType), Implementation.Project

Output
Dict of ChemComp.ccpCode:[Word, Word, Line, Word]
(1-letter Code, 3-letter Code, name, mol formula)
ccpnmr.analysis.core.MoleculeBasic.getChemicalShiftBounds(chemAtom, threshold=0.001, sourceName='BMRB')

Return the min and max chemical shifts for a given atom type observed in the databases

Input

ChemComp.ChemAtom, Float, Word

Output

Float

ccpnmr.analysis.core.MoleculeBasic.getLinkedResidue(residue, linkCode='prev')
Find a residue, if it exists, that is linked to the
input residue by a given type of molResidue link.
Input

MolSystem.Residue

Output

MolSystem.Residue

ccpnmr.analysis.core.MoleculeBasic.getMolTypeCcpCodes(molType='all', project=None)
Gives ccpCodes for chemComps according to molecule type: e.g. DNA
Project can be input to search for non-standard types.
Input

Implementation.Project, String (ChemComp.molType or ‘all’)

Output

List of Words (ChemComp.CcpCodes)

ccpnmr.analysis.core.MoleculeBasic.getNumConnectingBonds(atom1, atom2, limit=5)

Get the minimum number of binds that connect two atoms. Stops at a specified limit (and returns None if not within it)

Input

MolSystem.Atom, MolSystem.atom, Int

Output

Int

ccpnmr.analysis.core.MoleculeBasic.getRandomCoilShift(chemAtom, context=None, sourceName='BMRB')

Get the random coil chemical shift value of a chemAtom

Input

ChemComp.ChemAtom

Output

Float

ccpnmr.analysis.core.MoleculeBasic.getRandomCoilShiftCorrectionsDict()

Citation

Schwarzinger, S., Kroon, G. J. A., Foss, T. R., Chung, J., Wright, P. E., Dyson, H. J. “Sequence-Dependent Correlation of Random Coil NMR Chemical Shifts”, J. Am. Chem. Soc. 123, 2970-2978 (2001)

Values obtained from a GGXGG sequence pentapeptide.

ccpnmr.analysis.core.MoleculeBasic.getResidueCode(obj)
Get a text code for a residue/molResidue/resonanceGroup,
defaults to the ccpCode if a custom code is not present in userResidueCodesDict
Input

MolSystem.Residue

Output

Word

ccpnmr.analysis.core.MoleculeBasic.getResidueMapping(residue, aromaticsEquivalent=True)
Gives the Analysis.ResidueMapping for a residue
Makes a new one with new AtomSetsMappings if not exists Makes a ChainMapping too if needed.
Input

MolSystem.Residue

Output

Analysis.ResidueMapping

ccpnmr.analysis.core.MoleculeBasic.getResidueObservableAtoms(residue, refExperiment=None, labelling=None, minFraction=0.10000000000000001, jCouplingBonds=(1, 2, 3), usePermissiveShifts=False, chemElements=('H', 'C', 'N', 'F', 'P'))

Determine which atoms of a chem comp varient would give rise to observable resonances considering a given reference experiment and/or an isotope labelling scheme. Can specify minimum fraction of an isotope to consider something observable and the chemical elements which you are observing. Boolean option to match database min and max chemical shift bounds to atom sites, rather than randon coil shift values (default).

Input

MolSystem.Residue, NmrExpPrototype.RefExperiment, ChemCompLabel.LabelingScheme or LabeledMolecule.LabeledMixture, Float, Boolean, List of Words

Output

List of ChemComp.ChemAtoms

ccpnmr.analysis.core.MoleculeBasic.getSequenceResidueMapping(chain, sequence)

Match a sequence of residue ccpCodes to an existing chain and calculate the alignment score. .. describe:: Input

MolSystem.Chain, List of Words (MolSystem.Residue.ccpCodes)

Output

List of 2-List of [Int or None, MolSystem.Residue or None], Float (score)

ccpnmr.analysis.core.MoleculeBasic.getUnicodeAtomName(name, elementSymbol)
Return a unicode string for a protein atom name, i.e.
including any greek characters
Input

Word, Word (ChemElement.symbol)

Output

Unicode Word

ccpnmr.analysis.core.MoleculeBasic.getUnicodeGreek()
{‘a’:u’u03B1’,’b’:u’u03B2’,’g’:u’u03B3’,’d’:u’u03B4’,’e’:u’u03B5’,
‘z’:u’u03B6’,’h’:u’u03B7’,’q’:u’u03B8’,’i’:u’u03B9’,’k’:u’u03BA’, ‘l’:u’u03BB’,’m’:u’u03BC’,’n’:u’u03BD’,’x’:u’u03BE’,’o’:u’u03BF’, ‘p’:u’u03C0’,’r’:u’u03C1’,’j’:u’u03C2’,’s’:u’u03C3’,’t’:u’u03C4’, # j : Other sigma ‘u’:u’u03C5’,’f’:u’u03C6’,’c’:u’u03C7’,’y’:u’u03C8’,’w’:u’u03C9’}
ccpnmr.analysis.core.MoleculeBasic.greekSortAtomNames(dataList, molType='protein')

Sorts a list of atom names according to greek/sidechain order when letters are latinised .. describe:: Input

List of Strings

Output

List of Strings (sorted)

ccpnmr.analysis.core.MoleculeBasic.makeAtomSet(guiName, atoms, chemAtomSet, mappingType)

Make atomSet and atomSetMapping for equivalent atoms

Input

Word (AtomSet.name), List of MolSystem.Atoms, ChemComp.ChemAtomSet, Word (AtomSetMapping.mappingType)

Output

Nmr.AtomSet

ccpnmr.analysis.core.MoleculeBasic.makeAtomSetMapping(residueMapping, name, atomSets, chemAtomSet, mappingType, resonances=None)

Make atomSetMapping given atomSets and mapping type .. describe:: Input

Analysis.ResidueMapping, Word, MolSystem.Residue,
List of Nmr.AtomSets, ChemComp.ChemAtomSet, Word, Word, List of Nmr.Resonances
Output

Analysis.AtomSetMapping

ccpnmr.analysis.core.MoleculeBasic.makeGuiMultiAtomSet(residue, multiGuiName, guiSetsNames, elementSymbol, mappingType, chemAtomSet)

Make atom set mappings for multiple atom set selections .. describe:: Input

MolSystem.Residue, Word (Analysis.AtomSetMapping.name),
List of Words (Analysis.AtomSetMapping.names), Word, Word, ChemComp.ChemAtomSet
Output

Analysis.AtomSetMapping

ccpnmr.analysis.core.MoleculeBasic.makeGuiName(name, elementSymbol, molType)

Convert atom or atomSet name into name for gui: e.g H becomes Hn .. describe:: Input

Word (Nmr.AtomSet.name), Word, Word

Output

Word

Make a molSystemLink given two residues and the linkEnds to be joined .. describe:: Input

MolSystem.Residue, MolSystem.Residue, ChemComp.LinkEnd, ChemComp.LinkEnd

Output

MolSystem.MolSystemLink

ccpnmr.analysis.core.MoleculeBasic.makeNonStereoName(molType, name, n=None)

Convert a sterospecific atom name into a non-stereospecific one for a GUI .. describe:: Input

Word, Int (naming offset from start of alphabet)

Output

Word

ccpnmr.analysis.core.MoleculeBasic.makeResidueAtomSets(residue, aromaticsEquivalent=True)
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.
Input

MolSystem.Residue, Boolean

Output

None

ccpnmr.analysis.core.MoleculeBasic.makeResidueAtomSetsEquivalent(residue)
Remake a residue’s atom sets if they are found to be equivalent: e.g.
if an aromatic ring rotates quickly on the NMR timescale
Input

MolSystem.Residue

Output

None

ccpnmr.analysis.core.MoleculeBasic.makeResidueAtomSetsNonEquivalent(residue)
Remake a residue’s atom sets if they are found to be non-equivalent: e.g.
if an aromatic ring does not rotate quickly on the NMR timescale
Input

MolSystem.Residue

Output

None

ccpnmr.analysis.core.MoleculeBasic.makeResidueLocTag(residue, chemAtoms)

Make unique identifier for a given residue type in a given chain location .. describe:: Input

MolSystem.Residue, List of ChemCmp.chemAtoms

Output

Word

ccpnmr.analysis.core.MoleculeBasic.moveMolSystemChain(chain, molSystem)

Moves a chain from one molSystem to another .. describe:: Input

MolSystem.Chain, MolSystem.MolSystem

Output

None

ccpnmr.analysis.core.MoleculeBasic.newMolSystem(project)

Get a new molSystem for a project with a unique code. .. describe:: Input

Implementation.Project

Output

MolSystem.MolSystem

ccpnmr.analysis.core.MoleculeBasic.sequenceAlign(seq1, seq2, matrix, inspen=2, extpen=1)
Aligns two sequence strings (of one letter codes)
  • results are gapped with ‘-‘; first tries an exact substring match,

if that failts it then uses dynamicAlign

Input

String, String, Dict of Dicts (homology score matrix), Int, Int, Int, Int

Output

String, String (aligned & gapped sequence strings)

ccpnmr.analysis.core.MoleculeBasic.transferChainAssignments(chainA, chainB)

Transfer any atomic assignments from one chain to another where possible. .. describe:: Input

MolSystem.Chain, MolSystem.Chain

Output

None

ccpnmr.analysis.core.MoleculeBasic.transferResidueAssignments(residueA, residueB)

Move any atomic assignments from one residue to another where possible.

Input

MolSystem.Residue, MolSystem.Residue

Output

None

Previous topic

MergeObjects

Next topic

PeakBasic

This Page