def generate_pymol_session(self, bonsai_pdb_content, cutting_pdb_content, bonsai_label = 'Bonsai', cutting_label = 'Cutting', pymol_executable = 'pymol', settings = {}):
        ''' Generates the PyMOL session for the scaffold, model, and design structures.
            Returns this session and the script which generated it.'''
        if not pymol_load_failed:
            b = BatchBuilder(pymol_executable = pymol_executable)

            loop_residues = set()
            for l in cutting_pdb_content.split('\n'):
                if l.startswith('ATOM  ') and l[12:16] == ' C  ':
                    loop_residues.add(l[21:27])
            loop_residues = sorted(loop_residues)

            structures_list = [
                (bonsai_label, bonsai_pdb_content, set()),
                (cutting_label, cutting_pdb_content, loop_residues),
            ]
            settings['Main'] = bonsai_label
            settings['Loop'] = cutting_label
            PSE_files = b.run(LoopRemovalBuilder, [PDBContainer.from_content_triple(structures_list)], settings = settings)
            return PSE_files[0], b.PSE_scripts[0]
def generate_pymol_session ( self , bonsai_pdb_content , cutting_pdb_content , bonsai_label = 'Bonsai' , cutting_label = 'Cutting' , pymol_executable = 'pymol' , settings = { } ) : if not pymol_load_failed : b = BatchBuilder ( pymol_executable = pymol_executable ) loop_residues = set ( ) for l in cutting_pdb_content . split ( '\n' ) : if l . startswith ( 'ATOM  ' ) and l [ 12 : 16 ] == ' C  ' : loop_residues . add ( l [ 21 : 27 ] ) loop_residues = sorted ( loop_residues ) structures_list = [ ( bonsai_label , bonsai_pdb_content , set ( ) ) , ( cutting_label , cutting_pdb_content , loop_residues ) , ] settings [ 'Main' ] = bonsai_label settings [ 'Loop' ] = cutting_label PSE_files = b . run ( LoopRemovalBuilder , [ PDBContainer . from_content_triple ( structures_list ) ] , settings = settings ) return PSE_files [ 0 ] , b . PSE_scripts [ 0 ]
Generates the PyMOL session for the scaffold, model, and design structures.
            Returns this session and the script which generated it.