if __name__ == '__main__': # This code follows on from ex7.py. project = MemopsRoot(name='constraintsTest') guiRoot = Tkinter.Tk() cnsObj = CnsFormat(project, guiRoot) cnsDir = '../data/cns' cnsCoord = 'cns_1.pdb' cnsCoordFile = os.path.join(cnsDir, cnsCoord) # To make a molSystem object. chains = cnsObj.readSequence(cnsCoordFile) distConst = 'n15noesy.tbl' distConstFile = os.path.join(cnsDir, distConst) # To make a structureGeneration object. constList = cnsObj.readDistanceConstraints(distConstFile) nmrConstStore = constList.nmrConstraintStore strucGen = nmrConstStore.findFirstStructureGeneration() cnsObj.linkResonances(forceDefaultChainMapping=1, globalStereoAssign=1, setSingleProchiral=1, setSinglePossEquiv=1, strucGen=strucGen)
# Read in a sequence - this will create the molecular system with # all the atom information. # Note, many of the popups can be avoided when the right information # is passed in (see the readSequence() function in the # ccpnmr.format.converters.DataFormat class. # Set the location of the CNS files. cnsDir = '../data/cns' # Read in a sequence to set molecule and molSystem objects. cnsCoord = 'cns_1.pdb' cnsCoordFile = os.path.join(cnsDir, cnsCoord) # readSequence() returns a list of chains. chains = cnsObj.readSequence(cnsCoordFile, minimalPrompts=1) # Read in a distance constraint list. distConst = 'n15noesy.tbl' distConstFile = os.path.join(cnsDir, distConst) constList = cnsObj.readDistanceConstraints(distConstFile, minimalPrompts=1) # Do some preliminary data model navigation to get input parameters for # linkResonances. # An nmrConstraintStore links a group of constraint files. # A structureGeneration links an nmrConstraintStore with a set # of structures. nmrConstStore = constList.nmrConstraintStore strucGen = nmrConstStore.findFirstStructureGeneration()
# Create the FormatConverter CnsFormat object # cnsFormat = CnsFormat(ccpnProject, root) # # Read in a sequence - this will create the molecular system with # all the atom information. # # Note that a lot of the popups can be avoided when the right information # is passed in (see ccpnmr.format.converters.DataFormat, the readSequence # function in the DataFormat class) # coordinateFile = os.path.join(dataDir, coordinateFileName) ccpnChains = cnsFormat.readSequence(coordinateFile) # # Read in a distance constraint list # distanceConstraintFile = os.path.join(dataDir, distanceConstraintFileName) ccpnConstraintList = cnsFormat.readDistanceConstraints( distanceConstraintFile) # # Do some preliminary Data Model navigation to get input parameters for # linkResonances # # An nmrConstraintStore links a group of constraint files # A structureGeneration links an nmrConstraintStore with a set of structures
# Create the FormatConverter CnsFormat object # cnsFormat = CnsFormat(ccpnProject,root) # # Read in a sequence - this will create the molecular system with # all the atom information. # # Note that a lot of the popups can be avoided when the right information # is passed in (see ccpnmr.format.converters.DataFormat, the readSequence # function in the DataFormat class) # coordinateFile = os.path.join(dataDir,coordinateFileName) ccpnChains = cnsFormat.readSequence(coordinateFile) # # Read in a distance constraint list # distanceConstraintFile = os.path.join(dataDir,distanceConstraintFileName) ccpnConstraintList = cnsFormat.readDistanceConstraints(distanceConstraintFile) # # Do some preliminary Data Model navigation to get input parameters for # linkResonances # # An nmrConstraintStore links a group of constraint files # A structureGeneration links an nmrConstraintStore with a set of structures #