Exemplo n.º 1
0
            if t2RelaxTableTags.has_key(tagName):
                if t2RelaxTableTags[tagName][i] != None:
                    setattr(self, attrName, t2RelaxTableTags[tagName][i])
                else:
                    setattr(self, attrName, default)

        # For completeness...
        (self.seqCode, self.seqInsertCode) = getSeqAndInsertCode(self.seqCode)


###################
# Main of program #
###################

if __name__ == "__main__":

    files = ['/homes/penkett/project/nmrstar/files/bmr15230_3_pub.str']

    for file in files:

        #file = os.path.join(getTopDirectory(), file)

        nmrStarFile = NmrStarFile(file, version='3.1')

        nmrStarFile.read(verbose=1)

        for t2RelaxFile in nmrStarFile.t2RelaxFiles:
            for t2Relax in t2RelaxFile.t2RelaxValues:
                print t2Relax.Id, t2Relax.seqCode, t2Relax.resLabel, t2Relax.atomName, t2Relax.value, t2Relax.valueError, t2Relax.rexValue, t2Relax.rexValueError
Exemplo n.º 2
0
        #['../reference/ccpNmr/aartUtrecht/1byx/restraints.star','2.1.1'],
        #['../reference/ccpNmr/aartUtrecht/1bct/restraints.star','2.1.1'],
        #['../reference/ccpNmr/aartUtrecht/1d3z/restraints.star','2.1.1'],
        #['../reference/ccpNmr/aartUtrecht/1bct/restraints.star','2.1.1'],
        #['../reference/ccpNmr/aartUtrecht/1bsh/restraints.star','2.1.1'],
        #['../reference/ccpNmr/aartUtrecht/1fht/restraints.star','2.1.1'],
        #['../reference/ccpNmr/jurgenBmrb/1d8b/restraints.star','2.1.1']
        #['../reference/ccpNmr/jurgenBmrb/1n8x/1n8x.str','3.0']
        ['../reference/ccpNmr/jurgenBmrb/1ao9/1ao9.str', '3.0']
    ]

    for (file, version) in files:

        file = os.path.join(getTopDirectory(), file)

        nmrStarFile = NmrStarFile(file, version=version)

        nmrStarFile.read(verbose=1)

        for constraintFile in nmrStarFile.constraintFiles:
            #print constraintFile.comments
            for constraint in constraintFile.constraints:

                print constraint.Id, constraint.name, constraint.lowerAngle, constraint.upperAngle

                if constraint.errors:
                    print constraint.errors

                for item in constraint.nodes:
                    mlist = []
                    for member in item.members: