Exemplo n.º 1
0
    def readAtomMap(self):
        # read in the atom map
        logfile = open('{}{}_log.txt'.format(self.filesOut,self.pdbname),'a')

        self.startTimer()
        self.fillerLine()
        print 'Reading in Atom map file...'
        print 'Atom map name: {}{}'.format(self.filesIn,self.map1['filename'])
        logfile.write('atom map name: {}{}\n'.format(self.filesOut,self.map1['filename']))

        self.atmmap,self.atom_indices = readMap(self.filesIn,self.filesOut,self.pdbname,
                                                self.map1['filename'],self.map1['type'],[])  

        self.success()
        self.stopTimer()

        # find number of atoms in structure
        num_atoms = len(self.PDBarray)

        # find atom numbers present in list (repeated atom numbers removed)
        seen = set()
        seen_add = seen.add
        uniq_atms = [x for x in self.atmmap.vxls_val if not (x in seen or seen_add(x))] 
        
        # find set of atoms numbers not present (i.e atoms not assigned to voxels)
        Atms_notpres = set(range(1,num_atoms+1)) - set(uniq_atms)
        print 'Number of atoms not assigned to voxels: %s' %str(len(Atms_notpres))

        # append to log file for this eTrack run
        logfile.write('Number of atoms not assigned to voxels: %s\n' %str(len(Atms_notpres)))
Exemplo n.º 2
0
    def readAtomMap(self):

        # read in the atom map

        self.printStepNumber()
        self.startTimer()
        self.lgwrite(ln = 'Reading atom-tagged map file...')
        self.lgwrite(ln = 'Atom map name: {}'.format(self.map1))

        self.atmmap,self.atomIndices = readMap(dirIn   = self.filesIn,
                                               dirOut  = self.filesOut,
                                               mapName = self.map1,
                                               mapType = 'atom_map',
                                               log     = self.log)  
        self.stopTimer()

        # find number of atoms in structure
        num_atoms = len(self.PDBarray)

        # find atom numbers present in list (repeated atom numbers removed)
        seen = set()
        seen_add = seen.add
        uniq_atms = [x for x in self.atmmap.vxls_val if not (x in seen or seen_add(x))] 
        
        # find set of atoms numbers not present (i.e atoms not assigned to voxels)
        Atms_notpres = set(range(1,num_atoms+1)) - set(uniq_atms)
        self.lgwrite(ln = 'Number of atoms not assigned to voxels: {}'.format(len(Atms_notpres)))
Exemplo n.º 3
0
    def readDensityMap(self):
        # read in the density map
        logfile = open('{}{}_log.txt'.format(self.filesOut,self.pdbname),'a')

        self.startTimer()
        self.fillerLine()
        print 'Reading in Density map file...'
        print 'Density map name: {}{}'.format(self.filesIn,self.map2['filename'])
        logfile.write('density map name: {}{}\n'.format(self.filesIn,self.map2['filename']))

        self.densmap = readMap(self.filesIn,self.filesOut,self.pdbname,
                               self.map2['filename'],self.map2['type'],
                               self.atom_indices)  
        self.success()
        self.stopTimer()
Exemplo n.º 4
0
    def readDensityMap(self):

        # read in the density map

        self.printStepNumber()
        self.startTimer()
        self.lgwrite(ln = 'Reading density map file...')
        self.lgwrite(ln = 'Density map name: {}'.format(self.map2))
        
        self.densmap = readMap(dirIn    = self.filesIn,
                               dirOut   = self.filesOut,
                               mapName  = self.map2,
                               mapType  = 'density_map',
                               atomInds = self.atomIndices,
                               log      = self.log)  
        self.stopTimer()
Exemplo n.º 5
0
    def readFCMap(self):

        # read in the FC (calculated structure factor) density map

        self.printStepNumber()
        self.startTimer()
        self.lgwrite(ln = 'Reading Fcalc density map file...')
        self.lgwrite(ln = 'Density map name: {}'.format(self.map3))

        self.FCmap = readMap(dirIn    = self.filesIn,
                             dirOut   = self.filesOut,
                             mapName  = self.map3,
                             mapType  = 'density_map',
                             atomInds = self.atomIndices,
                             log      = self.log)  

        self.stopTimer()