def get_surface(pdb_file, PDB_TO_XYZR='pdb_to_xyzr', MSMS='msms'):
 xyz_tmp = tempfile.mktemp()
 PDB_TO_XYZR = (PDB_TO_XYZR + ' %s > %s')
 make_xyz = (PDB_TO_XYZR % (pdb_file, xyz_tmp))
 os.system(make_xyz)
 assert os.path.isfile(xyz_tmp), ('Failed to generate XYZR file using command:\n%s' % make_xyz)
 surface_tmp = tempfile.mktemp()
 MSMS = ((MSMS + ' -probe_radius 1.5 -if %s -of %s > ') + tempfile.mktemp())
 make_surface = (MSMS % (xyz_tmp, surface_tmp))
 os.system(make_surface)
 surface_file = (surface_tmp + '.vert')
 assert os.path.isfile(surface_file), ('Failed to generate surface file using command:\n%s' % make_surface)
 surface = _read_vertex_array(surface_file)
 return surface

def get_surface ( pdb_file , PDB_TO_XYZR = 'pdb_to_xyzr' , MSMS = 'msms' ) : xyz_tmp = tempfile . mktemp ( ) PDB_TO_XYZR = ( PDB_TO_XYZR + ' %s > %s' ) make_xyz = ( PDB_TO_XYZR % ( pdb_file , xyz_tmp ) ) os . system ( make_xyz ) assert os . path . isfile ( xyz_tmp ) , ( 'Failed to generate XYZR file using command:\n%s' % make_xyz ) surface_tmp = tempfile . mktemp ( ) MSMS = ( ( MSMS + ' -probe_radius 1.5 -if %s -of %s > ' ) + tempfile . mktemp ( ) ) make_surface = ( MSMS % ( xyz_tmp , surface_tmp ) ) os . system ( make_surface ) surface_file = ( surface_tmp + '.vert' ) assert os . path . isfile ( surface_file ) , ( 'Failed to generate surface file using command:\n%s' % make_surface ) surface = _read_vertex_array ( surface_file ) return surface
return a numeric array that represents the vertex list of the molecular surface .