Exemplo n.º 1
0
 def set_native_assembly_for_benchmark(self, params):
     """
         Sets the native model for benchmark, by reading the native
         structure and set the rigid bodies.
         @param fn_pdb_native PDB with the native structure
         @param anchored List of True/False values indicating
             if the components of the assembly are anchored. The function
             sets the FIRST anchored component in the (0,0,0) coordinate
             and moves the other components with the same translation
     """
     self.measure_models = True
     self.native_model = IMP.Model()
     if hasattr(params.benchmark, "fn_pdb_native"):
         self.native_assembly = \
             representation.create_assembly_from_pdb(self.native_model,
                           params.benchmark.fn_pdb_native, params.names)
     elif hasattr(params.benchmark, "fn_pdbs_native"):
         self.native_assembly = \
             representation.create_assembly(self.native_model,
                       params.benchmark.fn_pdbs_native, params.names)
     else:
         raise ValueError("set_native_assembly_for_benchmark: Requested " \
             "to set a native assembly for benchmark but did not provide " \
             "its pdb, or the pdbs of the components" )
     self.native_rbs = representation.create_rigid_bodies(self.native_assembly)
     anchor_assembly(self.native_rbs, params.anchor)
Exemplo n.º 2
0
 def set_assembly(self, fn_pdb, names):
     """
         Sets an assembly from a single PDB file. The function assumes that
         the components of the assembly are the chains of the PDB file.
         @param fn_pdb PDB with the file for the asembly
         @param names Names for each of the components (chains)
             of the asembly
     """
     self.assembly = representation.create_assembly_from_pdb(self.model,
                                                          fn_pdb,
                                                          names)
     self.components_rbs = representation.create_rigid_bodies(self.assembly)
     self.not_optimized_rbs = []
Exemplo n.º 3
0
 def set_native_assembly_for_benchmark(self, fn_pdb_native, anchored, names):
     """
         Sets the native model for benchmark, by reading the native
         structure and set the rigid bodies.
         @param fn_pdb_native PDB with the native structure
         @param anchored List of True/False values indicating
             if the components of the assembly are anchored. The function
             sets the FIRST anchored component in the (0,0,0) coordinate
             and moves the other components with the same translation
     """
     self.measure_models = True
     self.native_model = IMP.Model()
     self.native_assembly = \
             representation.create_assembly_from_pdb(self.native_model,
                                                   fn_pdb_native, names)
     self.native_rbs = representation.create_rigid_bodies(
                                             self.native_assembly)
     anchor_assembly(self.native_rbs, anchored)
Exemplo n.º 4
0
 def set_native_assembly_for_benchmark(self, params):
     """
         Sets the native model for benchmark, by reading the native
         structure and set the rigid bodies.
     """
     self.measure_models = True
     self.native_model = IMP.kernel.Model()
     if hasattr(params.benchmark, "fn_pdb_native"):
         self.native_assembly = \
             representation.create_assembly_from_pdb(self.native_model,
                           params.benchmark.fn_pdb_native, params.names)
     elif hasattr(params.benchmark, "fn_pdbs_native"):
         self.native_assembly = \
             representation.create_assembly(self.native_model,
                       params.benchmark.fn_pdbs_native, params.names)
     else:
         raise ValueError("set_native_assembly_for_benchmark: Requested " \
             "to set a native assembly for benchmark but did not provide " \
             "its pdb, or the pdbs of the components" )
     self.native_rbs = representation.create_rigid_bodies(self.native_assembly)
     anchor_assembly(self.native_rbs, params.anchor)