def dssp_dict_from_pdb_file(in_file, DSSP='dssp'):
 p = subprocess.Popen([DSSP, in_file], universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
 (out, err) = p.communicate()
 if err.strip():
  warnings.warn(err)
  if (not out.strip()):
   raise Exception('DSSP failed to produce an output')
 (out_dict, keys) = _make_dssp_dict(StringIO(out))
 return (out_dict, keys)

def dssp_dict_from_pdb_file ( in_file , DSSP = 'dssp' ) : p = subprocess . Popen ( [ DSSP , in_file ] , universal_newlines = True , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) ( out , err ) = p . communicate ( ) if err . strip ( ) : warnings . warn ( err ) if ( not out . strip ( ) ) : raise Exception ( 'DSSP failed to produce an output' ) ( out_dict , keys ) = _make_dssp_dict ( StringIO ( out ) ) return ( out_dict , keys )
create a dssp dictionary from a pdb file .