def display_molecule(mol, style='ball-and-stick'):
    '''Display the molecule *mol* with the default viewer.

    '''
    v = QtViewer()

    
    if style == 'ball-and-stick':
        bs = v.add_renderer(BallAndStickRenderer,
                            mol.r_array,
                            mol.type_array,
                            mol.bonds)
    elif style == 'vdw':
        sr = v.add_renderer(AtomRenderer, mol.r_array, mol.type_array,
                            backend='impostors')
    else:
        raise Exception("Rendering style unknown")
    
    v.widget.camera.autozoom(mol.r_array)
    v.run()
def display_molecule ( mol , style = 'ball-and-stick' ) : v = QtViewer ( ) if style == 'ball-and-stick' : bs = v . add_renderer ( BallAndStickRenderer , mol . r_array , mol . type_array , mol . bonds ) elif style == 'vdw' : sr = v . add_renderer ( AtomRenderer , mol . r_array , mol . type_array , backend = 'impostors' ) else : raise Exception ( "Rendering style unknown" ) v . widget . camera . autozoom ( mol . r_array ) v . run ( )
Display the molecule *mol* with the default viewer.