Ejemplo n.º 1
0
 def __init__(self, model, pdb_file = None,
              naccess_binary = 'naccess', tmp_directory = '/tmp'):
     res_data, atm_data = run_naccess(model, pdb_file, naccess = naccess_binary,
                                      temp_path = tmp_directory)
     self.naccess_atom_dict = process_asa_data(atm_data)
     atom_list = []
     property_dict={}
     property_keys=[]
     property_list=[]
     # Now create a dictionary that maps Atom objects to accessibility
     for chain in model:
         chain_id = chain.get_id()
         for residue in chain:
             res_id = residue.get_id()
             for atom in residue:
                 atom_id = atom.get_id()
                 full_id=(chain_id, res_id, atom_id)
                 if full_id in self.naccess_atom_dict:
                     asa = self.naccess_atom_dict[full_id]
                     property_dict[full_id]=asa
                     property_keys.append((full_id))
                     property_list.append((atom, asa))
                     atom.xtra['EXP_NACCESS']=asa
     AbstractAtomPropertyMap.__init__(self, property_dict, property_keys, 
             property_list)
Ejemplo n.º 2
0
 def __init__(self,
              model,
              pdb_file=None,
              naccess_binary='naccess',
              tmp_directory='/tmp'):
     res_data, atm_data = run_naccess(model,
                                      pdb_file,
                                      naccess=naccess_binary,
                                      temp_path=tmp_directory)
     self.naccess_atom_dict = process_asa_data(atm_data)
     atom_list = []
     property_dict = {}
     property_keys = []
     property_list = []
     # Now create a dictionary that maps Atom objects to accessibility
     for chain in model:
         chain_id = chain.get_id()
         for residue in chain:
             res_id = residue.get_id()
             for atom in residue:
                 atom_id = atom.get_id()
                 full_id = (chain_id, res_id, atom_id)
                 if full_id in self.naccess_atom_dict:
                     asa = self.naccess_atom_dict[full_id]
                     property_dict[full_id] = asa
                     property_keys.append((full_id))
                     property_list.append((atom, asa))
                     atom.xtra['EXP_NACCESS'] = asa
     AbstractAtomPropertyMap.__init__(self, property_dict, property_keys,
                                      property_list)